On 2008-12-14 14:02-0800 Alan W. Irwin wrote: > [...]This patch is only part of the story.
--- drivers/xfig.c 2008-12-14 14:40:29.000000000 -0800 +++ drivers/xfig.c~ 2008-12-14 12:31:45.000000000 -0800 @@ -414,7 +414,7 @@ flushbuffer(PLStream *pls) { PLDev *dev = pls->dev; - int i = 0; + short i = 0; if (count == 0) return; If you put the above patch on top of the previous one, everything now works fine with example 27. The resulting file size is reasonable (3.7M) and gives reasonable looking results with xfig. However, could some C expert here interpret *(buffptr + count++) = x1; for me, where x1 and count are int. and buffprt is short* ? (x1 just stores a value of a short so a short* for buffprt loses no precision.) The above statement is an example of several statements like this that appear in xfig.c. For the svn trunk version, count is a short (the source of the original problem), but I am concerned that if you turn it into an int (as demanded by example 27) some implicit casting is going on in statements like above that may not work properly for all compilers. If you add an int to a pointer to a short is the result always a pointer to a short? What is the syntax for doing all casting explicitly with the above statement (so I will better understand it in future)? 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