summaryrefslogtreecommitdiffstats
path: root/lib/libcurses/base
diff options
context:
space:
mode:
authormillert <millert@openbsd.org>2000-07-24 04:06:09 +0000
committermillert <millert@openbsd.org>2000-07-24 04:06:09 +0000
commit2a9262cfa0c64e36a033f83af8d3756af1bb0e57 (patch)
treebd7eebec09718dc6a1455d5b35dd937c44bb3da1 /lib/libcurses/base
parentRename move() to moveplayer() to avoid clashing with curses; (diff)
downloadwireguard-openbsd-2a9262cfa0c64e36a033f83af8d3756af1bb0e57.tar.xz
wireguard-openbsd-2a9262cfa0c64e36a033f83af8d3756af1bb0e57.zip
Update to ncurses-5.1-20000722
Diffstat (limited to 'lib/libcurses/base')
-rw-r--r--lib/libcurses/base/lib_newterm.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/lib/libcurses/base/lib_newterm.c b/lib/libcurses/base/lib_newterm.c
index 23a5d3d892d..6e01e19a271 100644
--- a/lib/libcurses/base/lib_newterm.c
+++ b/lib/libcurses/base/lib_newterm.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lib_newterm.c,v 1.9 2000/07/10 03:06:15 millert Exp $ */
+/* $OpenBSD: lib_newterm.c,v 1.10 2000/07/24 04:06:10 millert Exp $ */
/****************************************************************************
* Copyright (c) 1998,1999,2000 Free Software Foundation, Inc. *
@@ -49,7 +49,7 @@
#include <term.h> /* clear_screen, cup & friends, cur_term */
#include <tic.h>
-MODULE_ID("$From: lib_newterm.c,v 1.46 2000/07/01 22:26:22 tom Exp $")
+MODULE_ID("$From: lib_newterm.c,v 1.47 2000/07/22 22:33:34 Bruno.Haible Exp $")
#ifndef ONLCR /* Allows compilation under the QNX 4.2 OS */
#define ONLCR 0
@@ -200,10 +200,14 @@ newterm(NCURSES_CONST char *name, FILE * ofp, FILE * ifp)
*/
{
char *s;
- if (((s = getenv("LC_ALL")) != 0
- || (s = getenv("LC_CTYPE")) != 0
- || (s = getenv("LANG")) != 0)
- && strstr(s, "UTF-8") != 0) {
+ s = getenv("LC_ALL");
+ if (s == NULL || *s == '\0') {
+ s = getenv("LC_CTYPE");
+ if (s == NULL || *s == '\0') {
+ s = getenv("LANG");
+ }
+ }
+ if (s != NULL && *s != '\0' && strstr(s, "UTF-8") != NULL) {
SP->_outch = _nc_utf8_outch;
}
}