-
-/*
- * seq_setunseen.c -- add/delete all messages which have the SELECT_UNSEEN
+/* seq_setunseen.c -- add/delete all messages which have the SELECT_UNSEEN
* -- bit set to/from the Unseen-Sequence
*
* This code is Copyright (c) 2002, by the authors of nmh. See the
*/
#include <h/mh.h>
+#include <h/utils.h>
/*
* We scan through the folder and act upon all messages
* Get the list of sequences for Unseen-Sequence
* and split them.
*/
- if ((cp = context_find (usequence))) {
- dp = getcpy (cp);
- if (!(ap = brkstring (dp, " ", "\n")) || !*ap) {
- free (dp);
- return;
- }
- } else {
- return;
+ if (!(cp = context_find (usequence)))
+ return;
+ dp = mh_xstrdup(cp);
+ if (!(ap = brkstring (dp, " ", "\n")) || !*ap) {
+ free (dp);
+ return;
}
/*