moreproc will always be set in config/config.c, thus eliminated the ISTTY case.
[mmh] / sbr / strindex.c
1 /*
2 ** strindex.c -- "unsigned" lexical index
3 **
4 ** This code is Copyright (c) 2002, by the authors of nmh.  See the
5 ** COPYRIGHT file in the root directory of the nmh distribution for
6 ** complete copyright information.
7 */
8
9 #include <h/mh.h>
10
11 int
12 stringdex(char *p1, char *p2)
13 {
14         char *p;
15
16         if (p1 == NULL || p2 == NULL)
17                 return -1;
18
19         for (p = p2; *p; p++)
20                 if (uprf(p, p1))
21                         return (p - p2);
22
23         return -1;
24 }