Deploy the new <ctype.h> and `foocmp' macros from mLib.
[catacomb] / key / key-text.c
index 98c1fba..ace69ce 100644 (file)
@@ -34,6 +34,7 @@
 #include <mLib/base64.h>
 #include <mLib/bits.h>
 #include <mLib/dstr.h>
+#include <mLib/macros.h>
 #include <mLib/sub.h>
 #include <mLib/sym.h>
 #include <mLib/url.h>
@@ -298,7 +299,7 @@ int key_write(key_data *k, dstr *d, const key_filter *kf)
       DPUTC(d, ':');
       while (*p) {
        if (*p == ' ') DPUTC(d, '+');
-       else if (!isalnum((unsigned char)*p)) dstr_putf(d, "%%%02x", *p);
+       else if (!ISALNUM(*p)) dstr_putf(d, "%%%02x", *p);
        else DPUTC(d, *p);
        p++;
       }