/*
 * string.c
 *
 * rindex and index for portability.
 *
 */

char *
rindex(sp, c)
	register char *sp;
	register int c;
{
	register char *r;

	r = 0;
	do {
		if (*sp == c)
			r = sp;
	} while (*sp++);
	return r;
}

char *
index(sp, c)
	register char *sp;
	register int c;
{
	do {
		if (*sp == c)
			return (sp);
	} while (*sp++);
	return 0;
}
