[gs-cvs] rev 7732 - in trunk/gs: doc src
alexcher at ghostscript.com
alexcher at ghostscript.com
Wed Feb 21 19:10:50 PST 2007
Author: alexcher
Date: 2007-02-21 19:10:49 -0800 (Wed, 21 Feb 2007)
New Revision: 7732
Modified:
trunk/gs/doc/pscet_status.txt
trunk/gs/src/interp.c
Log:
Don't include systemdict, globaldict, and userdict into the array of
dictionaries that is pushed to the operand stack on dictstackoverflow.
Partly fix CET 20-02-02.
DIFFERENCES:
No other CET differences or differences in comparefiles.
Modified: trunk/gs/doc/pscet_status.txt
===================================================================
--- trunk/gs/doc/pscet_status.txt 2007-02-22 00:39:53 UTC (rev 7731)
+++ trunk/gs/doc/pscet_status.txt 2007-02-22 03:10:49 UTC (rev 7732)
@@ -3839,11 +3839,10 @@
20-02-1 OK Looks okay. -Tor
-20-02-2 DIFF CPSI only has an array of [ -0dict- ... ] where GS has an empty dict followed
- by an array with << >> [ //systemdict //globaldict //userdict -0dict- ... ].
- Different checksum. CPSI also has <<PROTECTED>> invalidaccess but that
- may be because GS text is too big to fit in the box so it might be clipped.
- assign Alex
+20-02-2 DIFF When --begin-- overflows dictionary stack it restores the argument
+ and places the content of the dictionary stack on the operand
+ stack. Adobe interpreters don't restore the argument.
+ assign Peter
20-02-3 OK Color corrected by rev 7172.
Modified: trunk/gs/src/interp.c
===================================================================
--- trunk/gs/src/interp.c 2007-02-22 00:39:53 UTC (rev 7731)
+++ trunk/gs/src/interp.c 2007-02-22 03:10:49 UTC (rev 7732)
@@ -131,7 +131,7 @@
private int interp(i_ctx_t **, const ref *, ref *);
private int interp_exit(i_ctx_t *);
private void set_gc_signal(i_ctx_t *, int *, int);
-private int copy_stack(i_ctx_t *, const ref_stack_t *, ref *);
+private int copy_stack(i_ctx_t *, const ref_stack_t *, int skip, ref *);
private int oparray_pop(i_ctx_t *);
private int oparray_cleanup(i_ctx_t *);
private int zerrorexec(i_ctx_t *);
@@ -549,7 +549,8 @@
if ((ccode = ref_stack_extend(&o_stack, 1)) < 0)
return ccode;
}
- ccode = copy_stack(i_ctx_p, &d_stack, &saref);
+ /* Skip system dictionaries for CET 20-02-02 */
+ ccode = copy_stack(i_ctx_p, &d_stack, min_dstack_size, &saref);
if (ccode < 0)
return ccode;
ref_stack_pop_to(&d_stack, min_dstack_size);
@@ -573,7 +574,7 @@
if ((ccode = ref_stack_extend(&o_stack, 1)) < 0)
return ccode;
}
- ccode = copy_stack(i_ctx_p, &e_stack, &saref);
+ ccode = copy_stack(i_ctx_p, &e_stack, 0, &saref);
if (ccode < 0)
return ccode;
{
@@ -613,7 +614,7 @@
epref = &doref;
goto again;
}
- ccode = copy_stack(i_ctx_p, &o_stack, &saref);
+ ccode = copy_stack(i_ctx_p, &o_stack, 0, &saref);
if (ccode < 0)
return ccode;
ref_stack_clear(&o_stack);
@@ -685,9 +686,9 @@
/* Copy the contents of an overflowed stack into a (local) array. */
private int
-copy_stack(i_ctx_t *i_ctx_p, const ref_stack_t * pstack, ref * arr)
+copy_stack(i_ctx_t *i_ctx_p, const ref_stack_t * pstack, int skip, ref * arr)
{
- uint size = ref_stack_count(pstack);
+ uint size = ref_stack_count(pstack) - skip;
uint save_space = ialloc_space(idmemory);
int code;
More information about the gs-cvs
mailing list