[gs-cvs] rev 9421 - branches/smask_work/base

mvrhel at ghostscript.com mvrhel at ghostscript.com
Thu Jan 29 14:13:00 PST 2009


Author: mvrhel
Date: 2009-01-29 14:12:59 -0800 (Thu, 29 Jan 2009)
New Revision: 9421

Modified:
   branches/smask_work/base/gdevp14.c
   branches/smask_work/base/gsovrc.c
Log:
Provide proper type casting to gx_color_index when it is read from clist.  This completes the bug fixes for 690157 within the softmask branch.

Modified: branches/smask_work/base/gdevp14.c
===================================================================
--- branches/smask_work/base/gdevp14.c	2009-01-29 21:20:29 UTC (rev 9420)
+++ branches/smask_work/base/gdevp14.c	2009-01-29 22:12:59 UTC (rev 9421)
@@ -1798,11 +1798,12 @@
 		if (op_pct->params.retain_any_comps && !op_pct->params.retain_spot_comps)
 		{
 
-			p14dev->drawn_comps = op_pct->params.drawn_comps;
+                    p14dev->drawn_comps = op_pct->params.drawn_comps;
 
 		} else {
 
-			p14dev->drawn_comps = (1 << p14dev->color_info.num_components) - 1; 
+                    /* Draw everything. If this parameter was not set, clist does not fill it in.  */
+                    p14dev->drawn_comps = ( (gx_color_index) 1 << (p14dev->color_info.num_components)) - (gx_color_index) 1; 
 		}
 
 		*pcdev = dev;

Modified: branches/smask_work/base/gsovrc.c
===================================================================
--- branches/smask_work/base/gsovrc.c	2009-01-29 21:20:29 UTC (rev 9420)
+++ branches/smask_work/base/gsovrc.c	2009-01-29 22:12:59 UTC (rev 9421)
@@ -82,7 +82,7 @@
         if (++nbytes > size)
             return_error(gs_error_rangecheck);
         else {
-            int     c = *data;
+            gx_color_index c = *data;
 
             cindex += (c & 0x7f) << shift;
             if ((c & 0x80) == 0)



More information about the gs-cvs mailing list