minix/lib/curses/initscr.c
2005-04-21 14:53:53 +00:00

19 lines
479 B
C
Executable file

/* initscr.c - initialize the curses library */
#include <stdlib.h>
#include <curses.h>
#include "curspriv.h"
WINDOW *initscr()
{
char *term;
if ((term = getenv("TERM")) == NULL) return NULL;
setterm(term);
gettmode();
if ((_cursvar.tmpwin = newwin(LINES, COLS, 0, 0)) == NULL) return NULL;
if ((curscr = newwin(LINES, COLS, 0, 0)) == NULL) return NULL;
if ((stdscr = newwin(LINES, COLS, 0, 0)) == NULL) return NULL;
clearok(curscr, TRUE);
return(stdscr);
}