X-Git-Url: https://git.distorted.org.uk/~mdw/mLib/blobdiff_plain/962e9e9cfd5b88a255c083110132e5ee417da209..3618811496a6d131fd4bffa19e262c521d39e819:/codec/url.c diff --git a/codec/url.c b/codec/url.c index 0de87ae..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 '~':