1998-02-01 02:37:08 +01:00
|
|
|
#include "f2c.h"
|
|
|
|
|
2002-06-01 14:38:32 +02:00
|
|
|
integer
|
|
|
|
i_indx (char *a, char *b, ftnlen la, ftnlen lb)
|
1998-02-01 02:37:08 +01:00
|
|
|
{
|
2002-06-01 14:38:32 +02:00
|
|
|
ftnlen i, n;
|
|
|
|
char *s, *t, *bend;
|
1998-02-01 02:37:08 +01:00
|
|
|
|
2002-06-01 14:38:32 +02:00
|
|
|
n = la - lb + 1;
|
|
|
|
bend = b + lb;
|
1998-02-01 02:37:08 +01:00
|
|
|
|
2002-06-01 14:38:32 +02:00
|
|
|
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);
|
1998-02-01 02:37:08 +01:00
|
|
|
}
|