]> diplodocus.org Git - nmh/blob - sbr/seq_getnum.c
757695bbbeeec6f83460b1c1c6713eaff6e87217
[nmh] / sbr / seq_getnum.c
1 /*
2 * seq_getnum.c -- find the index for a sequence
3 * -- return -1 if sequence doesn't exist
4 *
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.
8 */
9
10 #include <h/mh.h>
11
12
13 int
14 seq_getnum (struct msgs *mp, char *seqname)
15 {
16 size_t i;
17
18 for (i = 0; i < svector_size (mp->msgattrs); i++)
19 if (!strcmp (svector_at (mp->msgattrs, i), seqname))
20 return i;
21
22 return -1;
23 }