source: trunk/third/nmh/sbr/strindex.c @ 12455

Revision 12455, 316 bytes checked in by danw, 26 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r12454, which included commits to RCS files with non-trunk default branches.
Line 
1
2/*
3 * strindex.c -- "unsigned" lexical index
4 *
5 * $Id: strindex.c,v 1.1.1.1 1999-02-07 18:14:10 danw Exp $
6 */
7
8#include <h/mh.h>
9
10int
11stringdex (char *p1, char *p2)
12{
13    char *p;
14
15    if (p1 == NULL || p2 == NULL)
16        return -1;
17
18    for (p = p2; *p; p++)
19        if (uprf (p, p1))
20            return (p - p2);
21
22    return -1;
23}
Note: See TracBrowser for help on using the repository browser.