char *search( pat, text, n )
char *pat, *text;
int n;
{ int j, k, m, skip[MAXCHAR], d[MAXPATLEN];
m = strlen(pat);
if( m == 0 ) return( text );
preprocpat( pat, skip, d );
for( k=m-1; k= 0 && text[k] == pat[j]; j-- ) k--;
if( j ==(-1) ) return( text+k+1 );
}
return( NULL );
}
|