Save the text client!
[citadel.git] / textclient / messages.c
index df99e3362a092d93de27102c41fe4dba50d7cd91..3fc71730040495f947ffa3acc3c0a29dcf1f71c2 100644 (file)
@@ -1,16 +1,14 @@
-/*
- * Text client functions for reading and writing of messages
- *
- * Copyright (c) 1987-2020 by the citadel.org team
- *
- * This program is open source software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 3.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- */
+// Text client functions for reading and writing of messages
+//
+// Copyright (c) 1987-2020 by the citadel.org team
+//
+// This program is open source software.  Use, duplication, and/or
+// disclosure are subject to the GNU General Purpose License version 3.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
 
 #include "textclient.h"
 
@@ -139,7 +137,6 @@ void add_newline(struct cittext *textlist)
 
        while (ptr->text[strlen(ptr->text) - 1] == 32)
                ptr->text[strlen(ptr->text) - 1] = 0;
-       /* strcat(ptr->text,"\n"); */
 
        ptr->next = (struct cittext *)
            malloc(sizeof(struct cittext));
@@ -553,7 +550,8 @@ int read_message(CtdlIPC *ipc,
 
        if (dest) {
                fprintf(dest, "\n");
-       } else {
+       }
+       else {
                scr_printf("\n");
        }
 
@@ -562,7 +560,8 @@ int read_message(CtdlIPC *ipc,
        if ((message->email != NULL) && (!IsEmptyStr(message->email))) {
                if (!IsEmptyStr(message->author)) {
                        snprintf(reply_to, sizeof reply_to, "%s <%s>", message->author, message->email);
-               } else {
+               }
+               else {
                        safestrncpy(reply_to, message->email, sizeof reply_to);
                }
        }
@@ -577,10 +576,11 @@ int read_message(CtdlIPC *ipc,
                safestrncpy(reply_inreplyto, message->msgid, sizeof reply_inreplyto);
        }
 
-       if (message->references != NULL)
+       if (message->references != NULL) {
                if (!IsEmptyStr(message->references)) {
                        safestrncpy(reply_references, message->references, sizeof reply_references);
                }
+       }
 
        if (message->subject != NULL) {
                safestrncpy(reply_subject, message->subject, sizeof reply_subject);
@@ -659,7 +659,8 @@ int read_message(CtdlIPC *ipc,
         */
        if (format_type == 0) {
                fr = fmout(screenwidth, NULL, message->text, dest, 1);
-       } else {
+       }
+       else {
                /* renderer for text/plain */
 
                lineptr = message->text;
@@ -1085,7 +1086,8 @@ int entmsg(CtdlIPC * ipc, int is_reply,   /* nonzero if this was a <R>eply command
 
        if (c > 0) {
                mode = 1;
-       } else {
+       }
+       else {
                mode = 0;
        }