X-Git-Url: https://git.saurik.com/apple/libc.git/blobdiff_plain/1f2f436a38f7ae2d39a943ad2898d8fed4ed2e58..23e20b0053d7317ce3facd3fd38db8c73c2c380a:/stdlib/FreeBSD/rand.3 diff --git a/stdlib/FreeBSD/rand.3 b/stdlib/FreeBSD/rand.3 index f470523..278a682 100644 --- a/stdlib/FreeBSD/rand.3 +++ b/stdlib/FreeBSD/rand.3 @@ -37,26 +37,34 @@ .Os .Sh NAME .Nm rand , +.Nm rand_r , .Nm srand , -.Nm sranddev , -.Nm rand_r +.Nm sranddev .Nd bad random number generator .Sh LIBRARY .Lb libc .Sh SYNOPSIS .In stdlib.h -.Ft void -.Fn srand "unsigned seed" -.Ft void -.Fn sranddev void .Ft int -.Fn rand void +.Fo rand +.Fa void +.Fc .Ft int -.Fn rand_r "unsigned *ctx" +.Fo rand_r +.Fa "unsigned *seed" +.Fc +.Ft void +.Fo srand +.Fa "unsigned seed" +.Fc +.Ft void +.Fo sranddev +.Fa void +.Fc .Sh DESCRIPTION .Bf -symbolic These interfaces are obsoleted by -.Xr random 3 . +.Xr arc4random 3 . .Ef .Pp The @@ -85,7 +93,7 @@ seeded with a value of 1. .Pp The .Fn sranddev -function initializes a seed using the +function initializes a seed, using the .Xr random 4 random number device which returns good random numbers. However, the @@ -98,9 +106,10 @@ function provides the same functionality as .Fn rand . A pointer to the context value -.Fa ctx +.Fa seed must be supplied by the caller. .Sh SEE ALSO +.Xr arc4random 3 , .Xr random 3 , .Xr random 4 .Sh STANDARDS