a question about using curses lib

brad at bradley.UUCP brad at bradley.UUCP
Tue Mar 1 01:35:00 AEST 1988


Forgot one other routine

=======
tindex(s,t)
char s[], t[];
{
	register int j,k,i;
	for(i=0;s[i] != '\0'; i++) {
		for(j=i,k=0;t[k] != '\0' && s[j]== t[k]; j++, k++)
			;
		if(t[k] == '\0')
			return(i);
	}
	return(-1);
}



More information about the Comp.unix.questions mailing list