|
From: <ai...@us...> - 2013-03-29 00:06:01
|
Revision: 12302
http://sourceforge.net/p/plplot/code/12302
Author: airwin
Date: 2013-03-29 00:05:43 +0000 (Fri, 29 Mar 2013)
Log Message:
-----------
AWI commit of patch from Mark de Wever <m.d...@da...>
to check plsc->label_func for NULL where appropriate. I also
added a one-line comment change.
Tested by: Alan W. Irwin <ai...@us...>. This was a
light test demonstrating the PLplot library and example 19 continued
to build without issues, and by demonstrating that running example 19
with the ps device under valgrind provided valgrind-clean results.
Modified Paths:
--------------
trunk/src/plbox.c
Modified: trunk/src/plbox.c
===================================================================
--- trunk/src/plbox.c 2013-03-20 06:24:58 UTC (rev 12301)
+++ trunk/src/plbox.c 2013-03-29 00:05:43 UTC (rev 12302)
@@ -1509,7 +1509,7 @@
{
// Assume label data is for placement of exponents if no custom
// label function is provided.
- if ( plsc->label_data )
+ if ( !plsc->label_func && plsc->label_data )
{
height = ( (PLLabelDefaults *) plsc->label_data )->exp_label_disp;
pos = ( (PLLabelDefaults *) plsc->label_data )->exp_label_pos;
@@ -1751,7 +1751,7 @@
if ( !lly && !ldy && !loy && ymode )
{
snprintf( string, STRING_LEN, "(x10#u%d#d)", (int) yscale );
- if ( plsc->label_data )
+ if ( !plsc->label_func && plsc->label_data )
{
height = ( (PLLabelDefaults *) plsc->label_data )->exp_label_disp;
pos = ( (PLLabelDefaults *) plsc->label_data )->exp_label_pos;
@@ -2026,7 +2026,7 @@
{
// Assume label data is for placement of exponents if no custom
// label function is provided.
- if ( plsc->label_data )
+ if ( !plsc->label_func && plsc->label_data )
{
height = ( (PLLabelDefaults *) plsc->label_data )->exp_label_disp;
pos = ( (PLLabelDefaults *) plsc->label_data )->exp_label_pos;
@@ -2282,7 +2282,7 @@
if ( !lly && !ldy && !loy && ymode )
{
snprintf( string, STRING_LEN, "(x10#u%d#d)", (int) yscale );
- if ( plsc->label_data )
+ if ( !plsc->label_func && plsc->label_data )
{
height = ( (PLLabelDefaults *) plsc->label_data )->exp_label_disp;
pos = ( (PLLabelDefaults *) plsc->label_data )->exp_label_pos;
@@ -2453,6 +2453,7 @@
plform( PLINT axis, PLFLT value, PLINT scale, PLINT prec, char *string, PLINT len, PLBOOL ll, PLBOOL lf, PLBOOL lo )
{
// Check to see if a custom labeling function is defined. If not,
+ // use default.
if ( lo && plsc->label_func )
{
( *plsc->label_func )( axis, value, string, len, plsc->label_data );
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|