]> diplodocus.org Git - nmh/blobdiff - sbr/seq_setprev.c
Added many flags to CFLAGS with gcc, if supported.
[nmh] / sbr / seq_setprev.c
index fdffa9524bcf592b908bfbfdb256e7f61890c61f..89b052e1bc0dd9d43bb6cd331f0f13d993fb2706 100644 (file)
@@ -1,15 +1,16 @@
-
-/*
- * seq_setprev.c -- set the Previous-Sequence
- *
- * $Id$
+/* seq_setprev.c -- set the Previous-Sequence
  *
  * This code is Copyright (c) 2002, by the authors of nmh.  See the
  * COPYRIGHT file in the root directory of the nmh distribution for
  * complete copyright information.
  */
 
-#include <h/mh.h>
+#include "h/mh.h"
+#include "seq_setprev.h"
+#include "context_find.h"
+#include "brkstring.h"
+#include "seq_add.h"
+#include "h/utils.h"
 
 /*
  * Add all the messages currently SELECTED to
@@ -28,14 +29,12 @@ seq_setprev (struct msgs *mp)
      * Get the list of sequences for Previous-Sequence
      * and split them.
      */
-    if ((cp = context_find (psequence))) {
-       dp = getcpy (cp);
-       if (!(ap = brkstring (dp, " ", "\n")) || !*ap) {
-           free (dp);
-           return;
-       }
-    } else {
-       return;
+    if (!(cp = context_find(psequence)))
+        return;
+    dp = mh_xstrdup(cp);
+    if (!(ap = brkstring(dp, " ", "\n")) || !*ap) {
+        free(dp);
+        return;
     }
 
     /* Now add all SELECTED messages to each sequence */