diff options
Diffstat (limited to 'games/morse')
-rw-r--r-- | games/morse/morse.6 | 2 | ||||
-rw-r--r-- | games/morse/morse.c | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/games/morse/morse.6 b/games/morse/morse.6 index 42db42a..6b7f708 100644 --- a/games/morse/morse.6 +++ b/games/morse/morse.6 @@ -138,8 +138,8 @@ speaker device file .El .Sh ENVIRONMENT .Bl -tag -width LC_CTYPE -compact -.It Ev LC_CTYPE .It Ev LC_ALL +.It Ev LC_CTYPE .It Ev LANG If one of these variables (in this priority) is set to a locale ending in .Ql KOI8-R , diff --git a/games/morse/morse.c b/games/morse/morse.c index 38293a7..6579e8d 100644 --- a/games/morse/morse.c +++ b/games/morse/morse.c @@ -318,9 +318,9 @@ main(int argc, char **argv) argc -= optind; argv += optind; - if((p = getenv("LC_CTYPE")) || - (p = getenv("LC_ALL")) || - (p = getenv("LANG"))) { + if(((p = getenv("LC_ALL")) && *p) || + ((p = getenv("LC_CTYPE")) && *p) || + ((p = getenv("LANG")) && *p)) { if(strlen(p) >= sizeof(".KOI8-R") && strcasecmp(&p[strlen(p) + 1 - sizeof(".KOI8-R")], ".KOI8-R") == 0) hightab = koi8rtab; |