|
|
1.1 root 1: long int i_indx(a, b, la, lb)
2: char *a, *b;
3: long int la, lb;
4: {
5: long int i, n;
6: char *s, *t, *bend;
7:
8: n = la - lb + 1;
9: bend = b + lb;
10:
11: for(i = 0 ; i < n ; ++i)
12: {
13: s = a + i;
14: t = b;
15: while(t < bend)
16: if(*s++ != *t++)
17: goto no;
18: return(i+1);
19: no: ;
20: }
21: return(0);
22: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.