Implemented some basic libc functions and a text console
This commit is contained in:
8
libc/string/memcmp.c
Normal file
8
libc/string/memcmp.c
Normal file
@@ -0,0 +1,8 @@
|
||||
#include <stddef.h>
|
||||
|
||||
int memcmp(const void *vl, const void *vr, size_t n)
|
||||
{
|
||||
const unsigned char *l=vl, *r=vr;
|
||||
for (; n && *l == *r; n--, l++, r++);
|
||||
return n ? *l-*r : 0;
|
||||
}
|
||||
Reference in New Issue
Block a user