X-Git-Url: https://oss.titaniummirror.com/gitweb?a=blobdiff_plain;f=libf2c%2FlibF77%2Fs_cat.c;fp=libf2c%2FlibF77%2Fs_cat.c;h=0000000000000000000000000000000000000000;hb=6fed43773c9b0ce596dca5686f37ac3fc0fa11c0;hp=77a94f64745347e0ce0278447200cb445dbdd4da;hpb=27b11d56b743098deb193d510b337ba22dc52e5c;p=msp430-gcc.git diff --git a/libf2c/libF77/s_cat.c b/libf2c/libF77/s_cat.c deleted file mode 100644 index 77a94f64..00000000 --- a/libf2c/libF77/s_cat.c +++ /dev/null @@ -1,75 +0,0 @@ -/* Unless compiled with -DNO_OVERWRITE, this variant of s_cat allows the - * target of a concatenation to appear on its right-hand side (contrary - * to the Fortran 77 Standard, but in accordance with Fortran 90). - */ - -#include "f2c.h" -#ifndef NO_OVERWRITE -#include -#undef abs -#ifdef KR_headers - extern char *F77_aloc(); - extern void free(); - extern void G77_exit_0 (); -#else -#undef min -#undef max -#include - extern char *F77_aloc(ftnlen, char*); -#endif -#include -#endif /* NO_OVERWRITE */ - - VOID -#ifdef KR_headers -s_cat(lp, rpp, rnp, np, ll) char *lp, *rpp[]; ftnint rnp[], *np; ftnlen ll; -#else -s_cat(char *lp, char *rpp[], ftnint rnp[], ftnint *np, ftnlen ll) -#endif -{ - ftnlen i, nc; - char *rp; - ftnlen n = *np; -#ifndef NO_OVERWRITE - ftnlen L, m; - char *lp0, *lp1; - - lp0 = 0; - lp1 = lp; - L = ll; - i = 0; - while(i < n) { - rp = rpp[i]; - m = rnp[i++]; - if (rp >= lp1 || rp + m <= lp) { - if ((L -= m) <= 0) { - n = i; - break; - } - lp1 += m; - continue; - } - lp0 = lp; - lp = lp1 = F77_aloc(L = ll, "s_cat"); - break; - } - lp1 = lp; -#endif /* NO_OVERWRITE */ - 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++ = ' '; -#ifndef NO_OVERWRITE - if (lp0) { - memcpy(lp0, lp1, L); - free(lp1); - } -#endif - }