]> diplodocus.org Git - nmh/blobdiff - uip/sendsbr.c
Add basic support for the STLS command in POP
[nmh] / uip / sendsbr.c
index 1b65efb88d58ada08dffea123af5391bd6b5a911..be3b414f79e072c480a94bd0850e9666c6d0646b 100644 (file)
@@ -6,6 +6,11 @@
  */
 
 #include "h/mh.h"
+#include "sbr/fmt_new.h"
+#include "sendsbr.h"
+#include "distsbr.h"
+#include "annosbr.h"
+#include "sbr/m_name.h"
 #include "sbr/m_getfld.h"
 #include "sbr/concat.h"
 #include "sbr/cpydgst.h"
@@ -255,12 +260,8 @@ splitmsg (char **vec, int vecp, char *program, char *drft,
                     * of each message/partial in the collection.
                     */
                    if (!strcasecmp (name, "Subject")) {
-                       size_t sublen;
-
                        strncpy (subject, buffer, BUFSIZ);
-                       sublen = strlen (subject);
-                       if (sublen > 0 && subject[sublen - 1] == '\n')
-                           subject[sublen - 1] = '\0';
+                        trim_suffix_c(subject, '\n');
                    }
 
                    dp = add (concat (name, ":", buffer, NULL), dp);