Mercurial > hg > Applications > mh
annotate sbr/strindex.c @ 17:76d91e545ea8 default tip
addrsbr and dtimep fix
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 24 Nov 2014 14:49:25 +0900 |
parents | 441a2190cfae |
children |
rev | line source |
---|---|
0 | 1 /* strindex.c - "unsigned" lexical index */ |
2 #ifndef lint | |
12 | 3 static char ident[] = "@(#)$Id: strindex.c,v 1.1.1.1 2005/04/18 14:46:06 kono Exp $"; |
0 | 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 } |