source: trunk/minix/lib/other/swab.c@ 9

Last change on this file since 9 was 9, checked in by Mattia Monga, 13 years ago

Minix 3.1.2a

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
8void swab(from, to, count)
9char *from;
10char *to;
11int 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.