diff options
author | ache <ache@FreeBSD.org> | 1995-12-28 13:43:40 +0000 |
---|---|---|
committer | ache <ache@FreeBSD.org> | 1995-12-28 13:43:40 +0000 |
commit | 9905307e999e5bdee5347ef5b42a768d92457fa6 (patch) | |
tree | f8b010961e91b56ea6786b5f28469189eba2f4de /usr.bin/strings | |
parent | 81784b060329cca13e3164d9cc4779044f97df76 (diff) | |
download | FreeBSD-src-9905307e999e5bdee5347ef5b42a768d92457fa6.zip FreeBSD-src-9905307e999e5bdee5347ef5b42a768d92457fa6.tar.gz |
Localize it
Diffstat (limited to 'usr.bin/strings')
-rw-r--r-- | usr.bin/strings/strings.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.bin/strings/strings.c b/usr.bin/strings/strings.c index 435e134..af33b5e 100644 --- a/usr.bin/strings/strings.c +++ b/usr.bin/strings/strings.c @@ -47,13 +47,14 @@ static char sccsid[] = "@(#)strings.c 8.2 (Berkeley) 1/28/94"; #include <ctype.h> #include <errno.h> #include <fcntl.h> +#include <locale.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #define DEF_LEN 4 /* default minimum string length */ -#define ISSTR(ch) (isascii(ch) && (isprint(ch) || ch == '\t')) +#define ISSTR(ch) (isalnum(ch) || ispunct(ch) || isascii(ch) && isprint(ch) || ch == '\t') typedef struct exec EXEC; /* struct exec cast */ @@ -79,6 +80,8 @@ main(argc, argv) u_char *bfr; char *file, *p; + (void) setlocale(LC_CTYPE, ""); + /* * for backward compatibility, allow '-' to specify 'a' flag; no * longer documented in the man page or usage string. |