From: <arj...@us...> - 2011-03-17 07:53:30
|
Revision: 11635 http://plplot.svn.sourceforge.net/plplot/?rev=11635&view=rev Author: arjenmarkus Date: 2011-03-17 07:53:24 +0000 (Thu, 17 Mar 2011) Log Message: ----------- Consistently add the hidden argument to the plslabelfunc() function for both Fortran 77 and 95 bindings. Modified Paths: -------------- trunk/bindings/f77/scstubs.c trunk/bindings/f95/scstubs.c Modified: trunk/bindings/f77/scstubs.c =================================================================== --- trunk/bindings/f77/scstubs.c 2011-03-16 21:48:33 UTC (rev 11634) +++ trunk/bindings/f77/scstubs.c 2011-03-17 07:53:24 UTC (rev 11635) @@ -479,7 +479,7 @@ } } - c_plimage( (const PLFLT **) pidata, *nx, *ny, + c_plimage( pidata, *nx, *ny, *xmin, *xmax, *ymin, *ymax, *zmin, *zmax, *Dxmin, *Dxmax, *Dymin, *Dymax ); @@ -958,7 +958,7 @@ } void -PLSLABELFUNC( void ( STDCALL *labelfunc )( PLINT *, PLFLT *, char *, PLINT * ) ) +PLSLABELFUNC( void ( STDCALL *labelfunc )( PLINT *, PLFLT *, char *, PLINT *, PLINT ) ) { pllabelfunc = labelfunc; // N.B. neglect pointer to additional data for f77 Modified: trunk/bindings/f95/scstubs.c =================================================================== --- trunk/bindings/f95/scstubs.c 2011-03-16 21:48:33 UTC (rev 11634) +++ trunk/bindings/f95/scstubs.c 2011-03-17 07:53:24 UTC (rev 11635) @@ -38,7 +38,8 @@ // (*mapform)! // Slightly different to (*label_func) as we don't support PLPointer for // additional data in f77. -static void ( STDCALL *pllabelfunc )( PLINT *, PLFLT *, char *, PLINT * ); +// Note the hidden argument! +static void ( STDCALL *pllabelfunc )( PLINT *, PLFLT *, char *, PLINT *, PLINT ); // Slightly different to C version as we don't support PLPointer for additional data static void ( STDCALL *pltransform )( PLFLT *, PLFLT *, PLFLT *, PLFLT * ); @@ -547,7 +548,10 @@ { int i; - ( *pllabelfunc )( &axis, &value, label, &length ); + // (AM) Note the hidden argument "length" - it ensures that the string "label" + // is recognised to have that length + // + ( *pllabelfunc )( &axis, &value, label, &length, length ); // Ensure string is null terminated i = length - 1; @@ -1006,18 +1010,18 @@ } void -PLSLABELFUNC_ON( void ( STDCALL *labelfunc )( PLINT *, PLFLT *, char *, PLINT * ) ) +PLSLABELFUNC_ON( void ( STDCALL *labelfunc )( PLINT *, PLFLT *, char *, PLINT *, PLINT ) ) { pllabelfunc = labelfunc; - // N.B. neglect pointer to additional data for f77 + // N.B. neglect pointer to additional data for f95 c_plslabelfunc( pllabelfuncf2c, NULL ); } void -PLSLABELFUNC_ONa( void ( STDCALL *labelfunc )( PLINT *, PLFLT *, char *, PLINT * ) ) +PLSLABELFUNC_ONa( void ( STDCALL *labelfunc )( PLINT *, PLFLT *, char *, PLINT *, PLINT ) ) { pllabelfunc = labelfunc; - // N.B. neglect pointer to additional data for f77 + // N.B. neglect pointer to additional data for f95 c_plslabelfunc( pllabelfuncf2c, NULL ); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |