On 2008-12-15 10:06-0000 Andrew Ross wrote:

>
> Alan,
>
> There are also quite a few malloc / realloc calls which explicitly cast
> the output as (short *) rather than (int *). To avoid any problems these
> also need fixing. I've been through and checked this all. I think the
> xfig driver is now ok. I've submitted your patches + my addition fixes
> to svn. You beat me to this one...

Well, after the confirming list discussion on the short issue, my feeling is
it was okay to keep bufptr as a pointer to short (with the existing casts).
That solution saves some memory use, but your solution (changing it to a
pointer to int with changes to the appropriate casts) should be fine as
well.  Fooling around with allocing short memory areas to save memory
probably doesn't make much sense any more since most systems are no longer
memory constrained.

I have followed up on your commit with a trivial one which identified the
out-of-memory messages, and I am now happy with the current xfig.c.

Accordingly, I have added an xfig test to our ctest suite (revision 9120).
All along I have been using the xfig application to view our xfig files, and
the results look fine with that application for example 27.  However, the
viewing facilities of the xfig application are quite constrained (just try
to move the image vertically or horizontally) so I was happy to just
discover that the ImageMagick display application shows xfig results quite
nicely although for some reason (probably a misunderstanding of the xfig
standard by ImageMagick) there is a 90 deg rotation compared to what is
displayed with the xfig application.  But if you can ignore that rotation,
display is much easier to use for *.xfig files than the xfig application.

Alan
__________________________
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state implementation
for stellar interiors (freeeos.sf.net); PLplot scientific plotting software
package (plplot.org); the libLASi project (unifont.org/lasi); the Loads of
Linux Links project (loll.sf.net); and the Linux Brochure Project
(lbproject.sf.net).
__________________________

Linux-powered Science
__________________________

------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to