]> git.saurik.com Git - apple/libc.git/blob - stdlib/FreeBSD/rand.3.patch
Libc-763.11.tar.gz
[apple/libc.git] / stdlib / FreeBSD / rand.3.patch
1 --- rand.3.bsdnew 2009-11-13 14:11:50.000000000 -0800
2 +++ rand.3 2009-11-13 14:11:50.000000000 -0800
3 @@ -37,22 +37,30 @@
4 .Os
5 .Sh NAME
6 .Nm rand ,
7 +.Nm rand_r ,
8 .Nm srand ,
9 -.Nm sranddev ,
10 -.Nm rand_r
11 +.Nm sranddev
12 .Nd bad random number generator
13 .Sh LIBRARY
14 .Lb libc
15 .Sh SYNOPSIS
16 .In stdlib.h
17 -.Ft void
18 -.Fn srand "unsigned seed"
19 -.Ft void
20 -.Fn sranddev void
21 .Ft int
22 -.Fn rand void
23 +.Fo rand
24 +.Fa void
25 +.Fc
26 .Ft int
27 -.Fn rand_r "unsigned *ctx"
28 +.Fo rand_r
29 +.Fa "unsigned *seed"
30 +.Fc
31 +.Ft void
32 +.Fo srand
33 +.Fa "unsigned seed"
34 +.Fc
35 +.Ft void
36 +.Fo sranddev
37 +.Fa void
38 +.Fc
39 .Sh DESCRIPTION
40 .Bf -symbolic
41 These interfaces are obsoleted by
42 @@ -85,7 +93,7 @@ seeded with a value of 1.
43 .Pp
44 The
45 .Fn sranddev
46 -function initializes a seed using the
47 +function initializes a seed, using the
48 .Xr random 4
49 random number device which returns good random numbers.
50 However, the
51 @@ -98,7 +106,7 @@ function
52 provides the same functionality as
53 .Fn rand .
54 A pointer to the context value
55 -.Fa ctx
56 +.Fa seed
57 must be supplied by the caller.
58 .Sh SEE ALSO
59 .Xr random 3 ,