ftp://netsw.org/x11/tools/desktop/xscreensaver-4.07.tar.gz
[xscreensaver] / hacks / squiral.c
index 57feea0fbb6bf324b42036c1f617c8a74e476b1f..08d67550f0fc4f7b4cb74456f2acb190678437d8 100644 (file)
@@ -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 }
 };