* remove replace part of memfmout(); its not used anymore anyways
authorWilfried Göesgens <willi@citadel.org>
Sat, 2 Jan 2010 19:49:13 +0000 (19:49 +0000)
committerWilfried Göesgens <willi@citadel.org>
Sat, 2 Jan 2010 19:49:13 +0000 (19:49 +0000)
citadel/modules/chat/serv_chat.c
citadel/msgbase.c
citadel/msgbase.h

index 2fd90261c8d28873793a8cbe1aeb5645f82f559b..f0f1e7d6c40f4a73d976372cf27f75cf9c28628d 100644 (file)
@@ -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);
        }
index aac75e05319d9f0a69fb4c8939e0f04b6ae25ae1..70b00bdd0281227b34f78e25b6289886532d87fe 100644 (file)
@@ -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
index 7b888762278b03113a31bc01bae90cc94651f502..29a9a28ae293c33e3bb833edc79609868ddeeec6 100644 (file)
@@ -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);