aa9d57dd4e660bd36f307afbd919c8c3549fab06
[mmh] / sbr / seq_getnum.c
1
2 /*
3  * seq_getnum.c -- find the index for a sequence
4  *              -- return -1 if sequence doesn't exist
5  *
6  * $Id$
7  *
8  * This code is Copyright (c) 2002, by the authors of nmh.  See the
9  * COPYRIGHT file in the root directory of the nmh distribution for
10  * complete copyright information.
11  */
12
13 #include <h/mh.h>
14
15
16 int
17 seq_getnum (struct msgs *mp, char *seqname)
18 {
19     int i;
20
21     for (i = 0; mp->msgattrs[i]; i++)
22         if (!strcmp (mp->msgattrs[i], seqname))
23             return i;
24
25     return -1;
26 }