summaryrefslogtreecommitdiffstats
path: root/contrib/libf2c/libF77/s_copy.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/libf2c/libF77/s_copy.c')
-rw-r--r--contrib/libf2c/libF77/s_copy.c57
1 files changed, 28 insertions, 29 deletions
diff --git a/contrib/libf2c/libF77/s_copy.c b/contrib/libf2c/libF77/s_copy.c
index d167351..a91071e 100644
--- a/contrib/libf2c/libF77/s_copy.c
+++ b/contrib/libf2c/libF77/s_copy.c
@@ -8,44 +8,43 @@
/* assign strings: a = b */
-#ifdef KR_headers
-VOID s_copy(a, b, la, lb) register char *a, *b; ftnlen la, lb;
-#else
-void s_copy(register char *a, register char *b, ftnlen la, ftnlen lb)
-#endif
+void
+s_copy (register char *a, register char *b, ftnlen la, ftnlen lb)
{
- register char *aend, *bend;
+ register char *aend, *bend;
- aend = a + la;
+ aend = a + la;
- if(la <= lb)
+ if (la <= lb)
#ifndef NO_OVERWRITE
- if (a <= b || a >= b + la)
+ if (a <= b || a >= b + la)
#endif
- while(a < aend)
- *a++ = *b++;
+ while (a < aend)
+ *a++ = *b++;
#ifndef NO_OVERWRITE
- else
- for(b += la; a < aend; )
- *--aend = *--b;
+ else
+ for (b += la; a < aend;)
+ *--aend = *--b;
#endif
- else {
- bend = b + lb;
+ else
+ {
+ bend = b + lb;
#ifndef NO_OVERWRITE
- if (a <= b || a >= bend)
+ if (a <= b || a >= bend)
#endif
- while(b < bend)
- *a++ = *b++;
+ while (b < bend)
+ *a++ = *b++;
#ifndef NO_OVERWRITE
- else {
- a += lb;
- while(b < bend)
- *--a = *--bend;
- a += lb;
- }
-#endif
- while(a < aend)
- *a++ = ' ';
- }
+ else
+ {
+ a += lb;
+ while (b < bend)
+ *--a = *--bend;
+ a += lb;
}
+#endif
+ while (a < aend)
+ *a++ = ' ';
+ }
+}
OpenPOWER on IntegriCloud