Mercurial > urweb
changeset 1801:5c51ae0d643b
Fix some unportable uses of C character class functions
author | Adam Chlipala <adam@chlipala.net> |
---|---|
date | Fri, 03 Aug 2012 08:32:03 -0400 |
parents | 38297294cf98 |
children | e3ec868567ce |
files | src/c/urweb.c |
diffstat | 1 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- 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"); }