ReactOS
0.4.16-dev-981-g80eb313
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
rand.c
Go to the documentation of this file.
1
/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */
2
#include <precomp.h>
3
#include <
ntsecapi.h
>
4
#include <
internal/tls.h
>
5
6
/*
7
* @implemented
8
*/
9
int
10
rand
(
void
)
11
{
12
thread_data_t
*
data
=
msvcrt_get_thread_data
();
13
14
/* this is the algorithm used by MSVC, according to
15
* http://en.wikipedia.org/wiki/List_of_pseudorandom_number_generators */
16
data
->random_seed =
data
->random_seed * 214013 + 2531011;
17
return
(
data
->random_seed >> 16) &
RAND_MAX
;
18
}
19
20
/*
21
* @implemented
22
*/
23
void
24
srand
(
unsigned
int
seed)
25
{
26
thread_data_t
*
data
=
msvcrt_get_thread_data
();
27
data
->random_seed = seed;
28
}
data
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition:
gl.h:1950
RAND_MAX
#define RAND_MAX
Definition:
stdlib.h:87
msvcrt_get_thread_data
thread_data_t * msvcrt_get_thread_data(void)
Definition:
tls.c:31
ntsecapi.h
srand
void srand(unsigned int seed)
Definition:
rand.c:24
rand
int rand(void)
Definition:
rand.c:10
tls.h
thread_data_t
Definition:
mshtml_private.h:1090
sdk
lib
crt
stdlib
rand.c
Generated on Wed Apr 16 2025 06:14:16 for ReactOS by
1.9.6