summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorassar <>2001-06-09 01:41:59 +0000
committerassar <>2001-06-09 01:41:59 +0000
commite48fbbe799cf5b7ff38a184af2aa7f3ce90f7f65 (patch)
tree461691062c78d8323d4c88232dda2efb04b7d0ce
parentc13690753132d874488bb128d1c76d16d9dffb9d (diff)
downloadopenbsd-e48fbbe799cf5b7ff38a184af2aa7f3ce90f7f65.tar.gz
openbsd-e48fbbe799cf5b7ff38a184af2aa7f3ce90f7f65.tar.bz2
openbsd-e48fbbe799cf5b7ff38a184af2aa7f3ce90f7f65.zip
remove confusing comparison with srand (it does not return the old seed)
use .Sh AUTHORS and .An for author
-rw-r--r--src/lib/libc/stdlib/random.314
1 files changed, 3 insertions, 11 deletions
diff --git a/src/lib/libc/stdlib/random.3 b/src/lib/libc/stdlib/random.3
index d3a3198ebf..548c5aae7a 100644
--- a/src/lib/libc/stdlib/random.3
+++ b/src/lib/libc/stdlib/random.3
@@ -29,7 +29,7 @@
29.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30.\" SUCH DAMAGE. 30.\" SUCH DAMAGE.
31.\" 31.\"
32.\" $OpenBSD: random.3,v 1.12 2000/04/20 13:50:02 aaron Exp $ 32.\" $OpenBSD: random.3,v 1.13 2001/06/09 01:41:59 assar Exp $
33.\" 33.\"
34.Dd April 19, 1991 34.Dd April 19, 1991
35.Dt RANDOM 3 35.Dt RANDOM 3
@@ -81,16 +81,8 @@ For example,
81will produce a random binary 81will produce a random binary
82value. 82value.
83.Pp 83.Pp
84Unlike
85.Xr srand ,
86.Fn srandom
87does not return the old seed; the reason for this is that the amount of
88state information used is much more than a single word.
89(Two other routines are provided to deal with restarting/changing random
90number generators).
91Like 84Like
92.Xr rand 3 , 85.Xr rand 3 ,
93however,
94.Fn random 86.Fn random
95will by default produce a sequence of numbers that can be duplicated 87will by default produce a sequence of numbers that can be duplicated
96by calling 88by calling
@@ -162,8 +154,8 @@ it is initialized.
162With 256 bytes of state information, the period of the random number 154With 256 bytes of state information, the period of the random number
163generator is greater than 2**69 155generator is greater than 2**69
164which should be sufficient for most purposes. 156which should be sufficient for most purposes.
165.Sh AUTHOR 157.Sh AUTHORS
166Earl T. Cohen 158.An Earl T. Cohen
167.Sh DIAGNOSTICS 159.Sh DIAGNOSTICS
168If 160If
169.Fn initstate 161.Fn initstate