aboutsummaryrefslogtreecommitdiff
path: root/base64.c
diff options
context:
space:
mode:
Diffstat (limited to 'base64.c')
-rw-r--r--base64.c26
1 files changed, 15 insertions, 11 deletions
diff --git a/base64.c b/base64.c
index dcdb0ee..a69633d 100644
--- a/base64.c
+++ b/base64.c
@@ -39,7 +39,7 @@
#include "syshead.h"
-#if NTLM
+#ifdef ENABLE_HTTP_PROXY
#include "base64.h"
@@ -48,16 +48,6 @@
static char base64_chars[] =
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
-static int
-pos(char c)
-{
- char *p;
- for (p = base64_chars; *p; p++)
- if (*p == c)
- return p - base64_chars;
- return -1;
-}
-
int
base64_encode(const void *data, int size, char **str)
{
@@ -96,6 +86,18 @@ base64_encode(const void *data, int size, char **str)
return strlen(s);
}
+#if NTLM
+
+static int
+pos(char c)
+{
+ char *p;
+ for (p = base64_chars; *p; p++)
+ if (*p == c)
+ return p - base64_chars;
+ return -1;
+}
+
#define DECODE_ERROR 0xffffffff
static unsigned int
@@ -141,6 +143,8 @@ base64_decode(const char *str, void *data)
return q - (unsigned char *) data;
}
+#endif /* NTLM */
+
#else
static void dummy(void) {}
#endif