jfw (01/14/83)
Such a function would probably depend on the particular machine you are running on (witness the hairiness of printf). Here is a version for PDP-11 V7's (this is being written off the top of my pointy little head, so I don't entirely guarantee it, though I have just tested it, and it seems to work): char *strcatx(dest,srcs) char *dest; { char **srcn = &srcs,*p = dest; /* advance p to end of dest. string */ while (*p++) continue; p--; /* now, start catting each pointer on stack */ for ( ; *srcn != 0; srcn++ ) { /* strcpy(p,**srcn) */ while (*p++ = *(*srcn)++) continue; p--; } return dest; } - John Woods, ...!genradbo!mitccc!jfw, JFW%MIT-CCC@MIT-MC PS: It took about 15 minutes to write, test, and debug.