3 * seq_print.c -- Routines to print sequence information.
7 * This code is Copyright (c) 2002, by the authors of nmh. See the
8 * COPYRIGHT file in the root directory of the nmh distribution for
9 * complete copyright information.
14 #define empty(s) ((s) ? (s) : "")
17 * Print all the sequences in a folder
20 seq_printall (struct msgs *mp)
25 for (i = 0; mp->msgattrs[i]; i++) {
26 list = seq_list (mp, mp->msgattrs[i]);
27 printf ("%s%s: %s\n", mp->msgattrs[i],
28 is_seq_private (mp, i) ? " (private)" : "", empty(list));
34 * Print a particular sequence in a folder
37 seq_print (struct msgs *mp, char *seqname)
42 /* get the index of sequence */
43 i = seq_getnum (mp, seqname);
45 /* get sequence information */
46 list = seq_list (mp, seqname);
48 printf ("%s%s: %s\n", seqname,
49 (i == -1) ? "" : is_seq_private(mp, i) ? " (private)" : "", empty(list));