]>
diplodocus.org Git - nmh/blob - sbr/seq_print.c
3 * seq_print.c -- Routines to print sequence information.
5 * This code is Copyright (c) 2002, by the authors of nmh. See the
6 * COPYRIGHT file in the root directory of the nmh distribution for
7 * complete copyright information.
12 #define empty(s) ((s) ? (s) : "")
15 * Print all the sequences in a folder
18 seq_printall (struct msgs
*mp
)
23 for (i
= 0; i
< svector_size (mp
->msgattrs
); i
++) {
24 list
= seq_list (mp
, svector_at (mp
->msgattrs
, i
));
25 printf ("%s%s: %s\n", svector_at (mp
->msgattrs
, i
),
26 is_seq_private (mp
, i
) ? " (private)" : "", empty(list
));
32 * Print a particular sequence in a folder
35 seq_print (struct msgs
*mp
, char *seqname
)
40 /* get the index of sequence */
41 i
= seq_getnum (mp
, seqname
);
43 /* get sequence information */
44 list
= seq_list (mp
, seqname
);
46 printf ("%s%s: %s\n", seqname
,
47 (i
== -1) ? "" : is_seq_private(mp
, i
) ? " (private)" : "", empty(list
));