From: Wilfried Göesgens Date: Sat, 2 Jan 2010 19:49:13 +0000 (+0000) Subject: * remove replace part of memfmout(); its not used anymore anyways X-Git-Tag: v7.86~536 X-Git-Url: https://code.citadel.org/?p=citadel.git;a=commitdiff_plain;h=f6bc9b3ed0ac4cf90f7e6ad0094ca746ad9f9274 * remove replace part of memfmout(); its not used anymore anyways --- diff --git a/citadel/modules/chat/serv_chat.c b/citadel/modules/chat/serv_chat.c index 2fd90261c..f0f1e7d6c 100644 --- a/citadel/modules/chat/serv_chat.c +++ b/citadel/modules/chat/serv_chat.c @@ -568,7 +568,7 @@ void cmd_pexp(char *argbuf) cprintf("Message "); cprintf("from %s:\n", ptr->sender); if (ptr->text != NULL) - memfmout(ptr->text, 0, "\n"); + memfmout(ptr->text, "\n"); holdptr = ptr->next; if (ptr->text != NULL) free(ptr->text); @@ -606,7 +606,7 @@ void cmd_gexp(char *argbuf) { ); if (ptr->text != NULL) { - memfmout(ptr->text, 0, "\n"); + memfmout(ptr->text, "\n"); if (ptr->text[strlen(ptr->text)-1] != '\n') cprintf("\n"); free(ptr->text); } diff --git a/citadel/msgbase.c b/citadel/msgbase.c index aac75e053..70b00bdd0 100644 --- a/citadel/msgbase.c +++ b/citadel/msgbase.c @@ -3,7 +3,7 @@ * * Implements the message store. * - * Copyright (c) 1987-2009 by the citadel.org team + * Copyright (c) 1987-2010 by the citadel.org team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -927,10 +927,9 @@ void do_help_subst(char *buffer) */ void memfmout( char *mptr, /* where are we going to get our text from? */ - char subst, /* nonzero if we should do substitutions */ - char *nl) /* string to terminate lines with */ + const char *nl) /* string to terminate lines with */ { - int a, b, c; + int b, c; int real = 0; int old = 0; cit_uint8_t ch; @@ -944,22 +943,7 @@ void memfmout( c = 1; /* c is the current pos */ do { - if (subst) { - while (ch = *mptr, ((ch != 0) && (strlen(buffer) < 126))) { - ch = *mptr++; - buffer[strlen(buffer) + 1] = 0; - buffer[strlen(buffer)] = ch; - } - - if (buffer[0] == '^') - do_help_subst(buffer); - - buffer[strlen(buffer) + 1] = 0; - a = buffer[0]; - strcpy(buffer, &buffer[1]); - } else { - ch = *mptr++; - } + ch = *mptr++; old = real; real = ch; @@ -1743,7 +1727,7 @@ int CtdlOutputPreLoadedMsg( char allkeys[30]; char display_name[256]; char *mptr, *mpptr; - char *nl; /* newline string */ + const char *nl; /* newline string */ int suppress_f = 0; int subject_found = 0; struct ma_info ma; @@ -2166,7 +2150,7 @@ START_TEXT: if (mode == MT_MIME) { cprintf("Content-type: text/x-citadel-variformat\n\n"); } - memfmout(mptr, 0, nl); + memfmout(mptr, nl); } /* If the message on disk is format 4 (MIME), we've gotta hand it diff --git a/citadel/msgbase.h b/citadel/msgbase.h index 7b8887622..29a9a28ae 100644 --- a/citadel/msgbase.h +++ b/citadel/msgbase.h @@ -96,7 +96,7 @@ void cmd_msgs (char *cmdbuf); void cmd_isme (char *cmdbuf); void help_subst (char *strbuf, char *source, char *dest); void do_help_subst (char *buffer); -void memfmout (char *mptr, char subst, char *nl); +void memfmout (char *mptr, const char *nl); void output_mime_parts(char *); void cmd_msg0 (char *cmdbuf); void cmd_msg2 (char *cmdbuf);