Last change
on this file since 400 was 389, checked in by coas-nagasima, 5 years ago |
ビルドが通るよう更新
|
-
Property svn:eol-style
set to
native
-
Property svn:mime-type
set to
text/x-csrc;charset=UTF-8
|
File size:
230 bytes
|
Rev | Line | |
---|
[388] | 1 | #include <unistd.h>
|
---|
| 2 |
|
---|
| 3 | void swab(const void *restrict _src, void *restrict _dest, ssize_t n)
|
---|
| 4 | {
|
---|
| 5 | const char *src = _src;
|
---|
| 6 | char *dest = _dest;
|
---|
| 7 | for (; n>1; n-=2) {
|
---|
| 8 | dest[0] = src[1];
|
---|
| 9 | dest[1] = src[0];
|
---|
| 10 | dest += 2;
|
---|
| 11 | src += 2;
|
---|
| 12 | }
|
---|
| 13 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.