|
|
1.1 root 1: /*********************************************************************
2: * COPYRIGHT NOTICE *
3: **********************************************************************
4: * This software is copyright (C) 1982 by Pavel Curtis *
5: * *
6: * Permission is granted to reproduce and distribute *
7: * this file by any means so long as no fee is charged *
8: * above a nominal handling fee and so long as this *
9: * notice is always included in the copies. *
10: * *
11: * Other rights are reserved except as explicitly granted *
12: * by written permission of the author. *
13: * Pavel Curtis *
14: * Computer Science Dept. *
15: * 405 Upson Hall *
16: * Cornell University *
17: * Ithaca, NY 14853 *
18: * *
19: * Ph- (607) 256-4934 *
20: * *
21: * Pavel.Cornell@Udel-Relay (ARPAnet) *
22: * decvax!cornell!pavel (UUCPnet) *
23: *********************************************************************/
24:
25: /*
26: ** lib_endwin.c
27: **
28: ** The routine endwin().
29: **
30: ** $Log: lib_endwin.c,v $
31: * Revision 1.9 93/04/12 14:13:36 bin
32: * Udo: third color update
33: *
34: * Revision 1.3 92/06/10 14:16:50 bin
35: * changed ref to sys/fcntl.h
36: *
37: * Revision 1.2 92/04/13 14:37:24 bin
38: * update by vlad
39: *
40: * Revision 2.2 91/02/09 13:54:50 munk
41: * pavel don't output reset strings 1..3 ? (added)
42: * and added code to mark the screen as clear
43: *
44: * Revision 2.1 82/10/25 14:47:13 pavel
45: * Added Copyright Notice
46: *
47: * Revision 2.0 82/10/25 13:45:05 pavel
48: * Beta-one Test Release
49: *
50: **
51: */
52:
53: #ifdef RCSHDR
54: static char RCSid[] =
55: "$Header: /src386/usr/lib/ncurses/RCS/lib_endwin.c,v 1.9 93/04/12 14:13:36 bin Exp Locker: bin $";
56: #endif
57:
58: #ifdef COHERENT
59: #include <fcntl.h>
60: #else
61: #include <fcntl.h>
62: #endif
63: #include "term.h"
64: #include "curses.h"
65: #include "curses.priv.h"
66:
67:
68: static
69: outc(ch)
70: char ch;
71: {
72: putc(ch, SP->_ofp);
73: }
74:
75:
76: endwin()
77: {
78: #ifdef TRACE
79: if (_tracing)
80: _tracef("endwin() called");
81: #endif
82:
83: resetterm();
84:
85: mvcur(-1, -1, LINES - 1, 0);
86:
87: curscr->_clear = TRUE;
88:
89: if (curscr && (curscr->_attrs != A_NORMAL))
90: {
91: vidputs(A_NORMAL, outc);
92:
93: curscr->_attrs = A_NORMAL;
94: }
95:
96: if (exit_ca_mode)
97: tputs(exit_ca_mode, 1, outc);
98: if (reset_1string)
99: tputs(reset_1string, 1, outc);
100: if (reset_2string)
101: tputs(reset_2string, 1, outc);
102: if (reset_3string)
103: tputs(reset_3string, 1, outc);
104:
105: fflush(SP->_ofp);
106: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.