]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - filter/rasterbench.c
Merge changes from CUPS 1.5svn-r8950.
[thirdparty/cups.git] / filter / rasterbench.c
index a344db50f213980287fae6d9e85c6ba09b624cf2..fa6fd7709e35d16ad70d36e23b63c4b45686c4a4 100644 (file)
@@ -26,6 +26,7 @@
  * Include necessary headers...
  */
 
+#include <config.h>
 #include <cups/raster.h>
 #include <stdlib.h>
 #include <sys/time.h>
@@ -275,26 +276,26 @@ write_test(int         fd,                /* I - File descriptor to write to */
   * text with some whitespace.
   */
 
-  srand(time(NULL));
+  CUPS_SRAND(time(NULL));
 
   memset(data, 0, sizeof(data));
 
   for (y = 0; y < 28; y ++)
   {
-    for (x = rand() & 127, count = (rand() & 15) + 1;
+    for (x = CUPS_RAND() & 127, count = (CUPS_RAND() & 15) + 1;
          x < sizeof(data[0]);
          x ++, count --)
     {
       if (count <= 0)
       {
-       x     += (rand() & 15) + 1;
-       count = (rand() & 15) + 1;
+       x     += (CUPS_RAND() & 15) + 1;
+       count = (CUPS_RAND() & 15) + 1;
 
         if (x >= sizeof(data[0]))
          break;
       }
 
-      data[y][x] = rand();
+      data[y][x] = CUPS_RAND();
     }
   }