X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=hacks%2Fsquiral.c;h=08d67550f0fc4f7b4cb74456f2acb190678437d8;hb=40eacb5812ef7c0e3374fb139afbb4f5bc8bbfb5;hp=57feea0fbb6bf324b42036c1f617c8a74e476b1f;hpb=a719ec12b8b2563112366a8ac3196816fd64d2c7;p=xscreensaver diff --git a/hacks/squiral.c b/hacks/squiral.c index 57feea0f..08d67550 100644 --- a/hacks/squiral.c +++ b/hacks/squiral.c @@ -15,7 +15,7 @@ #include "yarandom.h" #define R(x) (abs(random())%x) -#define PROB(x) (abs(random())<(x*(double)RAND_MAX)) +#define PROB(x) (frand(1.0) < (x)) #define NCOLORSMAX 255 static int width, height, count, cycle; @@ -219,4 +219,5 @@ XrmOptionDescRec options[] = { {"-ncolors", ".ncolors", XrmoptionSepArg, 0}, {"-cycle", ".cycle", XrmoptionNoArg, "True"}, {"-no-cycle", ".cycle", XrmoptionNoArg, "False"}, + { 0, 0, 0, 0 } };