git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@1092
d4fa192b-c00b-0410-8231-
f00ffab90ce4
* $Id$
*/
+#include <sys/types.h>
+#include <stdint.h>
+#include "varnishapi.h"
+
static const char *b64 =
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
for (i = 0; i < 256; i++)
i64[i] = -1;
for (p = b64, i = 0; *p; p++, i++)
- i64[*p] = i;
+ i64[(int)*p] = i;
i64['='] = 0;
}
unsigned u, v, l;
int i;
+ u = 0;
l = 0;
while (*s) {
for (v = 0; v < 4; v++) {
if (!*s)
break;
- i = i64[*s++];
+ i = i64[(int)*s++];
if (i < 0)
return (-1);
u <<= 6;
d++;
}
}
- printf("\n");
*d = '\0';
return (0);
}