xref: /original-bsd/lib/libcurses/endwin.c (revision e59fb703)
1 /*
2  * Copyright (c) 1981 Regents of the University of California.
3  * All rights reserved.
4  *
5  * %sccs.include.redist.c%
6  */
7 
8 #ifndef lint
9 static char sccsid[] = "@(#)endwin.c	5.4 (Berkeley) 06/01/90";
10 #endif /* not lint */
11 
12 /*
13  * Clean things up before exiting
14  *
15  */
16 
17 # include	"curses.ext"
18 
19 endwin()
20 {
21 	resetty();
22 	_puts(VE);
23 	_puts(TE);
24 	if (curscr) {
25 		if (curscr->_flags & _STANDOUT) {
26 			_puts(SE);
27 			curscr->_flags &= ~_STANDOUT;
28 		}
29 		_endwin = TRUE;
30 	}
31 }
32