aboutsummaryrefslogtreecommitdiff
path: root/src/cmd
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2005-07-19 18:00:07 +0000
committerrsc <devnull@localhost>2005-07-19 18:00:07 +0000
commit1c171e3add096f5fbecceefd19f21a43c08b5509 (patch)
treee8b4ac09d6909617761c9ad476ff295d0e91d195 /src/cmd
parent86a1a5e7b30c37ad1d1a169855eb7b94b00d6aec (diff)
downloadplan9port-1c171e3add096f5fbecceefd19f21a43c08b5509.tar.gz
plan9port-1c171e3add096f5fbecceefd19f21a43c08b5509.tar.bz2
plan9port-1c171e3add096f5fbecceefd19f21a43c08b5509.zip
I just hate to be pushed around by some @#$%^& machine.
Diffstat (limited to 'src/cmd')
-rw-r--r--src/cmd/calendar.c2
-rw-r--r--src/cmd/fmt.c2
-rw-r--r--src/cmd/hget.c8
-rw-r--r--src/cmd/join.c2
-rw-r--r--src/cmd/split.c2
-rw-r--r--src/cmd/tail.c4
-rw-r--r--src/cmd/uniq.c2
7 files changed, 11 insertions, 11 deletions
diff --git a/src/cmd/calendar.c b/src/cmd/calendar.c
index ba86ab36..778c7608 100644
--- a/src/cmd/calendar.c
+++ b/src/cmd/calendar.c
@@ -174,7 +174,7 @@ void
upper2lower(char *to, char *from, int len)
{
while(--len>0 && *from!='\0')
- *to++ = tolower(*from++);
+ *to++ = tolower((uchar)*from++);
*to = 0;
}
diff --git a/src/cmd/fmt.c b/src/cmd/fmt.c
index e43731e5..59c14133 100644
--- a/src/cmd/fmt.c
+++ b/src/cmd/fmt.c
@@ -175,7 +175,7 @@ nspaceafter(char *s)
n = strlen(s);
if(n < 2)
return 1;
- if(isupper(s[0]) && n < 4)
+ if(isupper((uchar)s[0]) && n < 4)
return 1;
if(strchr(".!?", s[n-1]) != nil)
return 2;
diff --git a/src/cmd/hget.c b/src/cmd/hget.c
index 8fa1432d..1cd11abd 100644
--- a/src/cmd/hget.c
+++ b/src/cmd/hget.c
@@ -712,7 +712,7 @@ hhmtime(char *p, URL *u, Range *r)
tm.mon = 5;
} else {
for(p = month; *p; p++)
- *p = tolower(*p);
+ *p = tolower((uchar)*p);
for(i = 0; i < 12; i++)
if(strncmp(&monthchars[i*3], month, 3) == 0){
tm.mon = i;
@@ -732,7 +732,7 @@ hhmtime(char *p, URL *u, Range *r)
tm.sec = strtoul(p, &p, 10);
}
}
- if(tolower(*p) == 'p')
+ if(tolower((uchar)*p) == 'p')
tm.hour += 12;
}
@@ -1129,7 +1129,7 @@ passive(int ctl, URL *u)
p = strchr(msg, '(');
if(p == nil){
for(p = msg+3; *p; p++)
- if(isdigit(*p))
+ if(isdigit((uchar)*p))
break;
} else
p++;
@@ -1253,7 +1253,7 @@ int
cistrncmp(char *a, char *b, int n)
{
while(n-- > 0){
- if(tolower(*a++) != tolower(*b++))
+ if(tolower((uchar)*a++) != tolower((uchar)*b++))
return -1;
}
return 0;
diff --git a/src/cmd/join.c b/src/cmd/join.c
index 1739ef5d..9ce127fe 100644
--- a/src/cmd/join.c
+++ b/src/cmd/join.c
@@ -355,7 +355,7 @@ oparse(char *s)
break;
case '1':
case '2':
- if(s[1] == '.' && isdigit(s[2])) {
+ if(s[1] == '.' && isdigit((uchar)s[2])) {
olistf[no] = *s=='1'? F1: F2;
olist[no] = atoi(s += 2);
break;
diff --git a/src/cmd/split.c b/src/cmd/split.c
index c4025e20..e758786c 100644
--- a/src/cmd/split.c
+++ b/src/cmd/split.c
@@ -166,7 +166,7 @@ fold(char *s, int n)
fline = realloc(fline,n+1);
linesize = n+1;
}
- for(t=fline; *t++ = tolower(*s++); )
+ for(t=fline; *t++ = tolower((uchar)*s++); )
continue;
/* we assume the 'A'-'Z' only appear as themselves
* in a utf encoding.
diff --git a/src/cmd/tail.c b/src/cmd/tail.c
index db29986d..b40552bf 100644
--- a/src/cmd/tail.c
+++ b/src/cmd/tail.c
@@ -331,7 +331,7 @@ getnumber(char *s)
{
if(*s=='-' || *s=='+')
s++;
- if(!isdigit(*s))
+ if(!isdigit((uchar)*s))
return 0;
if(s[-1] == '+')
origin = BEG;
@@ -340,7 +340,7 @@ getnumber(char *s)
count = atol(s);
/* check range of count */
- if(count < 0 || (int)count != count)
+ if(count < 0 || (int)count != count)
fatal("too big");
return 1;
}
diff --git a/src/cmd/uniq.c b/src/cmd/uniq.c
index 122fb5ed..88fb9286 100644
--- a/src/cmd/uniq.c
+++ b/src/cmd/uniq.c
@@ -34,7 +34,7 @@ main(int argc, char *argv[])
f = 0;
while(argc > 1) {
if(*argv[1] == '-') {
- if(isdigit(argv[1][1]))
+ if(isdigit((uchar)argv[1][1]))
fields = atoi(&argv[1][1]);
else
mode = argv[1][1];