diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 1998-10-31 06:30:32 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 1998-10-31 06:30:32 +0000 |
commit | 6b2a1c68ae261f9418c63985441e14381a10cd12 (patch) | |
tree | 4ae6e697e6a9c43cbe1974319f6b1f7854838e02 /lib/libcurses/lib_initscr.c | |
parent | 774a90a035f055fa6dcf304c080c05bf13a095ca (diff) |
update to ncurses 4.2-981017
Diffstat (limited to 'lib/libcurses/lib_initscr.c')
-rw-r--r-- | lib/libcurses/lib_initscr.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/lib/libcurses/lib_initscr.c b/lib/libcurses/lib_initscr.c index 2e09588b491..8f9400788c4 100644 --- a/lib/libcurses/lib_initscr.c +++ b/lib/libcurses/lib_initscr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lib_initscr.c,v 1.5 1998/09/13 19:16:27 millert Exp $ */ +/* $OpenBSD: lib_initscr.c,v 1.6 1998/10/31 06:30:29 millert Exp $ */ /**************************************************************************** * Copyright (c) 1998 Free Software Foundation, Inc. * @@ -47,14 +47,13 @@ #include <sys/termio.h> /* needed for ISC */ #endif -MODULE_ID("$From: lib_initscr.c,v 1.23 1998/08/09 00:18:48 tom Exp $") +MODULE_ID("$From: lib_initscr.c,v 1.25 1998/09/19 21:39:25 tom Exp $") WINDOW *initscr(void) { static bool initialized = FALSE; NCURSES_CONST char *name; -char *p; -long l; +int value; T((T_CALLED("initscr()"))); /* Portable applications must not call initscr() more than once */ @@ -70,11 +69,8 @@ long l; } /* allow user to set maximum escape delay from the environment */ - if ((name = getenv("ESCDELAY")) != 0) { - l = strtol(name, &p, 10); - if (p != name && *p == '\0' && l != LONG_MIN && - l <= INT_MAX) - ESCDELAY = (int)l; + if ((value = _nc_getenv_num("ESCDELAY")) >= 0) { + ESCDELAY = value; } /* def_shell_mode - done in newterm/_nc_setupscreen */ |