1 --- random.3.orig 2010-04-28 23:38:47.000000000 -0700
2 +++ random.3 2010-04-29 09:47:13.000000000 -0700
15 .Nd better random number generator; routines for changing generators
33 +.Fa "const char *state"
36 -.Fn srandom "unsigned long seed"
43 -.Fn initstate "unsigned long seed" "char *state" "long n"
45 -.Fn setstate "char *state"
53 -uses a non-linear additive feedback random number generator employing a
54 -default table of size 31 long integers to return successive pseudo-random
55 +uses a non-linear, additive feedback, random number generator, employing a
56 +default table of size 31 long integers.
57 +It returns successive pseudo-random
58 numbers in the range from 0 to
59 .if t 2\u\s731\s10\d\(mi1.
61 @@ -78,7 +91,7 @@ The difference is that
63 produces a much less random sequence \(em in fact, the low dozen bits
64 generated by rand go through a cyclic pattern.
65 -All the bits generated by
66 +All of the bits generated by
70 @@ -87,18 +100,21 @@ will produce a random binary
76 +sets the initial seed value for future calls to
81 will by default produce a sequence of numbers that can be duplicated
91 -routine initializes a state array using the
92 +routine initializes a state array, using the
94 random number device which returns good random numbers,
95 suitable for cryptographic use.
96 @@ -123,7 +139,7 @@ more state, the better the random number
97 the nearest known amount.
98 Using less than 8 bytes will cause an error.)
99 The seed for the initialization (which specifies a starting point for
100 -the random number sequence, and provides for restarting at the same
101 +the random number sequence and provides for restarting at the same
102 point) is also an argument.
105 @@ -162,7 +178,7 @@ it is initialized.
106 With 256 bytes of state information, the period of the random number
107 generator is greater than
108 .if t 2\u\s769\s10\d,
111 which should be sufficient for most purposes.
114 @@ -171,11 +187,36 @@ is called with less than 8 bytes of stat
116 detects that the state information has been garbled, error
117 messages are printed on the standard error output.
119 +.Fd #include <stdlib.h>
124 +.Fa "unsigned long seed"
138 +.Fa "unsigned long seed"
141 +The type of each parameter is different in the legacy version.
151 functions appeared in