minix/lib/other/swab.c

23 lines
326 B
C
Raw Normal View History

2005-04-21 16:53:53 +02:00
#include <lib.h>
/* swab(3)
*
* Author: Terrence W. Holm Sep. 1988
*/
_PROTOTYPE( void swab, (char *from, char *to, int count));
void swab(from, to, count)
char *from;
char *to;
int count;
{
register char temp;
count >>= 1;
while (--count >= 0) {
temp = *from++;
*to++ = *from++;
*to++ = temp;
}
}