# include "curses.ext" /* * This routine initializes the current and standard screen. * * 3/5/81 (Berkeley) @(#)initscr.c 1.2 */ WINDOW * initscr() { reg char *sp; # ifdef DEBUG fprintf(outf, "INITSCR()\n"); # endif setterm(); _puts(TI); _puts(VS); if (curscr != NULL) { # ifdef DEBUG fprintf(outf, "INITSCR: curscr = 0%o\n", curscr); # endif delwin(curscr); } # ifdef DEBUG fprintf(outf, "LINES = %d, COLS = %d\n", LINES, COLS); # endif if ((curscr = newwin(LINES, COLS, 0, 0)) == ERR) return ERR; curscr->_clear = TRUE; curscr->_scroll = SD; /* wozmoven li apparatnyj SCROLL */ if (stdscr != NULL) { # ifdef DEBUG fprintf(outf, "INITSCR: stdscr = 0%o\n", stdscr); # endif delwin(stdscr); } stdscr = newwin(LINES, COLS, 0, 0); return stdscr; }