X-Git-Url: https://git.distorted.org.uk/~mdw/mLib/blobdiff_plain/96e10f286c055c81d9474e727bf0231a94aa2b43..3618811496a6d131fd4bffa19e262c521d39e819:/codec/url.c diff --git a/codec/url.c b/codec/url.c index 3c1fbfd..eecfe82 100644 --- a/codec/url.c +++ b/codec/url.c @@ -33,6 +33,7 @@ #include #include "dstr.h" +#include "macros.h" #include "url.h" /*----- Main code ---------------------------------------------------------*/ @@ -66,8 +67,8 @@ static void encode(url_ectx *ctx, dstr *d, const char *p) case ' ': DPUTC(d, '+'); break; default: - if (isspace((unsigned char)*p)) goto unsafe; - else if (isalnum((unsigned char *)p)) goto safe; + if (ISSPACE(*p)) goto unsafe; + else if (ISALNUM(*p)) goto safe; else if (ctx->f&URLF_LAX) goto safe; else goto unsafe; case '/': case '~':