Added Sourcehut build for OpenBSD.
Added Sourcehut FreeBSD build.
Add Sourcehut build for Debian Linux.
A C99 library for generating random numbers.
The lrnd library contains functions for generating random numbers using pluggable random number generators.
struct lrnd {
uint32_t const max_value;
bool (*next_value)(uint32_t *value_out);
};
The max_value
field contains the inclusive maximum value that the generator
can produce.
The next_value
field contains a pointer to a function that generates the
next random value for this generator.
struct lrnd *
lrnd_get_stdlib_rand(void);
Retrieve a static instance of the rand()
pseudo-random number generator.
bool
lrnd_next_value(struct lrnd *lrnd, uint32_t *value_out);
Generate the next random value for the given generator. Returns false
and
sets errno
if generation fails.
lrnd
is made available under a BSD-style license; see the LICENSE file
for details.