diff options
| author | Tatsuya Kinoshita <tats@debian.org> | 2013-10-13 00:47:34 +0000 | 
|---|---|---|
| committer | Tatsuya Kinoshita <tats@debian.org> | 2013-10-13 00:58:51 +0000 | 
| commit | f9ad57b0d32ef5033a9281b720ae6d8c54855b63 (patch) | |
| tree | 05efc5866c7642033d5c59c4dc54faee48e435a9 | |
| parent | Merge from upstream on 2012-05-22 (diff) | |
| download | w3m-f9ad57b0d32ef5033a9281b720ae6d8c54855b63.tar.gz w3m-f9ad57b0d32ef5033a9281b720ae6d8c54855b63.zip | |
Do not fail when LANG is not set
Check whether the value of LC_ALL, LC_CTYPE or LANG is not NULL in
check_cygwin_console().
Bug: https://sourceforge.net/p/w3m/patches/66/
Diffstat (limited to '')
| -rw-r--r-- | terms.c | 5 | 
1 files changed, 4 insertions, 1 deletions
| @@ -222,6 +222,7 @@ static void  check_cygwin_console(void)  {      char *term = getenv("TERM"); +    char *ctype;      HANDLE hWnd;      if (term == NULL) @@ -236,7 +237,9 @@ check_cygwin_console(void)  		isLocalConsole = 1;  	    }  	} -	if (strncmp(getenv("LANG"), "ja", 2) == 0) { +	if ((ctype = getenv("LC_ALL") || +	     ctype = getenv("LC_CTYPE") || +	     ctype = getenv("LANG")) && strncmp(ctype, "ja", 2) == 0) {  	    isWinConsole = TERM_CYGWIN_RESERVE_IME;  	}  #ifdef SUPPORT_WIN9X_CONSOLE_MBCS | 
