Solaris CC freaks out if isspace and friends get anything other than an int. We learned that, so we casted. But it is also a bad idea to cast a signed char to an int and expect things to work on win32. Now we cast to unsigned char, then to int, then pass to isspace. Ug

svn:r3120
This commit is contained in:
Nick Mathewson
2004-12-08 00:42:50 +00:00
parent d7dbfd3644
commit fe6eb34a10
6 changed files with 19 additions and 14 deletions
+2 -2
View File
@@ -262,7 +262,7 @@ int smartlist_split_string(smartlist_t *sl, const char *str, const char *sep,
cp = str;
while (1) {
if (flags&SPLIT_SKIP_SPACE) {
while (isspace((int)*cp)) ++cp;
while (TOR_ISSPACE(*cp)) ++cp;
}
if (max>0 && n == max-1) {
@@ -279,7 +279,7 @@ int smartlist_split_string(smartlist_t *sl, const char *str, const char *sep,
}
if (flags&SPLIT_SKIP_SPACE) {
while (end > cp && isspace((int)*(end-1)))
while (end > cp && TOR_ISSPACE(*(end-1)))
--end;
}
if (end != cp || !(flags&SPLIT_IGNORE_BLANK)) {