diff options
author | peter <peter@FreeBSD.org> | 1995-12-30 19:02:48 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 1995-12-30 19:02:48 +0000 |
commit | c3f352d4ad515968c54d216a0e53252eff8ab3ef (patch) | |
tree | 48ddeda3c6c8d8572cc34bf52ccf9cb9bd97d488 /lib/libF77/s_catow.c | |
parent | ab124e78b0271ddb904b761b31e5c9a0cf24e070 (diff) | |
download | FreeBSD-src-c3f352d4ad515968c54d216a0e53252eff8ab3ef.zip FreeBSD-src-c3f352d4ad515968c54d216a0e53252eff8ab3ef.tar.gz |
This commit was generated by cvs2svn to compensate for changes in r13122,
which included commits to RCS files with non-trunk default branches.
Diffstat (limited to 'lib/libF77/s_catow.c')
-rw-r--r-- | lib/libF77/s_catow.c | 69 |
1 files changed, 0 insertions, 69 deletions
diff --git a/lib/libF77/s_catow.c b/lib/libF77/s_catow.c deleted file mode 100644 index 6dd641c..0000000 --- a/lib/libF77/s_catow.c +++ /dev/null @@ -1,69 +0,0 @@ -/* Variant of s_cat that allows the target of a concatenation to */ -/* appear on its right-hand side (contrary to the Fortran 77 Standard). */ - -#include "f2c.h" -#undef abs -#ifdef KR_headers - extern char *malloc(); - extern void free(); -#else -#include "stdlib.h" -#endif -#include "string.h" - - static VOID -#ifdef KR_headers -s_cat0(lp, rpp, rnp, n, ll) char *lp, *rpp[]; ftnlen rnp[], n, ll; -#else -s_cat0(char *lp, char *rpp[], ftnlen rnp[], ftnlen n, ftnlen ll) -#endif -{ - ftnlen i, nc; - char *rp; - - for(i = 0 ; i < n ; ++i) { - nc = ll; - if(rnp[i] < nc) - nc = rnp[i]; - ll -= nc; - rp = rpp[i]; - while(--nc >= 0) - *lp++ = *rp++; - } - while(--ll >= 0) - *lp++ = ' '; - } - - VOID -#ifdef KR_headers -s_cat(lp, rpp, rnp, np, ll) char *lp, *rpp[]; ftnlen rnp[], *np, ll; -#else -s_cat(char *lp, char *rpp[], ftnlen rnp[], ftnlen *np, ftnlen ll) -#endif -{ - ftnlen i, L, m, n; - char *lpe, *rp; - - n = *np; - lpe = lp; - L = ll; - i = 0; - while(i < n) { - rp = rpp[i]; - m = rnp[i++]; - if (rp >= lpe || rp + m <= lp) { - if ((L -= m) <= 0) { - n = i; - break; - } - lpe += m; - continue; - } - lpe = malloc(ll); - s_cat0(lpe, rpp, rnp, n, ll); - memcpy(lp, lpe, ll); - free(lpe); - return; - } - s_cat0(lp, rpp, rnp, n, ll); - } |