view sbr/strindex.c @ 8:77780b728543 current-release **INVALID**

remove CR in base64
author kono
date Sun, 04 Dec 2005 02:34:48 +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);
}