X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=ncurses%2Fbase%2Flib_newterm.c;h=d7235d29c714570207ac24c25c82925cf1952ed2;hp=fe201d6b8e27054570510fe736c7a549a6e77f27;hb=0be808514502f3149b379d036ab3a83cbb4d4c02;hpb=82a087c4c47679fcfa59bb6d7bdbe587355ba3f6;ds=sidebyside diff --git a/ncurses/base/lib_newterm.c b/ncurses/base/lib_newterm.c index fe201d6b..d7235d29 100644 --- a/ncurses/base/lib_newterm.c +++ b/ncurses/base/lib_newterm.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2005,2006 Free Software Foundation, Inc. * + * Copyright (c) 1998-2006,2007 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -48,7 +48,7 @@ #include /* clear_screen, cup & friends, cur_term */ #include -MODULE_ID("$Id: lib_newterm.c,v 1.64 2006/01/14 15:36:24 tom Exp $") +MODULE_ID("$Id: lib_newterm.c,v 1.65 2007/03/10 23:39:27 tom Exp $") #ifndef ONLCR /* Allows compilation under the QNX 4.2 OS */ #define ONLCR 0 @@ -134,11 +134,6 @@ newterm(NCURSES_CONST char *name, FILE *ofp, FILE *ifp) _nc_handle_sigwinch(0); - /* allow user to set maximum escape delay from the environment */ - if ((value = _nc_getenv_num("ESCDELAY")) >= 0) { - ESCDELAY = value; - } - /* this loads the capability entry, then sets LINES and COLS */ if (setupterm(name, fileno(ofp), &errret) == ERR) { result = 0; @@ -149,6 +144,16 @@ newterm(NCURSES_CONST char *name, FILE *ofp, FILE *ifp) */ current = SP; _nc_set_screen(0); + + /* allow user to set maximum escape delay from the environment */ + if ((value = _nc_getenv_num("ESCDELAY")) >= 0) { +#if USE_REENTRANT + SP->_ESCDELAY = value; +#else + ESCDELAY = value; +#endif + } + if (_nc_setupscreen(LINES, COLS, ofp, filter_mode, slk_format) == ERR) { _nc_set_screen(current); result = 0;