2 * Copyright 2001 Sun Microsystems, Inc. All rights reserved.
3 * Use is subject to license terms.
6 /* Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T */
7 /* All Rights Reserved */
10 * Copyright (c) 1980 Regents of the University of California.
11 * All rights reserved. The Berkeley software License Agreement
12 * specifies the terms and conditions for redistribution.
15 #pragma ident "%Z%%M% %I% %E% SMI"
21 sccsid
[] = "@(#)initscr.c 1.6 88/02/08 SMI"; /* from UCB 5.1 85/06/07 */
30 * This routine initializes the current and standard screen.
39 fprintf(outf
, "INITSCR()\n");
42 (void) setterm(Def_term
);
45 if ((sp
= getenv("TERM")) == NULL
)
49 fprintf(outf
, "INITSCR: term = %s\n", sp
);
55 (void) signal(SIGTSTP
, (void(*)(int))tstp
);
59 fprintf(outf
, "INITSCR: curscr = 0%o\n", curscr
);
61 (void) delwin(curscr
);
64 fprintf(outf
, "LINES = %d, COLS = %d\n", LINES
, COLS
);
66 if ((curscr
= newwin(LINES
, COLS
, 0, 0)) == ERR
)
68 clearok(curscr
, TRUE
);
69 curscr
->_flags
&= ~_FULLLINE
;
72 fprintf(outf
, "INITSCR: stdscr = 0%o\n", stdscr
);
74 (void) delwin(stdscr
);
76 stdscr
= newwin(LINES
, COLS
, 0, 0);