#include <locale.h>
#endif
-MODULE_ID("$Id: lib_setup.c,v 1.148 2012/07/21 18:05:41 tom Exp $")
+MODULE_ID("$Id: lib_setup.c,v 1.151 2012/11/18 00:24:56 tom Exp $")
/****************************************************************************
*
_nc_unicode_locale(void)
{
int result = 0;
-#if HAVE_LANGINFO_CODESET
+#if defined(__MINGW32__) && USE_WIDEC_SUPPORT
+ result = 1;
+#elif HAVE_LANGINFO_CODESET
char *env = nl_langinfo(CODESET);
result = !strcmp(env, "UTF-8");
T(("_nc_unicode_locale(%s) ->%d", env, result));
if (tname == 0) {
tname = getenv("TERM");
if (tname == 0 || *tname == '\0') {
+#ifdef USE_TERM_DRIVER
+ tname = "unknown";
+#else
ret_error0(TGETENT_ERR, "TERM environment variable not set.\n");
+#endif
}
}
if ((VALID_STRING(cursor_address)
|| (VALID_STRING(cursor_down) && VALID_STRING(cursor_home)))
&& VALID_STRING(clear_screen)) {
+ free(termp);
ret_error1(TGETENT_YES, "terminal is not really generic.\n", tname);
} else {
+ free(termp);
ret_error1(TGETENT_NO, "I need something more specific.\n", tname);
}
} else if (hard_copy) {
+ free(termp);
ret_error1(TGETENT_YES, "I can't handle hardcopy terminals.\n", tname);
}
#endif