projects
/
gnulib.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
* base64.h (isbase64): Add.
[gnulib.git]
/
lib
/
base64.c
diff --git
a/lib/base64.c
b/lib/base64.c
index
97b6019
..
98d933a
100644
(file)
--- a/
lib/base64.c
+++ b/
lib/base64.c
@@
-274,10
+274,10
@@
static const signed char b64[0x100] = {
B64 (252), B64 (253), B64 (254), B64 (255)
};
B64 (252), B64 (253), B64 (254), B64 (255)
};
-
static inline
bool
-isb
64 (unsigned
char ch)
+bool
+isb
ase64 (
char ch)
{
{
- return
ch <= 255 && 0 <= b64[ch
];
+ return
to_uchar (ch) <= 255 && 0 <= b64[to_uchar (ch)
];
}
/* Decode base64 encoded input array IN of length INLEN to output
}
/* Decode base64 encoded input array IN of length INLEN to output
@@
-295,7
+295,7
@@
base64_decode (const char *restrict in, size_t inlen,
while (inlen >= 2)
{
while (inlen >= 2)
{
- if (!isb
64 (in[0]) || !isb
64 (in[1]))
+ if (!isb
ase64 (in[0]) || !isbase
64 (in[1]))
break;
if (outleft)
break;
if (outleft)
@@
-319,7
+319,7
@@
base64_decode (const char *restrict in, size_t inlen,
}
else
{
}
else
{
- if (!isb64 (in[2]))
+ if (!isb
ase
64 (in[2]))
break;
if (outleft)
break;
if (outleft)
@@
-339,7
+339,7
@@
base64_decode (const char *restrict in, size_t inlen,
}
else
{
}
else
{
- if (!isb64 (in[3]))
+ if (!isb
ase
64 (in[3]))
break;
if (outleft)
break;
if (outleft)