source: trunk/sys/dietlibc/swab.c @ 264

Last change on this file since 264 was 1, checked in by alain, 8 years ago

First import

File size: 212 bytes
Line 
1#include <unistd.h>
2
3void swab(const void *src, void *dest, ssize_t nbytes)
4{
5  ssize_t i;
6  const char *s=src;
7  char *d=dest;
8  nbytes&=~1;
9  for (i=0; i<nbytes; i+=2) {
10    d[i]=s[i+1];
11    d[i+1]=s[i];
12  }
13}
Note: See TracBrowser for help on using the repository browser.