repo.or.cz
/
syslinux-debian
/
hramrach.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Adding upstream version 3.50~pre5.
[syslinux-debian/hramrach.git]
/
com32
/
lib
/
strncmp.c
blob
4dbde1389f77cce75743192b751e9fecc24f1ba0
1
/*
2
* strncmp.c
3
*/
4
5
#include <string.h>
6
7
int
strncmp
(
const char
*
s1
,
const char
*
s2
,
size_t
n
)
8
{
9
const unsigned char
*
c1
=
s1
, *
c2
=
s2
;
10
unsigned char
ch
;
11
int
d
=
0
;
12
13
while
(
n
-- ) {
14
d
= (
int
)(
ch
= *
c1
++) - (
int
)*
c2
++;
15
if
(
d
|| !
ch
)
16
break
;
17
}
18
19
return
d
;
20
}