X-Git-Url: http://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=ncurses%2Fbase%2Flib_initscr.c;fp=ncurses%2Flib_initscr.c;h=9a89a077cd44822bf0baf696f4477d8d670ec18c;hp=e33f0b345de7f1713ed8464c3acae80cb1268e0f;hb=refs%2Ftags%2Fv5.0;hpb=661078ddbde3ce0f3b06e95642fbb9b5fef7dca1 diff --git a/ncurses/lib_initscr.c b/ncurses/base/lib_initscr.c similarity index 89% rename from ncurses/lib_initscr.c rename to ncurses/base/lib_initscr.c index e33f0b34..9a89a077 100644 --- a/ncurses/lib_initscr.c +++ b/ncurses/base/lib_initscr.c @@ -45,12 +45,13 @@ #include /* 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 */ @@ -66,25 +67,12 @@ const char *name; } /* 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; -}