[gs-cvs] rev 7712 - in trunk/gs: doc src

alexcher at ghostscript.com alexcher at ghostscript.com
Sun Feb 18 16:38:05 PST 2007


Author: alexcher
Date: 2007-02-18 16:38:04 -0800 (Sun, 18 Feb 2007)
New Revision: 7712

Modified:
   trunk/gs/doc/pscet_status.txt
   trunk/gs/src/idict.c
Log:
Reproduce the algorithm used by Adobe to grow the dictionary
to match CET 20-01-01.

DIFFERENCES:
None: no comparefiles or CET differences.


Modified: trunk/gs/doc/pscet_status.txt
===================================================================
--- trunk/gs/doc/pscet_status.txt	2007-02-17 15:55:51 UTC (rev 7711)
+++ trunk/gs/doc/pscet_status.txt	2007-02-19 00:38:04 UTC (rev 7712)
@@ -3972,9 +3972,7 @@
 
 19-14-2  OK	
 
-20-01-1  DIFF	GS gets maxlength 3 instead of maxlength 11 of CPSI and Tek.
-		This is probably implementation dependent and we may not want to change.
-                assign Alex
+20-01-1  OK  	Fixed in rev. 7712. - Alex
 
 20-01-2  AOK 	GS prints { 1 2 3 } [ 1 2 3 ] (1 2 3) where CPSI prints { 1 2 3 } [mark /1 -3array- ] and (   )
 		i.e. CPSI modifies the content of the array arguments when operator >> fails.

Modified: trunk/gs/src/idict.c
===================================================================
--- trunk/gs/src/idict.c	2007-02-17 15:55:51 UTC (rev 7711)
+++ trunk/gs/src/idict.c	2007-02-19 00:38:04 UTC (rev 7712)
@@ -790,8 +790,14 @@
     dict *pdict = pdref->value.pdict;
     /* We might have maxlength < npairs, if */
     /* dict_round_size increased the size. */
-    ulong new_size = (ulong) d_maxlength(pdict) * 3 / 2 + 2;
-
+    ulong new_size = (ulong) d_maxlength(pdict);
+    /* Adobe does this */
+    if (new_size < 20)       
+        new_size += 10;
+    else if (new_size < 200)
+        new_size *= 2;
+    else
+        new_size += new_size / 2;
 #if arch_sizeof_int < arch_sizeof_long
     if (new_size > max_uint)
 	new_size = max_uint;



More information about the gs-cvs mailing list