aboutsummaryrefslogtreecommitdiff
path: root/contrib/ncurses/ncurses/base/lib_newterm.c
diff options
context:
space:
mode:
authorRong-En Fan <rafan@FreeBSD.org>2008-05-09 02:28:12 +0000
committerRong-En Fan <rafan@FreeBSD.org>2008-05-09 02:28:12 +0000
commitaa59d4d4c5dda7e1c6f9dc0cc6edc58992a525c7 (patch)
tree502fa0a691368fb8b60b62eef10b3f3332efe830 /contrib/ncurses/ncurses/base/lib_newterm.c
parentd8977eaf361f5fdc1261c3f3524988f661ed926e (diff)
downloadsrc-aa59d4d4c5dda7e1c6f9dc0cc6edc58992a525c7.tar.gz
src-aa59d4d4c5dda7e1c6f9dc0cc6edc58992a525c7.zip
Import ncurses 5.6-20080503 snapshot onto the vender branchvendor/ncurses/5.6-20080503
Notes
Notes: svn path=/vendor/ncurses/dist/; revision=178866 svn path=/vendor/ncurses/5.6-20080503/; revision=178868; tag=vendor/ncurses/5.6-20080503
Diffstat (limited to 'contrib/ncurses/ncurses/base/lib_newterm.c')
-rw-r--r--contrib/ncurses/ncurses/base/lib_newterm.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/contrib/ncurses/ncurses/base/lib_newterm.c b/contrib/ncurses/ncurses/base/lib_newterm.c
index f52562cec106..3620a3fdbf2b 100644
--- a/contrib/ncurses/ncurses/base/lib_newterm.c
+++ b/contrib/ncurses/ncurses/base/lib_newterm.c
@@ -48,7 +48,7 @@
#include <term.h> /* clear_screen, cup & friends, cur_term */
#include <tic.h>
-MODULE_ID("$Id: lib_newterm.c,v 1.68 2008/01/12 20:24:40 tom Exp $")
+MODULE_ID("$Id: lib_newterm.c,v 1.69 2008/04/12 18:15:04 tom Exp $")
#ifndef ONLCR /* Allows compilation under the QNX 4.2 OS */
#define ONLCR 0
@@ -123,17 +123,17 @@ newterm(NCURSES_CONST char *name, FILE *ofp, FILE *ifp)
{
int value;
int errret;
- int slk_format = _nc_globals.slk_format;
SCREEN *current;
SCREEN *result = 0;
START_TRACE();
T((T_CALLED("newterm(\"%s\",%p,%p)"), name, ofp, ifp));
+ _nc_lock_global(set_SP);
/* this loads the capability entry, then sets LINES and COLS */
- if (setupterm(name, fileno(ofp), &errret) == ERR) {
- result = 0;
- } else {
+ if (setupterm(name, fileno(ofp), &errret) != ERR) {
+ int slk_format = _nc_globals.slk_format;
+
/*
* This actually allocates the screen structure, and saves the original
* terminal settings.
@@ -143,11 +143,7 @@ newterm(NCURSES_CONST char *name, FILE *ofp, FILE *ifp)
/* 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
+ set_escdelay(value);
}
if (_nc_setupscreen(LINES,
@@ -216,5 +212,6 @@ newterm(NCURSES_CONST char *name, FILE *ofp, FILE *ifp)
result = SP;
}
}
+ _nc_unlock_global(set_SP);
returnSP(result);
}