]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - filter/rasterbench.c
Import CUPS v2.0b1
[thirdparty/cups.git] / filter / rasterbench.c
index eacbd0eecd480f63594aece2628a10a01d0f3b4c..56d2778bee5dc5ad64d6635ae50dff4d50910d33 100644 (file)
@@ -1,25 +1,18 @@
 /*
- * "$Id: rasterbench.c 10996 2013-05-29 11:51:34Z msweet $"
+ * "$Id: rasterbench.c 11558 2014-02-06 18:33:34Z msweet $"
  *
- *   Raster benchmark program for CUPS.
+ * Raster benchmark program for CUPS.
  *
- *   Copyright 2007-2011 by Apple Inc.
- *   Copyright 1997-2006 by Easy Software Products.
+ * Copyright 2007-2014 by Apple Inc.
+ * Copyright 1997-2006 by Easy Software Products.
  *
- *   These coded instructions, statements, and computer programs are the
- *   property of Apple Inc. and are protected by Federal copyright
- *   law.  Distribution and use rights are outlined in the file "LICENSE.txt"
- *   which should have been included with this file.  If this file is
- *   file is missing or damaged, see the license at "http://www.cups.org/".
+ * These coded instructions, statements, and computer programs are the
+ * property of Apple Inc. and are protected by Federal copyright
+ * law.  Distribution and use rights are outlined in the file "LICENSE.txt"
+ * which should have been included with this file.  If this file is
+ * file is missing or damaged, see the license at "http://www.cups.org/".
  *
- *   This file is subject to the Apple OS-Developed Software exception.
- *
- * Contents:
- *
- *   main()           - Benchmark the raster read/write functions.
- *   compute_median() - Compute the median time for a test.
- *   read_test()      - Benchmark the raster read functions.
- *   write_test()     - Benchmark the raster write functions.
+ * This file is subject to the Apple OS-Developed Software exception.
  */
 
 /*
@@ -181,7 +174,7 @@ get_time(void)
 static void
 read_test(int fd)                      /* I - File descriptor to read from */
 {
-  int                  y;              /* Looping var */
+  unsigned             y;              /* Looping var */
   cups_raster_t                *r;             /* Raster stream */
   cups_page_header2_t  header;         /* Page header */
   unsigned char                buffer[8 * TEST_WIDTH];
@@ -263,8 +256,8 @@ static void
 write_test(int         fd,             /* I - File descriptor to write to */
            cups_mode_t mode)           /* I - Write mode */
 {
-  int                  page, x, y;     /* Looping vars */
-  int                  count;          /* Number of bytes to set */
+  unsigned             page, x, y;     /* Looping vars */
+  unsigned             count;          /* Number of bytes to set */
   cups_raster_t                *r;             /* Raster stream */
   cups_page_header2_t  header;         /* Page header */
   unsigned char                data[32][8 * TEST_WIDTH];
@@ -295,7 +288,7 @@ write_test(int         fd,          /* I - File descriptor to write to */
          break;
       }
 
-      data[y][x] = CUPS_RAND();
+      data[y][x] = (unsigned char)CUPS_RAND();
     }
   }
 
@@ -351,5 +344,5 @@ write_test(int         fd,          /* I - File descriptor to write to */
 
 
 /*
- * End of "$Id: rasterbench.c 10996 2013-05-29 11:51:34Z msweet $".
+ * End of "$Id: rasterbench.c 11558 2014-02-06 18:33:34Z msweet $".
  */