xref: /original-bsd/usr.bin/window/wwend.c (revision 541b0a81)
1 /*
2  * Copyright (c) 1983, 1993
3  *	The Regents of the University of California.  All rights reserved.
4  *
5  * This code is derived from software contributed to Berkeley by
6  * Edward Wang at The University of California, Berkeley.
7  *
8  * %sccs.include.redist.c%
9  */
10 
11 #ifndef lint
12 static char sccsid[] = "@(#)wwend.c	8.1 (Berkeley) 06/06/93";
13 #endif /* not lint */
14 
15 #include "ww.h"
16 #include "tt.h"
17 
18 /*ARGSUSED*/
19 wwend(exit)
20 {
21 	if (tt.tt_checkpoint) {
22 		(void) alarm(0);
23 		wwdocheckpoint = 0;
24 	}
25 	xxend();
26 	(void) wwsettty(0, &wwoldtty);
27 #ifdef TERMINFO
28 	if (exit)
29 		wwterminfoend();
30 #endif
31 }
32 
33 void
34 wwquit()
35 {
36 	wwend(1);
37 	exit(1);
38 }
39