|
From: <and...@us...> - 2008-07-31 21:21:01
|
Revision: 8601
http://plplot.svn.sourceforge.net/plplot/?rev=8601&view=rev
Author: andrewross
Date: 2008-07-31 21:21:09 +0000 (Thu, 31 Jul 2008)
Log Message:
-----------
Add support for plsfont, plgfont, plsfci and plgfci to f95 bindings.
Modified Paths:
--------------
trunk/bindings/f95/CMakeLists.txt
trunk/bindings/f95/plstubs.h
trunk/bindings/f95/scstubs.c
trunk/bindings/f95/sfstubsf95.f90
Modified: trunk/bindings/f95/CMakeLists.txt
===================================================================
--- trunk/bindings/f95/CMakeLists.txt 2008-07-31 21:06:23 UTC (rev 8600)
+++ trunk/bindings/f95/CMakeLists.txt 2008-07-31 21:21:09 UTC (rev 8601)
@@ -44,6 +44,8 @@
FILE(APPEND "${INC_FILE}"
"integer, parameter :: plflt = kind(1.0)\n")
endif(PL_DOUBLE)
+FILE(APPEND "${INC_FILE}"
+ "integer, parameter :: plunicode = kind(z'80000000')\n")
# Mark the include file as being generated
set_source_files_properties(plflt.inc PROPERTIES GENERATED ON)
Modified: trunk/bindings/f95/plstubs.h
===================================================================
--- trunk/bindings/f95/plstubs.h 2008-07-31 21:06:23 UTC (rev 8600)
+++ trunk/bindings/f95/plstubs.h 2008-07-31 21:21:09 UTC (rev 8601)
@@ -197,7 +197,9 @@
#define PLGDIPLT FNAME(PLGDIPLT,plgdiplt)
#define PLGETCURSOR FNAME(PLGETCURSOR,plgetcursor)
#define PLGFAM FNAME(PLGFAM,plgfam)
+#define PLGFCI FNAME(PLGFAM,plgfci)
#define PLGFNAM7 FNAME(PLGFNAM7,plgfnam7)
+#define PLGFONT FNAME(PLGFONT,plgfont)
#define PLGLEVEL FNAME(PLGLEVEL,plglevel)
#define PLGPAGE FNAME(PLGPAGE,plgpage)
#define PLGRA FNAME(PLGRA,plgra)
@@ -282,7 +284,9 @@
#define PLSESC FNAME(PLSESC,plsesc)
#define PLSETOPT7 FNAME(PLSETOPT7,plsetopt7)
#define PLSFAM FNAME(PLSFAM,plsfam)
+#define PLSFCI FNAME(PLSFAM,plsfci)
#define PLSFNAM7 FNAME(PLSFNAM7,plsfnam7)
+#define PLSFONT FNAME(PLSFONT,plsfont)
#define PLSHADE07 FNAME(PLSHADE07,plshade07)
#define PLSHADE17 FNAME(PLSHADE17,plshade17)
#define PLSHADE27 FNAME(PLSHADE27,plshade27)
Modified: trunk/bindings/f95/scstubs.c
===================================================================
--- trunk/bindings/f95/scstubs.c 2008-07-31 21:06:23 UTC (rev 8600)
+++ trunk/bindings/f95/scstubs.c 2008-07-31 21:21:09 UTC (rev 8601)
@@ -300,13 +300,31 @@
c_plgfam(fam, num, bmax);
}
+/* Note: Fortran does not have unsigned integers so we need to use a long
+ * (should be 64 bit on most platforms?) which corresponds to a fortran integer*8
+ * in order to contain the number. This all a bit ugly and could break on
+ * different hardware */
void
+PLGFCI(long long *pfci)
+{
+ PLUNICODE fci;
+ c_plgfci(&fci);
+ *pfci = (long long) fci;
+}
+
+void
PLGFNAM7(char *fnam, int length)
{
c_plgfnam(fnam);
}
void
+PLGFONT(PLINT *family, PLINT *style, PLINT *weight)
+{
+ c_plgfont(family, style, weight);
+}
+
+void
PLGLEVEL(PLINT *level)
{
c_plglevel(level);
@@ -812,13 +830,31 @@
c_plsfam(*fam, *num, *bmax);
}
+/* Note: Fortran does not have unsigned integers so we need to use a long
+ * (should be 64 bit on most platforms?) which corresponds to a fortran integer*8
+ * in order to contain the number. This all a bit ugly and could break on
+ * different hardware */
void
+PLSFCI(long long *fci)
+{
+ PLUNICODE f;
+ f = (PLUNICODE) (*fci & 0xffffffff);
+ c_plsfci(f);
+}
+
+void
PLSFNAM7(const char *fnam)
{
c_plsfnam(fnam);
}
void
+PLSFONT(PLINT *family, PLINT *style, PLINT *weight)
+{
+ c_plsfont(*family, *style, *weight);
+}
+
+void
PLSMAJ(PLFLT *def, PLFLT *scale)
{
c_plsmaj(*def, *scale);
Modified: trunk/bindings/f95/sfstubsf95.f90
===================================================================
--- trunk/bindings/f95/sfstubsf95.f90 2008-07-31 21:06:23 UTC (rev 8600)
+++ trunk/bindings/f95/sfstubsf95.f90 2008-07-31 21:21:09 UTC (rev 8601)
@@ -368,6 +368,19 @@
end interface
interface
+ subroutine plgfci( fci )
+ use plplot_flt
+ integer(kind=plunicode) :: fci
+ end subroutine plgfci
+ end interface
+
+ interface
+ subroutine plgfont( family, style, weight )
+ integer :: family, style, weight
+ end subroutine plgfont
+ end interface
+
+ interface
subroutine plglevel( level )
integer :: level
end subroutine plglevel
@@ -722,6 +735,19 @@
end interface
interface
+ subroutine plsfci( fci )
+ use plplot_flt
+ integer(kind=plunicode) :: fci
+ end subroutine plsfci
+ end interface
+
+ interface
+ subroutine plsfont( family, style, weight )
+ integer :: family, style, weight
+ end subroutine plsfont
+ end interface
+
+ interface
subroutine plsmaj( def, scale )
use plplot_flt
real(kind=plflt) :: def, scale
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|