git://git.jankratochvil.net
/
reactos.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
:pserver:cvsanon@mok.lvcm.com:/CVS/ReactOS reactos
[reactos.git]
/
lib
/
crtdll
/
stdlib
/
rand.c
1
/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */
2
#include <crtdll/stdlib.h>
3
4
static unsigned long long next = 0;
5
6
int
7
rand(void)
8
{
9
next = next * 0x5deece66dLL + 11;
10
return (int)((next >> 16) & RAND_MAX);
11
}
12
13
void
14
srand(unsigned seed)
15
{
16
next = seed;
17
}