[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 08:28:05 PDT 2007


Thank you very much for your help, but how do I apply this? How do I 
declare the variable "mem"? With which do I replace 
"gs_main_instance_default()" then?

    Till

Stefan Kemper wrote:
> mem  = gs_lib_ctx_get_non_gc_memory_t();
> gs_main_instance* get_minst_from_memory(mem);
> 
> Might do the trick for you.
> 
> Stefan
> 
> On 4/25/07, Till Kamppeter <till.kamppeter at gmail.com> 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