[gs-cvs] rev 7562 - in trunk/gs: doc src
alexcher at ghostscript.com
alexcher at ghostscript.com
Thu Jan 4 07:48:58 PST 2007
Author: alexcher
Date: 2007-01-04 07:48:57 -0800 (Thu, 04 Jan 2007)
New Revision: 7562
Modified:
trunk/gs/doc/pscet_status.txt
trunk/gs/src/zchar.c
Log:
Change the order of argument checking in widthshow operator. Check that the
character code is in the range 0 to 255 for the base fonts. Fix CET 13-26-04.
DIFFERENCES:
None.
Modified: trunk/gs/doc/pscet_status.txt
===================================================================
--- trunk/gs/doc/pscet_status.txt 2007-01-03 14:39:50 UTC (rev 7561)
+++ trunk/gs/doc/pscet_status.txt 2007-01-04 15:48:57 UTC (rev 7562)
@@ -3103,8 +3103,7 @@
13-26-3 OK
-13-26-4 DIFF Different error messages for several tests. - ADC
- assign Alex.
+13-26-4 OK Fixed in rev. 7562. - Alex
13-26-5 OK Minor differences visually reviewed by RJJ
Modified: trunk/gs/src/zchar.c
===================================================================
--- trunk/gs/src/zchar.c 2007-01-03 14:39:50 UTC (rev 7561)
+++ trunk/gs/src/zchar.c 2007-01-04 15:48:57 UTC (rev 7562)
@@ -93,12 +93,19 @@
double cxy[2];
int code;
+ if ((code = op_show_setup(i_ctx_p, op)) != 0 )
+ return code;
check_type(op[-1], t_integer);
- if ((gs_char) (op[-1].value.intval) != op[-1].value.intval)
- return_error(e_rangecheck);
- if ((code = num_params(op - 2, 2, cxy)) < 0 ||
- (code = op_show_setup(i_ctx_p, op)) != 0 ||
- (code = gs_widthshow_begin(igs, cxy[0], cxy[1],
+ if (gs_currentfont(igs)->FontType == ft_composite) {
+ if ((gs_char) (op[-1].value.intval) != op[-1].value.intval)
+ return_error(e_rangecheck);
+ } else {
+ if (op[-1].value.intval < 0 || op[-1].value.intval > 255)
+ return_error(e_rangecheck); /* per PLRM and CET 13-26 */
+ }
+ if ((code = num_params(op - 2, 2, cxy)) < 0 )
+ return code;
+ if ((code = gs_widthshow_begin(igs, cxy[0], cxy[1],
(gs_char) op[-1].value.intval,
op->value.bytes, r_size(op),
imemory, &penum)) < 0)
More information about the gs-cvs
mailing list