From: <ai...@us...> - 2010-10-01 21:12:21
|
Revision: 11238 http://plplot.svn.sourceforge.net/plplot/?rev=11238&view=rev Author: airwin Date: 2010-10-01 21:12:14 +0000 (Fri, 01 Oct 2010) Log Message: ----------- Use "const" attribute for all arrays in pllegend argument list since none of those array values are changed within pllegend. Modified Paths: -------------- trunk/examples/c/x04c.c trunk/examples/c/x26c.c trunk/include/plplot.h trunk/src/pllegend.c Modified: trunk/examples/c/x04c.c =================================================================== --- trunk/examples/c/x04c.c 2010-10-01 05:42:41 UTC (rev 11237) +++ trunk/examples/c/x04c.c 2010-10-01 21:12:14 UTC (rev 11238) @@ -144,7 +144,7 @@ pllegend( PL_LEGEND_BACKGROUND, 0.57, 0.85, 0.06, 15, nlegend, opt_array, 1.0, 1.0, 2.0, - 1., text_colors, text, + 1., text_colors, (const char **) text, NULL, NULL, NULL, line_colors, line_styles, line_widths, symbol_colors, symbol_scales, symbol_numbers, symbols ); Modified: trunk/examples/c/x26c.c =================================================================== --- trunk/examples/c/x26c.c 2010-10-01 05:42:41 UTC (rev 11237) +++ trunk/examples/c/x26c.c 2010-10-01 21:12:14 UTC (rev 11238) @@ -243,7 +243,7 @@ pllegend( PL_LEGEND_BACKGROUND, 0.57, 0.85, 0.06, 15, nlegend, opt_array, 1.0, 1.0, 2.0, - 1., text_colors, legend_text, + 1., text_colors, (const char **) legend_text, NULL, NULL, NULL, line_colors, line_styles, line_widths, symbol_colors, symbol_scales, symbol_numbers, symbols ); Modified: trunk/include/plplot.h =================================================================== --- trunk/include/plplot.h 2010-10-01 05:42:41 UTC (rev 11237) +++ trunk/include/plplot.h 2010-10-01 21:12:14 UTC (rev 11238) @@ -1218,13 +1218,16 @@ PLDLLIMPEXP void c_pllegend( PLINT opt, PLFLT x, PLFLT y, PLFLT plot_width, PLINT bg_color, - PLINT nlegend, PLINT *opt_array, + PLINT nlegend, const PLINT *opt_array, PLFLT text_offset, PLFLT text_scale, PLFLT text_spacing, - PLFLT text_justification, PLINT *text_colors, char **text, - PLINT *box_colors, PLINT *box_patterns, PLFLT *box_scales, - PLINT *line_colors, PLINT *line_styles, PLINT *line_widths, - PLINT *symbol_colors, PLFLT *symbol_scales, - PLINT *symbol_numbers, PLINT *symbols ); + PLFLT text_justification, + const PLINT *text_colors, const char **text, + const PLINT *box_colors, const PLINT *box_patterns, + const PLFLT *box_scales, + const PLINT *line_colors, const PLINT *line_styles, + const PLINT *line_widths, + const PLINT *symbol_colors, const PLFLT *symbol_scales, + const PLINT *symbol_numbers, const PLINT *symbols ); /* Sets position of the light source */ PLDLLIMPEXP void Modified: trunk/src/pllegend.c =================================================================== --- trunk/src/pllegend.c 2010-10-01 05:42:41 UTC (rev 11237) +++ trunk/src/pllegend.c 2010-10-01 21:12:14 UTC (rev 11238) @@ -165,13 +165,16 @@ void c_pllegend( PLINT opt, PLFLT x, PLFLT y, PLFLT plot_width, PLINT bg_color, - PLINT nlegend, PLINT *opt_array, + PLINT nlegend, const PLINT *opt_array, PLFLT text_offset, PLFLT text_scale, PLFLT text_spacing, - PLFLT text_justification, PLINT *text_colors, char **text, - PLINT *box_colors, PLINT *box_patterns, PLFLT *box_scales, - PLINT *line_colors, PLINT *line_styles, PLINT *line_widths, - PLINT *symbol_colors, PLFLT *symbol_scales, - PLINT *symbol_numbers, PLINT *symbols ) + PLFLT text_justification, + const PLINT *text_colors, const char **text, + const PLINT *box_colors, const PLINT *box_patterns, + const PLFLT *box_scales, + const PLINT *line_colors, const PLINT *line_styles, + const PLINT *line_widths, + const PLINT *symbol_colors, const PLFLT *symbol_scales, + const PLINT *symbol_numbers, const PLINT *symbols ) { // Viewport world-coordinate limits This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |