On Fri, Sep 11, 2009 at 8:52 AM, Alan W. Irwin <ir...@beluga.phys.uvic.ca> wrote: > On 2009-09-11 08:54+0200 Arjen Markus wrote: > >> By the way: I have the same failure wrt example 19 (snprintf is not >> defined) as David Aldrich. > > I. Possible technical solution > > Since you have a fairly up-to-date Windows platform, I guess this means > snprintf is unequivocally not available on any "bare" Windows platform. > I don't know the situation for Cygwin and MinGW. > > Hez, Andrew: is replacing snprintf with sprintf (just as in all other > examples) what should be done? Or would you like to do something more > general here like configuring plcdemos.h to take advantage of the CMake > variables, PL_HAVE_SNPRINTF and _PL_HAVE_SNPRINTF to implement essentially > the same solution as in plplotP.h?
I am ok with either solution. My reason for using snprintf is that part of example 19 is because the "length" argument provided to the plslabelfunc callback is fixed at compile time and the string is allocated and freed by PLplot itself rather than in the user's code. Using sprintf on this fixed-length array leads to the possibility of overruns. This should not be an issue for example 19 as the labels never approach the existing limit of 40 characters. If snprintf is replaced with sprintf, would a comment in example 19 and a warning in the plslabelfunc documentation be enough to let users know of this risk? If there is a safer way to implement the plslabelfunc callback which doesn't risk overruns in PLplot code then that would be another possible fix. < on to testing > > In any case, I think we should formally ask for some testing help on the > plplot-general list a week before each release from now on for all platforms > but especially for the Windows platforms where we don't have good testing > coverage. (A week should give us time to deal with most issues that come > up). From our download statistics and number of questions asked on > plplot-general there appears to be more and more interest in PLplot so > encouraging the new users to help out with testing on all our platforms > (especially for the many different Windows platforms where our developer > coverage is thin) makes a lot of sense. If there is general consensus this > is a good idea, and Hazen is willing to send such an e-mail the week before > each release, I will put a reminder in README.Release_Manager_Cookbook. This sounds like an excellent idea. Hez -- Hezekiah M. Carty Graduate Research Assistant University of Maryland Department of Atmospheric and Oceanic Science ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Plplot-devel mailing list Plplot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/plplot-devel