X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/puzzles/blobdiff_plain/077f3cbef8366f3cd57f07cb3eb5118457ea4f6d..f0ee053c2a4a214a0e77b22462d0c42806d0462b:/misc.c diff --git a/misc.c b/misc.c index 48088da..73b9a7b 100644 --- a/misc.c +++ b/misc.c @@ -7,23 +7,6 @@ #include "puzzles.h" -int rand_upto(int limit) -{ - unsigned long divisor = RAND_MAX / (unsigned)limit; - unsigned long max = divisor * (unsigned)limit; - unsigned long n; - - assert(limit > 0); - - do { - n = rand(); - } while (n >= max); - - n /= divisor; - - return (int)n; -} - void free_cfg(config_item *cfg) { config_item *i;