From 57ab2a1c1faa50d2edaa7895567dc1f350c053f1 Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Thu, 17 Jan 2008 20:29:27 +0000 Subject: [PATCH] The encoding and decoding tables for Base64 are no longer calculated at startup. CtdlInitBase64Table() is removed. The tables are now hardcoded as 'const' arrays. Not only will this eliminate the need to do a startup calculation, but since it is now const we will get a nice clean segv if some other code attempts to clobber them. --- citadel/citadel.c | 1 - citadel/citmail.c | 2 - citadel/getmail.c | 2 - citadel/sendcommand.c | 2 - citadel/server_main.c | 1 - citadel/setup.c | 2 - citadel/stress.c | 2 - citadel/userlist.c | 1 - citadel/whobbs.c | 2 - libcitadel/lib/libcitadel.h | 2 +- libcitadel/lib/tools.c | 78 +++++++++++++++++++------------------ webcit/webserver.c | 1 - 12 files changed, 41 insertions(+), 55 deletions(-) diff --git a/citadel/citadel.c b/citadel/citadel.c index 700c732f2..4b1258368 100644 --- a/citadel/citadel.c +++ b/citadel/citadel.c @@ -1417,7 +1417,6 @@ int main(int argc, char **argv) eCrashParameters params; // eCrashSymbolTable symbol_table; #endif - CtdlInitBase64Table(); calc_dirs_n_files(relh, home, relhome, ctdldir, 0); #ifdef HAVE_BACKTRACE diff --git a/citadel/citmail.c b/citadel/citmail.c index f47d8f2ab..fea00e064 100644 --- a/citadel/citmail.c +++ b/citadel/citmail.c @@ -184,8 +184,6 @@ int main(int argc, char **argv) { int read_recipients_from_headers = 0; char *add_these_recipients = NULL; - CtdlInitBase64Table(); - for (i=1; i