]> code.citadel.org Git - citadel.git/blobdiff - citadel/msgbase.c
* Removed code from some of the utilities which was still attempting
[citadel.git] / citadel / msgbase.c
index af13aeadf29921b31704993569c1de7eb29e50b5..d9b570c83464e0c7d0e14d3c58a348e99e00b9bf 100644 (file)
@@ -139,11 +139,11 @@ void get_mm(void) {
  */
 void cmd_msgs(char *cmdbuf)
 {
-       int a;
-       int mode;
+       int a = 0;
+       int mode = 0;
        char which[256];
-       int cm_howmany;
-       long cm_gt;
+       int cm_howmany = 0;
+       long cm_gt = 0L;
 
        extract(which,cmdbuf,0);
 
@@ -312,8 +312,8 @@ FMTEND:     cprintf("\n");
  * get a message off disk.
  * 
  */
-void output_message(char *msgid, int mode, int headers_only)
-{
+void output_message(char *msgid, int mode,
+                       int headers_only, int desired_section) {
        long msg_num;
        int a;
        CIT_UBYTE ch, rch;
@@ -323,7 +323,6 @@ void output_message(char *msgid, int mode, int headers_only)
        int msg_ok = 0;
        char boundary[256];             /* attachment boundary */
        char current_section = 0;       /* section currently being parsed */
-       char desired_section = 0;       /* section desired for printing */
        int has_attachments = 0;
 
        struct cdbdata *dmsgtext;
@@ -571,11 +570,13 @@ void cmd_msg0(char *cmdbuf)
 {
        char msgid[256];
        int headers_only = 0;
+       int desired_section = 0;
 
        extract(msgid,cmdbuf,0);
-       headers_only = extract_int(cmdbuf,1);
+       headers_only = extract_int(cmdbuf, 1);
+       desired_section = extract_int(cmdbuf, 2);
 
-       output_message(msgid,MT_CITADEL,headers_only);
+       output_message(msgid,MT_CITADEL, headers_only, desired_section);
        }
 
 
@@ -590,7 +591,7 @@ void cmd_msg2(char *cmdbuf)
        extract(msgid,cmdbuf,0);
        headers_only = extract_int(cmdbuf,1);
 
-       output_message(msgid,MT_RFC822,headers_only);
+       output_message(msgid,MT_RFC822,headers_only,0);
        }
 
 /* 
@@ -610,7 +611,7 @@ void cmd_msg3(char *cmdbuf)
        extract(msgid,cmdbuf,0);
        headers_only = extract_int(cmdbuf,1);
 
-       output_message(msgid,MT_RAW,headers_only);
+       output_message(msgid,MT_RAW,headers_only,0);
        }
 
 
@@ -648,7 +649,11 @@ long send_message(char *message_in_memory, /* pointer to buffer */
 
 
 
-
+/* FIX ... rewrite this to simply check for the existence of the twitroom,
+ * and create it if necessary.  No slot-numbers will need to be loaded.
+ * (Actually, twitroom should be created during the same portion of startup
+ * that creates Lobby/Mail/Aide.)
+ */
 void loadtroom(void) {
        struct quickroom qrbuf;
        int a;
@@ -973,7 +978,7 @@ void cmd_ent0(char *entargs)
        extract(recipient,entargs,1);
        anon_flag = extract_int(entargs,2);
        format_type = extract_int(entargs,3);
-       extract(boundary, entargs, 4);
+       extract(boundary, entargs, 5);
 
        /* first check to make sure the request is valid. */
 
@@ -1219,7 +1224,7 @@ void cmd_dele(char *delstr)
 
 
 /*
- * move a message to another room
+ * move a message to another room    FIX  Rework this to use name indices
  */
 void cmd_move(char *args)
 {