Extended Array Library
This commit is contained in:
18
libkeke_utils.h
Normal file
18
libkeke_utils.h
Normal file
@ -0,0 +1,18 @@
|
||||
#ifndef LIBKEKE_UTILS
|
||||
#define LIBKEKE_UTILS
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
#define BOOL_PRETTY(b) (b ? "True" : "False")
|
||||
|
||||
static void keke_swap(void *a, void *b, size_t size) {
|
||||
char *aa = a;
|
||||
char *bb = b;
|
||||
for(size_t i = 0; i < size; i++) {
|
||||
aa[i] ^= bb[i];
|
||||
bb[i] ^= aa[i];
|
||||
aa[i] ^= bb[i];
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user