[gs-devel] ESP/GPL GhostScript merger: "pcl3" driver and
undocumented removal of "gs_main_instance_default()"
Ray Johnston
Ray.Johnston at Artifex.com
Wed Apr 25 09:05:02 PDT 2007
Till,
I don't know what "forget_default_matrix" is supposed to do, but
I suspect that it is a kloodge that was put in to provide some
functionality that is better accomplished with standard PostScript,
in particular the /Install proc of setpagedevice.
Generally when devices mess around with matrices other than
via the "standard" method (device's get_initial_matrix proc),
it breaks PostScript that uses the Install, BeginPage and
EndPage to accomplish things like N-up printing.
Regards,
Ray
------------------------------------------------------------------------
Till Kamppeter wrote:
> Hi,
>
> I tried again to port the "pcl3" driver to GPL GhostScript 8.57. Now I
> have introduced a variable
>
> gs_memory_t *mem;
>
> in contrib/pcl3/eprn/gdeveprn.h to be used with all gs_malloc and
> gs_free calls. Compilation output is the following now:
>
> ------------------------------------------------------------------
> ./contrib/pcl3/eprn/gdeveprn.c: In function ‘eprn_set_page_layout’:
> ./contrib/pcl3/eprn/gdeveprn.c:665: warning: suggest parentheses
> around && within ||
> ./contrib/pcl3/eprn/gdeveprn.c: In function ‘eprn_forget_defaultmatrix’:
> ./contrib/pcl3/eprn/gdeveprn.c:1116: warning: implicit declaration of
> function ‘gs_main_instance_default’
> ./contrib/pcl3/eprn/gdeveprn.c:1116: error: invalid type argument of ‘->’
> ------------------------------------------------------------------
>
> The error is caused by the removal of "gs_main_instance_default()"
> from GhostScript and the "pcl3" driver uses it once in
> contrib/pcl3/eprn/gdeveprn.c:
>
> ------------------------------------------------------------------
> -static void eprn_forget_defaultmatrix(void) {
> #if EPRN_USE_GSTATE
> /* Old ghostscript versions */
> gs_setdefaultmatrix(igs, NULL);
> #else
> gs_setdefaultmatrix(gs_main_instance_default()->i_ctx_p->pgs, NULL);
> #endif
>
> return;
> }
> -----------------------------------------------------------------
>
> How should I replace this one?
>
> Till
> _______________________________________________
> gs-devel mailing list
> gs-devel at ghostscript.com
> http://www.ghostscript.com/mailman/listinfo/gs-devel
>
More information about the gs-devel
mailing list