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

leonardo at ghostscript.com leonardo at ghostscript.com
Mon Nov 13 06:42:19 PST 2006


Author: leonardo
Date: 2006-11-13 06:42:19 -0800 (Mon, 13 Nov 2006)
New Revision: 7191

Modified:
   trunk/gs/src/gxshade6.c
Log:
Fix (shadings) : Remove colors from C stack.

DETAILS :

This is the 5th step of fixing the bug 688955 
"64K stack overflows with shadings".

Cigwin/gcc yields warning for the last patch,
some of which may be harmful.

EXPECTED DIFFERENCES :

None.


Modified: trunk/gs/src/gxshade6.c
===================================================================
--- trunk/gs/src/gxshade6.c	2006-11-13 14:32:07 UTC (rev 7190)
+++ trunk/gs/src/gxshade6.c	2006-11-13 14:42:19 UTC (rev 7191)
@@ -1125,7 +1125,7 @@
     /* Assuming a very narrow trapezoid - ignore the transversal color variation. */
     /* Assuming the XY span is restricted with curve_samples. 
        It is important for intersection_of_small_bars to compute faster. */
-    int code;
+    int code = 0;
     patch_color_t *c;
     byte *color_stack_ptr1 = reserve_colors_inline(pfs, color_stack_ptr0, &c, 1);
 
@@ -2071,7 +2071,7 @@
     gs_fixed_edge le, re;
     fixed dx0, dy0, dx1, dy1;
     const shading_vertex_t *pp;
-    int i, code;
+    int i, code = 0;
     byte *color_stack_ptr1 = reserve_colors_inline(pfs, color_stack_ptr0, c, 2);
 
     if (color_stack_ptr1 == NULL)
@@ -2299,6 +2299,7 @@
     }
 }
 
+private int
 constant_color_quadrangle(patch_fill_state_t *pfs, const quadrangle_patch *p, bool self_intersecting,
 	byte *color_stack_ptr0)
 {



More information about the gs-cvs mailing list