libmicrohttpd

HTTP/1.x server C library (MHD 1.x, stable)
Log | Files | Refs | Submodules | README | LICENSE

commit 631c1d244c5282b7e95f1f6d30853627496e36e0
parent 5a6952fe90fdfbb311d81fb4ac96027bec867d8e
Author: Christian Grothoff <christian@grothoff.org>
Date:   Thu, 20 Jan 2011 10:56:54 +0000

dead

Diffstat:
Msrc/daemon/base64.c | 31-------------------------------
1 file changed, 0 insertions(+), 31 deletions(-)

diff --git a/src/daemon/base64.c b/src/daemon/base64.c @@ -27,37 +27,6 @@ static const char base64_digits[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; -#if 0 -char* BASE64Encode(const char* src) { - unsigned int in_len = strlen(src); - char* dest = malloc((in_len + 2 - ((in_len + 2) % 3)) / 3 * 4 + 1); - char* result = dest; - - if (dest == NULL) - return NULL; - while (*src) { - dest[0] = base64_chars[(src[0] & 0xfc) >> 2]; - dest[1] = base64_chars[((src[0] & 0x03) << 4) + ((src[1] & 0xf0) >> 4)]; - dest[2] = base64_chars[((src[1] & 0x0f) << 2) + ((src[2] & 0xc0) >> 6)]; - dest[3] = base64_chars[src[2] & 0x3f]; - if (!*(++src)) { - dest[2] = dest[3] = '='; - dest[4] = 0; - return result; - } - if (!*(++src)) { - dest[3] = '='; - dest[4] = 0; - return result; - } - src++; - dest += 4; - } - *dest = 0; - return result; - -} -#endif char* BASE64Decode(const char* src) { unsigned int in_len = strlen(src);