Doxygen Source Code Documentation
Main Page Alphabetical List Data Structures File List Data Fields Globals Search
i_indx.c
Go to the documentation of this file.00001 #include "f2c.h"
00002
00003 #ifdef KR_headers
00004 integer i_indx(a, b, la, lb) char *a, *b; ftnlen la, lb;
00005 #else
00006 integer i_indx(char *a, char *b, ftnlen la, ftnlen lb)
00007 #endif
00008 {
00009 ftnlen i, n;
00010 char *s, *t, *bend;
00011
00012 n = la - lb + 1;
00013 bend = b + lb;
00014
00015 for(i = 0 ; i < n ; ++i)
00016 {
00017 s = a + i;
00018 t = b;
00019 while(t < bend)
00020 if(*s++ != *t++)
00021 goto no;
00022 return(i+1);
00023 no: ;
00024 }
00025 return(0);
00026 }