|
|
1.1 ! root 1: # include <sccs.h> ! 2: ! 3: SCCSID(@(#)smove.c 8.1 12/31/84) ! 4: ! 5: /* ! 6: ** STRING MOVE ! 7: ** ! 8: ** The string `a' is moved to the string `b'. The length ! 9: ** of the string is returned. `a' must be null terminated. ! 10: ** There is no test for overflow of `b'. ! 11: */ ! 12: ! 13: smove(a, b) ! 14: register char *a, *b; ! 15: { ! 16: register int l; ! 17: ! 18: l = 0; ! 19: while (*a != '\0') ! 20: { ! 21: *b++ = *a++; ! 22: l++; ! 23: } ! 24: *b = '\0'; ! 25: return (l); ! 26: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.