Revision 12455,
872 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_print.c -- Routines to print sequence information. |
---|
4 | * |
---|
5 | * $Id: seq_print.c,v 1.1.1.1 1999-02-07 18:14:10 danw Exp $ |
---|
6 | */ |
---|
7 | |
---|
8 | #include <h/mh.h> |
---|
9 | |
---|
10 | #define empty(s) ((s) ? (s) : "") |
---|
11 | |
---|
12 | /* |
---|
13 | * Print all the sequences in a folder |
---|
14 | */ |
---|
15 | void |
---|
16 | seq_printall (struct msgs *mp) |
---|
17 | { |
---|
18 | int i; |
---|
19 | char *list; |
---|
20 | |
---|
21 | for (i = 0; mp->msgattrs[i]; i++) { |
---|
22 | list = seq_list (mp, mp->msgattrs[i]); |
---|
23 | printf ("%s%s: %s\n", mp->msgattrs[i], |
---|
24 | is_seq_private (mp, i) ? " (private)" : "", empty(list)); |
---|
25 | } |
---|
26 | } |
---|
27 | |
---|
28 | |
---|
29 | /* |
---|
30 | * Print a particular sequence in a folder |
---|
31 | */ |
---|
32 | void |
---|
33 | seq_print (struct msgs *mp, char *seqname) |
---|
34 | { |
---|
35 | int i; |
---|
36 | char *list; |
---|
37 | |
---|
38 | /* get the index of sequence */ |
---|
39 | i = seq_getnum (mp, seqname); |
---|
40 | |
---|
41 | /* get sequence information */ |
---|
42 | list = seq_list (mp, seqname); |
---|
43 | |
---|
44 | printf ("%s%s: %s\n", seqname, |
---|
45 | (i == -1) ? "" : is_seq_private(mp, i) ? " (private)" : "", empty(list)); |
---|
46 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.