develop/ktcc: Post-SVN tidy
- Move source code from `trunk` into program root directory. - Update build files.
This commit is contained in:
15
programs/develop/ktcc/libc.obj/source/string/memcmp.c
Normal file
15
programs/develop/ktcc/libc.obj/source/string/memcmp.c
Normal file
@@ -0,0 +1,15 @@
|
||||
/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
|
||||
int memcmp(const void* s1, const void* s2, size_t n)
|
||||
{
|
||||
if (n != 0) {
|
||||
const unsigned char *p1 = s1, *p2 = s2;
|
||||
do {
|
||||
if (*p1++ != *p2++)
|
||||
return (*--p1 - *--p2);
|
||||
} while (--n != 0);
|
||||
}
|
||||
return 0;
|
||||
}
|
Reference in New Issue
Block a user