diff options
| author | Andrey A. Chernov <ache@FreeBSD.org> | 1998-03-08 20:56:43 +0000 |
|---|---|---|
| committer | Andrey A. Chernov <ache@FreeBSD.org> | 1998-03-08 20:56:43 +0000 |
| commit | 0c312497c7ed1121997eb1078d868cc1193a0d64 (patch) | |
| tree | d1e1dfd0dc80cf9018641cf1d3d54f53b4b68fb8 /usr.bin | |
| parent | 227776616a6d9a44e9fd65f7066187747ce71e1e (diff) | |
Notes
Diffstat (limited to 'usr.bin')
| -rw-r--r-- | usr.bin/uniq/uniq.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/usr.bin/uniq/uniq.c b/usr.bin/uniq/uniq.c index 8f302ca349d8..fe47d42c3175 100644 --- a/usr.bin/uniq/uniq.c +++ b/usr.bin/uniq/uniq.c @@ -45,11 +45,12 @@ static const char copyright[] = static char sccsid[] = "@(#)uniq.c 8.3 (Berkeley) 5/4/95"; #endif static const char rcsid[] = - "$Id: uniq.c,v 1.3 1997/08/21 06:51:10 charnier Exp $"; + "$Id: uniq.c,v 1.4 1997/09/07 15:09:22 joerg Exp $"; #endif /* not lint */ #include <ctype.h> #include <err.h> +#include <locale.h> #include <stdio.h> #include <stdlib.h> #include <string.h> @@ -77,6 +78,8 @@ main (argc, argv) char *prevline, *thisline, *p; int iflag = 0, comp; + (void) setlocale(LC_CTYPE, ""); + obsolete(argv); while ((ch = getopt(argc, argv, "-cdif:s:u")) != -1) switch (ch) { @@ -198,7 +201,7 @@ skip(str) register int infield, nchars, nfields; for (nfields = numfields, infield = 0; nfields && *str; ++str) - if (isspace(*str)) { + if (isspace((unsigned char)*str)) { if (infield) { infield = 0; --nfields; @@ -234,7 +237,7 @@ obsolete(argv) return; } else if (ap[1] == '-') return; - if (!isdigit(ap[1])) + if (!isdigit((unsigned char)ap[1])) continue; /* * Digit signifies an old-style option. Malloc space for dash, |
