mirror of
https://github.com/vivier/EMILE.git
synced 2024-12-21 03:29:49 +00:00
9bd9755dbb
Signed-off-by: Laurent Vivier <Laurent@Vivier.EU>
24 lines
287 B
C
24 lines
287 B
C
/*
|
|
*
|
|
* (c) 2004,2005 Laurent Vivier <Laurent@Vivier.EU>
|
|
*
|
|
*/
|
|
|
|
#include <string.h>
|
|
|
|
int strncmp(const char *__s1, const char *__s2, size_t __n)
|
|
{
|
|
int tmp;
|
|
while (__n--)
|
|
{
|
|
tmp = *__s1 - *__s2;
|
|
if (tmp)
|
|
return tmp;
|
|
if (!*__s1)
|
|
break;
|
|
__s1++; __s2++;
|
|
}
|
|
|
|
return 0;
|
|
}
|