1994-10-07 08:58:58 +00:00
|
|
|
|
|
|
|
/* This work is copyrighted. See COPYRIGHT.OLD & COPYRIGHT.NEW for *
|
|
|
|
* details. If they are missing then this copy is in violation of *
|
|
|
|
* the copyright conditions. */
|
|
|
|
|
|
|
|
/*
|
|
|
|
** lib_initscr.c
|
|
|
|
**
|
|
|
|
** The routine initscr().
|
|
|
|
**
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include "curses.priv.h"
|
|
|
|
|
|
|
|
WINDOW *initscr()
|
|
|
|
{
|
|
|
|
#ifdef TRACE
|
|
|
|
_init_trace();
|
|
|
|
|
1994-12-02 06:40:24 +00:00
|
|
|
T(("initscr() called"));
|
1994-10-07 08:58:58 +00:00
|
|
|
#endif
|
1994-12-02 06:40:24 +00:00
|
|
|
|
1994-10-07 08:58:58 +00:00
|
|
|
if (newterm(getenv("TERM"), stdout, stdin) == NULL)
|
1994-12-02 06:40:24 +00:00
|
|
|
return NULL;
|
1994-10-07 08:58:58 +00:00
|
|
|
else {
|
|
|
|
def_shell_mode();
|
|
|
|
def_prog_mode();
|
|
|
|
return(stdscr);
|
|
|
|
}
|
|
|
|
}
|