]>
diplodocus.org Git - nmh/blob - sbr/seq_print.c
9c74e8620c96143524017af1f077d80135cd92bf
2 * seq_print.c -- Routines to print sequence information.
4 * This code is Copyright (c) 2002, by the authors of nmh. See the
5 * COPYRIGHT file in the root directory of the nmh distribution for
6 * complete copyright information.
11 #define empty(s) ((s) ? (s) : "")
14 * Print all the sequences in a folder
17 seq_printall (struct msgs
*mp
)
22 for (i
= 0; i
< svector_size (mp
->msgattrs
); i
++) {
23 list
= seq_list (mp
, svector_at (mp
->msgattrs
, i
));
24 printf ("%s%s: %s\n", svector_at (mp
->msgattrs
, i
),
25 is_seq_private (mp
, i
) ? " (private)" : "", empty(list
));
31 * Print a particular sequence in a folder
34 seq_print (struct msgs
*mp
, char *seqname
)
39 /* get the index of sequence */
40 i
= seq_getnum (mp
, seqname
);
42 /* get sequence information */
43 list
= seq_list (mp
, seqname
);
45 printf ("%s%s: %s\n", seqname
,
46 (i
== -1) ? "" : is_seq_private(mp
, i
) ? " (private)" : "", empty(list
));