chiark
/
gitweb
/
~mdw
/
mLib
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
utils/macros.h: Add <ctype.h> and `foocmp' helper macros.
[mLib]
/
codec
/
baseconv.c
diff --git
a/codec/baseconv.c
b/codec/baseconv.c
index bdb850f7d19ca53b2cbf4c9092e8fd7b6758852e..b7cb0a0618ebe0a893c2721c336429a9eb8cdb88 100644
(file)
--- a/
codec/baseconv.c
+++ b/
codec/baseconv.c
@@
-35,6
+35,7
@@
#include "alloc.h"
#include "codec.h"
#include "dstr.h"
#include "alloc.h"
#include "codec.h"
#include "dstr.h"
+#include "macros.h"
#include "sub.h"
#include "base64.h"
#include "sub.h"
#include "base64.h"
@@
-279,7
+280,7
@@
enum {
#define PUTWRAP(x) WRAP({ \
char ch = encodemap[x]; \
#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); \
})
DPUTC(d, ch); \
})
@@
-350,9
+351,9
@@
static int ctxn##_dodecode(ctxn##_ctx *ctx, \
case 0: \
break; \
case CDCF_LOWERC: \
case 0: \
break; \
case CDCF_LOWERC: \
- if (
isupper
(ch)) goto badch; \
+ if (
ISUPPER
(ch)) goto badch; \
default: \
default: \
- ch =
toupper
(ch); \
+ ch =
TOUPPER
(ch); \
} \
x = decodemap[ch]; \
switch (x) { \
} \
x = decodemap[ch]; \
switch (x) { \