From: David Wasley Date: Sat, 22 Jan 1983 03:15:13 +0000 (-0800) Subject: date and time created 83/01/21 11:15:13 by dlw X-Git-Tag: BSD-4_1c_2-Snapshot-Development~900 X-Git-Url: https://git.subgeniuskitty.com/unix-history/.git/commitdiff_plain/7a665304299252910739b245ee084a3044512cb2 date and time created 83/01/21 11:15:13 by dlw SCCS-vsn: usr.bin/f77/libF77/i_indx.c 1.1 --- diff --git a/usr/src/usr.bin/f77/libF77/i_indx.c b/usr/src/usr.bin/f77/libF77/i_indx.c new file mode 100644 index 0000000000..95abd811a9 --- /dev/null +++ b/usr/src/usr.bin/f77/libF77/i_indx.c @@ -0,0 +1,26 @@ +/* + * "@(#)i_indx.c 1.1" + */ + +long int i_indx(a, b, la, lb) +char *a, *b; +long int la, lb; +{ +long int i, n; +char *s, *t, *bend; + +n = la - lb + 1; +bend = b + lb; + +for(i = 0 ; i < n ; ++i) + { + s = a + i; + t = b; + while(t < bend) + if(*s++ != *t++) + goto no; + return(i+1); + no: ; + } +return(0); +}