source:
trunk/minix/lib/other/swab.c@
15
Last change on this file since 15 was 9, checked in by , 14 years ago | |
---|---|
File size: 326 bytes |
Line | |
---|---|
1 | #include <lib.h> |
2 | /* swab(3) |
3 | * |
4 | * Author: Terrence W. Holm Sep. 1988 |
5 | */ |
6 | _PROTOTYPE( void swab, (char *from, char *to, int count)); |
7 | |
8 | void swab(from, to, count) |
9 | char *from; |
10 | char *to; |
11 | int count; |
12 | { |
13 | register char temp; |
14 | |
15 | count >>= 1; |
16 | |
17 | while (--count >= 0) { |
18 | temp = *from++; |
19 | *to++ = *from++; |
20 | *to++ = temp; |
21 | } |
22 | } |
Note:
See TracBrowser
for help on using the repository browser.