]>
diplodocus.org Git - nmh/blob - sbr/seq_setunseen.c
3 * seq_setunseen.c -- add/delete all messages which have the SELECT_UNSEEN
4 * -- bit set to/from the Unseen-Sequence
12 * We scan through the folder and act upon all messages
13 * that are marked with the SELECT_UNSEEN bit.
15 * If seen == 1, delete messages from unseen sequence.
16 * If seen == 0, add messages to unseen sequence.
20 seq_setunseen (struct msgs
*mp
, int seen
)
26 * Get the list of sequences for Unseen-Sequence
29 if ((cp
= context_find (usequence
))) {
31 if (!(ap
= brkstring (dp
, " ", "\n")) || !*ap
) {
40 * Now add/delete each message which has the SELECT_UNSEEN
41 * bit set to/from each of these sequences.
45 /* make sure sequence exists first */
46 if (seq_getnum(mp
, *ap
) != -1)
47 for (msgnum
= mp
->lowsel
; msgnum
<= mp
->hghsel
; msgnum
++)
48 if (is_unseen (mp
, msgnum
))
49 seq_delmsg (mp
, *ap
, msgnum
);
51 for (msgnum
= mp
->lowmsg
; msgnum
<= mp
->hghmsg
; msgnum
++)
52 if (is_unseen (mp
, msgnum
))
53 seq_addmsg (mp
, *ap
, msgnum
, -1, 0);