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
Add memtest support.
[syslinux-debian/hramrach.git]
/
com32
/
lib
/
strcmp.c
blob
47a4aad873d27136f221c615eb5c0f0915ace828
1
/*
2
* strcmp.c
3
*/
4
5
#include <string.h>
6
7
int
strcmp
(
const char
*
s1
,
const char
*
s2
)
8
{
9
const unsigned char
*
c1
= (
const unsigned char
*)
s1
;
10
const unsigned char
*
c2
= (
const unsigned char
*)
s2
;
11
unsigned char
ch
;
12
int
d
=
0
;
13
14
while
(
1
) {
15
d
= (
int
)(
ch
= *
c1
++) - (
int
)*
c2
++;
16
if
(
d
|| !
ch
)
17
break
;
18
}
19
20
return
d
;
21
}