On Oct 5, 2010, at 21:42 , Alan W. Irwin wrote: > On 2010-10-05 22:19-0400 Schwab,Wilhelm K wrote: > >> I was interested in building it (5.9.7) to try the legend code. >> Is there a reason for the double pointer? It seems that >> >> this part\0that part\0...\0and the last part\0\0 >> >> would do the job just as easily?? > > I am willing to keep an open mind about changing the > present approach if we run into trouble interfacing const char ** > text to > other languages.
FWIW, I vote for keeping it as char**. For the smallish amounts of legend text it probably doesn't matter that much either way, but with more and/or larger strings that might come from different locations, the cost of copying into one buffer can become significant. Creating an array of char* and populating with pointers into a long buffer containing back-to-back strings is not nearly so onerous (presuming you know how many strings you have to begin with so you can allocate a big enough char* array). Does the library strdup the passed in strings, render them before returning, or just copy the pointers for later rendering? Thanks, Dave (who has obviously not examined the legend implementation!) ------------------------------------------------------------------------------ Beautiful is writing same markup. Internet Explorer 9 supports standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3. Spend less time writing and rewriting code and more time creating great experiences on the web. Be a part of the beta today. http://p.sf.net/sfu/beautyoftheweb _______________________________________________ Plplot-devel mailing list Plplot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/plplot-devel