[gs-cvs] rev 8344 - trunk/gs/src

ray at ghostscript.com ray at ghostscript.com
Thu Nov 1 13:49:28 PDT 2007


Author: ray
Date: 2007-11-01 13:49:28 -0700 (Thu, 01 Nov 2007)
New Revision: 8344

Modified:
   trunk/gs/src/gdevwts.c
Log:
Make sure that errors are propogated to caller in the WTS device (such
as VMerror). Bug 689511 for customer 951.

DETAILS:

This doesn't really fix the underlying problem seen by the (embedded)
customer where the clist rendering uses a large amount of RAM.

EXPECTED DIFFERENCES:

None.


Modified: trunk/gs/src/gdevwts.c
===================================================================
--- trunk/gs/src/gdevwts.c	2007-11-01 17:22:45 UTC (rev 8343)
+++ trunk/gs/src/gdevwts.c	2007-11-01 20:49:28 UTC (rev 8344)
@@ -407,7 +407,9 @@
 
     /* For each raster line */
     for (y = 0; y < pdev->height; y++) {
-	gdev_prn_get_bits(pdev, y, cmyk_line, &data);
+	code = gdev_prn_get_bits(pdev, y, cmyk_line, &data);
+	if (code < 0)
+	    break;		/* return the code below after cleanup */
 	wts_halftone_line_8(wdev->wcooked, y, pdev->width, n_planes, 
 			    wdev->band_offset_x, wdev->band_offset_y, dst, data);
 	for (i = 0; i < n_planes; i++)
@@ -1102,7 +1104,9 @@
 	 * The get_bit routines for our device returns a halftoned copy of
 	 * the output data.  Print this data to the output file.
 	 */
-	gdev_prn_get_bits(pdev, y, halftoned_buffer, &halftoned_data);
+	code = gdev_prn_get_bits(pdev, y, halftoned_buffer, &halftoned_data);
+	if (code < 0)
+	    break;		/* return code below after cleanup */
 	if (!output_is_nul)
 	    write_pkmraw_row(width, halftoned_data, prn_stream);
     }



More information about the gs-cvs mailing list