ReactOS
0.4.16-dev-1044-ga6558c0
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
strpbrk.c
Go to the documentation of this file.
1
2
#include <limits.h>
3
#include <string.h>
4
5
#define BIT_SIZE (CHAR_BIT * sizeof(unsigned long) / sizeof(char))
6
7
char
*
__cdecl
strpbrk
(
const
char
*
s1
,
const
char
*
s2
)
8
{
9
if
(*
s2
== 0)
10
{
11
return
0;
12
}
13
if
(*(
s2
+1) == 0)
14
{
15
return
strchr
(
s1
, *
s2
);
16
}
17
else
if
(*(
s2
+2) == 0)
18
{
19
char
*s3, *s4;
20
s3 =
strchr
(
s1
, *
s2
);
21
s4 =
strchr
(
s1
, *(
s2
+1));
22
if
(s3 == 0)
23
{
24
return
s4;
25
}
26
else
if
(s4 == 0)
27
{
28
return
s3;
29
}
30
return
s3 < s4 ? s3 : s4;
31
}
32
else
33
{
34
unsigned
long
char_map[(1 <<
CHAR_BIT
) /
BIT_SIZE
] = {0, };
35
const
unsigned
char
*
str
= (
const
unsigned
char
*)
s1
;
36
while
(*
s2
)
37
{
38
char_map[*(
const
unsigned
char
*)
s2
/
BIT_SIZE
] |= (1 << (*(
const
unsigned
char
*)
s2
%
BIT_SIZE
));
39
s2
++;
40
}
41
while
(*
str
)
42
{
43
if
(char_map[*
str
/
BIT_SIZE
] & (1 << (*
str
%
BIT_SIZE
)))
44
{
45
return
(
char
*)((
size_t
)
str
);
46
}
47
str
++;
48
}
49
}
50
return
0;
51
}
52
strchr
char * strchr(const char *String, int ch)
Definition:
utclib.c:501
__cdecl
#define __cdecl
Definition:
accygwin.h:79
strpbrk
char *__cdecl strpbrk(const char *s1, const char *s2)
Definition:
strpbrk.c:7
BIT_SIZE
#define BIT_SIZE
Definition:
strpbrk.c:5
CHAR_BIT
#define CHAR_BIT
Definition:
urlcache.c:62
size_t
__kernel_size_t size_t
Definition:
linux.h:237
s1
struct S1 s1
str
const WCHAR * str
Definition:
rpc_transport.c:2724
s2
PCWSTR s2
Definition:
shell32_main.h:38
sdk
lib
crt
string
strpbrk.c
Generated on Sun Apr 27 2025 06:15:01 for ReactOS by
1.9.6