|
|
1.1 ! root 1: # include <sccs.h> ! 2: ! 3: SCCSID(@(#)append.c 7.1 2/5/81) ! 4: ! 5: /* ! 6: ** APPEND -- block concatenate ! 7: ** ! 8: ** block `b1' of length `l1' is concatenated to block ! 9: ** `b2' of length `l2', giving `b3'. ! 10: ** ! 11: ** Returns the address of the next byte available after ! 12: ** the end of `b3'. ! 13: */ ! 14: ! 15: char * ! 16: append(b1, l1, b2, l2, b3) ! 17: int l1, l2; ! 18: char *b1, *b2, *b3; ! 19: { ! 20: register char *p, *q; ! 21: register int n; ! 22: ! 23: p = b3; ! 24: n = l1; ! 25: q = b1; ! 26: while (n-- > 0) ! 27: *p++ = *q++; ! 28: n = l2; ! 29: q = b2; ! 30: while (n-- > 0) ! 31: *p++ = *q++; ! 32: return (p); ! 33: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.