|
From: <arj...@us...> - 2009-11-16 15:17:54
|
Revision: 10602
http://plplot.svn.sourceforge.net/plplot/?rev=10602&view=rev
Author: arjenmarkus
Date: 2009-11-16 15:17:45 +0000 (Mon, 16 Nov 2009)
Log Message:
-----------
Extended the label format interface for FORTRAN 77 and Fortran 95 bindings. For FORTRAN 77 there is an extra routine (PLSLABELFUNC_NONE), for Fortran 95 there is one too (for symmetry), and the original label format routine is overloaded so that an integer 0 is treated as if it was a NULL pointer.
Modified Paths:
--------------
trunk/bindings/f77/plstubs.h
trunk/bindings/f77/scstubs.c
trunk/bindings/f95/plstubs.h
trunk/bindings/f95/scstubs.c
trunk/bindings/f95/sfstubsf95.f90
Modified: trunk/bindings/f77/plstubs.h
===================================================================
--- trunk/bindings/f77/plstubs.h 2009-11-16 15:14:24 UTC (rev 10601)
+++ trunk/bindings/f77/plstubs.h 2009-11-16 15:17:45 UTC (rev 10602)
@@ -304,6 +304,7 @@
#define PLSHADES27 FNAME( PLSHADES27, plshades27 )
#define PLSHADES7 FNAME( PLSHADES7, plshades7 )
#define PLSLABELFUNC FNAME( PLSLABELFUNC, plslabelfunc )
+#define PLSLABELFUNC_NONE FNAME( PLSLABELFUNC_NONE, plslabelfunc_none )
#define PLSMAJ FNAME( PLSMAJ, plsmaj )
#define PLSMEM FNAME( PLSMEM, plsmem )
#define PLSMIN FNAME( PLSMIN, plsmin )
Modified: trunk/bindings/f77/scstubs.c
===================================================================
--- trunk/bindings/f77/scstubs.c 2009-11-16 15:14:24 UTC (rev 10601)
+++ trunk/bindings/f77/scstubs.c 2009-11-16 15:17:45 UTC (rev 10602)
@@ -853,6 +853,13 @@
}
void
+PLSLABELFUNC_NONE( void )
+{
+ pllabelfunc = NULL;
+ c_plslabelfunc( NULL, NULL );
+}
+
+void
PLSMAJ( PLFLT *def, PLFLT *scale )
{
c_plsmaj( *def, *scale );
Modified: trunk/bindings/f95/plstubs.h
===================================================================
--- trunk/bindings/f95/plstubs.h 2009-11-16 15:14:24 UTC (rev 10601)
+++ trunk/bindings/f95/plstubs.h 2009-11-16 15:17:45 UTC (rev 10602)
@@ -313,7 +313,9 @@
#define PLSHADES17 FNAME( PLSHADES17, plshades17 )
#define PLSHADES27 FNAME( PLSHADES27, plshades27 )
#define PLSHADES7 FNAME( PLSHADES7, plshades7 )
-#define PLSLABELFUNC FNAME( PLSLABELFUNC, plslabelfunc )
+#define PLSLABELFUNC_ON FNAME( PLSLABELFUNC_ON, plslabelfunc_on )
+#define PLSLABELFUNC_OFF FNAME( PLSLABELFUNC_OFF, plslabelfunc_off )
+#define PLSLABELFUNC_NONE FNAME( PLSLABELFUNC_NONE, plslabelfunc_none )
#define PLSMAJ FNAME( PLSMAJ, plsmaj )
#define PLSMEM FNAME( PLSMEM, plsmem )
#define PLSMIN FNAME( PLSMIN, plsmin )
Modified: trunk/bindings/f95/scstubs.c
===================================================================
--- trunk/bindings/f95/scstubs.c 2009-11-16 15:14:24 UTC (rev 10601)
+++ trunk/bindings/f95/scstubs.c 2009-11-16 15:17:45 UTC (rev 10602)
@@ -902,7 +902,7 @@
}
void
-PLSLABELFUNC( void ( STDCALL *labelfunc )( PLINT *, PLFLT *, char *, PLINT * ))
+PLSLABELFUNC_ON( void ( STDCALL *labelfunc )( PLINT *, PLFLT *, char *, PLINT * ))
{
pllabelfunc = labelfunc;
/* N.B. neglect pointer to additional data for f77 */
@@ -910,6 +910,21 @@
}
void
+PLSLABELFUNC_OFF( PLINT * )
+{
+ pllabelfunc = NULL;
+ c_plslabelfunc( NULL, NULL );
+}
+
+/* Provided for symmetry with FORTRAN 77 */
+void
+PLSLABELFUNC_NONE( PLINT * )
+{
+ pllabelfunc = NULL;
+ c_plslabelfunc( NULL, NULL );
+}
+
+void
PLSMAJ( PLFLT *def, PLFLT *scale )
{
c_plsmaj( *def, *scale );
Modified: trunk/bindings/f95/sfstubsf95.f90
===================================================================
--- trunk/bindings/f95/sfstubsf95.f90 2009-11-16 15:14:24 UTC (rev 10601)
+++ trunk/bindings/f95/sfstubsf95.f90 2009-11-16 15:17:45 UTC (rev 10602)
@@ -749,6 +749,29 @@
end subroutine plsfont
end interface
+ interface plslabelfunc
+ subroutine plslabelfunc_on( labelfunc )
+ interface
+ subroutine labelfunc(axis, value, label, length)
+ use plplot_flt
+ implicit none
+ integer :: axis, length
+ real(kind=plflt) :: value
+ character*(length) label
+ end subroutine labelfunc
+ end interface
+ end subroutine plslabelfunc_on
+
+ subroutine plslabelfunc_off( dummy )
+ implicit none
+ integer :: dummy
+ end subroutine plslabelfunc_off
+
+ subroutine plslabelfunc_none
+ end subroutine plslabelfunc_none
+
+ end interface
+
interface
subroutine plsmaj( def, scale )
use plplot_flt
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|