diff options
| author | David E. O'Brien <obrien@FreeBSD.org> | 1999-09-18 10:51:31 +0000 |
|---|---|---|
| committer | David E. O'Brien <obrien@FreeBSD.org> | 1999-09-18 10:51:31 +0000 |
| commit | c1f999a45c30f40a3964639c48761ad29a52c612 (patch) | |
| tree | 0938eb35cebcf917f447463078144fc4832576c6 /contrib/libf2c/libF77/h_indx.c | |
| parent | 2a266d02ba4304af542da2cc521ecc0edc1c9706 (diff) | |
Notes
Diffstat (limited to 'contrib/libf2c/libF77/h_indx.c')
| -rw-r--r-- | contrib/libf2c/libF77/h_indx.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/contrib/libf2c/libF77/h_indx.c b/contrib/libf2c/libF77/h_indx.c new file mode 100644 index 000000000000..a211cc7fa0fb --- /dev/null +++ b/contrib/libf2c/libF77/h_indx.c @@ -0,0 +1,26 @@ +#include "f2c.h" + +#ifdef KR_headers +shortint h_indx(a, b, la, lb) char *a, *b; ftnlen la, lb; +#else +shortint h_indx(char *a, char *b, ftnlen la, ftnlen lb) +#endif +{ +ftnlen 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((shortint)i+1); + no: ; + } +return(0); +} |
