#include <sys/termio.h> /* needed for ISC */
#endif
-MODULE_ID("$Id: lib_initscr.c,v 1.21 1998/02/11 12:14:00 tom Exp $")
+MODULE_ID("$Id: lib_initscr.c,v 1.26 1998/12/19 23:10:09 tom Exp $")
WINDOW *initscr(void)
{
static bool initialized = FALSE;
-const char *name;
+NCURSES_CONST char *name;
+int value;
T((T_CALLED("initscr()")));
/* Portable applications must not call initscr() more than once */
}
/* allow user to set maximum escape delay from the environment */
- if ((name = getenv("ESCDELAY")) != 0)
- ESCDELAY = atoi(getenv("ESCDELAY"));
+ if ((value = _nc_getenv_num("ESCDELAY")) >= 0) {
+ ESCDELAY = value;
+ }
/* def_shell_mode - done in newterm/_nc_setupscreen */
def_prog_mode();
}
returnWin(stdscr);
}
-
-char *termname(void)
-{
-char *term = getenv("TERM");
-static char ret[MAX_ALIAS];
-
- T(("termname() called"));
-
- if (term != 0) {
- (void) strncpy(ret, term, sizeof(ret) - 1);
- term = ret;
- }
- return term;
-}