]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - ncurses/tinfo/lib_setup.c
ncurses 6.1 - patch 20180707
[ncurses.git] / ncurses / tinfo / lib_setup.c
index daf51a7e259cb67d6891e91e968902cf2915f24f..286a3c66559399196c2b68d21c587991990a54de 100644 (file)
@@ -48,7 +48,7 @@
 #include <locale.h>
 #endif
 
-MODULE_ID("$Id: lib_setup.c,v 1.191 2018/03/04 01:06:34 tom Exp $")
+MODULE_ID("$Id: lib_setup.c,v 1.194 2018/06/30 19:40:27 tom Exp $")
 
 /****************************************************************************
  *
@@ -543,9 +543,9 @@ _nc_get_locale(void)
      */
     env = setlocale(LC_CTYPE, 0);
 #else
-    if (((env = getenv("LC_ALL")) != 0 && *env != '\0')
+    if (((env = getenv("LANG")) != 0 && *env != '\0')
        || ((env = getenv("LC_CTYPE")) != 0 && *env != '\0')
-       || ((env = getenv("LANG")) != 0 && *env != '\0')) {
+       || ((env = getenv("LC_ALL")) != 0 && *env != '\0')) {
        ;
     }
 #endif
@@ -560,7 +560,7 @@ NCURSES_EXPORT(int)
 _nc_unicode_locale(void)
 {
     int result = 0;
-#if defined(__MINGW32__) && USE_WIDEC_SUPPORT
+#if defined(_WIN32) && USE_WIDEC_SUPPORT
     result = 1;
 #elif HAVE_LANGINFO_CODESET
     char *env = nl_langinfo(CODESET);
@@ -618,7 +618,7 @@ _nc_locale_breaks_acs(TERMINAL *termp)
 
 NCURSES_EXPORT(int)
 TINFO_SETUP_TERM(TERMINAL **tp,
-                NCURSES_CONST char *tname,
+                const char *tname,
                 int Filedes,
                 int *errret,
                 int reuse)
@@ -921,7 +921,7 @@ new_prescr(void)
  * the same TERMINAL data (see comment).
  */
 NCURSES_EXPORT(int)
-_nc_setupterm(NCURSES_CONST char *tname,
+_nc_setupterm(const char *tname,
              int Filedes,
              int *errret,
              int reuse)
@@ -949,7 +949,7 @@ _nc_setupterm(NCURSES_CONST char *tname,
  *     Make cur_term point to the structure.
  */
 NCURSES_EXPORT(int)
-setupterm(NCURSES_CONST char *tname, int Filedes, int *errret)
+setupterm(const char *tname, int Filedes, int *errret)
 {
     START_TRACE();
     return _nc_setupterm(tname, Filedes, errret, FALSE);