Rev | Line | |
---|
[9] | 1 | /* initscr.c - initialize the curses library */
|
---|
| 2 |
|
---|
| 3 | #include <stdlib.h>
|
---|
| 4 | #include <curses.h>
|
---|
| 5 | #include "curspriv.h"
|
---|
| 6 |
|
---|
| 7 | WINDOW *initscr()
|
---|
| 8 | {
|
---|
| 9 | char *term;
|
---|
| 10 |
|
---|
| 11 | if ((term = getenv("TERM")) == NULL) return NULL;
|
---|
| 12 | setterm(term);
|
---|
| 13 | gettmode();
|
---|
| 14 | if ((_cursvar.tmpwin = newwin(LINES, COLS, 0, 0)) == NULL) return NULL;
|
---|
| 15 | if ((curscr = newwin(LINES, COLS, 0, 0)) == NULL) return NULL;
|
---|
| 16 | if ((stdscr = newwin(LINES, COLS, 0, 0)) == NULL) return NULL;
|
---|
| 17 | clearok(curscr, TRUE);
|
---|
| 18 | return(stdscr);
|
---|
| 19 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.