Commit 10304bed authored by Martin Mareš's avatar Martin Mareš

Split random number functions off io.c, so that they can be documented

separately.
parent 5cc1e1f8
H UNIX system dependent parts
S io.c
S log.c
S krt.c
# io.c is documented under Resources
......@@ -5,6 +5,7 @@ io.c
unix.h
endian.h
config.Y
random.c
krt.c
krt.h
......
......@@ -28,20 +28,6 @@
#include "lib/unix.h"
#include "lib/sysio.h"
/*
* Random Numbers
*/
u32
random_u32(void)
{
long int rand_low, rand_high;
rand_low = random();
rand_high = random();
return (rand_low & 0xffff) | ((rand_high & 0xffff) << 16);
}
/*
* Tracked Files
*/
......
/*
* BIRD Internet Routing Daemon -- Random Numbers
*
* (c) 2000 Martin Mares <mj@ucw.cz>
*
* Can be freely distributed and used under the terms of the GNU GPL.
*/
#include <stdlib.h>
#include "nest/bird.h"
u32
random_u32(void)
{
long int rand_low, rand_high;
rand_low = random();
rand_high = random();
return (rand_low & 0xffff) | ((rand_high & 0xffff) << 16);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment