]> 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 ea0a08be577c5dfa66a4e8d1b55d17a5cb497c01..fa6fd7709e35d16ad70d36e23b63c4b45686c4a4 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: rasterbench.c 6649 2007-07-11 21:46:42Z mike $"
+ * "$Id: rasterbench.c 7376 2008-03-19 21:07:45Z mike $"
  *
  *   Raster benchmark program for the Common UNIX Printing System (CUPS).
  *
@@ -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();
     }
   }
 
@@ -350,5 +351,5 @@ write_test(int         fd,          /* I - File descriptor to write to */
 
 
 /*
- * End of "$Id: rasterbench.c 6649 2007-07-11 21:46:42Z mike $".
+ * End of "$Id: rasterbench.c 7376 2008-03-19 21:07:45Z mike $".
  */