Hi Alan,
I do not have a particular preference for either this style or the "\n" one (I
only feel a trifle uncomfortable with this implicit concatenation ;)).
Should this style also fail, we may have to put every "variable" command in its
own call to Tcl_Eval(). But let us see whether this change was enough.
Regards,
Arjen
> -----Original Message-----
> From: Alan W. Irwin [mailto:ir...@beluga.phys.uvic.ca]
> Sent: Wednesday, August 27, 2014 12:18 AM
> To: Arjen Markus; PLplot development list
> Subject: Style of bindings/tcl/plplot_parameters.h
>
> Hi Arjen:
>
> Here is the style of that code (taken from when you first committed it and
> that style
> has been propagated to the sed script that until my last commit generated
> that code).
>
> static void set_plplot_parameters( Tcl_Interp *interp ) {
>
> Tcl_Eval( interp, "namespace eval ::PLPLOT { \n\ # flags used for
> position
> argument of both pllegend and plcolorbar \n\
> variable PL_POSITION_LEFT 1 \n\
> variable PL_POSITION_RIGHT 2 \n\
> variable PL_POSITION_TOP 4 \n\
> [...]
> variable PL_FCI_MEDIUM 0x0 \n\
> variable PL_FCI_BOLD 0x1 \n\
> }" );
>
> }
>
> So with this style it appears we are putting a very long list of Tcl commands
> (currently
> almost 500 of them) into the string that starts with "namespace eval ::
> PLPLOT....",
> and the Portland Group compiler of the poster on plplot-general is choking on
> that
> long string.
>
> I have now (commit fc33fae) changed the sed script to split each part of that
> long
> string into separate string literals that the C compiler automatically
> concatenates, i.e.,
>
> static void set_plplot_parameters( Tcl_Interp *interp ) {
>
> Tcl_Eval( interp, "namespace eval ::PLPLOT { \n"
> "# flags used for position argument of both pllegend and plcolorbar \n"
> "variable PL_POSITION_LEFT 1 \n"
> "variable PL_POSITION_RIGHT 2 \n"
> "variable PL_POSITION_TOP 4 \n"
> [...]
> "variable PL_FCI_MEDIUM 0x0 \n"
> "variable PL_FCI_BOLD 0x1 \n"
> "}" );
>
> }
>
> That style appears to give good results for gcc. Also, on general
> principles, I think
> that is a better style, and it is possible that style will fix the Portland
> Group compiler
> choking on the old long-string style. On the other hand, that compiler might
> also
> choke at concatenating all those strings together. But I will ask the
> plplot-general OP
> to test that.
>
> 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); the Time Ephemerides project
> (timeephem.sf.net);
> PLplot scientific plotting software package (plplot.sf.net); 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
> __________________________
DISCLAIMER: This message is intended exclusively for the addressee(s) and may
contain confidential and privileged information. If you are not the intended
recipient please notify the sender immediately and destroy this message.
Unauthorized use, disclosure or copying of this message is strictly prohibited.
The foundation 'Stichting Deltares', which has its seat at Delft, The
Netherlands, Commercial Registration Number 41146461, is not liable in any way
whatsoever for consequences and/or damages resulting from the improper,
incomplete and untimely dispatch, receipt and/or content of this e-mail.
------------------------------------------------------------------------------
Slashdot TV.
Video for Nerds. Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel