Revision: 11451
http://plplot.svn.sourceforge.net/plplot/?rev=11451&view=rev
Author: airwin
Date: 2011-01-08 09:55:55 +0000 (Sat, 08 Jan 2011)
Log Message:
-----------
Initial commit of a sed script to generate plplot_octave_def (currently
by hand, but this should be a custom target) using the following
command;
sed -f bindings/octave/global_defines.sed \
<bindings/swig-support/plplotcapi.i \
>|bindings/octave/plplot_octave_def
Added Paths:
-----------
trunk/bindings/octave/global_defines.sed
Added: trunk/bindings/octave/global_defines.sed
===================================================================
--- trunk/bindings/octave/global_defines.sed (rev 0)
+++ trunk/bindings/octave/global_defines.sed 2011-01-08 09:55:55 UTC (rev 11451)
@@ -0,0 +1,19 @@
+# sed script specifically designed to parse the #define statements in
+# bindings/swig-support/plplotcapi.i into a file that can be used for
+# global variable definitions for octave.
+
+# Drop every line that is not a #define
+/^#define/! d
+
+# Drop specific #defines from the file that are not available to swig-generated
+# octave because of specific #if statements.
+/^#define ZEROW/ d
+/^#define ONEW/ d
+/OBJECT_DATA/ d
+/^#define pltr_img/ d
+
+# First translate comment identifier into octave.
+/^#define/ s?//?#?
+# Parse what is left while preserving trailing comments. Watch out
+# for parentheses around value as well.
+/^#define/ s?^#define *\([^ ]*\)[ (]*\([^ ]*\)[ )]*\(.*\)$?global \1\n\1 = \2; \3?
Property changes on: trunk/bindings/octave/global_defines.sed
___________________________________________________________________
Added: svn:eol-style
+ native
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|