SAFERHANGUP

This is an initial round of SAFERHANGUP hangup changes.  It introduces
SAFERHANGUP, provides the core framework, and enables it for UNIX.

Window-port changes are provided for win/tty, win/X11 and win/gnome.  Qt
changes should be forthcoming after having Warwick look at them.
window.doc is updated so windowport maintainers have an clue what needs to
be done to support SAFERHANGUP.
This commit is contained in:
cohrs
2003-09-19 03:15:49 +00:00
parent 1382c6c028
commit 40b5b12673
12 changed files with 178 additions and 42 deletions
+10 -6
View File
@@ -155,19 +155,23 @@ getlock()
(void) printf("\nThere is already a game in progress under your name.");
(void) printf(" Destroy old game? [yn] ");
(void) fflush(stdout);
c = getchar();
(void) putchar(c);
(void) fflush(stdout);
while (getchar() != '\n') ; /* eat rest of line and newline */
if ((c = getchar()) != EOF) {
int tmp;
(void) putchar(c);
(void) fflush(stdout);
while ((tmp = getchar()) != '\n' && tmp != EOF)
; /* eat rest of line and newline */
}
}
if(c == 'y' || c == 'Y')
if(c == 'y' || c == 'Y') {
if(eraseoldlocks())
goto gotlock;
else {
unlock_file(HLOCK);
error("Couldn't destroy old game.");
}
else {
} else {
unlock_file(HLOCK);
error("%s", "");
}