diff options
author | ache <ache@FreeBSD.org> | 1996-01-10 21:42:14 +0000 |
---|---|---|
committer | ache <ache@FreeBSD.org> | 1996-01-10 21:42:14 +0000 |
commit | c8975f103d9378fd640ce21b5dea7f2205241ce1 (patch) | |
tree | 4ec1c0a4a83733a34d59be58cf2abf9304bbfd09 /usr.bin/wc | |
parent | 525e36ce3e9516d50c97f25c011550e6cfec1edc (diff) | |
download | FreeBSD-src-c8975f103d9378fd640ce21b5dea7f2205241ce1.zip FreeBSD-src-c8975f103d9378fd640ce21b5dea7f2205241ce1.tar.gz |
Localize it.
Diffstat (limited to 'usr.bin/wc')
-rw-r--r-- | usr.bin/wc/wc.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/usr.bin/wc/wc.c b/usr.bin/wc/wc.c index a50196c..1f1c9b3 100644 --- a/usr.bin/wc/wc.c +++ b/usr.bin/wc/wc.c @@ -44,6 +44,7 @@ static char sccsid[] = "@(#)wc.c 8.1 (Berkeley) 6/6/93"; #include <sys/param.h> #include <sys/stat.h> #include <fcntl.h> +#include <locale.h> #include <unistd.h> #include <errno.h> #include <stdio.h> @@ -66,6 +67,8 @@ main(argc, argv) register int ch; int total; + (void) setlocale(LC_CTYPE, ""); + while ((ch = getopt(argc, argv, "lwc")) != EOF) switch((char)ch) { case 'l': @@ -115,9 +118,9 @@ void cnt(file) char *file; { - register u_char *p; + register u_char *p, ch; register short gotsp; - register int ch, len; + register int len; register u_long linect, wordct, charct; struct stat sb; int fd; |