To keep it simple, 'm' quits out of watching.
git-svn-id: svn://katsu.triplehelix.org/dgamelaunch/trunk@107
db0b04b0-f4d1-0310-9a6d-
de3e77497b0e
fprintf (user_spool, "%s:%s\n", me->username, message);
- fl.l_type = F_UNLCK;
-
- if (fcntl (fileno (user_spool), F_SETLK, &fl) == -1)
- mvaddstr (10, 1, "Couldn't unlock the file! Oh well.");
+ /*
+ * Don't unlock the file ourselves, this way it will be done automatically
+ * after all data has been written. (Using file locking with stdio is icky.)
+ */
fclose (user_spool);
+ mvaddstr (9, 1, "Message sent successfully ");
+ refresh ();
+ sleep (2);
+
return;
}
{
initncurses ();
domailuser (chosen_name);
+ /* XXX jilles: just quit out after mail for now */
+#if 0
endwin ();
- ttyplay_main (ttyfile_local, 1, 0);
+ ttyplay_main (ttyfile_local, 1, 0); /* ICK! Recursive */
+#endif
return 0;
}
break;