Mercurial > hg > Applications > mh
view sbr/strindex.c @ 3:f89a9a79e124
utf-8
author | kono |
---|---|
date | Wed, 20 Apr 2005 00:25:01 +0900 |
parents | bce86c4163a3 |
children | 441a2190cfae |
line wrap: on
line source
/* strindex.c - "unsigned" lexical index */ #ifndef lint static char ident[] = "@(#)$Id$"; #endif /* lint */ int stringdex (p1, p2) register char *p1, *p2; { register char *p; if (p1 == 0 || p2 == 0) return(-1); /* XXX */ for (p = p2; *p; p++) if (uprf (p, p1)) return (p - p2); return (-1); }