X-Git-Url: https://git.distorted.org.uk/~mdw/mLib/blobdiff_plain/776d2da28318443431563b68c2807eb0c29c49fa..3618811496a6d131fd4bffa19e262c521d39e819:/codec/baseconv.c diff --git a/codec/baseconv.c b/codec/baseconv.c index bdb850f..b7cb0a0 100644 --- a/codec/baseconv.c +++ b/codec/baseconv.c @@ -35,6 +35,7 @@ #include "alloc.h" #include "codec.h" #include "dstr.h" +#include "macros.h" #include "sub.h" #include "base64.h" @@ -279,7 +280,7 @@ enum { #define PUTWRAP(x) WRAP({ \ char ch = encodemap[x]; \ - if (f & CDCF_LOWERC) ch = tolower((unsigned char)ch); \ + if (f & CDCF_LOWERC) ch = TOLOWER(ch); \ DPUTC(d, ch); \ }) @@ -350,9 +351,9 @@ static int ctxn##_dodecode(ctxn##_ctx *ctx, \ case 0: \ break; \ case CDCF_LOWERC: \ - if (isupper(ch)) goto badch; \ + if (ISUPPER(ch)) goto badch; \ default: \ - ch = toupper(ch); \ + ch = TOUPPER(ch); \ } \ x = decodemap[ch]; \ switch (x) { \