repo.or.cz
/
syslinux-debian
/
hramrach.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Adding upstream version 6.02~pre8+dfsg.
[syslinux-debian/hramrach.git]
/
com32
/
lib
/
memswap.c
blob
53813ab86ac0e891756acd5ddfab65d8616acfde
1
/*
2
* memswap()
3
*
4
* Swaps the contents of two nonoverlapping memory areas.
5
* This really could be done faster...
6
*/
7
8
#include <string.h>
9
10
void
memswap
(
void
*
m1
,
void
*
m2
,
size_t
n
)
11
{
12
char
*
p
=
m1
;
13
char
*
q
=
m2
;
14
char
tmp
;
15
16
while
(
n
--) {
17
tmp
= *
p
;
18
*
p
= *
q
;
19
*
q
=
tmp
;
20
21
p
++;
22
q
++;
23
}
24
}