Revision 12455,
813 bytes
checked in by danw, 26 years ago
(diff) |
This commit was generated by cvs2svn to compensate for changes in r12454,
which included commits to RCS files with non-trunk default branches.
|
Line | |
---|
1 | |
---|
2 | /* |
---|
3 | * seq_setprev.c -- set the Previous-Sequence |
---|
4 | * |
---|
5 | * $Id: seq_setprev.c,v 1.1.1.1 1999-02-07 18:14:10 danw Exp $ |
---|
6 | */ |
---|
7 | |
---|
8 | #include <h/mh.h> |
---|
9 | |
---|
10 | /* |
---|
11 | * Add all the messages currently SELECTED to |
---|
12 | * the Previous-Sequence. This way, when the next |
---|
13 | * command is given, there is a convenient way to |
---|
14 | * selected all the messages used in the previous |
---|
15 | * command. |
---|
16 | */ |
---|
17 | |
---|
18 | void |
---|
19 | seq_setprev (struct msgs *mp) |
---|
20 | { |
---|
21 | char **ap, *cp, *dp; |
---|
22 | |
---|
23 | /* |
---|
24 | * Get the list of sequences for Previous-Sequence |
---|
25 | * and split them. |
---|
26 | */ |
---|
27 | if ((cp = context_find (psequence))) { |
---|
28 | dp = getcpy (cp); |
---|
29 | if (!(ap = brkstring (dp, " ", "\n")) || !*ap) { |
---|
30 | free (dp); |
---|
31 | return; |
---|
32 | } |
---|
33 | } else { |
---|
34 | return; |
---|
35 | } |
---|
36 | |
---|
37 | /* Now add all SELECTED messages to each sequence */ |
---|
38 | for (; *ap; ap++) |
---|
39 | seq_addsel (mp, *ap, -1, 1); |
---|
40 | |
---|
41 | free (dp); |
---|
42 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.