Feat: better screen formating & better project resstructure
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
#ifndef STDMEM_H
|
||||
#define STDMEM_H
|
||||
|
||||
#include "types.h"
|
||||
|
||||
static inline void *__memmove(void *dest, const void *src, uint64_t n) {
|
||||
unsigned char *__d = (unsigned char *)dest;
|
||||
const unsigned char *__s = (const unsigned char *)src;
|
||||
|
||||
if (__d < __s) {
|
||||
for (unsigned long long i = 0; i < n; i++) {
|
||||
__d[i] = __s[i];
|
||||
}
|
||||
} else {
|
||||
for (unsigned long long i = n; i > 0; i--) {
|
||||
__d[i - 1] = __s[i - 1];
|
||||
}
|
||||
}
|
||||
|
||||
return dest;
|
||||
}
|
||||
|
||||
#endif // STDMEM_H
|
||||
Reference in New Issue
Block a user