Doxygen Source Code Documentation
Main Page Alphabetical List Data Structures File List Data Fields Globals Search
s_copy.c
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007 #include "f2c.h"
00008
00009
00010
00011 #ifdef KR_headers
00012 VOID s_copy(a, b, la, lb) register char *a, *b; ftnlen la, lb;
00013 #else
00014 void s_copy(register char *a, register char *b, ftnlen la, ftnlen lb)
00015 #endif
00016 {
00017 register char *aend, *bend;
00018
00019 aend = a + la;
00020
00021 if(la <= lb)
00022 #ifndef NO_OVERWRITE
00023 if (a <= b || a >= b + la)
00024 #endif
00025 while(a < aend)
00026 *a++ = *b++;
00027 #ifndef NO_OVERWRITE
00028 else
00029 for(b += la; a < aend; )
00030 *--aend = *--b;
00031 #endif
00032
00033 else {
00034 bend = b + lb;
00035 #ifndef NO_OVERWRITE
00036 if (a <= b || a >= bend)
00037 #endif
00038 while(b < bend)
00039 *a++ = *b++;
00040 #ifndef NO_OVERWRITE
00041 else {
00042 a += lb;
00043 while(b < bend)
00044 *--a = *--bend;
00045 a += lb;
00046 }
00047 #endif
00048 while(a < aend)
00049 *a++ = ' ';
00050 }
00051 }