* Copyright (c) 1981 Regents of the University of California.
* %sccs.include.redist.c%
static char sccsid
[] = "@(#)initscr.c 5.9 (Berkeley) %G%";
* Initialize the current and standard screen.
if (setterm(Def_term
) == ERR
)
if ((sp
= getenv("TERM")) == NULL
)
__TRACE("initscr: term = %s\n", sp
);
/* Need either homing or cursor motion for refreshes */
tputs(TI
, 0, __cputchar
);
tputs(VS
, 0, __cputchar
);
(void)signal(SIGTSTP
, tstp
);
__TRACE("initscr: curscr = 0%o\n", curscr
);
__TRACE("initscr: LINES = %d, COLS = %d\n", LINES
, COLS
);
if ((curscr
= newwin(LINES
, COLS
, 0, 0)) == ERR
)
curscr
->flags
&= ~__FULLLINE
;
__TRACE("initscr: stdscr = 0%o\n", stdscr
);
return(stdscr
= newwin(LINES
, COLS
, 0, 0));