]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - ncurses/tinfo/lib_setup.c
ncurses 6.0 - patch 20150725
[ncurses.git] / ncurses / tinfo / lib_setup.c
index 522929009c1f7a9612265507b6d4bc4807a1663f..0a0a1f5badb50acade9f406776c5a5708c82509b 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 1998-2013,2014 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2014,2015 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 <locale.h>
 #endif
 
-MODULE_ID("$Id: lib_setup.c,v 1.160 2014/04/26 18:47:20 juergen Exp $")
+MODULE_ID("$Id: lib_setup.c,v 1.164 2015/06/27 18:10:55 tom Exp $")
 
 /****************************************************************************
  *
@@ -574,10 +574,11 @@ NCURSES_EXPORT(int)
 _nc_locale_breaks_acs(TERMINAL * termp)
 {
     const char *env_name = "NCURSES_NO_UTF8_ACS";
-    char *env;
+    const char *env;
     int value;
     int result = 0;
 
+    T((T_CALLED("_nc_locale_breaks_acs:%d"), result));
     if (getenv(env_name) != 0) {
        result = _nc_getenv_num(env_name);
     } else if ((value = tigetnum("U8")) >= 0) {
@@ -597,7 +598,7 @@ _nc_locale_breaks_acs(TERMINAL * termp)
            }
        }
     }
-    return result;
+    returnCode(result);
 }
 
 NCURSES_EXPORT(int)
@@ -705,7 +706,7 @@ TINFO_SETUP_TERM(TERMINAL ** tp,
            termp->Filedes = (short) Filedes;
            termp->_termname = strdup(tname);
        } else {
-           ret_error0(TGETENT_ERR,
+           ret_error0(errret ? *errret : TGETENT_ERR,
                       "Could not find any driver to handle this terminal.\n");
        }
 #else
@@ -864,5 +865,6 @@ _nc_setupterm(NCURSES_CONST char *tname,
 NCURSES_EXPORT(int)
 setupterm(NCURSES_CONST char *tname, int Filedes, int *errret)
 {
+    START_TRACE();
     return _nc_setupterm(tname, Filedes, errret, FALSE);
 }