]> code.citadel.org Git - citadel.git/blobdiff - citadel/msgbase.c
* do typedef the visit struct, remove all those 'struct' statements from all over...
[citadel.git] / citadel / msgbase.c
index 72f53627897ec4c03e367199323fe330236fc273..5178f2c5157c38e33750f95f50693dbbd27eec0f 100644 (file)
@@ -309,7 +309,10 @@ void headers_euid(long msgnum, void *userdata)
                return;
        }
 
-       cprintf("%ld|%s|\n", msgnum, (msg->cm_fields['E'] ? msg->cm_fields['E'] : ""));
+       cprintf("%ld|%s|%s\n", 
+               msgnum, 
+               (msg->cm_fields['E'] ? msg->cm_fields['E'] : ""),
+               (msg->cm_fields['T'] ? msg->cm_fields['T'] : "0"));
        CtdlFreeMessage(msg);
 }
 
@@ -353,7 +356,7 @@ int CtdlMsgCmp(struct CtdlMessage *msg, struct CtdlMessage *template) {
  * Retrieve the "seen" message list for the current room.
  */
 void CtdlGetSeen(char *buf, int which_set) {
-       struct visit vbuf;
+       visit vbuf;
 
        /* Learn about the user and room in question */
        CtdlGetRelationship(&vbuf, &CC->user, &CC->room);
@@ -378,7 +381,7 @@ void CtdlSetSeen(long *target_msgnums, int num_target_msgnums,
        int was_seen = 0;
        long lo = (-1L);
        long hi = (-1L);
-       struct visit vbuf;
+       visit vbuf;
        long *msglist;
        int num_msgs = 0;
        StrBuf *vset;
@@ -604,7 +607,7 @@ int CtdlForEachMessage(int mode, long ref, char *search_string,
 {
 
        int a, i, j;
-       struct visit vbuf;
+       visit vbuf;
        struct cdbdata *cdbfr;
        long *msglist = NULL;
        int num_msgs = 0;
@@ -930,14 +933,14 @@ void memfmout(
        const char *nl          /* string to terminate lines with */
 ) {
        int column = 0;
-       char ch = 0;
+       unsigned char ch = 0;
        char outbuf[1024];
        int len = 0;
        int nllen = 0;
 
        if (!mptr) return;
        nllen = strlen(nl);
-       while (ch=*(mptr++), ch > 0) {
+       while (ch=*(mptr++), ch != 0) {
 
                if (ch == '\n') {
                        client_write(outbuf, len);
@@ -1888,6 +1891,9 @@ void OutputRFC822MsgHeaders(
                                        }
                                }
                        }
+                       else if (i == 'K') {
+                               cprintf("Reply-To: <%s>%s", mptr, nl);
+                       }
                        if (mptr != mpptr)
                                free (mptr);
                }
@@ -2055,7 +2061,7 @@ int CtdlOutputPreLoadedMsg(
                int flags               /* should the bessage be exported clean? */
 ) {
        int i;
-       char *mptr;
+       char *mptr = NULL;
        const char *nl; /* newline string */
        struct ma_info ma;
 
@@ -2851,7 +2857,7 @@ long CtdlSubmitMsg(struct CtdlMessage *msg,       /* message to save */
        struct addresses_to_be_filed *aptr = NULL;
        StrBuf *saved_rfc822_version = NULL;
        int qualified_for_journaling = 0;
-       CitContext *CCC = CC;           /* CachedCitContext - performance boost */
+       CitContext *CCC = MyContext();
        char bounce_to[1024] = "";
        size_t tmp = 0;
        int rv = 0;