]> diplodocus.org Git - nmh/blob - sbr/seq_getnum.c
Reverted commit 9a4b4a3d3b27fe4a7ff6d0b8724ce1c06b5917eb.
[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 * This code is Copyright (c) 2002, by the authors of nmh. See the
7 * COPYRIGHT file in the root directory of the nmh distribution for
8 * complete copyright information.
9 */
10
11 #include <h/mh.h>
12
13
14 int
15 seq_getnum (struct msgs *mp, char *seqname)
16 {
17 size_t i;
18
19 for (i = 0; i < svector_size (mp->msgattrs); i++)
20 if (!strcmp (svector_at (mp->msgattrs, i), seqname))
21 return i;
22
23 return -1;
24 }