initscr(3cur)
NAME
initscr − initialize terminal environment
SYNTAX
initscr()
DESCRIPTION
This routine determines the terminal type, initializes all curses data structures and allocates memory space for the windows. It also arranges that the first call to the refresh routine will clear the screen.
The first routine called in a program using curses routines should almost always be initscr. If errors occur, initscr will write an appropriate error message to standard error and exit. If the program needs an indication of error conditions, newterm should be used instead of initscr.
Note that the curses program should only call initscr once as it may overflow core memory if it is called repeatedly. If this does occur, ERR is returned.
SEE ALSO
Subroutines