X-Git-Url: http://git.marmaro.de/?p=mmh;a=blobdiff_plain;f=sbr%2Fseq_setunseen.c;h=b18de5d2a3143ef35d8ff550e8f796f5e14b5c80;hp=a115564345c1dee2eee7efd5eddd93b9b885aae9;hb=714b5c530ece27ea2835a313013f5b770163403c;hpb=a485ed478abbd599d8c9aab48934e7a26733ecb1 diff --git a/sbr/seq_setunseen.c b/sbr/seq_setunseen.c index a115564..b18de5d 100644 --- a/sbr/seq_setunseen.c +++ b/sbr/seq_setunseen.c @@ -1,36 +1,36 @@ /* - * 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 - * COPYRIGHT file in the root directory of the nmh distribution for - * complete copyright information. - */ +** 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 +** COPYRIGHT file in the root directory of the nmh distribution for +** complete copyright information. +*/ #include /* - * We scan through the folder and act upon all messages - * that are marked with the SELECT_UNSEEN bit. - * - * If seen == 1, delete messages from unseen sequence. - * If seen == 0, add messages to unseen sequence. - */ +** We scan through the folder and act upon all messages +** that are marked with the SELECT_UNSEEN bit. +** +** If seen == 1, delete messages from unseen sequence. +** If seen == 0, add messages to unseen sequence. +*/ void -seq_setunseen (struct msgs *mp, int seen) +seq_setunseen(struct msgs *mp, int seen) { int msgnum; char **ap, *cp, *dp; /* - * 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); + ** 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 { @@ -38,22 +38,22 @@ seq_setunseen (struct msgs *mp, int seen) } /* - * Now add/delete each message which has the SELECT_UNSEEN - * bit set to/from each of these sequences. - */ + ** Now add/delete each message which has the SELECT_UNSEEN + ** bit set to/from each of these sequences. + */ for (; *ap; ap++) { if (seen) { /* make sure sequence exists first */ if (seq_getnum(mp, *ap) != -1) for (msgnum = mp->lowsel; msgnum <= mp->hghsel; msgnum++) - if (is_unseen (mp, msgnum)) - seq_delmsg (mp, *ap, msgnum); + if (is_unseen(mp, msgnum)) + seq_delmsg(mp, *ap, msgnum); } else { for (msgnum = mp->lowmsg; msgnum <= mp->hghmsg; msgnum++) - if (is_unseen (mp, msgnum)) - seq_addmsg (mp, *ap, msgnum, -1, 0); + if (is_unseen(mp, msgnum)) + seq_addmsg(mp, *ap, msgnum, -1, 0); } } - free (dp); + free(dp); }