[gs-devel] ESP/GPL GhostScript merger: "pcl3" driver and undocumented removal of "gs_main_instance_default()"

Till Kamppeter till.kamppeter at gmail.com
Wed Apr 25 03:09:29 PDT 2007


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



More information about the gs-devel mailing list