]> diplodocus.org Git - nmh/blob - sbr/seq_getnum.c
Fix stupid accidental dependence on a bash quirk in previous
[nmh] / 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 }