[gs-cvs] rev 7127 - trunk/gs/src
leonardo at ghostscript.com
leonardo at ghostscript.com
Thu Oct 26 00:53:20 PDT 2006
Author: leonardo
Date: 2006-10-26 00:53:20 -0700 (Thu, 26 Oct 2006)
New Revision: 7127
Modified:
trunk/gs/src/gstext.c
trunk/gs/src/gxchar.c
trunk/gs/src/gxfcopy.c
trunk/gs/src/gxfont.h
Log:
Fix : Specialize the build_char function argument type.
DETAILS :
The ghostpcl project yielded a potentially harmful
warning about a type cast. It occurs a cast from
a class to subclass. We could not provide a dynamic check in there,
so we analyzed why it needs such cast. The reason appears
an inaccurate design in the graphics library, and we fix it now.
EXPECTED DIFFERENCES :
None.
Modified: trunk/gs/src/gstext.c
===================================================================
--- trunk/gs/src/gstext.c 2006-10-26 07:07:58 UTC (rev 7126)
+++ trunk/gs/src/gstext.c 2006-10-26 07:53:20 UTC (rev 7127)
@@ -662,7 +662,7 @@
/* Dummy (ineffective) BuildChar/BuildGlyph procedure */
int
-gs_no_build_char(gs_text_enum_t *pte, gs_state *pgs, gs_font *pfont,
+gs_no_build_char(gs_show_enum *pte, gs_state *pgs, gs_font *pfont,
gs_char chr, gs_glyph glyph)
{
return 1; /* failure, but not error */
Modified: trunk/gs/src/gxchar.c
===================================================================
--- trunk/gs/src/gxchar.c 2006-10-26 07:07:58 UTC (rev 7126)
+++ trunk/gs/src/gxchar.c 2006-10-26 07:53:20 UTC (rev 7127)
@@ -1235,7 +1235,7 @@
/* Try using the build procedure in the font. */
/* < 0 means error, 0 means success, 1 means failure. */
penum->cc = cc; /* set this now for build procedure */
- code = (*pfont->procs.build_char)((gs_text_enum_t *)penum, pgs, pfont,
+ code = (*pfont->procs.build_char)(penum, pgs, pfont,
chr, glyph);
if (code < 0) {
discard(gs_note_error(code));
Modified: trunk/gs/src/gxfcopy.c
===================================================================
--- trunk/gs/src/gxfcopy.c 2006-10-26 07:07:58 UTC (rev 7126)
+++ trunk/gs/src/gxfcopy.c 2006-10-26 07:53:20 UTC (rev 7127)
@@ -699,7 +699,7 @@
}
private int
-copied_build_char(gs_text_enum_t *pte, gs_state *pgs, gs_font *font,
+copied_build_char(gs_show_enum *pte, gs_state *pgs, gs_font *font,
gs_char chr, gs_glyph glyph)
{
int wmode = font->WMode;
Modified: trunk/gs/src/gxfont.h
===================================================================
--- trunk/gs/src/gxfont.h 2006-10-26 07:07:58 UTC (rev 7126)
+++ trunk/gs/src/gxfont.h 2006-10-26 07:53:20 UTC (rev 7127)
@@ -35,6 +35,11 @@
typedef struct gs_text_enum_s gs_text_enum_t;
#endif
+#ifndef gs_show_enum_DEFINED
+# define gs_show_enum_DEFINED
+typedef struct gs_show_enum_s gs_show_enum;
+#endif
+
#ifndef gx_path_DEFINED
# define gx_path_DEFINED
typedef struct gx_path_s gx_path;
@@ -326,7 +331,7 @@
*/
#define font_proc_build_char(proc)\
- int proc(gs_text_enum_t *, gs_state *, gs_font *, gs_char, gs_glyph)
+ int proc(gs_show_enum *, gs_state *, gs_font *, gs_char, gs_glyph)
font_proc_build_char((*build_char));
} gs_font_procs;
More information about the gs-cvs
mailing list