summaryrefslogtreecommitdiffstats
path: root/lib/libF77/s_cat.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libF77/s_cat.c')
-rw-r--r--lib/libF77/s_cat.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/lib/libF77/s_cat.c b/lib/libF77/s_cat.c
new file mode 100644
index 0000000..7f55cd5
--- /dev/null
+++ b/lib/libF77/s_cat.c
@@ -0,0 +1,25 @@
+#include "f2c.h"
+
+#ifdef KR_headers
+VOID s_cat(lp, rpp, rnp, np, ll) char *lp, *rpp[]; ftnlen rnp[], *np, ll;
+#else
+VOID s_cat(char *lp, char *rpp[], ftnlen rnp[], ftnlen *np, ftnlen ll)
+#endif
+{
+ftnlen i, n, nc;
+char *f__rp;
+
+n = *np;
+for(i = 0 ; i < n ; ++i)
+ {
+ nc = ll;
+ if(rnp[i] < nc)
+ nc = rnp[i];
+ ll -= nc;
+ f__rp = rpp[i];
+ while(--nc >= 0)
+ *lp++ = *f__rp++;
+ }
+while(--ll >= 0)
+ *lp++ = ' ';
+}
OpenPOWER on IntegriCloud