[gs-cvs] rev 7564 - in trunk/gs: doc src
alexcher at ghostscript.com
alexcher at ghostscript.com
Thu Jan 4 16:48:11 PST 2007
Author: alexcher
Date: 2007-01-04 16:48:11 -0800 (Thu, 04 Jan 2007)
New Revision: 7564
Modified:
trunk/gs/doc/pscet_status.txt
trunk/gs/src/zchar.c
Log:
Change the order of argument checking in awidthshow operator. Check that the
character code is in the range 0 to 255 for the base fonts. Fix CET 13-02-05.
DIFFERENCES:
None.
Modified: trunk/gs/doc/pscet_status.txt
===================================================================
--- trunk/gs/doc/pscet_status.txt 2007-01-04 18:36:37 UTC (rev 7563)
+++ trunk/gs/doc/pscet_status.txt 2007-01-05 00:48:11 UTC (rev 7564)
@@ -2804,7 +2804,7 @@
13-02-4 OK
-13-02-5 DIFF awidthshow error incomformity. assign: Alex.
+13-02-5 OK Fixed in rev. 7564. - Alex
13-02-6 OK Minor differences visually reviewed by RJJ
Modified: trunk/gs/src/zchar.c
===================================================================
--- trunk/gs/src/zchar.c 2007-01-04 18:36:37 UTC (rev 7563)
+++ trunk/gs/src/zchar.c 2007-01-05 00:48:11 UTC (rev 7564)
@@ -126,13 +126,21 @@
double cxy[2], axy[2];
int code;
+ if ((code = op_show_setup(i_ctx_p, op)) != 0 )
+ return code;
+ if ((code = num_params(op - 1, 2, axy)) < 0 )
+ return code;
check_type(op[-3], t_integer);
- if ((gs_char) (op[-3].value.intval) != op[-3].value.intval)
- return_error(e_rangecheck);
- if ((code = num_params(op - 4, 2, cxy)) < 0 ||
- (code = num_params(op - 1, 2, axy)) < 0 ||
- (code = op_show_setup(i_ctx_p, op)) != 0 ||
- (code = gs_awidthshow_begin(igs, cxy[0], cxy[1],
+ if (gs_currentfont(igs)->FontType == ft_composite) {
+ if ((gs_char) (op[-3].value.intval) != op[-3].value.intval)
+ return_error(e_rangecheck);
+ } else {
+ if (op[-3].value.intval < 0 || op[-3].value.intval > 255)
+ return_error(e_rangecheck); /* per PLRM and CET 13-02 */
+ }
+ if ((code = num_params(op - 4, 2, cxy)) < 0 )
+ return code;
+ if ((code = gs_awidthshow_begin(igs, cxy[0], cxy[1],
(gs_char) op[-3].value.intval,
axy[0], axy[1],
op->value.bytes, r_size(op),
More information about the gs-cvs
mailing list