Initial revision
[mmh] / sbr / context_find.c
1
2 /*
3  * context_find.c -- find an entry in the context/profile list
4  *
5  * $Id$
6  */
7
8 #include <h/mh.h>
9
10
11 char *
12 context_find (char *str)
13 {
14     struct node *np;
15
16     /* sanity check - check that context has been read */
17     if (defpath == NULL)
18         adios (NULL, "oops, context hasn't been read yet");
19
20     for (np = m_defs; np; np = np->n_next)
21         if (!strcasecmp (np->n_name, str))
22             return (np->n_field);
23
24     return NULL;
25 }