summaryrefslogtreecommitdiffstats
path: root/usr.bin/uniq
diff options
context:
space:
mode:
authorache <ache@FreeBSD.org>1998-03-08 20:56:43 +0000
committerache <ache@FreeBSD.org>1998-03-08 20:56:43 +0000
commit81b26c08967177a4c0345a855c1108af83ec9327 (patch)
tree5be6f75cfd571306cd3e979ec6941000e51a2be3 /usr.bin/uniq
parent8b8e3127e97cfd88fd932bfb753d4833e94a54c5 (diff)
downloadFreeBSD-src-81b26c08967177a4c0345a855c1108af83ec9327.zip
FreeBSD-src-81b26c08967177a4c0345a855c1108af83ec9327.tar.gz
Localize it
Diffstat (limited to 'usr.bin/uniq')
-rw-r--r--usr.bin/uniq/uniq.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/usr.bin/uniq/uniq.c b/usr.bin/uniq/uniq.c
index 8f302ca..fe47d42 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,
OpenPOWER on IntegriCloud