Root/
Source at commit 1077 created 13 years 1 month ago. By azimutz, Removing this info from DEBUG's realm. This will be enabled by default until i gather enough feedback to decide whether it will stay On or Off by default. This info display, is only available on Gui; ShowInfo=No disables it. For the Gui minimalist, "Boot Banner"=No also disables it. Ok, "house cleaning" is suspended until i figure out what Meklort's cooking over at that new branch... "rewrite" :-o just the name sounds scary :-D | |
---|---|
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 | }␊ |
25 |