# HG changeset patch # User Adam Chlipala # Date 1343997123 14400 # Node ID 5c51ae0d643bc1e047d8e52a5fd54e5667b0420a # Parent 38297294cf9883970058c8a44495d37d1f46e237 Fix some unportable uses of C character class functions diff -r 38297294cf98 -r 5c51ae0d643b src/c/urweb.c --- a/src/c/urweb.c Thu Aug 02 18:12:37 2012 -0400 +++ b/src/c/urweb.c Fri Aug 03 08:32:03 2012 -0400 @@ -4092,7 +4092,7 @@ for (p = s; *p; ++p) { char c = *p; - if (!isalnum(c) && c != '+' && c != '-' && c != '.' && c != '%' && c != '#') + if (!isalnum((int)c) && c != '+' && c != '-' && c != '.' && c != '%' && c != '#') uw_error(ctx, FATAL, "Disallowed character in CSS atom"); } @@ -4104,7 +4104,7 @@ for (p = s; *p; ++p) { char c = *p; - if (!isalnum(c) && c != ':' && c != '/' && c != '.' && c != '_' && c != '+' + if (!isalnum((int)c) && c != ':' && c != '/' && c != '.' && c != '_' && c != '+' && c != '-' && c != '%' && c != '?' && c != '&' && c != '=' && c != '#') uw_error(ctx, FATAL, "Disallowed character in CSS URL"); } @@ -4118,12 +4118,12 @@ if (!*s) uw_error(ctx, FATAL, "Empty CSS property"); - if (!islower(s[0]) && s[0] != '_') + if (!islower((int)s[0]) && s[0] != '_') uw_error(ctx, FATAL, "Bad initial character in CSS property"); for (p = s; *p; ++p) { char c = *p; - if (!islower(c) && !isdigit(c) && c != '_' && c != '-') + if (!islower((int)c) && !isdigit((int)c) && c != '_' && c != '-') uw_error(ctx, FATAL, "Disallowed character in CSS property"); }