|
|
1.1 ! root 1: /* ! 2: * C string library internals. ! 3: * _memxchg() ! 4: * Exchange records of 'n' bytes pointed to by 's1' and 's2'. ! 5: */ ! 6: ! 7: #include <string.h> ! 8: ! 9: void ! 10: _memxchg(s1, s2, n) ! 11: register char *s1, *s2; ! 12: register size_t n; ! 13: { ! 14: register int i; ! 15: ! 16: while (n--) { ! 17: i = *s1; ! 18: *s1++ = *s2; ! 19: *s2++ = i; ! 20: } ! 21: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.