[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] isspace and friends take an int. solaris cares.
Update of /home/or/cvsroot/src/common
In directory moria.mit.edu:/home2/arma/work/onion/cvs/src/common
Modified Files:
crypto.c util.c
Log Message:
isspace and friends take an int. solaris cares.
Index: crypto.c
===================================================================
RCS file: /home/or/cvsroot/src/common/crypto.c,v
retrieving revision 1.56
retrieving revision 1.57
diff -u -d -r1.56 -r1.57
--- crypto.c 12 Mar 2004 13:02:16 -0000 1.56
+++ crypto.c 19 Mar 2004 20:50:10 -0000 1.57
@@ -691,9 +691,9 @@
int i;
for (i = 0; i < FINGERPRINT_LEN; ++i) {
if ((i%5) == 4) {
- if (!isspace(s[i])) return 0;
+ if (!isspace((int)s[i])) return 0;
} else {
- if (!isxdigit(s[i])) return 0;
+ if (!isxdigit((int)s[i])) return 0;
}
}
if (s[FINGERPRINT_LEN]) return 0;
Index: util.c
===================================================================
RCS file: /home/or/cvsroot/src/common/util.c,v
retrieving revision 1.63
retrieving revision 1.64
diff -u -d -r1.63 -r1.64
--- util.c 18 Mar 2004 19:59:39 -0000 1.63
+++ util.c 19 Mar 2004 20:50:10 -0000 1.64
@@ -163,8 +163,8 @@
const char *eat_whitespace(const char *s) {
assert(s);
- while(isspace(*s) || *s == '#') {
- while(isspace(*s))
+ while(isspace((int)*s) || *s == '#') {
+ while(isspace((int)*s))
s++;
if(*s == '#') { /* read to a \n or \0 */
while(*s && *s != '\n')
@@ -186,7 +186,7 @@
const char *find_whitespace(const char *s) {
assert(s);
- while(*s && !isspace(*s) && *s != '#')
+ while(*s && !isspace((int)*s) && *s != '#')
s++;
return s;
@@ -672,18 +672,18 @@
do {
*s = 0;
s--;
- } while (s >= line && isspace(*s));
+ } while (s >= line && isspace((int)*s));
key = line;
- while(isspace(*key))
+ while(isspace((int)*key))
key++;
if(*key == 0)
goto try_next_line; /* this line has nothing on it */
end = key;
- while(*end && !isspace(*end))
+ while(*end && !isspace((int)*end))
end++;
value = end;
- while(*value && isspace(*value))
+ while(*value && isspace((int)*value))
value++;
if(!*end || !*value) { /* only a key on this line. no value. */