diff options
author | Alexis211 <alexis211@gmail.com> | 2009-10-20 19:23:33 +0200 |
---|---|---|
committer | Alexis211 <alexis211@gmail.com> | 2009-10-20 19:23:33 +0200 |
commit | 768ada13917aeda373e6ff5fee21faf90c963746 (patch) | |
tree | 9e26d7d65e1693d1a7f9fd93c9fd33b41d175464 /Source/Library/Common/CMem.ns.cpp | |
parent | 6ec4b3d31080f90393e72989d559cfb76eff6f9d (diff) | |
parent | 9836acd720988af30250c2c1ec18d618664dea4e (diff) | |
download | Melon-768ada13917aeda373e6ff5fee21faf90c963746.tar.gz Melon-768ada13917aeda373e6ff5fee21faf90c963746.zip |
Merge branch 'usermode_syscalls'
Conflicts:
Source/Kernel/Makefile
Diffstat (limited to 'Source/Library/Common/CMem.ns.cpp')
-rw-r--r-- | Source/Library/Common/CMem.ns.cpp | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/Source/Library/Common/CMem.ns.cpp b/Source/Library/Common/CMem.ns.cpp new file mode 100644 index 0000000..37cdf0c --- /dev/null +++ b/Source/Library/Common/CMem.ns.cpp @@ -0,0 +1,35 @@ +#include <common.h> + +namespace CMem { + +//Standard C functions +u8int *memcpy(u8int *dest, const u8int *src, int count) { + for (int i = 0; i < count; i++) { + dest[i] = src[i]; + } + return dest; +} + +u8int *memset(u8int *dest, u8int val, int count) { + for (int i = 0; i < count; i++) { + dest[i] = val; + } + return dest; +} + +u16int *memsetw(u16int *dest, u16int val, int count) { + for (int i = 0; i < count; i++) { + dest[i] = val; + } + return dest; +} + +u32int strlen(const char *str) { + u32int i = 0; + while (str[i]) { + i++; + } + return i; +} + +} |