34 |
* It was reworked for the GNU C Library by Roland McGrath. |
* It was reworked for the GNU C Library by Roland McGrath. |
35 |
*/ |
*/ |
36 |
|
|
37 |
|
/* |
38 |
|
|
39 |
|
@deftypefn Supplement {long int} random (void) |
40 |
|
@deftypefnx Supplement void srandom (unsigned int @var{seed}) |
41 |
|
@deftypefnx Supplement void* initstate (unsigned int @var{seed}, void *@var{arg_state}, unsigned long @var{n}) |
42 |
|
@deftypefnx Supplement void* setstate (void *@var{arg_state}) |
43 |
|
|
44 |
|
Random number functions. @code{random} returns a random number in the |
45 |
|
range 0 to @code{LONG_MAX}. @code{srandom} initializes the random |
46 |
|
number generator to some starting point determined by @var{seed} |
47 |
|
(else, the values returned by @code{random} are always the same for each |
48 |
|
run of the program). @code{initstate} and @code{setstate} allow fine-grained |
49 |
|
control over the state of the random number generator. |
50 |
|
|
51 |
|
@end deftypefn |
52 |
|
|
53 |
|
*/ |
54 |
|
|
55 |
#include <errno.h> |
#include <errno.h> |
56 |
|
|
57 |
#if 0 |
#if 0 |