/* Copy.c */ /* Adaptation of Recyclable Object << 'firstwd.c'. */ /* Revision to be 'shiftedLine()' */ /* Actually, this is simple Copy routine, and the crucial part of Shift takes place by the assignment in main() by Pointer jump. else if(strncmp(inline, "Directory of C", 14)==0){ shiftedLine(jumpColumn30, &inline[29]); fprintf (outfp1, "%s", jumpColumn30); } */ /* The version below can accomodate all characters, because the Pointer is just copying the source 'from' */ /* So, I renamed this to 'copy.c', this name is more intuitive. */ #include <ctype.h> extern char *shiftedLine (char *to, char *from) { while (*from!='\0') *to++ = *from++; *to = '\0'; return (from); }