|
From: <and...@us...> - 2008-07-21 12:12:42
|
Revision: 8548
http://plplot.svn.sourceforge.net/plplot/?rev=8548&view=rev
Author: andrewross
Date: 2008-07-21 12:09:13 +0000 (Mon, 21 Jul 2008)
Log Message:
-----------
Add java support for plimagefr.
Modified Paths:
--------------
trunk/bindings/java/PLStream.java
trunk/bindings/swig-support/plplotcapi.i
Modified: trunk/bindings/java/PLStream.java
===================================================================
--- trunk/bindings/java/PLStream.java 2008-07-21 08:45:58 UTC (rev 8547)
+++ trunk/bindings/java/PLStream.java 2008-07-21 12:09:13 UTC (rev 8548)
@@ -405,6 +405,11 @@
plplotjavac.plimage(data, xmin, xmax, ymin, ymax, zmin, zmax, Dxmin, Dxmax, Dymin, Dymax);
}
+public void imagefr(double[][] data, double xmin, double xmax, double ymin, double ymax, double zmin, double zmax, double valuemin, double valuemax, double[][] pltr, double[][] OBJECT_DATA) {
+ if (set_stream() == -1) return;
+ plplotjavac.plimagefr(data, xmin, xmax, ymin, ymax, zmin, zmax, valuemin, valuemax, pltr, OBJECT_DATA);
+}
+
public void init() {
if (set_stream() == -1) return;
plplotjavac.plinit();
Modified: trunk/bindings/swig-support/plplotcapi.i
===================================================================
--- trunk/bindings/swig-support/plplotcapi.i 2008-07-21 08:45:58 UTC (rev 8547)
+++ trunk/bindings/swig-support/plplotcapi.i 2008-07-21 12:09:13 UTC (rev 8548)
@@ -944,6 +944,14 @@
PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax, PLFLT zmin, PLFLT zmax,
PLFLT Dxmin, PLFLT Dxmax, PLFLT Dymin, PLFLT Dymax);
+/* plots a 2d image (or a matrix too large for plshade() ). */
+
+void
+plimagefr( PLFLT **Matrix, PLINT nx, PLINT ny,
+ PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax, PLFLT zmin, PLFLT zmax,
+ PLFLT valuemin, PLFLT valuemax,
+ pltr_func pltr, PLPointer SWIG_OBJECT_DATA);
+
#ifdef 0
/* Returns a list of file-oriented device names and their menu strings */
void
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ai...@us...> - 2008-09-09 06:38:11
|
Revision: 8757
http://plplot.svn.sourceforge.net/plplot/?rev=8757&view=rev
Author: airwin
Date: 2008-09-09 06:38:21 +0000 (Tue, 09 Sep 2008)
Log Message:
-----------
Deal with Linux/GCC visibility issues.
Modified Paths:
--------------
trunk/bindings/f77/plstubs.h
trunk/bindings/f95/plstubs.h
Modified: trunk/bindings/f77/plstubs.h
===================================================================
--- trunk/bindings/f77/plstubs.h 2008-09-09 03:20:27 UTC (rev 8756)
+++ trunk/bindings/f77/plstubs.h 2008-09-09 06:38:21 UTC (rev 8757)
@@ -117,7 +117,7 @@
\*----------------------------------------------------------------------*/
#if STUB_LINKAGE==STUB_LAU
-#define FNAME(x,y) y##_
+#define FNAME(x,y) PLDLLIMPEXP y##_
#define FNAME_(x,y) y##_
#elif STUB_LINKAGE == STUB_L
Modified: trunk/bindings/f95/plstubs.h
===================================================================
--- trunk/bindings/f95/plstubs.h 2008-09-09 03:20:27 UTC (rev 8756)
+++ trunk/bindings/f95/plstubs.h 2008-09-09 06:38:21 UTC (rev 8757)
@@ -117,7 +117,7 @@
\*----------------------------------------------------------------------*/
#if STUB_LINKAGE==STUB_LAU
-#define FNAME(x,y) y##_
+#define FNAME(x,y) PLDLLIMPEXP y##_
#elif STUB_LINKAGE == STUB_L
#define FNAME(x,y) y
@@ -239,6 +239,8 @@
#if STUB_LINKAGE == STUB_STDCALL || STUB_LINKAGE == STUB_FORTRAN
#define CALL_PLOT3DC PLOT3DCF77
+#elif STUB_LINKAGE == STUB_LAU
+#define CALL_PLOT3DC plot3dcf77_
#else
#define CALL_PLOT3DC PLOT3DC
#endif
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ai...@us...> - 2009-06-22 21:01:17
|
Revision: 10060
http://plplot.svn.sourceforge.net/plplot/?rev=10060&view=rev
Author: airwin
Date: 2009-06-22 21:00:30 +0000 (Mon, 22 Jun 2009)
Log Message:
-----------
Move pyqt4 directory to bindings/qt_gui since it depends on the creation
of the plplotqt library that is created in qt_gui.
Change names where appropriate from pyqt to pyqt4.
Modified Paths:
--------------
trunk/bindings/python/CMakeLists.txt
trunk/bindings/qt_gui/CMakeLists.txt
trunk/bindings/qt_gui/pyqt4/config.py
Added Paths:
-----------
trunk/bindings/qt_gui/pyqt4/
trunk/bindings/qt_gui/pyqt4/CMakeLists.txt
trunk/bindings/qt_gui/pyqt4/plplot_pyqt4.sip
Removed Paths:
-------------
trunk/bindings/python/pyqt4/
trunk/bindings/qt_gui/pyqt4/CMakeLists.txt
trunk/bindings/qt_gui/pyqt4/plplot_pyqt.sip
Modified: trunk/bindings/python/CMakeLists.txt
===================================================================
--- trunk/bindings/python/CMakeLists.txt 2009-06-22 20:15:51 UTC (rev 10059)
+++ trunk/bindings/python/CMakeLists.txt 2009-06-22 21:00:30 UTC (rev 10060)
@@ -115,6 +115,4 @@
DESTINATION ${PYTHON_INSTDIR}
)
-add_subdirectory(pyqt4)
-
endif(ENABLE_python)
Modified: trunk/bindings/qt_gui/CMakeLists.txt
===================================================================
--- trunk/bindings/qt_gui/CMakeLists.txt 2009-06-22 20:15:51 UTC (rev 10059)
+++ trunk/bindings/qt_gui/CMakeLists.txt 2009-06-22 21:00:30 UTC (rev 10060)
@@ -18,7 +18,7 @@
# along with PLplot; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-if(PLD_extqt)
+if(ENABLE_qt)
include_directories(
${CMAKE_SOURCE_DIR}/include
${CMAKE_SOURCE_DIR}/lib/qsastime
@@ -176,4 +176,6 @@
)
install(FILES ${PC_CONFIGURED_FILE} DESTINATION ${PKG_CONFIG_DIR})
endif(PKG_CONFIG_EXECUTABLE)
-endif(PLD_extqt)
+
+ add_subdirectory(pyqt4)
+endif(ENABLE_qt)
Property changes on: trunk/bindings/qt_gui/pyqt4
___________________________________________________________________
Added: svn:mergeinfo
+
Deleted: trunk/bindings/qt_gui/pyqt4/CMakeLists.txt
===================================================================
--- trunk/bindings/python/pyqt4/CMakeLists.txt 2009-06-15 21:45:13 UTC (rev 10045)
+++ trunk/bindings/qt_gui/pyqt4/CMakeLists.txt 2009-06-22 21:00:30 UTC (rev 10060)
@@ -1,81 +0,0 @@
-# bindings/python/CMakeLists.txt
-### Process this file with cmake to produce Makefile
-###
-# Copyright (C) 2009 Hazen Babcock
-#
-# This file is part of PLplot.
-#
-# PLplot is free software; you can redistribute it and/or modify
-# it under the terms of the GNU Library General Public License as published
-# by the Free Software Foundation; version 2 of the License.
-#
-# PLplot is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Library General Public License for more details.
-#
-# You should have received a copy of the GNU Library General Public License
-# along with PLplot; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-
-if(ENABLE_pyqt4)
- #message(" ENABLE_pyqt4")
- file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/pyqt4_config)
-
- set(PYQT4_CONFIG_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/pyqt4_config)
-
- add_custom_command(
- OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/config.py.in
- COMMAND ${CMAKE_COMMAND} -E touch ${PYQT4_CONFIG_DIRECTORY}/config.py.in
- COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/plplot_pyqt.sip ${PYQT4_CONFIG_DIRECTORY}/.
- COMMAND python ${CMAKE_CURRENT_SOURCE_DIR}/config.py
- WORKING_DIRECTORY ${PYQT4_CONFIG_DIRECTORY}/
- DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/config.py ${CMAKE_CURRENT_SOURCE_DIR}/plplot_pyqt.sip
- )
- add_custom_target(generate_pyqt_source
- DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/config.py.in
- )
-
- set_source_files_properties(
- ${PYQT4_CONFIG_DIRECTORY}/sipAPIplplot_pyqt.h
- ${PYQT4_CONFIG_DIRECTORY}/sipplplot_pyqtcmodule.cpp
- ${PYQT4_CONFIG_DIRECTORY}/sipplplot_pyqtQtExtWidget.cpp
- ${PYQT4_CONFIG_DIRECTORY}/sipplplot_pyqtQtPLDriver.cpp
- ${PYQT4_CONFIG_DIRECTORY}/sipplplot_pyqtQtPLWidget.cpp
- PROPERTIES GENERATED ON
- )
-
- add_library(
- plplot_pyqt
- MODULE
- ${PYQT4_CONFIG_DIRECTORY}/sipplplot_pyqtcmodule.cpp
- ${PYQT4_CONFIG_DIRECTORY}/sipplplot_pyqtQtExtWidget.cpp
- ${PYQT4_CONFIG_DIRECTORY}/sipplplot_pyqtQtPLDriver.cpp
- ${PYQT4_CONFIG_DIRECTORY}/sipplplot_pyqtQtPLWidget.cpp
- )
-
- set_target_properties(plplot_pyqt PROPERTIES PREFIX "")
-
- if(ENABLE_DYNDRIVERS)
-# include_directories(
-# ${CMAKE_BINARY_DIR}/drivers
-# )
- get_target_property(qt_LOCATION qt LOCATION)
-
- target_link_libraries(
- plplot_pyqt
- ${qt_location}
- plplot${LIB_TAG}
- ${QT_LIBRARIES}
- )
- endif(ENABLE_DYNDRIVERS)
-
- #message(${PYTHON_INSTDIR})
-
- install(
- TARGETS plplot_pyqt
- LIBRARY
- DESTINATION ${PYTHON_INSTDIR}
- )
-
-endif(ENABLE_pyqt4)
Copied: trunk/bindings/qt_gui/pyqt4/CMakeLists.txt (from rev 10050, trunk/bindings/python/pyqt4/CMakeLists.txt)
===================================================================
--- trunk/bindings/qt_gui/pyqt4/CMakeLists.txt (rev 0)
+++ trunk/bindings/qt_gui/pyqt4/CMakeLists.txt 2009-06-22 21:00:30 UTC (rev 10060)
@@ -0,0 +1,110 @@
+# bindings/python/CMakeLists.txt
+### Process this file with cmake to produce Makefile
+###
+# Copyright (C) 2009 Hazen Babcock
+# Copyright (C) 2009 Alan W. Irwin
+#
+# This file is part of PLplot.
+#
+# PLplot is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Library General Public License as published
+# by the Free Software Foundation; version 2 of the License.
+#
+# PLplot is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public License
+# along with PLplot; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+if(ENABLE_pyqt4)
+ #message(" ENABLE_pyqt4")
+ file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/pyqt4_config)
+
+ set(PYQT4_CONFIG_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/pyqt4_config)
+
+ add_custom_command(
+ OUTPUT ${PYQT4_CONFIG_DIRECTORY}/config.py.in
+ COMMAND ${CMAKE_COMMAND} -E touch ${PYQT4_CONFIG_DIRECTORY}/config.py.in
+ COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/plplot_pyqt4.sip ${PYQT4_CONFIG_DIRECTORY}/plplot_pyqt4.sip
+ COMMAND python ${CMAKE_CURRENT_SOURCE_DIR}/config.py
+ WORKING_DIRECTORY ${PYQT4_CONFIG_DIRECTORY}/
+ DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/config.py
+ ${CMAKE_CURRENT_SOURCE_DIR}/plplot_pyqt4.sip
+ )
+ add_custom_target(generate_pyqt4_source
+ DEPENDS ${PYQT4_CONFIG_DIRECTORY}/config.py.in
+ )
+
+ set_source_files_properties(
+ ${PYQT4_CONFIG_DIRECTORY}/sipAPIplplot_pyqt.h
+ PROPERTIES
+ GENERATED ON
+ )
+
+ set(plplot_pyqt4_SRC
+ ${PYQT4_CONFIG_DIRECTORY}/sipplplot_pyqtcmodule.cpp
+ ${PYQT4_CONFIG_DIRECTORY}/sipplplot_pyqtQtExtWidget.cpp
+ ${PYQT4_CONFIG_DIRECTORY}/sipplplot_pyqtQtPLDriver.cpp
+ ${PYQT4_CONFIG_DIRECTORY}/sipplplot_pyqtQtPLWidget.cpp
+ )
+ set_source_files_properties(
+ ${plplot_pyqt4_SRC}
+ PROPERTIES
+ GENERATED ON
+ COMPILE_FLAGS "-DUSINGDLL"
+ )
+
+ # Assume sip.h can be found in PYTHON_INCLUDE_PATH
+ include_directories(
+ ${CMAKE_SOURCE_DIR}/drivers
+ ${CMAKE_SOURCE_DIR}/include
+ ${CMAKE_SOURCE_DIR}/lib/qsastime
+ ${CMAKE_BINARY_DIR}
+ ${CMAKE_BINARY_DIR}/include
+ ${PYTHON_INCLUDE_PATH}
+ )
+
+ add_library(
+ plplot_pyqt4
+ MODULE
+ ${plplot_pyqt4_SRC}
+ )
+
+ set_target_properties(plplot_pyqt4 PROPERTIES PREFIX "")
+
+ target_link_libraries(
+ plplot_pyqt4
+ plplotqt${LIB_TAG}
+ plplot${LIB_TAG}
+ ${QT_LIBRARIES}
+ ${PYTHON_LIBRARIES}
+ )
+ add_dependencies(plplot_pyqt4 generate_pyqt4_source)
+
+ if(USE_RPATH)
+ set_target_properties(
+ plplot_pyqt4
+ PROPERTIES
+ INSTALL_RPATH "${LIB_INSTALL_RPATH}"
+ INSTALL_NAME_DIR "${PYTHON_INSTDIR}"
+ )
+ else(USE_RPATH)
+ set_target_properties(
+ plplot_pyqt4
+ PROPERTIES
+ INSTALL_NAME_DIR "${PYTHON_INSTDIR}"
+ )
+ endif(USE_RPATH)
+
+ #message(${PYTHON_INSTDIR})
+
+ install(
+ TARGETS plplot_pyqt4
+ LIBRARY
+ DESTINATION ${PYTHON_INSTDIR}
+ )
+
+endif(ENABLE_pyqt4)
Modified: trunk/bindings/qt_gui/pyqt4/config.py
===================================================================
--- trunk/bindings/python/pyqt4/config.py 2009-06-15 21:45:13 UTC (rev 10045)
+++ trunk/bindings/qt_gui/pyqt4/config.py 2009-06-22 21:00:30 UTC (rev 10060)
@@ -4,7 +4,7 @@
# The name of the SIP build file generated by SIP and used by the build
# system.
-build_file = "plplot_pyqt.sbf"
+build_file = "plplot_pyqt4.sbf"
# Get the PyQt configuration information.
config = pyqtconfig.Configuration()
@@ -16,15 +16,15 @@
# Run SIP to generate the code. Note that we tell SIP where to find the qt
# module's specification files using the -I flag.
-os.system(" ".join([config.sip_bin, "-c", ".", "-b", build_file, "-I", config.pyqt_sip_dir, qt_sip_flags, "plplot_pyqt.sip"]))
+os.system(" ".join([config.sip_bin, "-c", ".", "-b", build_file, "-I", config.pyqt_sip_dir, qt_sip_flags, "plplot_pyqt4.sip"]))
# We are going to install the SIP specification file for this module and
# its configuration module.
installs = []
-installs.append(["plplot_pyqt.sip", os.path.join(config.default_sip_dir, "plplot_pyqt")])
+installs.append(["plplot_pyqt4.sip", os.path.join(config.default_sip_dir, "plplot_pyqt4")])
-installs.append(["plplot_pyqtconfig.py", config.default_mod_dir])
+installs.append(["plplot_pyqt4config.py", config.default_mod_dir])
# Create the Makefile. The QtModuleMakefile class provided by the
# pyqtconfig module takes care of all the extra preprocessor, compiler and
@@ -38,7 +38,7 @@
# Add the library we are wrapping. The name doesn't include any platform
# specific prefixes or extensions (e.g. the "lib" prefix on UNIX, or the
# ".dll" extension on Windows).
-makefile.extra_libs = ["plplotd", "qt"]
+makefile.extra_libs = ["plplotd", "plplotqtd"]
# Generate the Makefile itself.
makefile.generate()
@@ -60,4 +60,4 @@
# This creates the qtermwidgetconfig.py module from the qtermwidgetconfig.py.in
# template and the dictionary.
-sipconfig.create_config_module("plplot_pyqtconfig.py", "config.py.in", content)
+sipconfig.create_config_module("plplot_pyqt4config.py", "config.py.in", content)
Deleted: trunk/bindings/qt_gui/pyqt4/plplot_pyqt.sip
===================================================================
--- trunk/bindings/python/pyqt4/plplot_pyqt.sip 2009-06-15 21:45:13 UTC (rev 10045)
+++ trunk/bindings/qt_gui/pyqt4/plplot_pyqt.sip 2009-06-22 21:00:30 UTC (rev 10060)
@@ -1,60 +0,0 @@
-
-%Module plplot_pyqt 0
-
-%Import QtCore/QtCoremod.sip
-%Import QtGui/QtGuimod.sip
-
-class QtPLDriver {
-
-%TypeHeaderCode
-#include "plplot/qt.h"
-%End
-
- public:
- QtPLDriver(int i_iWidth=QT_DEFAULT_X, int i_iHeight=QT_DEFAULT_Y);
- virtual ~QtPLDriver();
-};
-
-class QtPLWidget: QWidget, QtPLDriver {
-
-%TypeHeaderCode
-#include "plplot/qt.h"
-%End
-
- public:
- QtPLWidget(int i_iWidth=QT_DEFAULT_X, int i_iHeight=QT_DEFAULT_Y, QWidget* parent=0);
- virtual ~QtPLWidget();
-
- void clearWidget();
-
- protected:
- void mouseReleaseEvent(QMouseEvent *event);
- void keyPressEvent(QKeyEvent *event);
- void closeEvent(QCloseEvent *event);
- void nextPage();
- void resizeEvent(QResizeEvent *);
- void paintEvent(QPaintEvent *);
- void getPlotParameters(double &io_dXFact, double &io_dYFact, double &io_dXOffset, double &io_dYOffset);
-};
-
-class QtExtWidget: QtPLWidget {
-
-%TypeHeaderCode
-#include "plplot/qt.h"
-%End
-
- public:
- QtExtWidget(int i_iWidth=QT_DEFAULT_X, int i_iHeight=QT_DEFAULT_Y, QWidget* parent=0);
- virtual ~QtExtWidget();
-
- void captureMousePlotCoords(double *x, double *y);
- void mouseMoveEvent(QMouseEvent *event);
- void mousePressEvent(QMouseEvent *event);
- void mouseReleaseEvent(QMouseEvent *event);
-
- protected:
- void paintEvent(QPaintEvent *event);
-};
-
-void plsetqtdev(QtExtWidget* widget);
-void plfreeqtdev();
Copied: trunk/bindings/qt_gui/pyqt4/plplot_pyqt4.sip (from rev 10048, trunk/bindings/python/pyqt4/plplot_pyqt.sip)
===================================================================
--- trunk/bindings/qt_gui/pyqt4/plplot_pyqt4.sip (rev 0)
+++ trunk/bindings/qt_gui/pyqt4/plplot_pyqt4.sip 2009-06-22 21:00:30 UTC (rev 10060)
@@ -0,0 +1,60 @@
+
+%Module plplot_pyqt 0
+
+%Import QtCore/QtCoremod.sip
+%Import QtGui/QtGuimod.sip
+
+class QtPLDriver {
+
+%TypeHeaderCode
+#include "qt.h"
+%End
+
+ public:
+ QtPLDriver(int i_iWidth=QT_DEFAULT_X, int i_iHeight=QT_DEFAULT_Y);
+ virtual ~QtPLDriver();
+};
+
+class QtPLWidget: QWidget, QtPLDriver {
+
+%TypeHeaderCode
+#include "qt.h"
+%End
+
+ public:
+ QtPLWidget(int i_iWidth=QT_DEFAULT_X, int i_iHeight=QT_DEFAULT_Y, QWidget* parent=0);
+ virtual ~QtPLWidget();
+
+ void clearWidget();
+
+ protected:
+ void mouseReleaseEvent(QMouseEvent *event);
+ void keyPressEvent(QKeyEvent *event);
+ void closeEvent(QCloseEvent *event);
+ void nextPage();
+ void resizeEvent(QResizeEvent *);
+ void paintEvent(QPaintEvent *);
+ void getPlotParameters(double &io_dXFact, double &io_dYFact, double &io_dXOffset, double &io_dYOffset);
+};
+
+class QtExtWidget: QtPLWidget {
+
+%TypeHeaderCode
+#include "qt.h"
+%End
+
+ public:
+ QtExtWidget(int i_iWidth=QT_DEFAULT_X, int i_iHeight=QT_DEFAULT_Y, QWidget* parent=0);
+ virtual ~QtExtWidget();
+
+ void captureMousePlotCoords(double *x, double *y);
+ void mouseMoveEvent(QMouseEvent *event);
+ void mousePressEvent(QMouseEvent *event);
+ void mouseReleaseEvent(QMouseEvent *event);
+
+ protected:
+ void paintEvent(QPaintEvent *event);
+};
+
+void plsetqtdev(QtExtWidget* widget);
+void plfreeqtdev();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ai...@us...> - 2009-12-03 21:49:35
|
Revision: 10673
http://plplot.svn.sourceforge.net/plplot/?rev=10673&view=rev
Author: airwin
Date: 2009-12-03 21:49:25 +0000 (Thu, 03 Dec 2009)
Log Message:
-----------
Style tweak of recent changes.
Modified Paths:
--------------
trunk/bindings/f77/scstubs.c
trunk/bindings/f95/scstubs.c
Modified: trunk/bindings/f77/scstubs.c
===================================================================
--- trunk/bindings/f77/scstubs.c 2009-12-03 12:50:44 UTC (rev 10672)
+++ trunk/bindings/f77/scstubs.c 2009-12-03 21:49:25 UTC (rev 10673)
@@ -370,7 +370,7 @@
void
PLGRADIENT( PLINT *n, PLFLT *x, PLFLT *y, PLFLT *angle )
{
- c_plgradient( *n, x, y, *angle );
+ c_plgradient( *n, x, y, *angle );
}
void
Modified: trunk/bindings/f95/scstubs.c
===================================================================
--- trunk/bindings/f95/scstubs.c 2009-12-03 12:50:44 UTC (rev 10672)
+++ trunk/bindings/f95/scstubs.c 2009-12-03 21:49:25 UTC (rev 10673)
@@ -375,7 +375,7 @@
void
PLGRADIENT( PLINT *n, PLFLT *x, PLFLT *y, PLFLT *angle )
{
- c_plgradient( *n, x, y, *angle );
+ c_plgradient( *n, x, y, *angle );
}
/* AM - removed: also defined, and better in sccont.c
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ai...@us...> - 2010-10-30 21:21:19
|
Revision: 11292
http://plplot.svn.sourceforge.net/plplot/?rev=11292&view=rev
Author: airwin
Date: 2010-10-30 21:21:12 +0000 (Sat, 30 Oct 2010)
Log Message:
-----------
Style previously committed changes.
Modified Paths:
--------------
trunk/bindings/f77/sccont.c
trunk/bindings/ocaml/plplot_impl.c
Modified: trunk/bindings/f77/sccont.c
===================================================================
--- trunk/bindings/f77/sccont.c 2010-10-30 21:20:35 UTC (rev 11291)
+++ trunk/bindings/f77/sccont.c 2010-10-30 21:21:12 UTC (rev 11292)
@@ -273,12 +273,12 @@
PLINT *min_color, PLINT *min_width,
PLINT *max_color, PLINT *max_width, PLINT *lx )
{
- PLINT rect = 1;
+ PLINT rect = 1;
PLfGrid data;
/* Fill a grid data structure to hold the fortran z array. */
- data.f = z;
+ data.f = z;
data.nx = *lx;
data.ny = *ny;
@@ -323,7 +323,7 @@
cgrid.yg = yg1;
/* Fill a grid data structure to hold the fortran z array. */
- data.f = z;
+ data.f = z;
data.nx = *lx;
data.ny = *ny;
@@ -349,9 +349,9 @@
PLINT *max_color, PLINT *max_width,
PLFLT *xg2, PLFLT *yg2, PLINT *lx )
{
- PLINT rect = 0;
- PLfGrid data;
- PLcGrid cgrid;
+ PLINT rect = 0;
+ PLfGrid data;
+ PLcGrid cgrid;
/* Fill a grid data structure to hold the coordinate arrays. */
cgrid.nx = *lx;
@@ -360,7 +360,7 @@
cgrid.yg = yg2;
/* Fill a grid data structure to hold the fortran z array. */
- data.f = z;
+ data.f = z;
data.nx = *lx;
data.ny = *ny;
@@ -383,11 +383,11 @@
PLINT *min_color, PLINT *min_width,
PLINT *max_color, PLINT *max_width, PLFLT *ftr, PLINT *lx )
{
- PLINT rect = 1;
- PLfGrid data;
+ PLINT rect = 1;
+ PLfGrid data;
/* Fill a grid data structure to hold the fortran z array. */
- data.f = z;
+ data.f = z;
data.nx = *lx;
data.ny = *ny;
@@ -422,7 +422,7 @@
PLfGrid2 data;
/* Fill a grid data structure to hold the fortran z array. */
- data.f = (PLFLT **) z;
+ data.f = (PLFLT **) z;
data.nx = *lx;
data.ny = *ny;
@@ -447,7 +447,7 @@
PLcGrid cgrid;
/* Fill a grid data structure to hold the fortran z array. */
- data.f = (PLFLT **) z;
+ data.f = (PLFLT **) z;
data.nx = *lx;
data.ny = *ny;
@@ -478,7 +478,7 @@
PLcGrid cgrid;
/* Fill a grid data structure to hold the fortran z array. */
- data.f = (PLFLT **) z;
+ data.f = (PLFLT **) z;
data.nx = *lx;
data.ny = *ny;
@@ -507,7 +507,7 @@
PLfGrid2 data;
/* Fill a grid data structure to hold the fortran z array. */
- data.f = (PLFLT **) z;
+ data.f = (PLFLT **) z;
data.nx = *lx;
data.ny = *ny;
Modified: trunk/bindings/ocaml/plplot_impl.c
===================================================================
--- trunk/bindings/ocaml/plplot_impl.c 2010-10-30 21:20:35 UTC (rev 11291)
+++ trunk/bindings/ocaml/plplot_impl.c 2010-10-30 21:21:12 UTC (rev 11292)
@@ -641,18 +641,18 @@
}
// Copy a string array
-#define INIT_STRING_ARRAY( o ) \
- int o##_length; \
- o##_length = Wosize_val( o ); \
- const char *c_##o[o##_length]; \
- for ( i = 0; i < o##_length; i++ ) { c_##o[i] = String_val( Field( o, i ) ); }
+#define INIT_STRING_ARRAY( o ) \
+ int o ## _length; \
+ o ## _length = Wosize_val( o ); \
+ const char *c_ ## o[o ## _length]; \
+ for ( i = 0; i < o ## _length; i++ ) { c_ ## o[i] = String_val( Field( o, i ) ); }
// Copy an int array, o, of n element to the C array c
-#define INIT_INT_ARRAY( o ) \
- int o##_length; \
- o##_length = Wosize_val( o ); \
- int c_##o[o##_length]; \
- for ( i = 0; i < (o##_length); i++ ) { (c_##o)[i] = Int_val( Field( (o), i ) ); }
+#define INIT_INT_ARRAY( o ) \
+ int o ## _length; \
+ o ## _length = Wosize_val( o ); \
+ int c_ ## o[o ## _length]; \
+ for ( i = 0; i < ( o ## _length ); i++ ) { ( c_ ## o )[i] = Int_val( Field( ( o ), i ) ); }
int lor_ml_list( value list, ML_VARIANT_FUNC variant_f )
{
@@ -740,12 +740,12 @@
int translated_option;
switch ( legend_option )
{
- case 0: translated_option = PL_LEGEND_NONE; break;
- case 1: translated_option = PL_LEGEND_COLOR_BOX; break;
- case 2: translated_option = PL_LEGEND_LINE; break;
- case 3: translated_option = PL_LEGEND_SYMBOL; break;
- case 4: translated_option = PL_LEGEND_TEXT_LEFT; break;
- case 5: translated_option = PL_LEGEND_BACKGROUND; break;
+ case 0: translated_option = PL_LEGEND_NONE; break;
+ case 1: translated_option = PL_LEGEND_COLOR_BOX; break;
+ case 2: translated_option = PL_LEGEND_LINE; break;
+ case 3: translated_option = PL_LEGEND_SYMBOL; break;
+ case 4: translated_option = PL_LEGEND_TEXT_LEFT; break;
+ case 5: translated_option = PL_LEGEND_BACKGROUND; break;
default: translated_option = -1;
}
return translated_option;
@@ -762,10 +762,10 @@
{
CAMLparam5( opt, x, y, plot_width, bg_color );
CAMLxparam5( opt_array, text_offset, text_scale, text_spacing,
- text_justification );
+ text_justification );
CAMLxparam5( text_colors, text, box_colors, box_patterns, box_scales );
CAMLxparam5( line_colors, line_styles, line_widths, symbol_colors,
- symbol_scales );
+ symbol_scales );
CAMLxparam2( symbol_numbers, symbols );
// Counter
@@ -803,15 +803,15 @@
}
pllegend( c_opt, Double_val( x ), Double_val( y ),
- Double_val( plot_width ), Int_val( bg_color ), n_legend,
- c_opt_array,
- Double_val( text_offset ), Double_val( text_scale ),
- Double_val( text_spacing ), Double_val( text_justification ),
- c_text_colors, c_text,
- c_box_colors, c_box_patterns, (double *)box_scales,
- c_line_colors, c_line_styles, c_line_widths,
- c_symbol_colors, (double *)symbol_scales, c_symbol_numbers,
- c_symbols );
+ Double_val( plot_width ), Int_val( bg_color ), n_legend,
+ c_opt_array,
+ Double_val( text_offset ), Double_val( text_scale ),
+ Double_val( text_spacing ), Double_val( text_justification ),
+ c_text_colors, c_text,
+ c_box_colors, c_box_patterns, (double *) box_scales,
+ c_line_colors, c_line_styles, c_line_widths,
+ c_symbol_colors, (double *) symbol_scales, c_symbol_numbers,
+ c_symbols );
CAMLreturn( Val_unit );
}
@@ -819,10 +819,10 @@
value ml_pllegend_byte( value* argv, int argn )
{
return ml_pllegend( argv[0], argv[1], argv[2], argv[3], argv[4],
- argv[5], argv[6], argv[7], argv[8], argv[9],
- argv[10], argv[11], argv[12], argv[13], argv[14],
- argv[15], argv[16], argv[17], argv[18], argv[19],
- argv[20], argv[21] );
+ argv[5], argv[6], argv[7], argv[8], argv[9],
+ argv[10], argv[11], argv[12], argv[13], argv[14],
+ argv[15], argv[16], argv[17], argv[18], argv[19],
+ argv[20], argv[21] );
}
/* pltr* function implementations */
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ai...@us...> - 2010-12-23 23:36:13
|
Revision: 11385
http://plplot.svn.sourceforge.net/plplot/?rev=11385&view=rev
Author: airwin
Date: 2010-12-23 23:36:07 +0000 (Thu, 23 Dec 2010)
Log Message:
-----------
Initial commit of swig-generated bindings for Octave.
N.B. these bindings are ignored and the traditional matwrap-generated
bindings used by default unless the user specifies
-DENABLE_swig_octave=ON.
The only tests run so far with -DENABLE_swig_octave=ON on the Linux
platform are the plplot_octave target builds
bindings/octave/plplot_octave.oct and the ldd -r result on
plplot_octave.oct is identical to that for the traditional
matwrap-bindings (except for the index numbers for each library).
Further planned tests are to see if the standard octave example 10
works with these new bindings, and if so, try all the same tests on
the wine version of Windows.
Modified Paths:
--------------
trunk/bindings/ocaml/plplot_impl.c
trunk/bindings/octave/CMakeLists.txt
trunk/bindings/swig-support/plplotcapi.i
Added Paths:
-----------
trunk/bindings/octave/plplot_octave.i
Modified: trunk/bindings/ocaml/plplot_impl.c
===================================================================
--- trunk/bindings/ocaml/plplot_impl.c 2010-12-23 20:16:16 UTC (rev 11384)
+++ trunk/bindings/ocaml/plplot_impl.c 2010-12-23 23:36:07 UTC (rev 11385)
@@ -802,16 +802,16 @@
lor_ml_list( Field( opt_array, i ), translate_legend_option );
}
- /* pllegend( c_opt, Double_val( x ), Double_val( y ),
- Double_val( plot_width ), Int_val( bg_color ), n_legend,
- c_opt_array,
- Double_val( text_offset ), Double_val( text_scale ),
- Double_val( text_spacing ), Double_val( text_justification ),
- c_text_colors, c_text,
- c_box_colors, c_box_patterns, (double *) box_scales,
- c_line_colors, c_line_styles, c_line_widths,
- c_symbol_colors, (double *) symbol_scales, c_symbol_numbers,
- c_symbols ); */
+ // pllegend( c_opt, Double_val( x ), Double_val( y ),
+// Double_val( plot_width ), Int_val( bg_color ), n_legend,
+// c_opt_array,
+// Double_val( text_offset ), Double_val( text_scale ),
+// Double_val( text_spacing ), Double_val( text_justification ),
+// c_text_colors, c_text,
+// c_box_colors, c_box_patterns, (double *) box_scales,
+// c_line_colors, c_line_styles, c_line_widths,
+// c_symbol_colors, (double *) symbol_scales, c_symbol_numbers,
+// c_symbols );
CAMLreturn( Val_unit );
}
Modified: trunk/bindings/octave/CMakeLists.txt
===================================================================
--- trunk/bindings/octave/CMakeLists.txt 2010-12-23 20:16:16 UTC (rev 11384)
+++ trunk/bindings/octave/CMakeLists.txt 2010-12-23 23:36:07 UTC (rev 11385)
@@ -137,24 +137,57 @@
PROPERTIES GENERATED ON)
# Build octave interface.
- set(octave_interface_INCLUDE_PATHS
- ${CMAKE_SOURCE_DIR}/include
- ${CMAKE_BINARY_DIR}
- ${CMAKE_BINARY_DIR}/include
- ${CMAKE_CURRENT_SOURCE_DIR}
- ${CMAKE_CURRENT_BINARY_DIR}
- ${OCTAVE_INCLUDE_PATH}
- )
- include_directories(${octave_interface_INCLUDE_PATHS})
- add_library(plplot_octave MODULE ${CMAKE_CURRENT_BINARY_DIR}/plplot_octave.cc)
- target_link_libraries(
- plplot_octave
- plplot${LIB_TAG}
- "${OCTAVE_LIBRARIES}"
- "${OCTINTERP_LIBRARIES}"
- )
+ if( ENABLE_swig_octave)
+ set(octave_interface_INCLUDE_PATHS
+ ${CMAKE_SOURCE_DIR}/include
+ ${CMAKE_SOURCE_DIR}/lib/qsastime
+ ${CMAKE_BINARY_DIR}
+ ${CMAKE_BINARY_DIR}/include
+ ${CMAKE_CURRENT_BINARY_DIR}
+ ${CMAKE_SOURCE_DIR}/bindings/swig-support
+ )
+ include_directories(${octave_interface_INCLUDE_PATHS})
+ set(CMAKE_SWIG_FLAGS -DSWIG_OCTAVE)
+ set(CMAKE_SWIG_OUTDIR ${CMAKE_CURRENT_BINARY_DIR})
+ set_source_files_properties(plplot_octave.i
+ PROPERTIES
+ SWIG_MODULE_NAME plplot_octave
+ CPLUSPLUS ON
+ )
+
+ set(SWIG_MODULE_plplot_octave_EXTRA_DEPS
+ ${CMAKE_SOURCE_DIR}/bindings/swig-support/plplotcapi.i)
+
+ # Set up swig + c wrapper.
+ swig_add_module(plplot_octave octave plplot_octave.i)
+ swig_link_libraries(
+ plplot_octave
+ plplot${LIB_TAG}
+ "${OCTAVE_LIBRARIES}"
+ "${OCTINTERP_LIBRARIES}"
+ )
+ else(ENABLE_swig_octave)
+ set(octave_interface_INCLUDE_PATHS
+ ${CMAKE_SOURCE_DIR}/include
+ ${CMAKE_BINARY_DIR}
+ ${CMAKE_BINARY_DIR}/include
+ ${CMAKE_CURRENT_SOURCE_DIR}
+ ${CMAKE_CURRENT_BINARY_DIR}
+ ${OCTAVE_INCLUDE_PATH}
+ )
+ include_directories(${octave_interface_INCLUDE_PATHS})
+
+ add_library(plplot_octave MODULE ${CMAKE_CURRENT_BINARY_DIR}/plplot_octave.cc)
+ target_link_libraries(
+ plplot_octave
+ plplot${LIB_TAG}
+ "${OCTAVE_LIBRARIES}"
+ "${OCTINTERP_LIBRARIES}"
+ )
+ endif( ENABLE_swig_octave)
+
if(USE_RPATH)
get_target_property(LIB_INSTALL_RPATH plplot${LIB_TAG} INSTALL_RPATH)
# (Reasonable) assumption here is that OCTAVE_LIBRARIES and
Added: trunk/bindings/octave/plplot_octave.i
===================================================================
--- trunk/bindings/octave/plplot_octave.i (rev 0)
+++ trunk/bindings/octave/plplot_octave.i 2010-12-23 23:36:07 UTC (rev 11385)
@@ -0,0 +1,91 @@
+/*
+Copyright (C) 2010 Alan W. Irwin
+This file is part of PLplot.
+
+PLplot is free software; you can redistribute it and/or modify
+it under the terms of the GNU Library General Public License as published by
+the Free Software Foundation; version 2 of the License.
+
+PLplot is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public License
+along with the file PLplot; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+*/
+
+/*
+A SWIG interface to PLplot for Octave. This wrapper does the following:
+
+ 1) it strictly provides the C-API with the usual change of not
+ requiring lengths for arrays,
+
+ 2) it attempts to provide the entire PLplot API (excluding for now
+ any special arguments that require special callbacks).
+
+ 3) it works only with the double-precision version of the
+ PLplot library.
+
+This is known to work with swig-1.3.36.
+
+*/
+%module plplot_octave
+
+%{
+#include "plplotP.h"
+%}
+
+/* type definitions */
+typedef double PLFLT;
+typedef int PLINT;
+typedef unsigned int PLUNICODE;
+typedef PLINT PLBOOL;
+
+/* I hate global variables but this is the best way I can think of to manage consistency
+ checking among function arguments. */
+%{
+static PLINT Alen = 0;
+static PLINT Xlen = 0, Ylen = 0;
+%}
+
+/* The following typemaps take care of marshaling values into and out of PLplot functions. The
+Array rules are trickly because of the need for length checking. These rules manage
+some global variables (above) to handle consistency checking amoung parameters.
+
+Naming rules:
+ Array (sets Alen to dim[0])
+ ArrayCk (tests that dim[0] == Alen)
+ ArrayX (sets Xlen to dim[0]
+ ArrayCkX (tests dim[0] == Xlen)
+ ArrayY (sets Ylen to dim[1])
+ ArrayCkY (tests dim[1] == Ylen)
+ Matrix (sets Xlen to dim[0], Ylen to dim[1])
+ MatrixCk (test Xlen == dim[0] && Ylen == dim[1])
+*/
+
+/* typemaps */
+%include <typemaps.i>
+
+// No special typemaps for now just for proof of concept that attempts
+// to get simple examples without PLplot arrays such as example 10 to
+// work.
+
+typedef PLINT (*defined_func)(PLFLT, PLFLT);
+typedef void (*fill_func)(PLINT, PLFLT*, PLFLT*);
+typedef void (*pltr_func)(PLFLT, PLFLT, PLFLT *, PLFLT*, PLPointer);
+typedef void (*mapform_func)(PLINT, PLFLT*, PLFLT*);
+typedef PLFLT (*f2eval_func)(PLINT, PLINT, PLPointer);
+typedef void (*label_func)(PLINT, PLFLT, char*, PLINT, PLPointer);
+
+%{
+typedef PLINT (*defined_func)(PLFLT, PLFLT);
+typedef void (*fill_func)(PLINT, PLFLT*, PLFLT*);
+typedef void (*pltr_func)(PLFLT, PLFLT, PLFLT *, PLFLT*, PLPointer);
+typedef void (*mapform_func)(PLINT, PLFLT *, PLFLT*);
+typedef PLFLT (*f2eval_func)(PLINT, PLINT, PLPointer);
+typedef void (*label_func)(PLINT, PLFLT, char*, PLINT, PLPointer);
+%}
+/* swig compatible PLplot API definitions from here on. */
+%include plplotcapi.i
Property changes on: trunk/bindings/octave/plplot_octave.i
___________________________________________________________________
Added: svn:eol-style
+ native
Modified: trunk/bindings/swig-support/plplotcapi.i
===================================================================
--- trunk/bindings/swig-support/plplotcapi.i 2010-12-23 20:16:16 UTC (rev 11384)
+++ trunk/bindings/swig-support/plplotcapi.i 2010-12-23 23:36:07 UTC (rev 11385)
@@ -868,11 +868,11 @@
void
plstart( const char *devname, PLINT nx, PLINT ny );
-#ifndef SWIG_LUA
+#if !defined ( SWIG_LUA ) && !defined ( SWIG_OCTAVE )
%feature( "autodoc", "Set the coordinate transform." ) plstransform;
void
plstransform( ct_func ctf, PLPointer data );
-#endif // SWIG_LUA
+#endif
%feature( "autodoc", "Prints out the same string repeatedly at the n points in world coordinates given by the x and y arrays. Supersedes plpoin and plsymbol for the case where text refers to a unicode glyph either directly as UTF-8 or indirectly via the standard text escape sequences allowed for PLplot input strings." ) plstring;
void
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ai...@us...> - 2010-12-26 23:14:20
|
Revision: 11390
http://plplot.svn.sourceforge.net/plplot/?rev=11390&view=rev
Author: airwin
Date: 2010-12-26 23:14:13 +0000 (Sun, 26 Dec 2010)
Log Message:
-----------
Sort out plSetOpt versus plsetop issues for our swig-generated octave
bindings.
Modified Paths:
--------------
trunk/bindings/octave/plplot_octave.i
trunk/bindings/swig-support/plplotcapi.i
Modified: trunk/bindings/octave/plplot_octave.i
===================================================================
--- trunk/bindings/octave/plplot_octave.i 2010-12-26 23:10:33 UTC (rev 11389)
+++ trunk/bindings/octave/plplot_octave.i 2010-12-26 23:14:13 UTC (rev 11390)
@@ -216,3 +216,5 @@
%}
/* swig compatible PLplot API definitions from here on. */
%include plplotcapi.i
+// Our Octave interfaces define plsetopt.m which relies on plSetOpt internally.
+int plSetOpt( const char *opt, const char *optarg );
Modified: trunk/bindings/swig-support/plplotcapi.i
===================================================================
--- trunk/bindings/swig-support/plplotcapi.i 2010-12-26 23:10:33 UTC (rev 11389)
+++ trunk/bindings/swig-support/plplotcapi.i 2010-12-26 23:14:13 UTC (rev 11390)
@@ -5,7 +5,7 @@
//
//
//Copyright (C) 2002 Gary Bishop
-//Copyright (C) 2002, 2004 Alan W. Irwin
+//Copyright (C) 2002-2010 Alan W. Irwin
//Copyright (C) 2004 Rafael Laboissiere
//Copyright (C) 2004 Andrew Ross
//
@@ -761,9 +761,12 @@
void
plsesc( char esc );
+// Octave has its own definition of plsetopt(.m)
+#if !defined ( SWIG_OCTAVE )
%feature( "autodoc", "Process input strings, treating them as an option and argument pair. The first is for the external API, the second the work routine declared here for backward compatibility." ) plsetopt;
PLINT
plsetopt( const char *opt, const char *optarg );
+#endif
%feature( "autodoc", "Set family file parameters." ) plsfam;
void
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ai...@us...> - 2010-12-29 23:30:17
|
Revision: 11400
http://plplot.svn.sourceforge.net/plplot/?rev=11400&view=rev
Author: airwin
Date: 2010-12-29 23:30:10 +0000 (Wed, 29 Dec 2010)
Log Message:
-----------
Implement typemaps for the string-returning functions. These typemaps
work, but the implementation uses a swig internal detail and doesn't
follow the style of other functions that return data to octave so this
implementation should be reviewed and improved.
Also handle the plSetOpt versus plsetopt octave situation in a simpler
way using the %rename directive.
Modified Paths:
--------------
trunk/bindings/octave/plplot_octave.i
trunk/bindings/swig-support/plplotcapi.i
Modified: trunk/bindings/octave/plplot_octave.i
===================================================================
--- trunk/bindings/octave/plplot_octave.i 2010-12-29 23:24:04 UTC (rev 11399)
+++ trunk/bindings/octave/plplot_octave.i 2010-12-29 23:30:10 UTC (rev 11400)
@@ -365,20 +365,24 @@
%typemap(argout) (PLFLT *ArrayY, PLINT ny, PLFLT **OutMatrixCk) {}
%typemap(freearg) (PLFLT *ArrayY, PLINT ny, PLFLT **OutMatrixCk) {}
-/******************************************************************************
- String returning functions
-******************************************************************************/
+//-----------------------------------------------------------------------------
+// String returning functions
+//-----------------------------------------------------------------------------
-/* This currently just used for plgdev, plgfnam, and plgver which apparently
- * have a limit of 80 bytes. But to (hopefully) be safe for any future use
- * have a 1000 byte limit here. */
-%typemap(in, numinputs=0) char *OUTPUT ( char buff[1000] ) {}
-%typemap(argout) char *OUTPUT {}
+// This currently just used for plgdev, plgfnam, and plgver which
+// apparently have a limit of 80 bytes. N.B. This works, but it
+// copies what was done by Rafael for matwrap with no deep knowledge
+// of octave and uses swig internals (note the use of retval1 as the
+// return value). Thus, it needs to be redone by somebody who knows
+// what they are doing.
+%typemap(in, numinputs=0) char *OUTPUT (octave_value_list retval){
+ retval(0) = octave_value(charMatrix(80, 1), true);
+ $1 = (char *)retval(0).char_matrix_value().data();
+}
+%typemap(argout) char *OUTPUT {
+ return retval1;
+ }
-%typemap(in, checkfn="lua_isstring") const char *message {}
-
-
-
typedef PLINT (*defined_func)(PLFLT, PLFLT);
typedef void (*fill_func)(PLINT, PLFLT*, PLFLT*);
typedef void (*pltr_func)(PLFLT, PLFLT, PLFLT *, PLFLT*, PLPointer);
@@ -394,7 +398,9 @@
typedef PLFLT (*f2eval_func)(PLINT, PLINT, PLPointer);
typedef void (*label_func)(PLINT, PLFLT, char*, PLINT, PLPointer);
%}
+// For historical reasons our octave bindings use the name plSetOpt for
+// the PLplot function, plsetopt, and use the plsetopt name for a different
+// purpose (plsetopt.m). We implement that here using the rename directive.
+%rename(plSetOpt) plsetopt;
/* swig compatible PLplot API definitions from here on. */
%include plplotcapi.i
-// Our Octave interfaces define plsetopt.m which relies on plSetOpt internally.
-int plSetOpt( const char *opt, const char *optarg );
Modified: trunk/bindings/swig-support/plplotcapi.i
===================================================================
--- trunk/bindings/swig-support/plplotcapi.i 2010-12-29 23:24:04 UTC (rev 11399)
+++ trunk/bindings/swig-support/plplotcapi.i 2010-12-29 23:30:10 UTC (rev 11400)
@@ -761,12 +761,9 @@
void
plsesc( char esc );
-// Octave has its own definition of plsetopt(.m)
-#if !defined ( SWIG_OCTAVE )
%feature( "autodoc", "Process input strings, treating them as an option and argument pair. The first is for the external API, the second the work routine declared here for backward compatibility." ) plsetopt;
PLINT
plsetopt( const char *opt, const char *optarg );
-#endif
%feature( "autodoc", "Set family file parameters." ) plsfam;
void
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ai...@us...> - 2011-01-30 22:46:08
|
Revision: 11539
http://plplot.svn.sourceforge.net/plplot/?rev=11539&view=rev
Author: airwin
Date: 2011-01-30 22:46:02 +0000 (Sun, 30 Jan 2011)
Log Message:
-----------
Make constants in these files consistent with plplot.h
Modified Paths:
--------------
trunk/bindings/f77/plplot_parameters.fm4
trunk/bindings/f95/plplot_parameters.h
trunk/bindings/swig-support/plplotcapi.i
Modified: trunk/bindings/f77/plplot_parameters.fm4
===================================================================
--- trunk/bindings/f77/plplot_parameters.fm4 2011-01-30 21:28:06 UTC (rev 11538)
+++ trunk/bindings/f77/plplot_parameters.fm4 2011-01-30 22:46:02 UTC (rev 11539)
@@ -112,34 +112,26 @@
parameter (PL_LEGEND_BOUNDING_BOX = 64)
integer*4 PL_LEGEND_ROW_MAJOR
parameter (PL_LEGEND_ROW_MAJOR = 128)
- integer*4 PL_POSITION_LEFT
- parameter (PL_POSITION_LEFT = 1)
- integer*4 PL_POSITION_RIGHT
- parameter (PL_POSITION_RIGHT = 2)
- integer*4 PL_POSITION_TOP
- parameter (PL_POSITION_TOP = 4)
- integer*4 PL_POSITION_BOTTOM
- parameter (PL_POSITION_BOTTOM = 8)
integer*4 PL_COLORBAR_LABEL_LEFT
- parameter (PL_COLORBAR_LABEL_LEFT = 16)
+ parameter (PL_COLORBAR_LABEL_LEFT = 1)
integer*4 PL_COLORBAR_LABEL_RIGHT
- parameter (PL_COLORBAR_LABEL_RIGHT = 32)
+ parameter (PL_COLORBAR_LABEL_RIGHT = 2)
integer*4 PL_COLORBAR_LABEL_TOP
- parameter (PL_COLORBAR_LABEL_TOP = 64)
+ parameter (PL_COLORBAR_LABEL_TOP = 4)
integer*4 PL_COLORBAR_LABEL_BOTTOM
- parameter (PL_COLORBAR_LABEL_BOTTOM = 128)
+ parameter (PL_COLORBAR_LABEL_BOTTOM = 8)
integer*4 PL_COLORBAR_IMAGE
- parameter (PL_COLORBAR_IMAGE = 256)
+ parameter (PL_COLORBAR_IMAGE = 16)
integer*4 PL_COLORBAR_SHADE
- parameter (PL_COLORBAR_SHADE = 512)
+ parameter (PL_COLORBAR_SHADE = 32)
integer*4 PL_COLORBAR_GRADIENT
- parameter (PL_COLORBAR_GRADIENT = 1024)
+ parameter (PL_COLORBAR_GRADIENT = 64)
integer*4 PL_COLORBAR_CAP_LOW
- parameter (PL_COLORBAR_CAP_LOW = 2048)
+ parameter (PL_COLORBAR_CAP_LOW = 128)
integer*4 PL_COLORBAR_CAP_HIGH
- parameter (PL_COLORBAR_CAP_HIGH = 4096)
+ parameter (PL_COLORBAR_CAP_HIGH = 256)
integer*4 PL_COLORBAR_SHADE_LABEL
- parameter (PL_COLORBAR_SHADE_LABEL = 8192)
+ parameter (PL_COLORBAR_SHADE_LABEL = 512)
integer*4 PLSWIN_DEVICE ! device coordinates
parameter (PLSWIN_DEVICE = 1)
integer*4 PLSWIN_WORLD ! world coordinates
Modified: trunk/bindings/f95/plplot_parameters.h
===================================================================
--- trunk/bindings/f95/plplot_parameters.h 2011-01-30 21:28:06 UTC (rev 11538)
+++ trunk/bindings/f95/plplot_parameters.h 2011-01-30 22:46:02 UTC (rev 11539)
@@ -55,20 +55,16 @@
integer, parameter :: PL_LEGEND_BACKGROUND = 32
integer, parameter :: PL_LEGEND_BOUNDING_BOX = 64
integer, parameter :: PL_LEGEND_ROW_MAJOR = 128
- integer, parameter :: PL_POSITION_LEFT = 1
- integer, parameter :: PL_POSITION_RIGHT = 2
- integer, parameter :: PL_POSITION_TOP = 4
- integer, parameter :: PL_POSITION_BOTTOM = 8
- integer, parameter :: PL_COLORBAR_LABEL_LEFT = 16
- integer, parameter :: PL_COLORBAR_LABEL_RIGHT = 32
- integer, parameter :: PL_COLORBAR_LABEL_TOP = 64
- integer, parameter :: PL_COLORBAR_LABEL_BOTTOM = 128
- integer, parameter :: PL_COLORBAR_IMAGE = 256
- integer, parameter :: PL_COLORBAR_SHADE = 512
- integer, parameter :: PL_COLORBAR_GRADIENT = 1024
- integer, parameter :: PL_COLORBAR_CAP_LOW = 2048
- integer, parameter :: PL_COLORBAR_CAP_HIGH = 4096
- integer, parameter :: PL_COLORBAR_SHADE_LABEL = 8192
+ integer, parameter :: PL_COLORBAR_LABEL_LEFT = 1
+ integer, parameter :: PL_COLORBAR_LABEL_RIGHT = 2
+ integer, parameter :: PL_COLORBAR_LABEL_TOP = 4
+ integer, parameter :: PL_COLORBAR_LABEL_BOTTOM = 8
+ integer, parameter :: PL_COLORBAR_IMAGE = 16
+ integer, parameter :: PL_COLORBAR_SHADE = 32
+ integer, parameter :: PL_COLORBAR_GRADIENT = 64
+ integer, parameter :: PL_COLORBAR_CAP_LOW = 128
+ integer, parameter :: PL_COLORBAR_CAP_HIGH = 256
+ integer, parameter :: PL_COLORBAR_SHADE_LABEL = 512
integer, parameter :: PLSWIN_DEVICE = 1 ! device coordinates
integer, parameter :: PLSWIN_WORLD = 2 ! world coordinates
integer, parameter :: PL_X_AXIS = 1 ! The x-axis
Modified: trunk/bindings/swig-support/plplotcapi.i
===================================================================
--- trunk/bindings/swig-support/plplotcapi.i 2011-01-30 21:28:06 UTC (rev 11538)
+++ trunk/bindings/swig-support/plplotcapi.i 2011-01-30 22:46:02 UTC (rev 11539)
@@ -117,20 +117,16 @@
#define PL_LEGEND_ROW_MAJOR 128
// Flags for plcolorbar
-#define PL_POSITION_LEFT 1
-#define PL_POSITION_RIGHT 2
-#define PL_POSITION_TOP 4
-#define PL_POSITION_BOTTOM 8
-#define PL_COLORBAR_LABEL_LEFT 16
-#define PL_COLORBAR_LABEL_RIGHT 32
-#define PL_COLORBAR_LABEL_TOP 64
-#define PL_COLORBAR_LABEL_BOTTOM 128
-#define PL_COLORBAR_IMAGE 256
-#define PL_COLORBAR_SHADE 512
-#define PL_COLORBAR_GRADIENT 1024
-#define PL_COLORBAR_CAP_LOW 2048
-#define PL_COLORBAR_CAP_HIGH 4096
-#define PL_COLORBAR_SHADE_LABEL 8192
+#define PL_COLORBAR_LABEL_LEFT 1
+#define PL_COLORBAR_LABEL_RIGHT 2
+#define PL_COLORBAR_LABEL_TOP 4
+#define PL_COLORBAR_LABEL_BOTTOM 8
+#define PL_COLORBAR_IMAGE 16
+#define PL_COLORBAR_SHADE 32
+#define PL_COLORBAR_GRADIENT 64
+#define PL_COLORBAR_CAP_LOW 128
+#define PL_COLORBAR_CAP_HIGH 256
+#define PL_COLORBAR_SHADE_LABEL 512
// Window parameter tags
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ai...@us...> - 2011-11-24 21:04:16
|
Revision: 12039
http://plplot.svn.sourceforge.net/plplot/?rev=12039&view=rev
Author: airwin
Date: 2011-11-24 21:04:09 +0000 (Thu, 24 Nov 2011)
Log Message:
-----------
Implement NON_TRANSITIVE case for the fortran bindings. When obvious
false positives were discounted, ldd -u showed perfect results for the
Fortran examples in the build tree, but slightly imperfect results in
the traditional installed examples tree because we have failed to
configure a separate *.pc file for the plplotf77c and plplotf95c
libraries, and lumped that information instead into the *.pc files
associated with the plplotf77 and plotf95 libraries. I will leave it
to someone else to fix that.
Build and run tests in the build tree and traditional installed
examples tree produced results without obvious errors on Debian
stable. However, the latest Linux distributions such as Fedora or
Debian unstable have a linker that enforces linking rules much more
stringently than Debian stable so additional tests (and likely some
fixes) are required before -DNON_TRANSITIVE=ON will work for fortran
on those platforms.
Modified Paths:
--------------
trunk/bindings/f77/CMakeLists.txt
trunk/bindings/f95/CMakeLists.txt
Modified: trunk/bindings/f77/CMakeLists.txt
===================================================================
--- trunk/bindings/f77/CMakeLists.txt 2011-11-24 20:09:56 UTC (rev 12038)
+++ trunk/bindings/f77/CMakeLists.txt 2011-11-24 21:04:09 UTC (rev 12039)
@@ -203,6 +203,18 @@
add_library(plplotf77${LIB_TAG} ${plplotf77${LIB_TAG}_LIB_SRCS})
+ if(NON_TRANSITIVE)
+ # empty list ==> non-transitive linking for everything that links to
+ # libplplotf77cd and libplplotf77d in the shared libraries case.
+ target_link_libraries(plplotf77c${LIB_TAG} LINK_INTERFACE_LIBRARIES)
+ target_link_libraries(plplotf77${LIB_TAG} LINK_INTERFACE_LIBRARIES)
+ # This configures the pkg-config method to use non-transitive linking.
+ set(PC_REQUIRES_TAG "Requires.private")
+ else(NON_TRANSITIVE)
+ # This configures the pkg-config method to use transitive linking
+ set(PC_REQUIRES_TAG "Requires")
+ endif(NON_TRANSITIVE)
+
if(STATIC_OPTS)
add_library(plplotf77opts${LIB_TAG} STATIC ${plplotf77opts${LIB_TAG}_LIB_SRCS})
target_link_libraries(plplotf77${LIB_TAG} plplotf77c${LIB_TAG})
Modified: trunk/bindings/f95/CMakeLists.txt
===================================================================
--- trunk/bindings/f95/CMakeLists.txt 2011-11-24 20:09:56 UTC (rev 12038)
+++ trunk/bindings/f95/CMakeLists.txt 2011-11-24 21:04:09 UTC (rev 12039)
@@ -147,6 +147,18 @@
add_library(plplotf95${LIB_TAG} ${plplotf95${LIB_TAG}_LIB_SRCS})
+ if(NON_TRANSITIVE)
+ # empty list ==> non-transitive linking for everything that links to
+ # libplplotf95cd and libplplotf95d in the shared libraries case.
+ target_link_libraries(plplotf95c${LIB_TAG} LINK_INTERFACE_LIBRARIES)
+ target_link_libraries(plplotf95${LIB_TAG} LINK_INTERFACE_LIBRARIES)
+ # This configures the pkg-config method to use non-transitive linking.
+ set(PC_REQUIRES_TAG "Requires.private")
+ else(NON_TRANSITIVE)
+ # This configures the pkg-config method to use transitive linking
+ set(PC_REQUIRES_TAG "Requires")
+ endif(NON_TRANSITIVE)
+
if(STATIC_OPTS)
add_library(plplotf95opts${LIB_TAG} STATIC ${plplotf95opts${LIB_TAG}_LIB_SRCS})
target_link_libraries(plplotf95${LIB_TAG} plplotf95c${LIB_TAG})
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ai...@us...> - 2011-11-26 21:33:41
|
Revision: 12054
http://plplot.svn.sourceforge.net/plplot/?rev=12054&view=rev
Author: airwin
Date: 2011-11-26 21:33:35 +0000 (Sat, 26 Nov 2011)
Log Message:
-----------
Implement NON_TRANSITIVE case for the wxwidgets and qt_gui bindings.
This commit should complete my NON_TRANSITIVE work.
scripts/comprehensive_test.sh showed no errors with the
--cmake_added_options -DNON_TRANSITIVE=ON --do_shared yes
--do_nondynamic yes --do_static no
options. The most recent Linux distributions such as Fedora
and Debian unstable have stricter linkers than my Debian stable
platform, and there is more work to do on those systems before
the above test will pass.
That leaves the "--do_static yes" case where I encountered some
pkg-config trouble in the traditional installed examples build because
the --static option for pkg-config has the side effect that only
static external libraries are looked for, and one of those was missing
on my system. This bad result was due to inconsistency between the
forced static libraries used by pkg-config when the --static option is
used and the shared libraries that CMake tends to look for and use.
That issue can be solved on Unix by configuring our CMake-based build
system to only look for and use static external libraries. But
implementing that idea will take some substantial additional effort.
Modified Paths:
--------------
trunk/bindings/qt_gui/CMakeLists.txt
trunk/bindings/wxwidgets/CMakeLists.txt
Modified: trunk/bindings/qt_gui/CMakeLists.txt
===================================================================
--- trunk/bindings/qt_gui/CMakeLists.txt 2011-11-26 20:51:54 UTC (rev 12053)
+++ trunk/bindings/qt_gui/CMakeLists.txt 2011-11-26 21:33:35 UTC (rev 12054)
@@ -57,6 +57,16 @@
${MATH_LIB}
${QT_LIBRARIES}
)
+ if(NON_TRANSITIVE)
+ # empty list ==> non-transitive linking for everything that links to
+ # libplplotqtd in the shared libraries case.
+ target_link_libraries(plplotqt${LIB_TAG} LINK_INTERFACE_LIBRARIES)
+ # This configures the pkg-config method to use non-transitive linking.
+ set(PC_REQUIRES_TAG "Requires.private")
+ else(NON_TRANSITIVE)
+ # This configures the pkg-config method to use transitive linking
+ set(PC_REQUIRES_TAG "Requires")
+ endif(NON_TRANSITIVE)
# qt_RPATH set in cmake/modules/qt.cmake. This is only used for the
# install-tree rpath since cmake handles the build-tree rpath
# automatically (so long as full pathnames to libraries are used).
Modified: trunk/bindings/wxwidgets/CMakeLists.txt
===================================================================
--- trunk/bindings/wxwidgets/CMakeLists.txt 2011-11-26 20:51:54 UTC (rev 12053)
+++ trunk/bindings/wxwidgets/CMakeLists.txt 2011-11-26 21:33:35 UTC (rev 12054)
@@ -49,6 +49,17 @@
# Create plplotwxwidgets[d] library
add_library(plplotwxwidgets${LIB_TAG} ${plplotwxwidgets${LIB_TAG}_LIB_SRCS})
+ if(NON_TRANSITIVE)
+ # empty list ==> non-transitive linking for everything that links to
+ # libplplotwxwidgetsd in the shared libraries case.
+ target_link_libraries(plplotwxwidgets${LIB_TAG} LINK_INTERFACE_LIBRARIES)
+ # This configures the pkg-config method to use non-transitive linking.
+ set(PC_REQUIRES_TAG "Requires.private")
+ else(NON_TRANSITIVE)
+ # This configures the pkg-config method to use transitive linking
+ set(PC_REQUIRES_TAG "Requires")
+ endif(NON_TRANSITIVE)
+
if(BUILD_SHARED_LIBS)
SET_SOURCE_FILES_PROPERTIES(${plplotwxwidgets${LIB_TAG}_LIB_SRCS}
PROPERTIES COMPILE_FLAGS "-DUSINGDLL" )
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <and...@us...> - 2013-11-05 14:56:14
|
Revision: 12658
http://sourceforge.net/p/plplot/code/12658
Author: andrewross
Date: 2013-11-05 14:56:10 +0000 (Tue, 05 Nov 2013)
Log Message:
-----------
Further plpath updates for tcl/tk, java and lua bindings.
Modified Paths:
--------------
trunk/bindings/java/PLStream.java
trunk/bindings/lua/plplotluac.i
trunk/bindings/tcl/plapi.tpl
trunk/bindings/tk/PLWin.itk
Modified: trunk/bindings/java/PLStream.java
===================================================================
--- trunk/bindings/java/PLStream.java 2013-11-05 14:27:16 UTC (rev 12657)
+++ trunk/bindings/java/PLStream.java 2013-11-05 14:56:10 UTC (rev 12658)
@@ -695,6 +695,12 @@
plplotjavac.plpat( inc, del );
}
+ public void path( int n, double x1, double y1, double x2, double y2 )
+ {
+ if ( set_stream() == -1 ) return;
+ plplotjavac.plpath( n, x1, y1, x2, y2 );
+ }
+
public void poin( double[] x, double[] y, int code )
{
if ( set_stream() == -1 ) return;
Modified: trunk/bindings/lua/plplotluac.i
===================================================================
--- trunk/bindings/lua/plplotluac.i 2013-11-05 14:27:16 UTC (rev 12657)
+++ trunk/bindings/lua/plplotluac.i 2013-11-05 14:56:10 UTC (rev 12658)
@@ -1434,6 +1434,7 @@
%rename( plot3dcl ) plot3dcl;
%rename( parseopts ) plparseopts;
%rename( pat ) plpat;
+%rename( path ) plpath;
%rename( poin ) plpoin;
%rename( poin3 ) plpoin3;
%rename( poly3 ) plpoly3;
Modified: trunk/bindings/tcl/plapi.tpl
===================================================================
--- trunk/bindings/tcl/plapi.tpl 2013-11-05 14:27:16 UTC (rev 12657)
+++ trunk/bindings/tcl/plapi.tpl 2013-11-05 14:56:10 UTC (rev 12658)
@@ -560,6 +560,15 @@
inc PLINT *
del PLINT *
+# Draw a line connecting two points, accounting for coordinate transforms
+
+pltclcmd plpath void
+n PLINT
+x1 PLFLT
+y1 PLFLT
+x2 PLFLT
+y2 PLFLT
+
# Plots array y against x for n points using ASCII code "code".
# The original tclAPI.c version of this had a defaultable n capability,
# which we don't have...
Modified: trunk/bindings/tk/PLWin.itk
===================================================================
--- trunk/bindings/tk/PLWin.itk 2013-11-05 14:27:16 UTC (rev 12657)
+++ trunk/bindings/tk/PLWin.itk 2013-11-05 14:56:10 UTC (rev 12658)
@@ -222,6 +222,10 @@
eval $plwin cmd plpat $args
}
+ method plpath {args} {
+ eval $plwin cmd plpath $args
+ }
+
method plpoin {args} {
eval $plwin cmd plpoin $args
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <and...@us...> - 2013-11-22 13:16:19
|
Revision: 12735
http://sourceforge.net/p/plplot/code/12735
Author: andrewross
Date: 2013-11-22 13:16:16 +0000 (Fri, 22 Nov 2013)
Log Message:
-----------
Fix up const arguments to plgFileDevs calls.
Modified Paths:
--------------
trunk/bindings/tk/plframe.c
trunk/bindings/tk-x-plat/plplotter.c
Modified: trunk/bindings/tk/plframe.c
===================================================================
--- trunk/bindings/tk/plframe.c 2013-11-21 22:52:38 UTC (rev 12734)
+++ trunk/bindings/tk/plframe.c 2013-11-22 13:16:16 UTC (rev 12735)
@@ -139,9 +139,9 @@
char *SaveFnam; // File name we are currently saving to.
// Malloc'ed.
- char **devDesc; // Descriptive names for file-oriented
+ const char **devDesc; // Descriptive names for file-oriented
// devices. Malloc'ed.
- char **devName; // Keyword names of file-oriented devices.
+ const char **devName; // Keyword names of file-oriented devices.
// Malloc'ed.
// Used in selecting & modifying plot or device area
@@ -447,15 +447,15 @@
// Create list of valid device names and keywords for page dumps
- plFramePtr->devDesc = (char **) ckalloc( NDEV * sizeof ( char ** ) );
- plFramePtr->devName = (char **) ckalloc( NDEV * sizeof ( char ** ) );
+ plFramePtr->devDesc = (const char **) ckalloc( NDEV * sizeof ( char ** ) );
+ plFramePtr->devName = (const char **) ckalloc( NDEV * sizeof ( char ** ) );
for ( i = 0; i < NDEV; i++ )
{
plFramePtr->devDesc[i] = NULL;
plFramePtr->devName[i] = NULL;
}
ndev = NDEV;
- plgFileDevs( (const char ***) &plFramePtr->devDesc, (const char ***) &plFramePtr->devName, &ndev );
+ plgFileDevs( &plFramePtr->devDesc, &plFramePtr->devName, &ndev );
// Start up event handlers and other good stuff
Modified: trunk/bindings/tk-x-plat/plplotter.c
===================================================================
--- trunk/bindings/tk-x-plat/plplotter.c 2013-11-21 22:52:38 UTC (rev 12734)
+++ trunk/bindings/tk-x-plat/plplotter.c 2013-11-22 13:16:16 UTC (rev 12735)
@@ -151,9 +151,9 @@
char *SaveFnam; // File name we are currently saving to.
// Malloc'ed.
- char **devDesc; // Descriptive names for file-oriented
+ const char **devDesc; // Descriptive names for file-oriented
// devices. Malloc'ed.
- char **devName; // Keyword names of file-oriented devices.
+ const char **devName; // Keyword names of file-oriented devices.
// Malloc'ed.
// Used in selecting & modifying plot or device area
@@ -433,15 +433,15 @@
// Create list of valid device names and keywords for page dumps
- plPlotterPtr->devDesc = (char **) malloc( (size_t) NDEV * sizeof ( char ** ) );
- plPlotterPtr->devName = (char **) malloc( (size_t) NDEV * sizeof ( char ** ) );
+ plPlotterPtr->devDesc = (const char **) malloc( (size_t) NDEV * sizeof ( char ** ) );
+ plPlotterPtr->devName = (const char **) malloc( (size_t) NDEV * sizeof ( char ** ) );
for ( i = 0; i < NDEV; i++ )
{
plPlotterPtr->devDesc[i] = NULL;
plPlotterPtr->devName[i] = NULL;
}
ndev = NDEV;
- plgFileDevs( (const char ***) &plPlotterPtr->devDesc, (const char ***) &plPlotterPtr->devName, &ndev );
+ plgFileDevs( &plPlotterPtr->devDesc, &plPlotterPtr->devName, &ndev );
// Start up event handlers and other good stuff
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <and...@us...> - 2013-11-27 12:11:38
|
Revision: 12764
http://sourceforge.net/p/plplot/code/12764
Author: andrewross
Date: 2013-11-27 12:11:34 +0000 (Wed, 27 Nov 2013)
Log Message:
-----------
Implement null arguments for plsvect for swig generated bindings.
Modified Paths:
--------------
trunk/bindings/java/plplotjavac.i
trunk/bindings/lua/plplotluac.i
trunk/bindings/octave/plplot_octave.i
trunk/bindings/python/plplotcmodule.i
trunk/bindings/swig-support/plplotcapi.i
Modified: trunk/bindings/java/plplotjavac.i
===================================================================
--- trunk/bindings/java/plplotjavac.i 2013-11-27 11:43:57 UTC (rev 12763)
+++ trunk/bindings/java/plplotjavac.i 2013-11-27 12:11:34 UTC (rev 12764)
@@ -716,6 +716,43 @@
return $jnicall;
}
+// trailing count, and check consistency with previous
+%typemap( in ) ( const PLFLT * ArrayCkNull, PLINT n )
+{
+ if ( $input != NULL )
+ {
+ jPLFLT *jydata = ( *jenv )->GetPLFLTArrayElements( jenv, $input, 0 );
+ $2 = ( *jenv )->GetArrayLength( jenv, $input );
+ if ( ( *jenv )->GetArrayLength( jenv, $input ) != Alen )
+ {
+ printf( "Vectors must be same length.\n" );
+ return;
+ }
+ setup_array_1d_PLFLT( &$1, jydata, Alen );
+ ( *jenv )->ReleasePLFLTArrayElements( jenv, $input, jydata, 0 );
+ }
+ else
+ {
+ $1 = NULL;
+ $2 = 0;
+ }
+}
+%typemap( freearg ) ( const PLFLT * ArrayCkNull, PLINT n )
+{
+ if ( $1 != NULL )
+ free( $1 );
+
+}
+%typemap( jni ) ( const PLFLT * ArrayCkNull, PLINT n ) jPLFLTArray
+%typemap( jtype ) ( const PLFLT * ArrayCkNull, PLINT n ) jPLFLTbracket
+%typemap( jstype ) ( const PLFLT * ArrayCkNull, PLINT n ) jPLFLTbracket
+%typemap( javain ) ( const PLFLT * ArrayCkNull, PLINT n ) "$javainput"
+%typemap( javaout ) ( const PLFLT * ArrayCkNull, PLINT n )
+{
+ return $jnicall;
+}
+
+
// no count, but check consistency with previous or NULL
%typemap( in ) const PLFLT * ArrayCkNull {
if ( $input != NULL )
@@ -863,6 +900,34 @@
return $jnicall;
}
+
+// with no trailing count
+%typemap( in ) const PLFLT * ArrayNull {
+ if ( $input != NULL )
+ {
+ jPLFLT *jxdata = ( *jenv )->GetPLFLTArrayElements( jenv, $input, 0 );
+ Alen = ( *jenv )->GetArrayLength( jenv, $input );
+ setup_array_1d_PLFLT( &$1, jxdata, Alen );
+ ( *jenv )->ReleasePLFLTArrayElements( jenv, $input, jxdata, 0 );
+ }
+ else
+ {
+ $1 = NULL;
+ Alen = 0;
+ }
+}
+%typemap( freearg ) const PLFLT * ArrayNull {
+ if ( $1 != NULL )
+ free( $1 );
+}
+%typemap( jni ) const PLFLT * ArrayNull jPLFLTArray
+%typemap( jtype ) const PLFLT * ArrayNull jPLFLTbracket
+%typemap( jstype ) const PLFLT * ArrayNull jPLFLTbracket
+%typemap( javain ) const PLFLT * ArrayNull "$javainput"
+%typemap( javaout ) const PLFLT * ArrayNull {
+ return $jnicall;
+}
+
// check consistency with X dimension of previous
%typemap( in ) const PLFLT * ArrayCkX {
jPLFLT *jxdata = ( *jenv )->GetPLFLTArrayElements( jenv, $input, 0 );
Modified: trunk/bindings/lua/plplotluac.i
===================================================================
--- trunk/bindings/lua/plplotluac.i 2013-11-27 11:43:57 UTC (rev 12763)
+++ trunk/bindings/lua/plplotluac.i 2013-11-27 12:11:34 UTC (rev 12764)
@@ -176,14 +176,21 @@
// No count but check consistency with previous, or NULL
%typemap( in ) const PLINT * ArrayCkNull( int temp )
{
- $1 = (PLINT *) LUA_get_int_num_array_var( L, $input, &temp );
- if ( !$1 )
- SWIG_fail;
- if ( temp != Alen )
+ if ( lua_isnil( L, $input ) )
{
- lua_pushfstring( L, "Tables must be of same length." );
- SWIG_fail;
+ $1 = NULL;
}
+ else
+ {
+ $1 = (PLINT *) LUA_get_int_num_array_var( L, $input, &temp );
+ if ( !$1 )
+ SWIG_fail;
+ if ( temp != Alen )
+ {
+ lua_pushfstring( L, "Tables must be of same length." );
+ SWIG_fail;
+ }
+ }
}
%typemap( freearg ) const PLINT * ArrayCkNull { LUA_FREE_ARRAY( $1 ); }
%typemap( default ) const PLINT * ArrayCkNull { $1 = NULL; }
@@ -204,14 +211,21 @@
%typemap( in ) const PLINT * ArrayCkMinus1Null( int temp )
{
- $1 = (PLINT *) LUA_get_int_num_array_var( L, $input, &temp );
- if ( !$1 )
- SWIG_fail;
- if ( temp < Alen - 1 )
+ if ( lua_isnil( L, $input ) )
{
- lua_pushfstring( L, "Tables must be at least length of others minus 1." );
- SWIG_fail;
+ $1 = NULL;
}
+ else
+ {
+ $1 = (PLINT *) LUA_get_int_num_array_var( L, $input, &temp );
+ if ( !$1 )
+ SWIG_fail;
+ if ( temp < Alen - 1 )
+ {
+ lua_pushfstring( L, "Tables must be at least length of others minus 1." );
+ SWIG_fail;
+ }
+ }
}
%typemap( freearg ) const PLINT * ArrayCkMinus1Null { LUA_FREE_ARRAY( $1 ); }
%typemap( default ) const PLINT * ArrayCkMinus1Null { $1 = NULL; }
@@ -295,6 +309,33 @@
}
+// Trailing count and check consistency with previous
+%typemap( in ) ( const PLFLT * ArrayCkNull, PLINT n )
+{
+ int temp = 0;
+ if ( lua_isnil( L, $input ) )
+ {
+ $1 = NULL;
+ }
+ else
+ {
+ $1 = (PLFLT *) LUA_get_double_num_array_var( L, $input, &temp );
+ if ( !$1 )
+ SWIG_fail;
+ if ( temp != Alen )
+ {
+ lua_pushfstring( L, "Tables must be of same length." );
+ SWIG_fail;
+ }
+ }
+ $2 = temp;
+}
+%typemap( freearg ) ( const PLFLT * ArrayCkNull, PLINT n )
+{
+ LUA_FREE_ARRAY( $1 );
+}
+
+
// no count, but check consistency with previous
%typemap( in ) const PLFLT * ArrayCk( int temp )
{
@@ -313,14 +354,21 @@
// no count, but check consistency with previous, or NULL
%typemap( in ) const PLFLT * ArrayCkNull( int temp )
{
- $1 = (PLFLT *) LUA_get_double_num_array_var( L, $input, &temp );
- if ( !$1 )
- SWIG_fail;
- if ( temp != Alen )
+ if ( lua_isnil( L, $input ) )
{
- lua_pushfstring( L, "Tables must be of same length." );
- SWIG_fail;
+ $1 = NULL;
}
+ else
+ {
+ $1 = (PLFLT *) LUA_get_double_num_array_var( L, $input, &temp );
+ if ( !$1 )
+ SWIG_fail;
+ if ( temp != Alen )
+ {
+ lua_pushfstring( L, "Tables must be of same length." );
+ SWIG_fail;
+ }
+ }
}
%typemap( freearg ) const PLFLT * ArrayCkNull { LUA_FREE_ARRAY( $1 ); }
@@ -337,6 +385,28 @@
{
LUA_FREE_ARRAY( $1 );
}
+
+// No length but remember size to check others
+%typemap( in ) const PLFLT * ArrayNull {
+ int temp;
+ if ( lua_isnil( L, $input ) )
+ {
+ $1 = NULL;
+ Alen = 0;
+ }
+ else
+ {
+ $1 = (PLFLT *) LUA_get_double_num_array_var( L, $input, &temp );
+ if ( !$1 )
+ SWIG_fail;
+ Alen = temp;
+ }
+}
+%typemap( freearg ) ( const PLFLT * Array )
+{
+ LUA_FREE_ARRAY( $1 );
+}
+
%typemap( default ) const PLFLT * ArrayCkNull { $1 = NULL; }
// with trailing count
Modified: trunk/bindings/octave/plplot_octave.i
===================================================================
--- trunk/bindings/octave/plplot_octave.i 2013-11-27 11:43:57 UTC (rev 12763)
+++ trunk/bindings/octave/plplot_octave.i 2013-11-27 12:11:34 UTC (rev 12764)
@@ -401,6 +401,33 @@
{
}
+// With trailing count and check consistency with previous
+%typemap( in ) ( const PLFLT * ArrayCkNull, PLINT n ) ( Matrix temp )
+{
+ if ( _n_dims( $input ) > 1 )
+ {
+ error( "argument must be a scalar or vector" ); SWIG_fail;
+ }
+ if ( !$input.is_empty() )
+ {
+ if ( _dim( $input, 0 ) != Alen )
+ {
+ error( "argument vectors must be same length" ); SWIG_fail;
+ }
+ temp = $input.matrix_value();
+ $1 = &temp( 0, 0 );
+ $2 = (PLINT) ( _dim( $input, 0 ) );
+ }
+ else
+ {
+ $1 = NULL;
+ $2 = 0;
+ }
+}
+%typemap( freearg ) ( const PLFLT * ArrayCkNull, PLINT n )
+{
+}
+
// No count but check consistency with previous
%typemap( in ) const PLFLT * ArrayCk( Matrix temp )
{
@@ -472,6 +499,29 @@
{
}
+// No count but remember size to check others
+%typemap( in ) const PLFLT * ArrayNull( Matrix temp )
+{
+ if ( _n_dims( $input ) > 1 )
+ {
+ error( "argument must be a scalar or vector" ); SWIG_fail;
+ }
+ if ( !$input.is_empty() )
+ {
+ Alen = (PLINT) ( _dim( $input, 0 ) );
+ temp = $input.matrix_value();
+ $1 = &temp( 0, 0 );
+ }
+ else
+ {
+ $1 = NULL;
+ Alen = 0;
+ }
+}
+%typemap( freearg ) ( const PLFLT * ArrayNull )
+{
+}
+
// With trailing count but remember size to check others
%typemap( in ) ( const PLFLT * Array, PLINT n ) ( Matrix temp )
{
Modified: trunk/bindings/python/plplotcmodule.i
===================================================================
--- trunk/bindings/python/plplotcmodule.i 2013-11-27 11:43:57 UTC (rev 12763)
+++ trunk/bindings/python/plplotcmodule.i 2013-11-27 12:11:34 UTC (rev 12764)
@@ -327,6 +327,33 @@
Py_CLEAR( tmp$argnum );
}
+// trailing count and check consistency with previous
+%typemap( in ) ( const PLFLT * ArrayCkNull, PLINT n ) ( PyArrayObject * tmp = NULL )
+{
+ if ( $input != Py_None )
+ {
+ tmp = (PyArrayObject *) myArray_ContiguousFromObject( $input, NPY_PLFLT, 1, 1 );
+ if ( tmp == NULL )
+ return NULL;
+ if ( PyArray_DIMS( tmp )[0] != Alen )
+ {
+ PyErr_SetString( PyExc_ValueError, "Vectors must be same length." );
+ return NULL;
+ }
+ $1 = (PLFLT *) PyArray_DATA( tmp );
+ $2 = PyArray_DIMS( tmp )[0];
+ }
+ else
+ {
+ $1 = NULL;
+ $2 = 0;
+ }
+}
+%typemap( freearg ) ( const PLFLT * ArrayCkNull, PLINT n )
+{
+ Py_CLEAR( tmp$argnum );
+}
+
// no count, but check consistency with previous
%typemap( in ) const PLFLT * ArrayCk( PyArrayObject * tmp = NULL )
{
@@ -345,6 +372,8 @@
// no count, but check consistency with previous, or NULL
%typemap( in ) const PLFLT * ArrayCkNull( PyArrayObject * tmp = NULL )
{
+ if ( $input != Py_None )
+ {
tmp = (PyArrayObject *) myArray_ContiguousFromObject( $input, NPY_PLFLT, 1, 1 );
if ( tmp == NULL )
return NULL;
@@ -354,6 +383,11 @@
return NULL;
}
$1 = (PLFLT *) PyArray_DATA( tmp );
+ }
+ else
+ {
+ $1 = NULL;
+ }
}
%typemap( freearg ) const PLFLT * ArrayCkNull { Py_CLEAR( tmp$argnum );}
@@ -465,6 +499,26 @@
}
%typemap( freearg ) const PLFLT * Array { Py_CLEAR( tmp$argnum );}
+
+// with no count
+%typemap( in ) const PLFLT * ArrayNull( PyArrayObject * tmp = NULL )
+{
+ if ( $input != Py_None )
+ {
+ tmp = (PyArrayObject *) myArray_ContiguousFromObject( $input, NPY_PLFLT, 1, 1 );
+ if ( tmp == NULL )
+ return NULL;
+ Alen = PyArray_DIMS( tmp )[0];
+ $1 = (PLFLT *) PyArray_DATA( tmp );
+ }
+ else
+ {
+ $1 = NULL;
+ Alen = 0;
+ }
+}
+%typemap( freearg ) const PLFLT * ArrayNull { Py_CLEAR( tmp$argnum );}
+
// 2D array with trailing dimensions, check consistency with previous
%typemap( in ) ( const PLFLT * *MatrixCk, PLINT nx, PLINT ny ) ( PyArrayObject * tmp = NULL )
{
Modified: trunk/bindings/swig-support/plplotcapi.i
===================================================================
--- trunk/bindings/swig-support/plplotcapi.i 2013-11-27 11:43:57 UTC (rev 12763)
+++ trunk/bindings/swig-support/plplotcapi.i 2013-11-27 12:11:34 UTC (rev 12764)
@@ -764,7 +764,7 @@
plstyl( PLINT n, const PLINT *Array, const PLINT *ArrayCk );
void
-plsvect( const PLFLT *Array, const PLFLT *ArrayCk, PLINT n, PLBOOL fill );
+plsvect( const PLFLT *ArrayNull, const PLFLT *ArrayCkNull, PLINT n, PLBOOL fill );
void
plsvpa( PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax );
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ai...@us...> - 2008-10-10 20:31:25
|
Revision: 8877
http://plplot.svn.sourceforge.net/plplot/?rev=8877&view=rev
Author: airwin
Date: 2008-10-10 20:31:23 +0000 (Fri, 10 Oct 2008)
Log Message:
-----------
Change to new PLDLLIMPEXP* naming convention with separate namespace
for each library.
Modified Paths:
--------------
trunk/bindings/tcl/pltcl.h
trunk/bindings/tcl/tclMatrix.h
trunk/bindings/tk/pltk.h
Modified: trunk/bindings/tcl/pltcl.h
===================================================================
--- trunk/bindings/tcl/pltcl.h 2008-10-10 20:30:22 UTC (rev 8876)
+++ trunk/bindings/tcl/pltcl.h 2008-10-10 20:31:23 UTC (rev 8877)
@@ -22,7 +22,7 @@
/* tclMain.c */
/* Main program for a Tcl-based shell that reads Tcl commands from stdin. */
-int PLDLLIMPEXP
+int PLDLLIMPEXP_TCLTK
pltclMain(int argc, const char **argv, char *RcFileName,
int (*AppInit)(Tcl_Interp *interp));
@@ -35,7 +35,7 @@
/* Initialization routine for PLplot-extended tclsh's (like pltcl). */
-int PLDLLIMPEXP
+int PLDLLIMPEXP_TCLTK
Pltcl_Init( Tcl_Interp *interp );
int
@@ -49,7 +49,7 @@
/* Tcl command -- wait until the specified condition is satisfied. */
-PLDLLIMPEXP int
+PLDLLIMPEXP_TCLTK int
plWait_Until(ClientData, Tcl_Interp *, int, const char **);
/* Tcl command -- return the IP address for the current host. */
Modified: trunk/bindings/tcl/tclMatrix.h
===================================================================
--- trunk/bindings/tcl/tclMatrix.h 2008-10-10 20:30:22 UTC (rev 8876)
+++ trunk/bindings/tcl/tclMatrix.h 2008-10-10 20:31:23 UTC (rev 8877)
@@ -320,7 +320,7 @@
/* Tcl package initialisation function */
-int PLDLLIMPEXP Matrix_Init (Tcl_Interp*);
+int PLDLLIMPEXP_TCLMAT Matrix_Init (Tcl_Interp*);
/* This procedure is invoked to process the "matrix" Tcl command. */
@@ -330,7 +330,7 @@
/* Returns a pointer to the specified matrix operator's data. */
-tclMatrix PLDLLIMPEXP *
+tclMatrix PLDLLIMPEXP_TCLMAT *
Tcl_GetMatrixPtr(Tcl_Interp *interp, const char *matName);
/* Some stuff for handling extension subcommands. */
Modified: trunk/bindings/tk/pltk.h
===================================================================
--- trunk/bindings/tk/pltk.h 2008-10-10 20:30:22 UTC (rev 8876)
+++ trunk/bindings/tk/pltk.h 2008-10-10 20:31:23 UTC (rev 8877)
@@ -23,12 +23,12 @@
#define TCL_STORAGE_CLASS DLLEXPORT
#endif /* BUILD_Vfs */
-EXTERN PLDLLIMPEXP int
+EXTERN PLDLLIMPEXP_TCLTK int
Pltk_Init( Tcl_Interp *interp );
/* Main program for wish, with PLplot extensions. */
-EXTERN PLDLLIMPEXP int
+EXTERN PLDLLIMPEXP_TCLTK int
pltkMain(int argc, const char **argv, char *RcFileName,
int (*AppInit)(Tcl_Interp *interp));
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <arj...@us...> - 2008-10-22 04:25:34
|
Revision: 8953
http://plplot.svn.sourceforge.net/plplot/?rev=8953&view=rev
Author: arjenmarkus
Date: 2008-10-22 04:25:30 +0000 (Wed, 22 Oct 2008)
Log Message:
-----------
Changes to the Fortran 77 and 95 bindings because of support for the latest
gfortran version under MinGW. This also cleans up a few oddities in the
interface (notably sc3d.c). Added an export definitions file for F77. This
was required for CVF.
Modified Paths:
--------------
trunk/bindings/f77/CMakeLists.txt
trunk/bindings/f77/plplotf77.def
trunk/bindings/f77/plstubs.h
trunk/bindings/f77/sc3d.c
trunk/bindings/f95/plplotf95.def
trunk/bindings/f95/plstubs.h
trunk/bindings/f95/sc3d.c
trunk/bindings/f95/scstubs.c
trunk/bindings/f95/sfstubsf95.f90
Modified: trunk/bindings/f77/CMakeLists.txt
===================================================================
--- trunk/bindings/f77/CMakeLists.txt 2008-10-22 02:24:26 UTC (rev 8952)
+++ trunk/bindings/f77/CMakeLists.txt 2008-10-22 04:25:30 UTC (rev 8953)
@@ -35,7 +35,7 @@
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/sfstubs.f
COMMAND sed
-f ${CMAKE_CURRENT_SOURCE_DIR}/double2single.sed ${CMAKE_CURRENT_SOURCE_DIR}/sfstubs.fm4 > ${CMAKE_CURRENT_BINARY_DIR}/sfstubs.f
- DEPENDS
+ DEPENDS
${CMAKE_CURRENT_SOURCE_DIR}/double2single.sed
${CMAKE_CURRENT_SOURCE_DIR}/sfstubs.fm4
)
@@ -129,6 +129,10 @@
configurable.f
)
+if(WIN32 AND BUILD_SHARED_LIBS)
+ SET(plplotf77${LIB_TAG}_LIB_SRCS ${plplotf77${LIB_TAG}_LIB_SRCS} plplotf77.def)
+endif(WIN32 AND BUILD_SHARED_LIBS)
+
add_library(plplotf77${LIB_TAG} ${plplotf77${LIB_TAG}_LIB_SRCS})
target_link_libraries(plplotf77${LIB_TAG} plplotf77c${LIB_TAG})
Modified: trunk/bindings/f77/plplotf77.def
===================================================================
--- trunk/bindings/f77/plplotf77.def 2008-10-22 02:24:26 UTC (rev 8952)
+++ trunk/bindings/f77/plplotf77.def 2008-10-22 04:25:30 UTC (rev 8953)
@@ -1,54 +1,30 @@
+EXPORTS
_PLABORT@8
_PLAXES@40
- _PLBIN@12
_PLBOX3@72
_PLBOX@32
_PLCON0@36
_PLCON1@44
_PLCON2@44
- _PLCONT@32
- _PLCPSTRM@8
- _PLERRX@12
- _PLERRY@12
- _PLFILL3@12
- _PLFILL@8
+ _PLCONT@36
_PLGDEV@8
_PLGFNAM@8
- _PLGRIDDATA@32
+ _PLSFNAM@8
_PLGVER@8
- _PLHIST@20
- _PLIMAGE@44
_PLIMAGEFR0@48
_PLIMAGEFR1@56
_PLIMAGEFR2@56
_PLIMAGEFR@48
_PLLAB@24
- _PLLINE3@12
- _PLLINE@8
_PLMAP@28
_PLMERIDIANS@28
- _PLMESH@16
- _PLMESHC@20
_PLMTEX3@28
_PLMTEX@28
- _PLOT3D@20
- _PLOT3DC@20
_PLPARSEOPTS@4
- _PLPOIN3@16
- _PLPOIN@12
- _PLPOLY3@20
_PLPTEX3@48
_PLPTEX@28
- _PLSCMAP0@12
- _PLSCMAP0A@16
- _PLSCMAP1@12
- _PLSCMAP1L2@20
- _PLSCMAP1L@24
- _PLSCMAP1LA2@24
- _PLSCMAP1LA@28
- _PLSDEV7@4
- _PLSETOPT7@8
- _PLSFNAM7@4
+ _PLSDEV@8
+ _PLSETOPT@16
_PLSHADE0@76
_PLSHADE1@84
_PLSHADE2@84
@@ -59,16 +35,9 @@
_PLSHADES@60
_PLSPAUSE@4
_PLSTART@16
- _PLSTRF2C@16
_PLSTRC2F@16
_PLSTRIPC@104
- _PLSURF3D@20
- _PLSVECT@12
- _PLSYM@12
_PLTIMEFMT@8
_PLVEC0@20
_PLVEC1@28
_PLVEC2@28
- _PLXORMOD@8
-EXPORTS
-LIBRARY plplotf77d.dll
Modified: trunk/bindings/f77/plstubs.h
===================================================================
--- trunk/bindings/f77/plstubs.h 2008-10-22 02:24:26 UTC (rev 8952)
+++ trunk/bindings/f77/plstubs.h 2008-10-22 04:25:30 UTC (rev 8953)
@@ -53,6 +53,7 @@
#define STUB_U 3
#define STUB_FORTRAN 4
#define STUB_STDCALL 5
+#define STUB_MINGW 6
#ifndef STUB_LINKAGE
@@ -99,6 +100,8 @@
#define STUB_LINKAGE STUB_FORTRAN
#elif defined(_MSC_VER)
#define STUB_LINKAGE STUB_STDCALL
+#elif defined(__GNUC__) /* GNU C with MinGW/Cygwin */
+#define STUB_LINKAGE STUB_MINGW
#endif
#elif defined(MSDOS) /* MS-DOS based */
#define STUB_LINKAGE STUB_FORTRAN
@@ -125,7 +128,7 @@
#define FNAME_(x,y) y
#elif STUB_LINKAGE == STUB_U
-#define FNAME(x,y) x
+#define FNAME(x,y) PLDLLIMPEXP_F77C __stdcall x
#define FNAME_(x,y) x
#elif STUB_LINKAGE == STUB_FORTRAN
@@ -136,6 +139,10 @@
#define FNAME(x,y) PLDLLIMPEXP_F77C __stdcall x
#define FNAME_(x,y) x
+#elif STUB_LINKAGE == STUB_MINGW
+#define FNAME(x,y) PLDLLIMPEXP_F77C y##_
+#define FNAME_(x,y) y
+
#else
#error "Illegal setting for STUB_LINKAGE"
#endif
Modified: trunk/bindings/f77/sc3d.c
===================================================================
--- trunk/bindings/f77/sc3d.c 2008-10-22 02:24:26 UTC (rev 8952)
+++ trunk/bindings/f77/sc3d.c 2008-10-22 04:25:30 UTC (rev 8953)
@@ -25,7 +25,7 @@
#include "plstubs.h"
void
-PLOT3DC(PLFLT *x, PLFLT *y, PLFLT *z,
+PLOT3DC__(PLFLT *x, PLFLT *y, PLFLT *z,
PLINT *nx, PLINT *ny, PLINT *opt,
PLFLT *clevel, PLINT *nlevel, PLINT *lx)
{
@@ -48,6 +48,14 @@
}
void
+PLOT3DC(PLFLT *x, PLFLT *y, PLFLT *z,
+ PLINT *nx, PLINT *ny, PLINT *opt,
+ PLFLT *clevel, PLINT *nlevel, PLINT *lx)
+{
+ PLOT3DC__(x, y, z, nx, ny, opt, clevel, nlevel, lx);
+}
+
+void
PLSURF3D(PLFLT *x, PLFLT *y, PLFLT *z,
PLINT *nx, PLINT *ny, PLINT *opt,
PLFLT *clevel, PLINT *nlevel, PLINT *lx)
@@ -97,7 +105,7 @@
PLFLT clevel = 0.;
optlocal = *opt | MESH;
- PLOT3DC_(x, y, z, nx, ny, &optlocal, &clevel, &nlevel, lx);
+ PLOT3DC__(x, y, z, nx, ny, &optlocal, &clevel, &nlevel, lx);
}
void
@@ -107,7 +115,7 @@
{
PLINT optlocal;
optlocal = *opt | MESH;
- PLOT3DC_(x, y, z, nx, ny, &optlocal, clevel, nlevel, lx);
+ PLOT3DC__(x, y, z, nx, ny, &optlocal, clevel, nlevel, lx);
}
@@ -119,6 +127,6 @@
PLFLT clevel = 0.;
optlocal = *opt | (*side == 1 ? DRAW_SIDES : 0);
- PLOT3DC_(x, y, z, nx, ny, &optlocal, &clevel, &nlevel, lx);
+ PLOT3DC__(x, y, z, nx, ny, &optlocal, &clevel, &nlevel, lx);
}
Modified: trunk/bindings/f95/plplotf95.def
===================================================================
--- trunk/bindings/f95/plplotf95.def 2008-10-22 02:24:26 UTC (rev 8952)
+++ trunk/bindings/f95/plplotf95.def 2008-10-22 04:25:30 UTC (rev 8953)
@@ -48,13 +48,17 @@
_PLPLOT_mp_PLGRIDDATA@32
_PLPLOT_mp_PLHIST@20
_PLPLOT_mp_PLIMAGE@44
- _PLPLOT_mp_PLIMAGEFR@52
+ _PLPLOTP_mp_PLIMAGEFR_0@36
+ _PLPLOTP_mp_PLIMAGEFR_1@44
+ _PLPLOTP_mp_PLIMAGEFR_2@44
+ _PLPLOTP_mp_PLIMAGEFR_TR@40
_PLPLOT_mp_PLLINE@8
_PLPLOT_mp_PLLINE3@12
_PLPLOT_mp_PLMESH@16
_PLPLOT_mp_PLMESHC@20
_PLPLOT_mp_PLOT3D@20
_PLPLOT_mp_PLOT3DC@20
+ _PLPLOT_mp_PLRANDD@0
_PLPLOT_mp_PLSPAUSE@4
_PLPLOT_mp_PLSURF3D@20
_PLPLOT_mp_PLPOIN@12
Modified: trunk/bindings/f95/plstubs.h
===================================================================
--- trunk/bindings/f95/plstubs.h 2008-10-22 02:24:26 UTC (rev 8952)
+++ trunk/bindings/f95/plstubs.h 2008-10-22 04:25:30 UTC (rev 8953)
@@ -53,6 +53,7 @@
#define STUB_U 3
#define STUB_FORTRAN 4
#define STUB_STDCALL 5
+#define STUB_MINGW 6
#ifndef STUB_LINKAGE
@@ -94,15 +95,17 @@
#ifdef IVF /* Intel Visual Fortran */
#define STUB_LINKAGE STUB_U
#elif defined(CVF)
-#define STUB_LINKAGE_STUB_U
+#define STUB_LINKAGE STUB_U
+#elif defined(MSDOS)
+#define STUB_LINKAGE STUB_FORTRAN
#elif defined(_MSC_VER)
#define STUB_LINKAGE STUB_STDCALL
-#else
-#define STUB_LINKAGE STUB_STDCALL
+#elif defined(__GNUC__)
+#define STUB_LINKAGE STUB_MINGW
#endif
-#elif defined(MSDOS)
+#elif defined(MSDOS) /* MS-DOS based */
#define STUB_LINKAGE STUB_FORTRAN
-#endif
+#endif /* Windows 32-bit */
#ifndef STUB_LINKAGE /* The default */
#define STUB_LINKAGE STUB_LAU
@@ -118,18 +121,27 @@
#if STUB_LINKAGE==STUB_LAU
#define FNAME(x,y) PLDLLIMPEXP_F95C y##_
+#define FNAME_(x,y) y##_
#elif STUB_LINKAGE == STUB_L
#define FNAME(x,y) y
+#define FNAME_(x,y) y
#elif STUB_LINKAGE == STUB_U
#define FNAME(x,y) x
+#define FNAME_(x,y) x
+#elif STUB_LINKAGE == STUB_FORTRAN
+#define FNAME(x,y) fortran x
+#define FNAME_(x,y) x
+
#elif STUB_LINKAGE == STUB_STDCALL
#define FNAME(x,y) PLDLLIMPEXP_F95C __stdcall x
+#define FNAME_(x,y) x
-#elif STUB_LINKAGE == STUB_FORTRAN
-#define FNAME(x,y) fortran x
+#elif STUB_LINKAGE == STUB_MINGW
+#define FNAME(x,y) PLDLLIMPEXP_F95C y##_
+#define FNAME_(x,y) y
#else
#error "Illegal setting for STUB_LINKAGE"
Modified: trunk/bindings/f95/sc3d.c
===================================================================
--- trunk/bindings/f95/sc3d.c 2008-10-22 02:24:26 UTC (rev 8952)
+++ trunk/bindings/f95/sc3d.c 2008-10-22 04:25:30 UTC (rev 8953)
@@ -25,7 +25,7 @@
#include "plstubs.h"
void
-PLOT3DC(PLFLT *x, PLFLT *y, PLFLT *z,
+PLOT3DC__(PLFLT *x, PLFLT *y, PLFLT *z,
PLINT *nx, PLINT *ny, PLINT *opt,
PLFLT *clevel, PLINT *nlevel, PLINT *lx)
{
@@ -48,6 +48,14 @@
}
void
+PLOT3DC(PLFLT *x, PLFLT *y, PLFLT *z,
+ PLINT *nx, PLINT *ny, PLINT *opt,
+ PLFLT *clevel, PLINT *nlevel, PLINT *lx)
+{
+ PLOT3DC__(x, y, z, nx, ny, opt, clevel, nlevel, lx);
+}
+
+void
PLSURF3D(PLFLT *x, PLFLT *y, PLFLT *z,
PLINT *nx, PLINT *ny, PLINT *opt,
PLFLT *clevel, PLINT *nlevel, PLINT *lx)
@@ -97,7 +105,7 @@
PLFLT clevel = 0.;
optlocal = *opt | MESH;
- CALL_PLOT3DC(x, y, z, nx, ny, &optlocal, &clevel, &nlevel, lx);
+ PLOT3DC__(x, y, z, nx, ny, &optlocal, &clevel, &nlevel, lx);
}
void
@@ -107,7 +115,7 @@
{
PLINT optlocal;
optlocal = *opt | MESH;
- CALL_PLOT3DC(x, y, z, nx, ny, &optlocal, clevel, nlevel, lx);
+ PLOT3DC__(x, y, z, nx, ny, &optlocal, clevel, nlevel, lx);
}
@@ -119,6 +127,6 @@
PLFLT clevel = 0.;
optlocal = *opt | (*side != 0 ? DRAW_SIDES : 0);
- CALL_PLOT3DC(x, y, z, nx, ny, &optlocal, &clevel, &nlevel, lx);
+ PLOT3DC__(x, y, z, nx, ny, &optlocal, &clevel, &nlevel, lx);
}
Modified: trunk/bindings/f95/scstubs.c
===================================================================
--- trunk/bindings/f95/scstubs.c 2008-10-22 02:24:26 UTC (rev 8952)
+++ trunk/bindings/f95/scstubs.c 2008-10-22 04:25:30 UTC (rev 8953)
@@ -300,7 +300,7 @@
c_plgfam(fam, num, bmax);
}
-/* Note: Fortran does not have unsigned integers so we need to use a
+/* Note: Fortran does not have unsigned integers so we need to use a
* 64 bit signed integer which corresponds to a fortran integer*8
* in order to contain the number. */
void
@@ -829,9 +829,10 @@
c_plsfam(*fam, *num, *bmax);
}
-/* Note: Fortran does not have unsigned integers so we need to use a
+/* Note: Fortran does not have unsigned integers so we need to use a
* 64 bit signed integer which corresponds to a fortran integer*8
* in order to contain the number. */
+/* PLSFCI(PLINT64 *fci) */
void
PLSFCI(PLINT64 *fci)
{
Modified: trunk/bindings/f95/sfstubsf95.f90
===================================================================
--- trunk/bindings/f95/sfstubsf95.f90 2008-10-22 02:24:26 UTC (rev 8952)
+++ trunk/bindings/f95/sfstubsf95.f90 2008-10-22 04:25:30 UTC (rev 8953)
@@ -372,7 +372,7 @@
use plplot_flt
integer(kind=plunicode) :: fci
end subroutine plgfci
- end interface
+ end interface
interface
subroutine plgfont( family, style, weight )
@@ -739,7 +739,7 @@
use plplot_flt
integer(kind=plunicode) :: fci
end subroutine plsfci
- end interface
+ end interface
interface
subroutine plsfont( family, style, weight )
@@ -1006,20 +1006,20 @@
call plhistf77( size(data), data, datmin, datmax, nbin, oldwin )
end subroutine plhist
-! subroutine plimagefr( idata, xmin, xmax, ymin, ymax, zmin, zmax, &
-! dxmin, dxmax, dymin, dymax, valuemin, valuemax )
-! real(kind=plflt), dimension(:,:) :: idata
-! real(kind=plflt) :: xmin, xmax, ymin, ymax, zmin, zmax
+! subroutine plimagefr( idata, xmin, xmax, ymin, ymax, zmin, zmax, &
+! dxmin, dxmax, dymin, dymax, valuemin, valuemax )
+! real(kind=plflt), dimension(:,:) :: idata
+! real(kind=plflt) :: xmin, xmax, ymin, ymax, zmin, zmax
! real(kind=plflt) :: dxmin, dxmax, dymin, dymax, &
! valuemin, valuemax
!
-! integer :: nx, ny
+! integer :: nx, ny
!
-! nx = size(idata,1)
-! ny = size(idata,2)
-! call plimagefrf77( idata, nx, ny, xmin, xmax, ymin, ymax, zmin, zmax, &
-! dxmin, dxmax, dymin, dymax, valuemin, valuemax )
-! end subroutine plimagefr
+! nx = size(idata,1)
+! ny = size(idata,2)
+! call plimagefrf77( idata, nx, ny, xmin, xmax, ymin, ymax, zmin, zmax, &
+! dxmin, dxmax, dymin, dymax, valuemin, valuemax )
+! end subroutine plimagefr
subroutine plimage( idata, xmin, xmax, ymin, ymax, zmin, zmax, &
dxmin, dxmax, dymin, dymax )
@@ -1032,7 +1032,7 @@
nx = size(idata,1)
ny = size(idata,2)
call plimagef77( idata, nx, ny, xmin, xmax, ymin, ymax, zmin, zmax, &
- dxmin, dxmax, dymin, dymax, nx )
+ dxmin, dxmax, dymin, dymax )
end subroutine plimage
subroutine plline( x, y )
@@ -1136,7 +1136,7 @@
enddo
call plpoly3f77( size(x), x, y, z, idraw, iifcc )
end subroutine plpoly3
-
+
real (kind=plflt) function plrandd()
external plranddf77
real(kind=plflt) :: plranddf77
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sm...@us...> - 2009-01-19 09:14:59
|
Revision: 9341
http://plplot.svn.sourceforge.net/plplot/?rev=9341&view=rev
Author: smekal
Date: 2009-01-19 09:14:48 +0000 (Mon, 19 Jan 2009)
Log Message:
-----------
Initial work on PLplot bindings to the Lua interpreter language. Some examples already work, but still lot of work on the interface needs to be done.
Modified Paths:
--------------
trunk/bindings/CMakeLists.txt
Added Paths:
-----------
trunk/bindings/lua/
trunk/bindings/lua/CMakeLists.txt
trunk/bindings/lua/plplotluac.i
Modified: trunk/bindings/CMakeLists.txt
===================================================================
--- trunk/bindings/CMakeLists.txt 2009-01-18 21:39:41 UTC (rev 9340)
+++ trunk/bindings/CMakeLists.txt 2009-01-19 09:14:48 UTC (rev 9341)
@@ -33,6 +33,7 @@
add_subdirectory(ada)
add_subdirectory(d)
add_subdirectory(ocaml)
+add_subdirectory(lua)
set(index)
if(ENABLE_tcl)
Added: trunk/bindings/lua/CMakeLists.txt
===================================================================
--- trunk/bindings/lua/CMakeLists.txt (rev 0)
+++ trunk/bindings/lua/CMakeLists.txt 2009-01-19 09:14:48 UTC (rev 9341)
@@ -0,0 +1,48 @@
+# bindings/lua/CMakeLists.txt
+### Process this file with cmake to produce Makefile
+###
+# Copyright (C) 2008 Werner Smekal
+#
+# This file is part of PLplot.
+#
+# PLplot is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Library General Public License as published
+# by the Free Software Foundation; version 2 of the License.
+#
+# PLplot is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public License
+# along with PLplot; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+if(ENABLE_lua)
+
+# This is currently the include list for swig.
+set(lua_interface_INCLUDE_PATHS
+${CMAKE_SOURCE_DIR}/include
+${CMAKE_BINARY_DIR}
+${CMAKE_BINARY_DIR}/include
+${CMAKE_CURRENT_BINARY_DIR}
+${LUA_INCLUDE_DIR}
+${CMAKE_SOURCE_DIR}/bindings/swig-support
+)
+include_directories(${lua_interface_INCLUDE_PATHS})
+
+set(CMAKE_SWIG_FLAGS -DSWIG_LUA)
+set(CMAKE_SWIG_OUTDIR ${CMAKE_CURRENT_BINARY_DIR})
+
+set_source_files_properties(plplotluac.i
+PROPERTIES SWIG_MODULE_NAME plplotluac
+)
+
+set(SWIG_MODULE_plplotluac_EXTRA_DEPS
+${CMAKE_SOURCE_DIR}/bindings/swig-support/plplotcapi.i)
+
+# Set up swig + c wrapper.
+swig_add_module(plplotluac lua plplotluac.i)
+swig_link_libraries(plplotluac plplot${LIB_TAG} ${LUA_LIBRARIES})
+
+endif(ENABLE_lua)
Property changes on: trunk/bindings/lua/CMakeLists.txt
___________________________________________________________________
Added: svn:eol-style
+ native
Added: trunk/bindings/lua/plplotluac.i
===================================================================
--- trunk/bindings/lua/plplotluac.i (rev 0)
+++ trunk/bindings/lua/plplotluac.i 2009-01-19 09:14:48 UTC (rev 9341)
@@ -0,0 +1,294 @@
+/*
+Copyright (C) 2009 Werner Smekal
+This file is part of PLplot.
+
+PLplot is free software; you can redistribute it and/or modify
+it under the terms of the GNU Library General Public License as published by
+the Free Software Foundation; version 2 of the License.
+
+PLplot is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public License
+along with the file PLplot; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+*/
+
+/*
+A SWIG interface to PLplot for LUA. This wrapper does the following:
+
+ 1) it strictly provides the C-API with the usual change of not
+ requiring lengths for arrays,
+
+ 2) it attempts to provide the entire API *excluding* callbacks for
+ plcont and plshade(s) (for now).
+
+ 3) it works only with the double-precision version of the
+ PLplot library.
+
+This is known to work with swig-1.3.36.
+
+*/
+%module plplotluac
+
+%{
+#include "plplotP.h"
+%}
+
+/* type definitions */
+typedef double PLFLT;
+typedef int PLINT;
+typedef unsigned int PLUNICODE;
+typedef PLINT PLBOOL;
+
+/* Assign the module a shorter name */
+%luacode {
+ pl=plplotluac
+}
+
+/* I hate global variables but this is the best way I can think of to manage consistency
+ checking among function arguments. */
+%{
+static PLINT Alen = 0;
+static PLINT Xlen = 0, Ylen = 0;
+%}
+
+/* The following typemaps take care of marshaling values into and out of PLplot functions. The
+Array rules are trickly because of the need for length checking. These rules manage
+some global variables (above) to handle consistency checking amoung parameters.
+
+Naming rules:
+ Array (sets Alen to dim[0])
+ ArrayCk (tests that dim[0] == Alen)
+ ArrayX (sets Xlen to dim[0]
+ ArrayCkX (tests dim[0] == Xlen)
+ ArrayY (sets Ylen to dim[1])
+ ArrayCkY (tests dim[1] == Ylen)
+ Matrix (sets Xlen to dim[0], Ylen to dim[1])
+ MatrixCk (test Xlen == dim[0] && Ylen == dim[1])
+*/
+
+/* typemaps */
+%include <typemaps.i>
+
+/**********************************************************************************
+ PLINT arrays
+**********************************************************************************/
+
+/* With preceding count */
+%typemap(in) (PLINT n, PLINT *Array) {
+ $2 = (PLINT*)SWIG_get_int_num_array_var(L, $input, &$1);
+ if(!$2) SWIG_fail;
+ Alen = $1;
+}
+%typemap(freearg) (PLINT n, PLINT *Array) { SWIG_FREE_ARRAY($2); }
+
+
+/* Trailing count and check consistency with previous */
+%typemap(in) (PLINT *ArrayCk, PLINT n) (int temp) {
+ $1 = (PLINT*)SWIG_get_int_num_array_var(L, $input, &temp);
+ if(!$1) SWIG_fail;
+ if(temp != Alen) {
+ lua_pushfstring(L, "Tables must be of same length.");
+ SWIG_fail;
+ }
+ $2 = temp;
+}
+%typemap(freearg) (PLINT *ArrayCk, PLINT n) { SWIG_FREE_ARRAY($1); }
+
+
+/* No count but check consistency with previous */
+%typemap(in) PLINT *ArrayCk (int temp) {
+ $1 = (PLINT*)SWIG_get_int_num_array_var(L, $input, &temp);
+ if(!$1) SWIG_fail;
+ if(temp != Alen) {
+ lua_pushfstring(L, "Tables must be of same length.");
+ SWIG_fail;
+ }
+}
+%typemap(freearg) PLINT *ArrayCk { SWIG_FREE_ARRAY($1); }
+
+
+/* Weird case to allow argument to be one shorter than others */
+%typemap(in) PLINT *ArrayCkMinus1 (int temp) {
+ $1 = (PLINT*)SWIG_get_int_num_array_var(L, $input, &temp);
+ if(!$1) SWIG_fail;
+ if(temp < Alen-1) {
+ lua_pushfstring(L, "Tables must be at least length of others minus 1.");
+ SWIG_fail;
+ }
+}
+%typemap(freearg) PLINT *ArrayCkMinus1 { SWIG_FREE_ARRAY($1); }
+
+%typemap(in) PLINT *ArrayCkMinus1Null (int temp) {
+ $1 = (PLINT*)SWIG_get_int_num_array_var(L, $input, &temp);
+ if(!$1) SWIG_fail;
+ if(temp < Alen-1) {
+ lua_pushfstring(L, "Tables must be at least length of others minus 1.");
+ SWIG_fail;
+ }
+}
+%typemap(freearg) PLINT *ArrayCkMinus1Null { SWIG_FREE_ARRAY($1); }
+
+
+/* No length but remember size to check others */
+%typemap(in) PLINT *Array (int temp) {
+ $1 = (PLINT*)SWIG_get_int_num_array_var(L, $input, &temp);
+ if(!$1) SWIG_fail;
+ Alen = temp;
+}
+%typemap(freearg) (PLINT *Array) { SWIG_FREE_ARRAY($1); }
+
+
+/******************************************************************************
+ PLFLT Arrays
+******************************************************************************/
+
+/* with preceding count */
+%typemap(in) (PLINT n, PLFLT *Array) {
+ $2 = (PLFLT*)SWIG_get_double_num_array_var(L, $input, &$1);
+ if(!$2) SWIG_fail;
+ Alen = $1;
+}
+%typemap(freearg) (PLINT n, PLFLT *Array) { SWIG_FREE_ARRAY($2); }
+
+
+/* Trailing count and check consistency with previous */
+%typemap(in) (PLFLT *ArrayCk, PLINT n) (int temp) {
+ $1 = (PLFLT*)SWIG_get_double_num_array_var(L, $input, &temp);
+ if(!$1) SWIG_fail;
+ if(temp != Alen) {
+ lua_pushfstring(L, "Tables must be of same length.");
+ SWIG_fail;
+ }
+ $2 = temp;
+}
+%typemap(freearg) (PLFLT *ArrayCk, PLINT n) { SWIG_FREE_ARRAY($1); }
+
+
+/* no count, but check consistency with previous */
+%typemap(in) PLFLT *ArrayCk (int temp) {
+ $1 = (PLFLT*)SWIG_get_double_num_array_var(L, $input, &temp);
+ if(!$1) SWIG_fail;
+ if(temp != Alen) {
+ lua_pushfstring(L, "Tables must be of same length.");
+ SWIG_fail;
+ }
+}
+%typemap(freearg) PLFLT *ArrayCk { SWIG_FREE_ARRAY($1); }
+
+
+/* No length but remember size to check others */
+%typemap(in) PLFLT *Array (int temp) {
+ $1 = (PLFLT*)SWIG_get_double_num_array_var(L, $input, &temp);
+ if(!$1) SWIG_fail;
+ Alen = temp;
+}
+%typemap(freearg) (PLFLT *Array) { SWIG_FREE_ARRAY($1); }
+
+
+/******************************************************************************
+ Function calls
+******************************************************************************/
+
+/* lua functions
+%include <lua_fnptr.i>
+
+%{
+void mapform_fn(PLINT n, PLFLT* x, PLFLT* y)
+{
+ SWIGLUA_FN_GET(fn);
+ lua_pushnumber(fn.L, n);
+ SWIG_write_double_num_array(L, x, n)
+ SWIG_write_double_num_array(L, y, n)
+ lua_call(fn.L,3,0); // 2 in, 1 out
+}
+%} */
+
+typedef PLINT (*defined_func)(PLFLT, PLFLT);
+typedef void (*fill_func)(PLINT, PLFLT*, PLFLT*);
+typedef void (*pltr_func)(PLFLT, PLFLT, PLFLT *, PLFLT*, PLPointer);
+typedef void (*mapform_func)(PLINT, PLFLT *, PLFLT*);
+typedef PLFLT (*f2eval_func)(PLINT, PLINT, PLPointer);
+
+%{
+typedef PLINT (*defined_func)(PLFLT, PLFLT);
+typedef void (*fill_func)(PLINT, PLFLT*, PLFLT*);
+typedef void (*pltr_func)(PLFLT, PLFLT, PLFLT *, PLFLT*, PLPointer);
+typedef void (*mapform_func)(PLINT, PLFLT *, PLFLT*);
+typedef PLFLT (*f2eval_func)(PLINT, PLINT, PLPointer);
+%}
+
+%typemap(in, numinputs=0) defined_func df {
+ $1 = NULL;
+}
+
+%typemap(in, numinputs=0) fill_func ff {
+ $1 = plfill;
+}
+
+/* Process options list using current options info. */
+%typemap(in) (int *p_argc, const char **argv) {
+ int i, n;
+
+ if(!lua_istable(L, $input)) {
+ lua_pushstring(L,"expected a table");
+ SWIG_fail;
+ }
+
+ lua_pushstring(L, "n");
+ lua_gettable(L, $input);
+ if(!lua_isnumber(L, -1)) {
+ lua_pushfstring(L, "Table doesn't contain key 'n'.");
+ SWIG_fail;
+ }
+ n = (int)lua_tonumber(L, -1);
+ lua_pop(L, 1); /* remove number */
+ n=n+1; /* since lua only counts the options */
+ printf("n=%d\n", n);
+ $1 = &n;
+
+ $2 = SWIG_ALLOC_ARRAY(char*, n+1);
+
+ for(i = 0; i < n; i++) {
+ lua_rawgeti(L, $input, i);
+ if(lua_isstring(L, -1)) {
+ $2[i] = (char*)lua_tostring(L, -1);
+ printf("argv[%d]=%s\n", i, $2[i]);
+ } else {
+ lua_pop(L,1);
+ lua_pushfstring(L, "List items must be strings");
+ SWIG_fail;
+ /* $2 array is freed after 'fail:' */
+ }
+ lua_pop(L,1);
+ }
+ puts("here");
+ $2[n] = NULL;
+}
+%typemap(freearg) (int *p_argc, const char **argv) {
+ SWIG_FREE_ARRAY($2);
+}
+%typemap(in,checkfn="lua_isnumber") PLINT mode {
+ $1 = ((int)lua_tonumber(L,$input)) | PL_PARSE_NODELETE;
+}
+
+
+%ignore plshades;
+%ignore plshade;
+%ignore plshade1;
+%ignore plvect;
+%ignore plfcont;
+%ignore plfshade;
+%ignore plimagefr;
+%ignore plcont;
+
+/******************************************************************************
+ Renames
+******************************************************************************/
+%rename(parseopts) plparseopts;
+
+/* swig compatible PLplot API definitions from here on. */
+%include plplotcapi.i
Property changes on: trunk/bindings/lua/plplotluac.i
___________________________________________________________________
Added: svn:eol-style
+ native
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <arj...@us...> - 2009-01-26 20:15:39
|
Revision: 9391
http://plplot.svn.sourceforge.net/plplot/?rev=9391&view=rev
Author: arjenmarkus
Date: 2009-01-26 20:15:35 +0000 (Mon, 26 Jan 2009)
Log Message:
-----------
Correct an interfacing problem that occurred with the Compaq Visual Fortran
compiler - a mismatch in calling conventions associated with the user-defined
functions for example 19
Modified Paths:
--------------
trunk/bindings/f77/scstubs.c
trunk/bindings/f95/scstubs.c
Modified: trunk/bindings/f77/scstubs.c
===================================================================
--- trunk/bindings/f77/scstubs.c 2009-01-26 09:25:06 UTC (rev 9390)
+++ trunk/bindings/f77/scstubs.c 2009-01-26 20:15:35 UTC (rev 9391)
@@ -29,8 +29,13 @@
#include "plstubs.h"
-static void (*plmapform)(PLINT *, PLFLT *, PLFLT *) ; /* Note: slightly different prototype than
- (*mapform)! */
+#ifdef CVF
+#define STDCALL __stdcall
+#else
+#define STDCALL
+#endif
+static void (STDCALL *plmapform)(PLINT *, PLFLT *, PLFLT *) ; /* Note: slightly different prototype than
+ (*mapform)! */
void
PL_SETCONTLABELFORMAT(PLINT *lexp, PLINT *sigdig)
@@ -753,7 +758,7 @@
*/
#define PLSETMAPFORMC FNAME(PLSETMAPFORMC,plsetmapformc)
void
-PLSETMAPFORMC( void (*mapform)(PLINT *, PLFLT *, PLFLT *) )
+PLSETMAPFORMC( void (STDCALL *mapform)(PLINT *, PLFLT *, PLFLT *) )
{
plmapform = mapform ;
}
Modified: trunk/bindings/f95/scstubs.c
===================================================================
--- trunk/bindings/f95/scstubs.c 2009-01-26 09:25:06 UTC (rev 9390)
+++ trunk/bindings/f95/scstubs.c 2009-01-26 20:15:35 UTC (rev 9391)
@@ -29,8 +29,13 @@
#include "plstubs.h"
-static void (*plmapform)(PLINT *, PLFLT *, PLFLT *) ; /* Note: slightly different prototype than
- (*mapform)! */
+#ifdef CVF
+#define STDCALL __stdcall
+#else
+#define STDCALL
+#endif
+static void (STDCALL *plmapform)(PLINT *, PLFLT *, PLFLT *) ; /* Note: slightly different prototype than
+ (*mapform)! */
void
PL_SETCONTLABELFORMAT(PLINT *lexp, PLINT *sigdig)
@@ -812,7 +817,7 @@
*/
#define PLSETMAPFORMC FNAME(PLSETMAPFORMC,plsetmapformc)
void
-PLSETMAPFORMC( void (*mapform)(PLINT *, PLFLT *, PLFLT *) )
+PLSETMAPFORMC( void (STDCALL *mapform)(PLINT *, PLFLT *, PLFLT *) )
{
plmapform = mapform ;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sm...@us...> - 2009-03-24 22:13:58
|
Revision: 9772
http://plplot.svn.sourceforge.net/plplot/?rev=9772&view=rev
Author: smekal
Date: 2009-03-24 22:13:49 +0000 (Tue, 24 Mar 2009)
Log Message:
-----------
For MinGW the .def files need "LIBRARY libplplotfxxd.dll" defined at the top, otherwise at runtime the executable doesn't know what dll to open. Fortran 77 and 95 examples work now for MinGW.
Modified Paths:
--------------
trunk/bindings/f77/plplotf77_mingw.def
trunk/bindings/f95/plplotf95_mingw.def
Modified: trunk/bindings/f77/plplotf77_mingw.def
===================================================================
--- trunk/bindings/f77/plplotf77_mingw.def 2009-03-24 22:02:46 UTC (rev 9771)
+++ trunk/bindings/f77/plplotf77_mingw.def 2009-03-24 22:13:49 UTC (rev 9772)
@@ -1,4 +1,5 @@
; dlltool -z plplotf77_mingw.def --export-all-symbol libplplotf77d.dll
+LIBRARY libplplotf77d.dll
EXPORTS
plabort_
plaxes_
Modified: trunk/bindings/f95/plplotf95_mingw.def
===================================================================
--- trunk/bindings/f95/plplotf95_mingw.def 2009-03-24 22:02:46 UTC (rev 9771)
+++ trunk/bindings/f95/plplotf95_mingw.def 2009-03-24 22:13:49 UTC (rev 9772)
@@ -1,4 +1,4 @@
-;
+LIBRARY libplplotf95d.dll
EXPORTS
plparseopts_
__plplotp_MOD_plaxes
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sm...@us...> - 2009-04-15 06:54:18
|
Revision: 9801
http://plplot.svn.sourceforge.net/plplot/?rev=9801&view=rev
Author: smekal
Date: 2009-04-15 06:54:10 +0000 (Wed, 15 Apr 2009)
Log Message:
-----------
Revert changes regarding creation of import libraries for DLLs since this issue was solved with the addition of the files Windows-GNU-Fortran.cmake and Cygwin-GNU-Fortran.cmake in cmake/Modules/Platform/.
Modified Paths:
--------------
trunk/bindings/f77/CMakeLists.txt
trunk/bindings/f95/CMakeLists.txt
Modified: trunk/bindings/f77/CMakeLists.txt
===================================================================
--- trunk/bindings/f77/CMakeLists.txt 2009-04-13 18:37:50 UTC (rev 9800)
+++ trunk/bindings/f77/CMakeLists.txt 2009-04-15 06:54:10 UTC (rev 9801)
@@ -130,23 +130,8 @@
configurable.f
)
-if(WIN32 AND BUILD_SHARED_LIBS AND NOT MINGW)
- set(plplotf77${LIB_TAG}_LIB_SRCS ${plplotf77${LIB_TAG}_LIB_SRCS} plplotf77.def)
-endif(WIN32 AND BUILD_SHARED_LIBS AND NOT MINGW)
-
add_library(plplotf77${LIB_TAG} ${plplotf77${LIB_TAG}_LIB_SRCS})
-if(MINGW AND BUILD_SHARED_LIBS)
- add_custom_command(
- TARGET plplotf77${LIB_TAG}
- POST_BUILD
- COMMAND dlltool libplplotf77${LIB_TAG}.dll -d ${CMAKE_CURRENT_SOURCE_DIR}/plplotf77_mingw.def -l libplplotf77${LIB_TAG}.dll.a
- WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/dll
- COMMENT "Creating library file: libplplotf77${LIB_TAG}.dll.a"
- )
-endif(MINGW AND BUILD_SHARED_LIBS)
-
-
target_link_libraries(plplotf77${LIB_TAG} plplotf77c${LIB_TAG})
if(USE_RPATH)
Modified: trunk/bindings/f95/CMakeLists.txt
===================================================================
--- trunk/bindings/f95/CMakeLists.txt 2009-04-13 18:37:50 UTC (rev 9800)
+++ trunk/bindings/f95/CMakeLists.txt 2009-04-15 06:54:10 UTC (rev 9801)
@@ -116,26 +116,12 @@
sfstubs.h
)
- if(WIN32 AND BUILD_SHARED_LIBS AND NOT MINGW)
- SET(plplotf95${LIB_TAG}_LIB_SRCS ${plplotf95${LIB_TAG}_LIB_SRCS} plplotf95.def)
- endif(WIN32 AND BUILD_SHARED_LIBS AND NOT MINGW)
-
# Explicitly include dependencies for sfstubsf95.f90
include(AddFileDependencies)
add_file_dependencies(sfstubsf95.f90 ${CMAKE_CURRENT_BINARY_DIR}/plflt.inc)
add_library(plplotf95${LIB_TAG} ${plplotf95${LIB_TAG}_LIB_SRCS})
- if(MINGW AND BUILD_SHARED_LIBS)
- add_custom_command(
- TARGET plplotf95${LIB_TAG}
- POST_BUILD
- COMMAND dlltool libplplotf95${LIB_TAG}.dll -d ${CMAKE_CURRENT_SOURCE_DIR}/plplotf95_mingw.def -l libplplotf95${LIB_TAG}.dll.a
- WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/dll
- COMMENT "Creating library file: libplplotf95${LIB_TAG}.dll.a"
- )
- endif(MINGW AND BUILD_SHARED_LIBS)
-
target_link_libraries(plplotf95${LIB_TAG} plplotf95c${LIB_TAG})
if(USE_RPATH)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ai...@us...> - 2009-05-02 21:39:31
|
Revision: 9884
http://plplot.svn.sourceforge.net/plplot/?rev=9884&view=rev
Author: airwin
Date: 2009-05-02 21:39:30 +0000 (Sat, 02 May 2009)
Log Message:
-----------
Solve visibility issues for tk.so.
Modified Paths:
--------------
trunk/bindings/tcl/pltcl.h
trunk/bindings/tk/tcpip.h
Modified: trunk/bindings/tcl/pltcl.h
===================================================================
--- trunk/bindings/tcl/pltcl.h 2009-05-02 20:59:42 UTC (rev 9883)
+++ trunk/bindings/tcl/pltcl.h 2009-05-02 21:39:30 UTC (rev 9884)
@@ -44,7 +44,7 @@
/* tkshell.c */
/* Sets up auto_path variable */
-int
+PLDLLIMPEXP_TCLTK int
pls_auto_path(Tcl_Interp *interp);
/* Tcl command -- wait until the specified condition is satisfied. */
Modified: trunk/bindings/tk/tcpip.h
===================================================================
--- trunk/bindings/tk/tcpip.h 2009-05-02 20:59:42 UTC (rev 9883)
+++ trunk/bindings/tk/tcpip.h 2009-05-02 21:39:30 UTC (rev 9884)
@@ -15,7 +15,7 @@
/* Modified version of the "Tdp_PacketSend" command. */
-int
+PLDLLIMPEXP_TCLTK int
pl_PacketSend PLARGS((Tcl_Interp *interp, PLiodev *iodev,
PDFstrm *pdfs));
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ai...@us...> - 2009-05-02 22:09:41
|
Revision: 9885
http://plplot.svn.sourceforge.net/plplot/?rev=9885&view=rev
Author: airwin
Date: 2009-05-02 22:09:40 +0000 (Sat, 02 May 2009)
Log Message:
-----------
Fix visibility issues for tk-xwin-plat device driver.
Modified Paths:
--------------
trunk/bindings/tcl/pltcl.h
trunk/bindings/tk/plserver.h
trunk/bindings/tk/tcpip.h
Modified: trunk/bindings/tcl/pltcl.h
===================================================================
--- trunk/bindings/tcl/pltcl.h 2009-05-02 21:39:30 UTC (rev 9884)
+++ trunk/bindings/tcl/pltcl.h 2009-05-02 22:09:40 UTC (rev 9885)
@@ -22,23 +22,23 @@
/* tclMain.c */
/* Main program for a Tcl-based shell that reads Tcl commands from stdin. */
-int PLDLLIMPEXP_TCLTK
+PLDLLIMPEXP_TCLTK int
pltclMain(int argc, const char **argv, char *RcFileName,
int (*AppInit)(Tcl_Interp *interp));
/* tclAPI.c */
/* Front-end to PLplot/Tcl API for use from Tcl commands (e.g. plframe). */
-int
+PLDLLIMPEXP_TCLTK int
plTclCmd(char *cmdlist, Tcl_Interp *interp,
int argc, const char **argv);
/* Initialization routine for PLplot-extended tclsh's (like pltcl). */
-int PLDLLIMPEXP_TCLTK
+PLDLLIMPEXP_TCLTK int
Pltcl_Init( Tcl_Interp *interp );
-int
+PLDLLIMPEXP_TCLTK int
PlbasicInit( Tcl_Interp *interp );
/* tkshell.c */
Modified: trunk/bindings/tk/plserver.h
===================================================================
--- trunk/bindings/tk/plserver.h 2009-05-02 21:39:30 UTC (rev 9884)
+++ trunk/bindings/tk/plserver.h 2009-05-02 22:09:40 UTC (rev 9885)
@@ -43,12 +43,12 @@
/* plr.c */
/* Set default state parameters before anyone else has a chance to. */
-void
+PLDLLIMPEXP_TCLTK void
plr_start(PLRDev *plr);
/* Read & process commands until "nbyte_max" bytes have been read. */
-int
+PLDLLIMPEXP_TCLTK int
plr_process(PLRDev *plr);
#endif /* __PLSERVER_H__ */
Modified: trunk/bindings/tk/tcpip.h
===================================================================
--- trunk/bindings/tk/tcpip.h 2009-05-02 21:39:30 UTC (rev 9884)
+++ trunk/bindings/tk/tcpip.h 2009-05-02 22:09:40 UTC (rev 9885)
@@ -21,7 +21,7 @@
/* Modified version of the "Tdp_PacketReceive" command. */
-int
+PLDLLIMPEXP_TCLTK int
pl_PacketReceive PLARGS((Tcl_Interp *interp, PLiodev *iodev,
PDFstrm *pdfs));
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sm...@us...> - 2009-05-05 11:53:50
|
Revision: 9918
http://plplot.svn.sourceforge.net/plplot/?rev=9918&view=rev
Author: smekal
Date: 2009-05-05 11:53:37 +0000 (Tue, 05 May 2009)
Log Message:
-----------
Changes to remove compilation warnings (about redefinition of PySequence_Fast_GET_ITEM and implicit conversion of jint to int). Tested with ctest.
Modified Paths:
--------------
trunk/bindings/java/plplotjavac.i
trunk/bindings/python/plplotcmodule.i
Modified: trunk/bindings/java/plplotjavac.i
===================================================================
--- trunk/bindings/java/plplotjavac.i 2009-05-05 11:35:31 UTC (rev 9917)
+++ trunk/bindings/java/plplotjavac.i 2009-05-05 11:53:37 UTC (rev 9918)
@@ -1456,9 +1456,9 @@
%typemap(javaout) (int *p_argc, char **argv) {
return $jnicall;
}
-%typemap(in) (int *p_argc, char **argv) (jint size) {
+%typemap(in) (int *p_argc, char **argv) (int size) {
int i = 0;
- size = (*jenv)->GetArrayLength(jenv, $input);
+ size = (int)((*jenv)->GetArrayLength(jenv, $input));
$1 = &size;
$2 = (char **) malloc((size+1)*sizeof(char *));
/* make a copy of each string */
Modified: trunk/bindings/python/plplotcmodule.i
===================================================================
--- trunk/bindings/python/plplotcmodule.i 2009-05-05 11:35:31 UTC (rev 9917)
+++ trunk/bindings/python/plplotcmodule.i 2009-05-05 11:53:37 UTC (rev 9918)
@@ -64,7 +64,9 @@
#define PyArray_PLINT PyArray_INT
#endif
/* python-1.5 compatibility mode? */
-#define PySequence_Fast_GET_ITEM PySequence_GetItem
+#if !defined(PySequence_Fast_GET_ITEM)
+ #define PySequence_Fast_GET_ITEM PySequence_GetItem
+#endif
#define PySequence_Size PySequence_Length
%}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
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.
|
|
From: <arj...@us...> - 2009-11-19 08:13:37
|
Revision: 10612
http://plplot.svn.sourceforge.net/plplot/?rev=10612&view=rev
Author: arjenmarkus
Date: 2009-11-19 08:13:30 +0000 (Thu, 19 Nov 2009)
Log Message:
-----------
Adding copies of the PLSLABELFUNC_* functions for compilers that add an extra underscore if the function/routine name already contains an underscore.
Modified Paths:
--------------
trunk/bindings/f77/plstubs.h
trunk/bindings/f77/scstubs.c
trunk/bindings/f95/plstubs.h
trunk/bindings/f95/scstubs.c
Modified: trunk/bindings/f77/plstubs.h
===================================================================
--- trunk/bindings/f77/plstubs.h 2009-11-18 23:57:43 UTC (rev 10611)
+++ trunk/bindings/f77/plstubs.h 2009-11-19 08:13:30 UTC (rev 10612)
@@ -305,6 +305,7 @@
#define PLSHADES7 FNAME( PLSHADES7, plshades7 )
#define PLSLABELFUNC FNAME( PLSLABELFUNC, plslabelfunc )
#define PLSLABELFUNC_NONE FNAME( PLSLABELFUNC_NONE, plslabelfunc_none )
+#define PLSLABELFUNC_NONEa 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-18 23:57:43 UTC (rev 10611)
+++ trunk/bindings/f77/scstubs.c 2009-11-19 08:13:30 UTC (rev 10612)
@@ -860,6 +860,13 @@
}
void
+PLSLABELFUNC_NONEa( 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-18 23:57:43 UTC (rev 10611)
+++ trunk/bindings/f95/plstubs.h 2009-11-19 08:13:30 UTC (rev 10612)
@@ -314,8 +314,11 @@
#define PLSHADES27 FNAME( PLSHADES27, plshades27 )
#define PLSHADES7 FNAME( PLSHADES7, plshades7 )
#define PLSLABELFUNC_ON FNAME( PLSLABELFUNC_ON, plslabelfunc_on )
+#define PLSLABELFUNC_ONa FNAME( PLSLABELFUNC_ON_, plslabelfunc_on_ )
#define PLSLABELFUNC_OFF FNAME( PLSLABELFUNC_OFF, plslabelfunc_off )
+#define PLSLABELFUNC_OFFa FNAME( PLSLABELFUNC_OFF_, plslabelfunc_off_ )
#define PLSLABELFUNC_NONE FNAME( PLSLABELFUNC_NONE, plslabelfunc_none )
+#define PLSLABELFUNC_NONEa 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-18 23:57:43 UTC (rev 10611)
+++ trunk/bindings/f95/scstubs.c 2009-11-19 08:13:30 UTC (rev 10612)
@@ -910,12 +910,27 @@
}
void
+PLSLABELFUNC_ONa( void ( STDCALL *labelfunc )( PLINT *, PLFLT *, char *, PLINT * ))
+{
+ pllabelfunc = labelfunc;
+ /* N.B. neglect pointer to additional data for f77 */
+ c_plslabelfunc( pllabelfuncf2c, NULL );
+}
+
+void
PLSLABELFUNC_OFF( PLINT *dummy )
{
pllabelfunc = NULL;
c_plslabelfunc( NULL, NULL );
}
+void
+PLSLABELFUNC_OFFa( PLINT *dummy )
+{
+ pllabelfunc = NULL;
+ c_plslabelfunc( NULL, NULL );
+}
+
/* Provided for symmetry with FORTRAN 77 */
void
PLSLABELFUNC_NONE( void )
@@ -923,6 +938,12 @@
pllabelfunc = NULL;
c_plslabelfunc( NULL, NULL );
}
+void
+PLSLABELFUNC_NONEa( PLINT * )
+{
+ pllabelfunc = NULL;
+ c_plslabelfunc( NULL, NULL );
+}
void
PLSMAJ( PLFLT *def, PLFLT *scale )
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|