ReactOS
0.4.16-dev-1059-gb1cf981
Toggle main menu visibility
Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
Functions
_
a
b
c
d
e
f
g
h
i
l
m
o
p
r
s
t
u
v
w
Variables
_
c
d
e
f
g
h
i
l
m
n
o
p
s
t
u
x
Typedefs
_
a
b
c
d
e
f
g
h
i
l
m
o
p
r
s
t
u
v
w
x
Enumerations
_
a
b
c
d
f
i
l
m
o
p
s
t
w
x
Enumerator
a
b
c
d
e
f
g
h
i
m
n
o
p
r
s
t
u
v
w
x
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
_
a
b
c
d
e
f
h
i
k
l
m
n
o
p
r
s
t
u
v
w
z
Enumerator
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Properties
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Related Functions
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
v
x
Files
File List
File Members
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Macros
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Examples
strcmp.c
Go to the documentation of this file.
1
/***
2
*strcmp.c - routine to compare two strings (for equal, less, or greater)
3
*
4
* Copyright (c) Microsoft Corporation. All rights reserved.
5
*
6
*Purpose:
7
* Compares two string, determining their ordinal order.
8
*
9
*******************************************************************************/
10
11
#include <string.h>
12
13
#pragma function(strcmp)
14
15
/***
16
*strcmp - compare two strings, returning less than, equal to, or greater than
17
*
18
*Purpose:
19
* STRCMP compares two strings and returns an integer
20
* to indicate whether the first is less than the second, the two are
21
* equal, or whether the first is greater than the second.
22
*
23
* Comparison is done byte by byte on an UNSIGNED basis, which is to
24
* say that Null (0) is less than any other character (1-255).
25
*
26
*Entry:
27
* const char * src - string for left-hand side of comparison
28
* const char * dst - string for right-hand side of comparison
29
*
30
*Exit:
31
* returns -1 if src < dst
32
* returns 0 if src == dst
33
* returns +1 if src > dst
34
*
35
*Exceptions:
36
*
37
*******************************************************************************/
38
39
int
__cdecl
strcmp
(
40
const
char
*
src
,
41
const
char
*
dst
42
)
43
{
44
int
ret
= 0 ;
45
46
while
((
ret
= *(
unsigned
char
*)
src
- *(
unsigned
char
*)
dst
) == 0 && *
dst
)
47
{
48
++
src
, ++
dst
;
49
}
50
51
return
((-
ret
) < 0) - (
ret
< 0);
// (if positive) - (if negative) generates branchless code
52
}
__cdecl
#define __cdecl
Definition:
accygwin.h:79
src
GLenum src
Definition:
glext.h:6340
dst
GLenum GLenum dst
Definition:
glext.h:6340
strcmp
int __cdecl strcmp(const char *src, const char *dst)
Definition:
strcmp.c:39
ret
int ret
Definition:
wcstombs-tests.c:31
sdk
lib
ucrt
string
strcmp.c
Generated on Wed Apr 30 2025 06:16:56 for ReactOS by
1.9.6