Hi All
I've just had cause to try to eliminate some calls to plexit - something I'm 
sure we all agree to be a good thing. Basically I want to be able to move some 
exe files with plplot statically linked and using the wxWidgets driver. As the 
wxWidgets driver doesn't need the .fnt files I'd rather not have to mess around 
with these, but if they aren't found plplot calls plexit so up to now I've had 
to move copies of these round too.

I've attached a patch that deals gracefully with missing .fnt files. The new 
behaviour is a plabort call during initialisation when the files are not found. 
Then wherever the Hershey font data is used, a check is made to see if the data 
was initialised, if this fails then plabort is called and the function returns 
for plpoin, plpoin3 and pldeco, or the function simply returns doing nothing in 
the case of plcvec.

Unfortunately it seemed that even though wxWidgets does not use Hershey fonts, 
plstrl still used them for calculating string lengths, then wxWidgets just did 
not use the derived widths for justify text (it calculates justification on the 
fly to allow for newlines). This caused lots of annoying popups in the examples 
due to the plabort calls so I flagged wxWidgets to calculate it's own widths, 
although it just returns zero in all cases. It may be that other interactive 
drivers want to do the same thing if they don't already.

The final change was a bug fix for plstrl to avoid these string length driver 
calls ending up in the buffer.

I've tested the patch with the first few examples. With no .fnt files calls to 
plpoin generate an abort message, and the points are not drawn, but the 
plotting continues.

I hope the patch is okay to merge in.

All the best

Phil

Attachment: plsym_noplexit.patch
Description: Binary data

------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today. 
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
Plplot-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to