diff options
| author | Andrey A. Chernov <ache@FreeBSD.org> | 1999-06-08 14:59:12 +0000 |
|---|---|---|
| committer | Andrey A. Chernov <ache@FreeBSD.org> | 1999-06-08 14:59:12 +0000 |
| commit | 8e8cc9474225f0f413409e6c76020ce4d4c3862b (patch) | |
| tree | 387fafde2b6f60aa3a8a6ae8a1fa336bb98f20af /gnu | |
| parent | b25d26374e394b388226522d9bcaa973a42bcfe8 (diff) | |
Notes
Diffstat (limited to 'gnu')
| -rw-r--r-- | gnu/usr.bin/man/man/man.c | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/gnu/usr.bin/man/man/man.c b/gnu/usr.bin/man/man/man.c index 92e9f840ff42..0ecae7f224de 100644 --- a/gnu/usr.bin/man/man/man.c +++ b/gnu/usr.bin/man/man/man.c @@ -479,18 +479,22 @@ man_getopt (argc, argv) || tmp != short_locale + 2 || strlen(tmp + 1) < 4 || tmp[3] != '.') { - errno = EINVAL; - perror ("bad ctype locale env"); - exit (1); - } - tmp[1] = short_locale[0]; - tmp[2] = short_locale[1]; - short_locale = tmp + 1; - tmp = short_locale + 3; - for (pltable = ltable; pltable->lcode != NULL; pltable++) { - if (strcmp(pltable->lcode, tmp) == 0) { - locale_nroff = pltable->nroff; - break; + if (debug) { + errno = EINVAL; + perror ("ctype locale env"); + } + free(short_locale); + locale = NULL; + } else { + tmp[1] = short_locale[0]; + tmp[2] = short_locale[1]; + short_locale = tmp + 1; + tmp = short_locale + 3; + for (pltable = ltable; pltable->lcode != NULL; pltable++) { + if (strcmp(pltable->lcode, tmp) == 0) { + locale_nroff = pltable->nroff; + break; + } } } } |
