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

dan at ghostscript.com dan at ghostscript.com
Tue Aug 8 17:17:30 PDT 2006


Author: dan
Date: 2006-08-08 17:17:29 -0700 (Tue, 08 Aug 2006)
New Revision: 6978

Modified:
   trunk/gs/src/iutil.c
Log:
Change the error reporting to match the CET expected values for CET
test file 10-01.ps page 3.  We now correctly report stackunderflow
and type checks on this page.



Modified: trunk/gs/src/iutil.c
===================================================================
--- trunk/gs/src/iutil.c	2006-08-09 00:11:09 UTC (rev 6977)
+++ trunk/gs/src/iutil.c	2006-08-09 00:17:29 UTC (rev 6978)
@@ -878,17 +878,25 @@
     ref values[6];
     const ref *pvalues;
 
-    if (r_has_type(op, t_array))
-	pvalues = op->value.refs;
-    else {
-	int i;
+    switch (r_type(op)) {
+	case t_array:
+	    pvalues = op->value.refs;
+	    break;
+	case t_mixedarray:
+	case t_shortarray:
+	    {
+		int i;
 
-	for (i = 0; i < 6; ++i) {
-	    code = array_get(mem, op, (long)i, &values[i]);
-	    if (code < 0)
-		return code;
-	}
-	pvalues = values;
+		for (i = 0; i < 6; ++i) {
+		    code = array_get(mem, op, (long)i, &values[i]);
+		    if (code < 0)
+			return code;
+		}
+		pvalues = values;
+	    }
+	    break;
+	default:
+	    return_op_typecheck(op);
     }
     check_read(*op);
     if (r_size(op) != 6)



More information about the gs-cvs mailing list