projects
/
unix-history
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
modern syntax for inits. When ANSI cpp comes will need more work.
[unix-history]
/
usr
/
src
/
games
/
cribbage
/
io.c
diff --git
a/usr/src/games/cribbage/io.c
b/usr/src/games/cribbage/io.c
index
945cfef
..
708dbd2
100644
(file)
--- a/
usr/src/games/cribbage/io.c
+++ b/
usr/src/games/cribbage/io.c
@@
-1,6
+1,16
@@
+/*
+ * Copyright (c) 1980 Regents of the University of California.
+ * All rights reserved. The Berkeley software License Agreement
+ * specifies the terms and conditions for redistribution.
+ */
+
+#ifndef lint
+static char sccsid[] = "@(#)io.c 5.1 (Berkeley) %G%";
+#endif not lint
+
# include <curses.h>
# include <ctype.h>
# include <curses.h>
# include <ctype.h>
-# include <
unctr
l.h>
+# include <
signa
l.h>
# include "deck.h"
# include "cribbage.h"
# include "cribcur.h"
# include "deck.h"
# include "cribbage.h"
# include "cribcur.h"
@@
-546,3
+556,17
@@
getline()
stdscr = oscr;
return linebuf;
}
stdscr = oscr;
return linebuf;
}
+
+/*
+ * bye:
+ * Leave the program, cleaning things up as we go.
+ */
+bye()
+{
+ signal(SIGINT, SIG_IGN);
+ mvcur(0, COLS - 1, LINES - 1, 0);
+ fflush(stdout);
+ endwin();
+ putchar('\n');
+ exit(1);
+}