repo.or.cz
/
minix3.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
. pci driver now returns devices, even when they have been pci_reserve()d
[minix3.git]
/
lib
/
other
/
swab.c
blob
8f02161b94568fca713c6aedc218739688bf0a7e
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
}