projects
/
mmh
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
351a69858c82a874959d12f9b8892f79d1db2ee7
[mmh]
/
strindex.c
1
/* strindex.c - "unsigned" lexical index */
2
#ifndef lint
3
static char ident[] = "@(#)$Id: strindex.c,v 2.3 1992/12/15 00:20:22 jromine Exp $";
4
#endif /* lint */
5
6
7
int stringdex (p1, p2)
8
register char *p1,
9
*p2;
10
{
11
register char *p;
12
13
if (p1 == 0 || p2 == 0) return(-1); /* XXX */
14
15
for (p = p2; *p; p++)
16
if (uprf (p, p1))
17
return (p - p2);
18
19
return (-1);
20
}