summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPhilip Hazel <ph10@hermes.cam.ac.uk>2005-09-28 10:46:48 +0000
committerPhilip Hazel <ph10@hermes.cam.ac.uk>2005-09-28 10:46:48 +0000
commit9a799bc0748201e80ca3b4f7ffaaa588315626b7 (patch)
treefa4902b9e358ec34836767ef17de78f8c8c09ec8 /src
parent16f12c7602daf6f4618d6b4bd037115fc7ee517e (diff)
Make ${base62d: adjust for BASE_62, as ${base62: does.
Diffstat (limited to 'src')
-rw-r--r--src/src/expand.c9
-rw-r--r--src/src/globals.c8
2 files changed, 13 insertions, 4 deletions
diff --git a/src/src/expand.c b/src/src/expand.c
index aa1398e8a..739f5e854 100644
--- a/src/src/expand.c
+++ b/src/src/expand.c
@@ -1,4 +1,4 @@
-/* $Cambridge: exim/src/src/expand.c,v 1.42 2005/09/13 11:13:27 ph10 Exp $ */
+/* $Cambridge: exim/src/src/expand.c,v 1.43 2005/09/28 10:46:48 ph10 Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
@@ -4358,6 +4358,8 @@ while (*s != 0)
continue;
}
+ /* Note that for Darwin and Cygwin, BASE_62 actually has the value 36 */
+
case EOP_BASE62D:
{
uschar buf[16];
@@ -4369,10 +4371,11 @@ while (*s != 0)
if (t == NULL)
{
expand_string_message = string_sprintf("argument for base62d "
- "operator is \"%s\", which is not a base 62 number", sub);
+ "operator is \"%s\", which is not a base %d number", sub,
+ BASE_62);
goto EXPAND_FAILED;
}
- n = n * 62 + (t - base62_chars);
+ n = n * BASE_62 + (t - base62_chars);
}
(void)sprintf(CS buf, "%ld", n);
yield = string_cat(yield, &size, &ptr, buf, Ustrlen(buf));
diff --git a/src/src/globals.c b/src/src/globals.c
index eed5a9704..3a5b2af1c 100644
--- a/src/src/globals.c
+++ b/src/src/globals.c
@@ -1,4 +1,4 @@
-/* $Cambridge: exim/src/src/globals.c,v 1.38 2005/09/13 11:13:27 ph10 Exp $ */
+/* $Cambridge: exim/src/src/globals.c,v 1.39 2005/09/28 10:46:48 ph10 Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
@@ -333,8 +333,14 @@ uschar *av_scanner = US"sophie:/var/run/sophie"; /* AV scanner */
#endif
BOOL background_daemon = TRUE;
+
+#if BASE_62 == 62
uschar *base62_chars=
US"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
+#else
+uschar *base62_chars= US"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
+#endif
+
uschar *bi_command = NULL;
uschar *big_buffer = NULL;
int big_buffer_size = BIG_BUFFER_SIZE;