]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - ncurses/tinfo/lib_setup.c
ncurses 5.9 - patch 20110807
[ncurses.git] / ncurses / tinfo / lib_setup.c
index 992b8c7110a8d70ff6fbc80fe4f92c1d85849040..e4edd04fa9f3569d8d7da4a74b8104f1d994b5d1 100644 (file)
@@ -47,7 +47,7 @@
 #include <locale.h>
 #endif
 
-MODULE_ID("$Id: lib_setup.c,v 1.136 2011/04/16 15:32:45 tom Exp $")
+MODULE_ID("$Id: lib_setup.c,v 1.139 2011/08/05 21:56:40 tom Exp $")
 
 /****************************************************************************
  *
@@ -221,6 +221,7 @@ NCURSES_SP_NAME(use_env) (NCURSES_SP_DCLx bool f)
 {
     T((T_CALLED("use_env(%p,%d)"), (void *) SP_PARM, (int) f));
 #if NCURSES_SP_FUNCS
+    START_TRACE();
     if (IsPreScreen(SP_PARM)) {
        SP_PARM->_use_env = f;
     }
@@ -235,6 +236,7 @@ NCURSES_EXPORT(void)
 use_env(bool f)
 {
     T((T_CALLED("use_env(%d)"), (int) f));
+    START_TRACE();
     _nc_prescreen.use_env = f;
     returnVoid;
 }
@@ -477,7 +479,7 @@ _nc_tinfo_cmdch(TERMINAL * termp, char proto)
     if ((tmp = getenv("CC")) != 0 && strlen(tmp) == 1) {
        CC = *tmp;
        for_each_string(i, &(termp->type)) {
-           for (tmp = termp->type.Strings[i]; *tmp; tmp++) {
+           for (tmp = termp->type.Strings[i]; tmp && *tmp; tmp++) {
                if (*tmp == proto)
                    *tmp = CC;
            }
@@ -547,7 +549,7 @@ _nc_locale_breaks_acs(TERMINAL * termp)
     int value;
     int result = 0;
 
-    if ((env = getenv(env_name)) != 0) {
+    if (getenv(env_name) != 0) {
        result = _nc_getenv_num(env_name);
     } else if ((value = tigetnum("U8")) >= 0) {
        result = value;         /* use extension feature */