projects
/
mmh
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Added all of the MH sources, including RCS files, in
[mmh]
/
docs
/
historical
/
mh-6.8.5
/
sbr
/
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
}