Merge from vendor branch OPENSSH:
[dragonfly.git] / contrib / gcc-3.4 / libf2c / libF77 / h_indx.c
1 #include "f2c.h"
2
3 shortint
4 h_indx (char *a, char *b, ftnlen la, ftnlen lb)
5 {
6   ftnlen i, n;
7   char *s, *t, *bend;
8
9   n = la - lb + 1;
10   bend = b + lb;
11
12   for (i = 0; i < n; ++i)
13     {
14       s = a + i;
15       t = b;
16       while (t < bend)
17         if (*s++ != *t++)
18           goto no;
19       return ((shortint) i + 1);
20     no:;
21     }
22   return (0);
23 }