summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adam@chlipala.net>2012-08-03 08:32:03 -0400
committerGravatar Adam Chlipala <adam@chlipala.net>2012-08-03 08:32:03 -0400
commit921f958c199860d10320b7d2a162fa59bdef5bac (patch)
treeb9ff90e46b350f9d7c780b1e7a125ca2670449cf
parenta8ae5c1814db75525bf0ab199b0e5bd08c2c558a (diff)
Fix some unportable uses of C character class functions
-rw-r--r--src/c/urweb.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/c/urweb.c b/src/c/urweb.c
index 2eb1c9fe..3a0af564 100644
--- a/src/c/urweb.c
+++ b/src/c/urweb.c
@@ -4092,7 +4092,7 @@ uw_Basis_string uw_Basis_atom(uw_context ctx, uw_Basis_string s) {
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 @@ uw_Basis_string uw_Basis_css_url(uw_context ctx, uw_Basis_string s) {
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 @@ uw_Basis_string uw_Basis_property(uw_context ctx, uw_Basis_string s) {
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");
}