X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/6c42153ad9362cc676ea66563bf400d7511b3b68..4aca08ce404ffaa63000c218e8e042d7b27fbfcc:/sbr/seq_setunseen.c diff --git a/sbr/seq_setunseen.c b/sbr/seq_setunseen.c index 022982ea..058648c7 100644 --- a/sbr/seq_setunseen.c +++ b/sbr/seq_setunseen.c @@ -1,16 +1,18 @@ - -/* - * 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 * - * $Id$ - * * 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 +#include "h/mh.h" +#include "context_find.h" +#include "brkstring.h" +#include "seq_getnum.h" +#include "seq_del.h" +#include "seq_add.h" +#include "h/utils.h" /* * We scan through the folder and act upon all messages @@ -30,14 +32,12 @@ seq_setunseen (struct msgs *mp, int seen) * 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; } /*