repo.or.cz
/
neatlibc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
setjmp.h: implement setjmp() and longjmp()
[neatlibc.git]
/
rand.c
blob
13f5d20fccba1fdf69fbd3183d336ec7699201c3
1
#include <stdlib.h>
2
3
static unsigned
r
;
4
5
void
srand
(
unsigned int
seed
)
6
{
7
r
=
seed
;
8
}
9
10
int
rand
(
void
)
11
{
12
r
=
r
*
1103515245
+
12345
;
13
return
r
&
0x7fffffff
;
14
}