From: <jb...@us...> - 2009-01-02 10:17:29
|
Revision: 9241 http://plplot.svn.sourceforge.net/plplot/?rev=9241&view=rev Author: jbauck Date: 2009-01-02 10:17:24 +0000 (Fri, 02 Jan 2009) Log Message: ----------- Add Ada examples x31a.adb and xthick31a.adb. Fix error in bindings related to setting background color. Modified Paths: -------------- trunk/bindings/ada/plplot.adb.cmake trunk/bindings/ada/plplot.ads.cmake trunk/bindings/ada/plplot_thin.ads.cmake trunk/bindings/ada/plplot_traditional.adb.cmake trunk/bindings/ada/plplot_traditional.ads.cmake trunk/examples/ada/CMakeLists.txt trunk/examples/ada/Makefile.examples.in trunk/plplot_test/test_ada.sh.in Added Paths: ----------- trunk/examples/ada/x31a.adb.cmake trunk/examples/ada/xthick31a.adb.cmake Modified: trunk/bindings/ada/plplot.adb.cmake =================================================================== --- trunk/bindings/ada/plplot.adb.cmake 2009-01-01 02:38:00 UTC (rev 9240) +++ trunk/bindings/ada/plplot.adb.cmake 2009-01-02 10:17:24 UTC (rev 9241) @@ -1593,7 +1593,7 @@ PL_Output_File_Name : char_array(0..79); begin plgfnam(PL_Output_File_Name); - Output_File_Name := To_Ada(PL_Output_File_Name, True); + Output_File_Name := To_Ada(PL_Output_File_Name, False); end Get_Output_File_Name; @@ -2307,7 +2307,7 @@ procedure Set_Background_Color_RGB (Red_Component, Green_Component, Blue_Component : Integer) is begin - plscolbg(Red, Green, Blue); + plscolbg(Red_Component, Green_Component, Blue_Component); end Set_Background_Color_RGB; Modified: trunk/bindings/ada/plplot.ads.cmake =================================================================== --- trunk/bindings/ada/plplot.ads.cmake 2009-01-01 02:38:00 UTC (rev 9240) +++ trunk/bindings/ada/plplot.ads.cmake 2009-01-02 10:17:24 UTC (rev 9241) @@ -39,6 +39,9 @@ package PLplot is + -- Used with Set_Device_Window_Parameters. + PL_NOTSET : Long_Float renames PLplot_Thin.PL_NOTSET; + -- "Rename" some useful types from the thin binding. subtype Boolean_Array_1D is PLplot_Thin.Boolean_Array_1D; subtype Integer_Array_1D is PLplot_Thin.Integer_Array_1D; Modified: trunk/bindings/ada/plplot_thin.ads.cmake =================================================================== --- trunk/bindings/ada/plplot_thin.ads.cmake 2009-01-01 02:38:00 UTC (rev 9240) +++ trunk/bindings/ada/plplot_thin.ads.cmake 2009-01-02 10:17:24 UTC (rev 9241) @@ -325,8 +325,9 @@ -- Macro used (in some cases) to ignore value of argument -- I don't plan on changing the value so you can hard-code it - PL_NOTSET : constant := -42; - PL_NOTSET_Float : constant := -42.0; -- Added for Ada binding. + -- Long_Float for Ada binding. Used with plsdidev which requires Long_Float. + -- C doesn't care if it is an integer, apparently converting it to a float. + PL_NOTSET : constant Long_Float := -42.0; -- See plcont.c for examples of the following Modified: trunk/bindings/ada/plplot_traditional.adb.cmake =================================================================== --- trunk/bindings/ada/plplot_traditional.adb.cmake 2009-01-01 02:38:00 UTC (rev 9240) +++ trunk/bindings/ada/plplot_traditional.adb.cmake 2009-01-02 10:17:24 UTC (rev 9241) @@ -1548,7 +1548,7 @@ PL_Output_File_Name : char_array(0..79); begin PLplot_Thin.plgfnam(PL_Output_File_Name); - Output_File_Name := To_Ada(PL_Output_File_Name, True); + Output_File_Name := To_Ada(PL_Output_File_Name, False); end plgfnam; @@ -2202,7 +2202,7 @@ procedure plscolbg (Red_Component, Green_Component, Blue_Component : Integer) is begin - PLplot_Thin.plscolbg(Red, Green, Blue); + PLplot_Thin.plscolbg(Red_Component, Green_Component, Blue_Component); end plscolbg; Modified: trunk/bindings/ada/plplot_traditional.ads.cmake =================================================================== --- trunk/bindings/ada/plplot_traditional.ads.cmake 2009-01-01 02:38:00 UTC (rev 9240) +++ trunk/bindings/ada/plplot_traditional.ads.cmake 2009-01-02 10:17:24 UTC (rev 9241) @@ -39,6 +39,9 @@ package PLplot_Traditional is + -- Used with plsdidev. + PL_NOTSET : Long_Float renames PLplot_Thin.PL_NOTSET; + -- "Rename" some useful types from the thin binding. subtype Boolean_Array_1D is PLplot_Thin.Boolean_Array_1D; subtype Integer_Array_1D is PLplot_Thin.Integer_Array_1D; Modified: trunk/examples/ada/CMakeLists.txt =================================================================== --- trunk/examples/ada/CMakeLists.txt 2009-01-01 02:38:00 UTC (rev 9240) +++ trunk/examples/ada/CMakeLists.txt 2009-01-02 10:17:24 UTC (rev 9241) @@ -49,6 +49,7 @@ "28" "29" "30" +"31" "thick01" "thick02" "thick03" @@ -79,6 +80,7 @@ "thick28" "thick29" "thick30" +"thick31" ) if(BUILD_TEST) Modified: trunk/examples/ada/Makefile.examples.in =================================================================== --- trunk/examples/ada/Makefile.examples.in 2009-01-01 02:38:00 UTC (rev 9240) +++ trunk/examples/ada/Makefile.examples.in 2009-01-02 10:17:24 UTC (rev 9241) @@ -60,6 +60,7 @@ x28a$(EXEEXT) \ x29a$(EXEEXT) \ x30a$(EXEEXT) \ + x31a$(EXEEXT) \ xthick01a$(EXEEXT) \ xthick02a$(EXEEXT) \ xthick03a$(EXEEXT) \ @@ -89,7 +90,8 @@ xthick27a$(EXEEXT) \ xthick28a$(EXEEXT) \ xthick29a$(EXEEXT) \ - xthick30a$(EXEEXT) + xthick30a$(EXEEXT) \ + xthick31a$(EXEEXT) all: $(EXECUTABLES_list) Added: trunk/examples/ada/x31a.adb.cmake =================================================================== --- trunk/examples/ada/x31a.adb.cmake (rev 0) +++ trunk/examples/ada/x31a.adb.cmake 2009-01-02 10:17:24 UTC (rev 9241) @@ -0,0 +1,293 @@ +-- $Id$ + +-- set/get tester + +-- Copyright (C) 2008 Jerry Bauck + +-- This file is part of PLplot. + +-- PLplot is free software; you can redistribute it and/or modify +-- it under the terms of the GNU General Library Public License as published +-- by the Free Software Foundation; either version 2 of the License, or +-- (at your option) any later version. + +-- 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 + +with + Ada.Text_IO, + Ada.Long_Float_Text_IO, + Ada.Strings, + Ada.Strings.Fixed, + Ada.Numerics, + Ada.Numerics.Long_Elementary_Functions, + PLplot_Auxiliary, + PLplot_Traditional; +use + Ada.Text_IO, + Ada.Long_Float_Text_IO, + Ada.Strings, + Ada.Strings.Fixed, + Ada.Numerics, + Ada.Numerics.Long_Elementary_Functions, + PLplot_Auxiliary, + PLplot_Traditional; + +-- COMMENT THIS LINE IF YOUR COMPILER DOES NOT INCLUDE THESE +-- DEFINITIONS, FOR EXAMPLE, IF IT IS NOT ADA 2005 WITH ANNEX G.3 COMPLIANCE. +--with Ada.Numerics.Long_Real_Arrays; use Ada.Numerics.Long_Real_Arrays; +@Ada_Is_2007_With_and_Use_Numerics@ + +-- This example mostly outputs text. As part of the PLplot testing regime, we +-- require that the text output match that of the C version, x31c.c, exactly. +-- Therefore, certain extra measures were made in this Ada version to assure +-- that matching text is created. + +procedure x31a is + xmin, xmax, ymin, ymax, zxmin, zxmax, zymin, zymax : Long_Float; + xmid, ymid, wx, wy : Long_Float; + mar, aspect, jx, jy, ori : Long_Float; + win, level2, digmax, digit, compression1, compression2 : Integer; + xp1, yp1, xp2, yp2 : Long_Float; + xleng1, yleng1, xoff1, yoff1, xleng2, yleng2, xoff2, yoff2 : Integer; + num1, bmax1, num2, bmax2, r, g, b : Integer; + fam1, fam2 : Boolean; + a : Long_Float; + r1 : Integer_0_255_Array(0 .. 1) := (0, 255); + g1 : Integer_0_255_Array(0 .. 1) := (0, 255); + b1 : Integer_0_255_Array(0 .. 1) := (0, 0); + a1 : Real_Vector(0 .. 1) := (1.0, 1.0); + status : Integer; + fnam : String(1 .. 80); + + -- Convert a boolean to integers 0 or 1. + function Boolean_To_Integer(B : Boolean) return Integer is + begin + if B then + return 1; + else + return 0; + end if; + end Boolean_To_Integer; + + -- Function to return a formated float that looks like what C does. + function PF(x : Long_Float) return String is + A_String : String(1 .. 30); + begin + Put(A_String, x, Aft => 6, Exp => 0); + return Trim(A_String, Left); + end PF; + +begin + -- Parse and process command line arguments + status := 0; + + plparseopts(PL_PARSE_FULL); + + -- Test setting / getting compression parameter across plinit. + compression1 := 95; + plscompression(compression1); + + -- Test setting / getting familying parameters across plinit. + fam1 := False; + num1 := 10; + bmax1 := 1000; + plsfam(fam1, num1, bmax1); + + -- Test setting / getting page parameters across plinit. + xp1 := 200.0; + yp1 := 200.0; + xleng1 := 400; + yleng1 := 200; + xoff1 := 10; + yoff1 := 20; + plspage(xp1, yp1, xleng1, yleng1, xoff1, yoff1); + + -- Initialize plplot. + plinit; + + -- Test if device initialization screwed around with the preset + -- compression parameter. + plgcompression(compression2); + Put_Line("Output various PLplot parameters"); + Put_Line("compression parameter =" & Integer'image(compression2)); + if (compression2 /= compression1) then + Put_Line(Standard_Error, "plgcompression test failed"); + status := 1; + end if; + + -- Test if device initialization screwed around with any of the + -- preset familying values. + plgfam(fam2, num2, bmax2); + Put_Line("family parameters: fam, num, bmax =" + & Integer'image(Boolean_To_Integer(fam2)) + & Integer'image(num2) & Integer'image(bmax2)); + if fam2 /= fam1 or num2 /= num1 or bmax2 /= bmax1 then + Put_Line(Standard_Error, "plgfam test failed"); + status := 1; + end if; + + -- Test if device initialization screwed around with any of the + -- preset page values. + plgpage(xp2, yp2, xleng2, yleng2, xoff2, yoff2); + Put("page parameters: xp, yp, xleng, yleng, xoff, yoff = " + & PF(xp2) & " " & PF(yp2)); + Put_Line(Integer'image(xleng2) & Integer'image(yleng2) + & Integer'image(xoff2) & Integer'image(yoff2)); + if xp2 /= xp1 or yp2 /= yp1 or xleng2 /= xleng1 or yleng2 /= yleng1 or + xoff2 /= xoff1 or yoff2 /= yoff1 then + Put_Line(Standard_Error, "plgpage test failed"); + status := 1; + end if; + + -- Exercise plscolor, plscol0, plscmap1, and plscmap1a to make sure + -- they work without any obvious error messages. + plscolor(True); + plscol0(1, 255, 0, 0); + plscmap1(r1, g1, b1); + plscmap1a(r1, g1, b1, a1); + + plglevel(level2); + Put_Line("level parameter =" & Integer'image(level2)); + if (level2 /= 1) then + Put_Line(Standard_Error, "plglevel test failed."); + status := 1; + end if; + + pladv(0); + plvpor(0.01, 0.99, 0.02, 0.49); + plgvpd(xmin, xmax, ymin, ymax); + Put_Line("plvpor: xmin, xmax, ymin, ymax = " + & PF(xmin) & " " & PF(xmax) & " " & PF(ymin) & " " & PF(ymax)); + if xmin /= 0.01 or xmax /= 0.99 or ymin /= 0.02 or ymax /= 0.49 then + Put_Line(Standard_Error, "plgvpd test failed"); + status := 1; + end if; + xmid := 0.5 * (xmin + xmax); + ymid := 0.5 * (ymin + ymax); + + plwind(0.2, 0.3, 0.4, 0.5); + plgvpw(xmin, xmax, ymin, ymax); + Put_Line("plwind: xmin, xmax, ymin, ymax = " + & PF(xmin) & " " & PF(xmax) & " " & PF(ymin) & " " & PF(ymax)); + if xmin /= 0.2 or xmax /= 0.3 or ymin /= 0.4 or ymax /= 0.5 then + Put_Line(Standard_Error, "plgvpw test failed"); + status := 1; + end if; + + -- Get world coordinates for middle of viewport. + plcalc_world(xmid,ymid,wx,wy,win); + Put_Line("world parameters: wx, wy, win = " + & PF(wx) & " " & PF(wy) & Integer'image(win)); + if abs(wx-0.5*(xmin+xmax))>1.0E-5 or abs(wy-0.5*(ymin+ymax))>1.0E-5 then + Put_Line(Standard_Error, "plcalc_world test failed"); + status := 1; + end if; + + -- Retrieve and print the name of the output file (if any). + -- This goes to stderr not stdout since it will vary between tests and + -- we want stdout to be identical for compare test. + plgfnam(fnam); + if fnam(1) = Character'Val(0) then + Put_Line("No output file name is set"); + else + Put_Line("Output file name read"); + end if; + Put_Line(Standard_Error, "Output file name is " & fnam); + + -- Set and get the number of digits used to display axis labels. + -- Note digit is currently ignored in pls[xyz]ax and + -- therefore it does not make sense to test the returned value. + plsxax(3, 0); + plgxax(digmax, digit); + Put_Line("x axis parameters: digmax, digits =" + & Integer'image(digmax) & Integer'image(digit)); + if digmax /= 3 then + Put_Line(Standard_Error, "plgxax test failed"); + status := 1; + end if; + + plsyax(4, 0); + plgyax(digmax, digit); + Put_Line("y axis parameters: digmax, digits =" + & Integer'image(digmax) & Integer'image(digit)); + if digmax /= 4 then + Put_Line(Standard_Error, "plgyax test failed"); + status := 1; + end if; + + plszax(5, 0); + plgzax(digmax, digit); + Put_Line("z axis parameters: digmax, digits =" + & Integer'image(digmax) & Integer'image(digit)); + if digmax /= 5 then + Put_Line(Standard_Error, "plgzax test failed"); + status := 1; + end if; + + plsdidev(0.05, PL_NOTSET, 0.1, 0.2); + plgdidev(mar, aspect, jx, jy); + Put_Line("device-space window parameters: mar, aspect, jx, jy = " + & PF(mar) & " " & PF(aspect) & " " & PF(jx) & " " & PF(jy)); + if mar /= 0.05 or jx /= 0.1 or jy /= 0.2 then + Put_Line(Standard_Error, "plgdidev test failed"); + status := 1; + end if; + + plsdiori(1.0); + plgdiori(ori); + Put_Line("ori parameter = " & PF(ori)); + if ori /= 1.0 then + Put_Line(Standard_Error, "plgdiori test failed"); + status := 1; + end if; + + plsdiplt(0.1, 0.2, 0.9, 0.8); + plgdiplt(xmin, ymin, xmax, ymax); + Put_Line("plot-space window parameters: xmin, ymin, xmax, ymax = " + & PF(xmin) & " " & PF(ymin) & " " & PF(xmax) & " " & PF(ymax)); + if xmin /= 0.1 or xmax /= 0.9 or ymin /= 0.2 or ymax /= 0.8 then + Put_Line(Standard_Error, "plgdiplt test failed"); + status := 1; + end if; + + plsdiplz(0.1, 0.1, 0.9, 0.9); + plgdiplt(zxmin, zymin, zxmax, zymax); + Put_Line("zoomed plot-space window parameters: xmin, ymin, xmax, ymax = " + & PF(zxmin) & " " & PF(zymin) & " " & PF(zxmax) & " " & PF(zymax)); + if + abs(zxmin - (xmin + (xmax - xmin) * 0.1)) > 1.0E-5 or + abs(zxmax - (xmin + (xmax - xmin) * 0.9)) > 1.0E-5 or + abs(zymin - (ymin + (ymax - ymin) * 0.1)) > 1.0E-5 or + abs(zymax - (ymin + (ymax - ymin) * 0.9)) > 1.0E-5 + then + Put_Line(Standard_Error, "plsdiplz test failed"); + status := 1; + end if; + + plscolbg(10, 20, 30); + plgcolbg(r, g, b); + Put_Line("background colour parameters: r, g, b =" + & Integer'image(r) & Integer'image(g) & Integer'image(b)); + if r /= 10 or g /= 20 or b /= 30 then + Put_Line(Standard_Error, "plgcolbg test failed"); + status := 1; + end if; + + plscolbga(20, 30, 40, 0.5); + plgcolbga(r, g, b, a); + Put_Line("background/transparency colour parameters: r, g, b, a =" + & Integer'image(r) & Integer'image(g) & Integer'image(b) & " " & PF(a)); + if r /= 20 or g /= 30 or b /= 40 or a /= 0.5 then + Put_Line(Standard_Error, "plgcolbga test failed"); + status := 1; + end if; + + plend; +end x31a; Property changes on: trunk/examples/ada/x31a.adb.cmake ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Added: trunk/examples/ada/xthick31a.adb.cmake =================================================================== --- trunk/examples/ada/xthick31a.adb.cmake (rev 0) +++ trunk/examples/ada/xthick31a.adb.cmake 2009-01-02 10:17:24 UTC (rev 9241) @@ -0,0 +1,293 @@ +-- $Id$ + +-- set/get tester + +-- Copyright (C) 2008 Jerry Bauck + +-- This file is part of PLplot. + +-- PLplot is free software; you can redistribute it and/or modify +-- it under the terms of the GNU General Library Public License as published +-- by the Free Software Foundation; either version 2 of the License, or +-- (at your option) any later version. + +-- 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 + +with + Ada.Text_IO, + Ada.Long_Float_Text_IO, + Ada.Strings, + Ada.Strings.Fixed, + Ada.Numerics, + Ada.Numerics.Long_Elementary_Functions, + PLplot_Auxiliary, + PLplot; +use + Ada.Text_IO, + Ada.Long_Float_Text_IO, + Ada.Strings, + Ada.Strings.Fixed, + Ada.Numerics, + Ada.Numerics.Long_Elementary_Functions, + PLplot_Auxiliary, + PLplot; + +-- COMMENT THIS LINE IF YOUR COMPILER DOES NOT INCLUDE THESE +-- DEFINITIONS, FOR EXAMPLE, IF IT IS NOT ADA 2005 WITH ANNEX G.3 COMPLIANCE. +--with Ada.Numerics.Long_Real_Arrays; use Ada.Numerics.Long_Real_Arrays; +@Ada_Is_2007_With_and_Use_Numerics@ + +-- This example mostly outputs text. As part of the PLplot testing regime, we +-- require that the text output match that of the C version, x31c.c, exactly. +-- Therefore, certain extra measures were made in this Ada version to assure +-- that matching text is created. + +procedure xthick31a is + xmin, xmax, ymin, ymax, zxmin, zxmax, zymin, zymax : Long_Float; + xmid, ymid, wx, wy : Long_Float; + mar, aspect, jx, jy, ori : Long_Float; + win, level2, digmax, digit, compression1, compression2 : Integer; + xp1, yp1, xp2, yp2 : Long_Float; + xleng1, yleng1, xoff1, yoff1, xleng2, yleng2, xoff2, yoff2 : Integer; + num1, bmax1, num2, bmax2, r, g, b : Integer; + fam1, fam2 : Boolean; + a : Long_Float; + r1 : Integer_0_255_Array(0 .. 1) := (0, 255); + g1 : Integer_0_255_Array(0 .. 1) := (0, 255); + b1 : Integer_0_255_Array(0 .. 1) := (0, 0); + a1 : Real_Vector(0 .. 1) := (1.0, 1.0); + status : Integer; + fnam : String(1 .. 80); + + -- Convert a boolean to integers 0 or 1. + function Boolean_To_Integer(B : Boolean) return Integer is + begin + if B then + return 1; + else + return 0; + end if; + end Boolean_To_Integer; + + -- Function to return a formated float that looks like what C does. + function PF(x : Long_Float) return String is + A_String : String(1 .. 30); + begin + Put(A_String, x, Aft => 6, Exp => 0); + return Trim(A_String, Left); + end PF; + +begin + -- Parse and process command line arguments + status := 0; + + Parse_Command_Line_Arguments(Parse_Full); + + -- Test setting / getting compression parameter across Initialize_PLplot. + compression1 := 95; + Set_Compression_Level(compression1); + + -- Test setting / getting familying parameters across Initialize_PLplot. + fam1 := False; + num1 := 10; + bmax1 := 1000; + Set_File_Family_Parameters(fam1, num1, bmax1); + + -- Test setting / getting page parameters across Initialize_PLplot. + xp1 := 200.0; + yp1 := 200.0; + xleng1 := 400; + yleng1 := 200; + xoff1 := 10; + yoff1 := 20; + Set_Page_Parameters(xp1, yp1, xleng1, yleng1, xoff1, yoff1); + + -- Initialize plplot. + Initialize_PLplot; + + -- Test if device initialization screwed around with the preset + -- compression parameter. + Get_Compression_Level(compression2); + Put_Line("Output various PLplot parameters"); + Put_Line("compression parameter =" & Integer'image(compression2)); + if (compression2 /= compression1) then + Put_Line(Standard_Error, "Get_Compression_Level test failed"); + status := 1; + end if; + + -- Test if device initialization screwed around with any of the + -- preset familying values. + Get_File_Family_Parameters(fam2, num2, bmax2); + Put_Line("family parameters: fam, num, bmax =" + & Integer'image(Boolean_To_Integer(fam2)) + & Integer'image(num2) & Integer'image(bmax2)); + if fam2 /= fam1 or num2 /= num1 or bmax2 /= bmax1 then + Put_Line(Standard_Error, "Get_File_Family_Parameters test failed"); + status := 1; + end if; + + -- Test if device initialization screwed around with any of the + -- preset page values. + Get_Page_Parameters(xp2, yp2, xleng2, yleng2, xoff2, yoff2); + Put("page parameters: xp, yp, xleng, yleng, xoff, yoff = " + & PF(xp2) & " " & PF(yp2)); + Put_Line(Integer'image(xleng2) & Integer'image(yleng2) + & Integer'image(xoff2) & Integer'image(yoff2)); + if xp2 /= xp1 or yp2 /= yp1 or xleng2 /= xleng1 or yleng2 /= yleng1 or + xoff2 /= xoff1 or yoff2 /= yoff1 then + Put_Line(Standard_Error, "Get_Page_Parameters test failed"); + status := 1; + end if; + + -- Exercise Enable_Color_Output, Set_One_Color_Map_0, Set_Color_Map_1_RGB, and Set_Color_Map_1_RGBa to make sure + -- they work without any obvious error messages. + Enable_Color_Output(True); + Set_One_Color_Map_0(1, 255, 0, 0); + Set_Color_Map_1_RGB(r1, g1, b1); + Set_Color_Map_1_RGB_And_Alpha(r1, g1, b1, a1); + + Get_Run_Level(level2); + Put_Line("level parameter =" & Integer'image(level2)); + if (level2 /= 1) then + Put_Line(Standard_Error, "Get_Run_Level test failed."); + status := 1; + end if; + + Advance_To_Subpage(Next_Subpage); + Set_Viewport_Normalized(0.01, 0.99, 0.02, 0.49); + Get_Viewport_Normalized(xmin, xmax, ymin, ymax); + Put_Line("plvpor: xmin, xmax, ymin, ymax = " + & PF(xmin) & " " & PF(xmax) & " " & PF(ymin) & " " & PF(ymax)); + if xmin /= 0.01 or xmax /= 0.99 or ymin /= 0.02 or ymax /= 0.49 then + Put_Line(Standard_Error, "Get_Viewport_Normalized test failed"); + status := 1; + end if; + xmid := 0.5 * (xmin + xmax); + ymid := 0.5 * (ymin + ymax); + + Set_Viewport_World(0.2, 0.3, 0.4, 0.5); + Get_Viewport_World(xmin, xmax, ymin, ymax); + Put_Line("plwind: xmin, xmax, ymin, ymax = " + & PF(xmin) & " " & PF(xmax) & " " & PF(ymin) & " " & PF(ymax)); + if xmin /= 0.2 or xmax /= 0.3 or ymin /= 0.4 or ymax /= 0.5 then + Put_Line(Standard_Error, "Get_Viewport_World test failed"); + status := 1; + end if; + + -- Get world coordinates for middle of viewport. + World_From_Relative_Coordinates(xmid,ymid,wx,wy,win); + Put_Line("world parameters: wx, wy, win = " + & PF(wx) & " " & PF(wy) & Integer'image(win)); + if abs(wx-0.5*(xmin+xmax))>1.0E-5 or abs(wy-0.5*(ymin+ymax))>1.0E-5 then + Put_Line(Standard_Error, "World_From_Relative_Coordinates test failed"); + status := 1; + end if; + + -- Retrieve and print the name of the output file (if any). + -- This goes to stderr not stdout since it will vary between tests and + -- we want stdout to be identical for compare test. + Get_Output_File_Name(fnam); + if fnam(1) = Character'Val(0) then + Put_Line("No output file name is set"); + else + Put_Line("Output file name read"); + end if; + Put_Line(Standard_Error, "Output file name is " & fnam); + + -- Set and get the number of digits used to display axis labels. + -- Note digit is currently ignored in pls[xyz]ax and + -- therefore it does not make sense to test the returned value. + Set_Floating_Point_Display_X(3, 0); + Get_X_Label_Parameters(digmax, digit); + Put_Line("x axis parameters: digmax, digits =" + & Integer'image(digmax) & Integer'image(digit)); + if digmax /= 3 then + Put_Line(Standard_Error, "Get_X_Label_Parameters test failed"); + status := 1; + end if; + + Set_Floating_Point_Display_Y(4, 0); + Get_Y_Label_Parameters(digmax, digit); + Put_Line("y axis parameters: digmax, digits =" + & Integer'image(digmax) & Integer'image(digit)); + if digmax /= 4 then + Put_Line(Standard_Error, "Get_Y_Label_Parameters test failed"); + status := 1; + end if; + + Set_Floating_Point_Display_Z(5, 0); + Get_Z_Label_Parameters(digmax, digit); + Put_Line("z axis parameters: digmax, digits =" + & Integer'image(digmax) & Integer'image(digit)); + if digmax /= 5 then + Put_Line(Standard_Error, "Get_Z_Label_Parameters test failed"); + status := 1; + end if; + + Set_Device_Window_Parameters(0.05, PL_NOTSET, 0.1, 0.2); + Get_Device_Window_Parameters(mar, aspect, jx, jy); + Put_Line("device-space window parameters: mar, aspect, jx, jy = " + & PF(mar) & " " & PF(aspect) & " " & PF(jx) & " " & PF(jy)); + if mar /= 0.05 or jx /= 0.1 or jy /= 0.2 then + Put_Line(Standard_Error, "Get_Device_Window_Parameters test failed"); + status := 1; + end if; + + Set_Plot_Orientation(1.0); + Get_Plot_Orientation(ori); + Put_Line("ori parameter = " & PF(ori)); + if ori /= 1.0 then + Put_Line(Standard_Error, "Get_Plot_Orientation test failed"); + status := 1; + end if; + + Set_Device_Window_Extrema(0.1, 0.2, 0.9, 0.8); + Get_Device_Window_Extrema(xmin, ymin, xmax, ymax); + Put_Line("plot-space window parameters: xmin, ymin, xmax, ymax = " + & PF(xmin) & " " & PF(ymin) & " " & PF(xmax) & " " & PF(ymax)); + if xmin /= 0.1 or xmax /= 0.9 or ymin /= 0.2 or ymax /= 0.8 then + Put_Line(Standard_Error, "Get_Device_Window_Extrema test failed"); + status := 1; + end if; + + Set_Zoom(0.1, 0.1, 0.9, 0.9); + Get_Device_Window_Extrema(zxmin, zymin, zxmax, zymax); + Put_Line("zoomed plot-space window parameters: xmin, ymin, xmax, ymax = " + & PF(zxmin) & " " & PF(zymin) & " " & PF(zxmax) & " " & PF(zymax)); + if + abs(zxmin - (xmin + (xmax - xmin) * 0.1)) > 1.0E-5 or + abs(zxmax - (xmin + (xmax - xmin) * 0.9)) > 1.0E-5 or + abs(zymin - (ymin + (ymax - ymin) * 0.1)) > 1.0E-5 or + abs(zymax - (ymin + (ymax - ymin) * 0.9)) > 1.0E-5 + then + Put_Line(Standard_Error, "Set_Zoom test failed"); + status := 1; + end if; + + Set_Background_Color_RGB(10, 20, 30); + Get_Background_Color_RGB(r, g, b); + Put_Line("background colour parameters: r, g, b =" + & Integer'image(r) & Integer'image(g) & Integer'image(b)); + if r /= 10 or g /= 20 or b /= 30 then + Put_Line(Standard_Error, "Get_Background_Color_RGB test failed"); + status := 1; + end if; + + Set_Background_Color_RGB_And_Alpha(20, 30, 40, 0.5); + Get_Background_Color_RGB_And_Alpha(r, g, b, a); + Put_Line("background/transparency colour parameters: r, g, b, a =" + & Integer'image(r) & Integer'image(g) & Integer'image(b) & " " & PF(a)); + if r /= 20 or g /= 30 or b /= 40 or a /= 0.5 then + Put_Line(Standard_Error, "Get_Background_Color_RGBa test failed"); + status := 1; + end if; + + End_PLplot; +end xthick31a; Property changes on: trunk/examples/ada/xthick31a.adb.cmake ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Modified: trunk/plplot_test/test_ada.sh.in =================================================================== --- trunk/plplot_test/test_ada.sh.in 2009-01-01 02:38:00 UTC (rev 9240) +++ trunk/plplot_test/test_ada.sh.in 2009-01-02 10:17:24 UTC (rev 9241) @@ -33,10 +33,10 @@ for index in \ 01 02 03 04 05 06 07 08 09 \ 10 11 12 13 15 16 18 19 20 \ -21 22 23 24 25 26 27 28 29 30 \ +21 22 23 24 25 26 27 28 29 30 31\ thick01 thick02 thick03 thick04 thick05 thick06 thick07 thick08 thick09 \ thick10 thick11 thick12 thick13 thick15 thick16 thick18 thick19 thick20 \ -thick21 thick22 thick23 thick24 thick25 thick26 thick27 thick28 thick29 thick30; do +thick21 thick22 thick23 thick24 thick25 thick26 thick27 thick28 thick29 thick30 thick31; do if [ "$verbose_test" ]; then echo "x${index}" fi This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jb...@us...> - 2009-01-02 10:54:36
|
Revision: 9242 http://plplot.svn.sourceforge.net/plplot/?rev=9242&view=rev Author: jbauck Date: 2009-01-02 10:54:32 +0000 (Fri, 02 Jan 2009) Log Message: ----------- Added pragmas to selectively disable warning messages that were being generated during compilation of the Ada bindings and Ada Examples 21. Building should now proceed without these specific warnings but other warnings can still be generated as they arise. Modified Paths: -------------- trunk/bindings/ada/plplot.ads.cmake trunk/bindings/ada/plplot_traditional.ads.cmake trunk/doc/docbook/src/ada.xml trunk/examples/ada/x20a.adb.cmake trunk/examples/ada/xthick20a.adb.cmake Modified: trunk/bindings/ada/plplot.ads.cmake =================================================================== --- trunk/bindings/ada/plplot.ads.cmake 2009-01-02 10:17:24 UTC (rev 9241) +++ trunk/bindings/ada/plplot.ads.cmake 2009-01-02 10:54:32 UTC (rev 9242) @@ -69,7 +69,13 @@ -- from this package (PLplot_Traditional) can't be used. Thus, this also -- overloads the name Fill_Polygon. It might never occur to the Ada programmer -- that this is happening, which is good. + pragma Warnings(Off, "foreign caller must pass bounds explicitly"); + pragma Warnings(Off, "type of argument ""Fill_Polygon.x"" is unconstrained array"); + pragma Warnings(Off, "type of argument ""Fill_Polygon.y"" is unconstrained array"); procedure Fill_Polygon(length : Integer; x, y : Real_Vector) renames PLplot_Thin.plfill; + pragma Warnings(On, "foreign caller must pass bounds explicitly"); + pragma Warnings(On, "type of argument ""Fill_Polygon.x"" is unconstrained array"); + pragma Warnings(On, "type of argument ""Fill_Polygon.y"" is unconstrained array"); -- Make Mask_Function_Pointer_Type available to the user so that s/he doesn't -- have to "with" PLplot_Thin. Note that it is also used herein. Modified: trunk/bindings/ada/plplot_traditional.ads.cmake =================================================================== --- trunk/bindings/ada/plplot_traditional.ads.cmake 2009-01-02 10:17:24 UTC (rev 9241) +++ trunk/bindings/ada/plplot_traditional.ads.cmake 2009-01-02 10:54:32 UTC (rev 9242) @@ -69,7 +69,13 @@ -- from this package (PLplot_Traditional) can't be used. Thus, this also -- overloads the name plfill. It might never occur to the Ada programmer -- that this is happening, which is good. + pragma Warnings(Off, "foreign caller must pass bounds explicitly"); + pragma Warnings(Off, "type of argument ""plfill.x"" is unconstrained array"); + pragma Warnings(Off, "type of argument ""plfill.y"" is unconstrained array"); procedure plfill(length : Integer; x, y : Real_Vector) renames PLplot_Thin.plfill; + pragma Warnings(On, "foreign caller must pass bounds explicitly"); + pragma Warnings(On, "type of argument ""plfill.x"" is unconstrained array"); + pragma Warnings(On, "type of argument ""plfill.y"" is unconstrained array"); -- Make Mask_Function_Pointer_Type available to the user so that s/he doesn't -- have to "with" PLplot_Thin. Note that it is also used herein. Modified: trunk/doc/docbook/src/ada.xml =================================================================== --- trunk/doc/docbook/src/ada.xml 2009-01-02 10:17:24 UTC (rev 9241) +++ trunk/doc/docbook/src/ada.xml 2009-01-02 10:54:32 UTC (rev 9242) @@ -304,12 +304,7 @@ <para> As discussed in Section 6.1, the bindings are made to work with Ada 95 but to also take advantage of the Annex G.3 (vector-matrix) features of Ada 2005. Actually, this adaptation takes place during the PLplot build process when <literal>DHAVE_ADA_2007=OFF</literal> or <literal>DHAVE_ADA_2007=ON</literal> is chosen; the appropriate binding source files are generated automatically. User programs will work with either compiler type without modification.</para> <para><emphasis role="bold"> 10.2 GNAT Dependence</emphasis></para> <para> There is a slight but significant dependence on the GNAT version of Ada. This is discussed more fully in Section 6.2</para> - <para><emphasis role="bold"> 10.3 Compiler Warnings</emphasis></para> - <para> During normal compilation of the Ada bindings, approximately a dozen warnings are generated, in pairs, of the following form:</para> - <para> <literal>bar.adb:46: warning: type of argument "foo" is unconstrained array</literal></para> - <para> <literal>bar.adb:46: warning: foreign caller must pass bounds explicitly</literal></para> - <para> These are normal and an unavoidable consequence of some of the callback routines interacting with the underlying C code.</para> - <para><emphasis role="bold"> 10.4 PLplot_Auxiliary</emphasis></para> + <para><emphasis role="bold"> 10.3 PLplot_Auxiliary</emphasis></para> <para> The bindings include files <literal>PLplot_Auxiliary.ads</literal> and <literal>PLplot_Auxiliary.adb</literal>. These files are currently used to provide a few convenience subprograms that are used in the examples. However, they are also very tightly associated with the above-mentioned facility to accommodate either Ada 95 or Ada 2005 compilers. The current situation is such that if the user is using an Ada 95 compiler <emphasis>and</emphasis> requires the Real_Vector or Real_Matrix type definitions, then he/she should <literal>with</literal> <literal>PLplot_Auxiliary</literal>. If in doubt, <literal>PLplot_Auxiliary</literal> can always be <literal>with</literal>-ed without harm. In the future, this confusion might be removed and the need for <literal>PLplot_Auxiliary</literal> removed. (However, user programs that with it should still work without change.)</para> </sect1> Modified: trunk/examples/ada/x20a.adb.cmake =================================================================== --- trunk/examples/ada/x20a.adb.cmake 2009-01-02 10:17:24 UTC (rev 9241) +++ trunk/examples/ada/x20a.adb.cmake 2009-01-02 10:54:32 UTC (rev 9242) @@ -142,7 +142,11 @@ xxi := gin.wX; yyi := gin.wY; if start /= 0 then + pragma Warnings(Off, """sx"" may be referenced before it has a value"); + pragma Warnings(Off, """sy"" may be referenced before it has a value"); plline(sx, sy); -- Clear previous rectangle. + pragma Warnings(On, """sx"" may be referenced before it has a value"); + pragma Warnings(On, """sy"" may be referenced before it has a value"); end if; start := 0; Modified: trunk/examples/ada/xthick20a.adb.cmake =================================================================== --- trunk/examples/ada/xthick20a.adb.cmake 2009-01-02 10:17:24 UTC (rev 9241) +++ trunk/examples/ada/xthick20a.adb.cmake 2009-01-02 10:54:32 UTC (rev 9242) @@ -142,7 +142,11 @@ xxi := gin.wX; yyi := gin.wY; if start /= 0 then + pragma Warnings(Off, """sx"" may be referenced before it has a value"); + pragma Warnings(Off, """sy"" may be referenced before it has a value"); Draw_Curve(sx, sy); -- Clear previous rectangle. + pragma Warnings(On, """sx"" may be referenced before it has a value"); + pragma Warnings(On, """sy"" may be referenced before it has a value"); end if; start := 0; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jb...@us...> - 2009-01-04 22:22:17
|
Revision: 9251 http://plplot.svn.sourceforge.net/plplot/?rev=9251&view=rev Author: jbauck Date: 2009-01-04 21:46:04 +0000 (Sun, 04 Jan 2009) Log Message: ----------- Change the style of pragma Warnings(...) to only one argument to be compatible with pre-4.3 GNAT. Modified Paths: -------------- trunk/bindings/ada/plplot.ads.cmake trunk/bindings/ada/plplot_traditional.ads.cmake trunk/examples/ada/x20a.adb.cmake trunk/examples/ada/xthick20a.adb.cmake Modified: trunk/bindings/ada/plplot.ads.cmake =================================================================== --- trunk/bindings/ada/plplot.ads.cmake 2009-01-03 22:21:06 UTC (rev 9250) +++ trunk/bindings/ada/plplot.ads.cmake 2009-01-04 21:46:04 UTC (rev 9251) @@ -69,13 +69,13 @@ -- from this package (PLplot_Traditional) can't be used. Thus, this also -- overloads the name Fill_Polygon. It might never occur to the Ada programmer -- that this is happening, which is good. - pragma Warnings(Off, "foreign caller must pass bounds explicitly"); - pragma Warnings(Off, "type of argument ""Fill_Polygon.x"" is unconstrained array"); - pragma Warnings(Off, "type of argument ""Fill_Polygon.y"" is unconstrained array"); + -- Suppress these warnings compatibly with pre-4.3 GNAT: + -- "foreign caller must pass bounds explicitly" + -- "type of argument ""plfill.x"" is unconstrained array" + -- "type of argument ""plfill.y"" is unconstrained array" + pragma Warnings(Off); procedure Fill_Polygon(length : Integer; x, y : Real_Vector) renames PLplot_Thin.plfill; - pragma Warnings(On, "foreign caller must pass bounds explicitly"); - pragma Warnings(On, "type of argument ""Fill_Polygon.x"" is unconstrained array"); - pragma Warnings(On, "type of argument ""Fill_Polygon.y"" is unconstrained array"); + pragma Warnings(On); -- Make Mask_Function_Pointer_Type available to the user so that s/he doesn't -- have to "with" PLplot_Thin. Note that it is also used herein. Modified: trunk/bindings/ada/plplot_traditional.ads.cmake =================================================================== --- trunk/bindings/ada/plplot_traditional.ads.cmake 2009-01-03 22:21:06 UTC (rev 9250) +++ trunk/bindings/ada/plplot_traditional.ads.cmake 2009-01-04 21:46:04 UTC (rev 9251) @@ -69,13 +69,13 @@ -- from this package (PLplot_Traditional) can't be used. Thus, this also -- overloads the name plfill. It might never occur to the Ada programmer -- that this is happening, which is good. - pragma Warnings(Off, "foreign caller must pass bounds explicitly"); - pragma Warnings(Off, "type of argument ""plfill.x"" is unconstrained array"); - pragma Warnings(Off, "type of argument ""plfill.y"" is unconstrained array"); + -- Suppress these warnings compatibly with pre-4.3 GNAT: + -- "foreign caller must pass bounds explicitly" + -- "type of argument ""plfill.x"" is unconstrained array" + -- "type of argument ""plfill.y"" is unconstrained array" + pragma Warnings(Off); procedure plfill(length : Integer; x, y : Real_Vector) renames PLplot_Thin.plfill; - pragma Warnings(On, "foreign caller must pass bounds explicitly"); - pragma Warnings(On, "type of argument ""plfill.x"" is unconstrained array"); - pragma Warnings(On, "type of argument ""plfill.y"" is unconstrained array"); + pragma Warnings(On); -- Make Mask_Function_Pointer_Type available to the user so that s/he doesn't -- have to "with" PLplot_Thin. Note that it is also used herein. Modified: trunk/examples/ada/x20a.adb.cmake =================================================================== --- trunk/examples/ada/x20a.adb.cmake 2009-01-03 22:21:06 UTC (rev 9250) +++ trunk/examples/ada/x20a.adb.cmake 2009-01-04 21:46:04 UTC (rev 9251) @@ -142,11 +142,10 @@ xxi := gin.wX; yyi := gin.wY; if start /= 0 then - pragma Warnings(Off, """sx"" may be referenced before it has a value"); - pragma Warnings(Off, """sy"" may be referenced before it has a value"); + -- Suppress warning """sy"" may be referenced before it has a value". + pragma Warnings(Off); plline(sx, sy); -- Clear previous rectangle. - pragma Warnings(On, """sx"" may be referenced before it has a value"); - pragma Warnings(On, """sy"" may be referenced before it has a value"); + pragma Warnings(On); end if; start := 0; Modified: trunk/examples/ada/xthick20a.adb.cmake =================================================================== --- trunk/examples/ada/xthick20a.adb.cmake 2009-01-03 22:21:06 UTC (rev 9250) +++ trunk/examples/ada/xthick20a.adb.cmake 2009-01-04 21:46:04 UTC (rev 9251) @@ -142,11 +142,10 @@ xxi := gin.wX; yyi := gin.wY; if start /= 0 then - pragma Warnings(Off, """sx"" may be referenced before it has a value"); - pragma Warnings(Off, """sy"" may be referenced before it has a value"); + -- Suppress warning """sy"" may be referenced before it has a value". + pragma Warnings(Off); Draw_Curve(sx, sy); -- Clear previous rectangle. - pragma Warnings(On, """sx"" may be referenced before it has a value"); - pragma Warnings(On, """sy"" may be referenced before it has a value"); + pragma Warnings(On); end if; start := 0; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jb...@us...> - 2009-01-06 07:27:36
|
Revision: 9257 http://plplot.svn.sourceforge.net/plplot/?rev=9257&view=rev Author: jbauck Date: 2009-01-06 07:27:34 +0000 (Tue, 06 Jan 2009) Log Message: ----------- Fix spelling error in bindings. Tweak docs in ada.xml. Modified Paths: -------------- trunk/bindings/ada/plplot.ads.cmake trunk/bindings/ada/plplot_traditional.ads.cmake trunk/doc/docbook/src/ada.xml Modified: trunk/bindings/ada/plplot.ads.cmake =================================================================== --- trunk/bindings/ada/plplot.ads.cmake 2009-01-06 03:29:12 UTC (rev 9256) +++ trunk/bindings/ada/plplot.ads.cmake 2009-01-06 07:27:34 UTC (rev 9257) @@ -311,10 +311,10 @@ -- Flags for the opt argument in plbin -- - Bin_Default : constant Integer := 0; - Bin_Centred : constant Integer := 1; - Bin_Noexpand : constant Integer := 2; - Bin_Noempty : constant Integer := 4; + Bin_Default : constant Integer := 0; + Bin_Centered : constant Integer := 1; + Bin_Noexpand : constant Integer := 2; + Bin_Noempty : constant Integer := 4; -------------------------------------------------------------------------------- Modified: trunk/bindings/ada/plplot_traditional.ads.cmake =================================================================== --- trunk/bindings/ada/plplot_traditional.ads.cmake 2009-01-06 03:29:12 UTC (rev 9256) +++ trunk/bindings/ada/plplot_traditional.ads.cmake 2009-01-06 07:27:34 UTC (rev 9257) @@ -310,10 +310,10 @@ -- Flags for the opt argument in plbin -- - Bin_Default : constant Integer := 0; - Bin_Centred : constant Integer := 1; - Bin_Noexpand : constant Integer := 2; - Bin_Noempty : constant Integer := 4; + Bin_Default : constant Integer := 0; + Bin_Centered : constant Integer := 1; + Bin_Noexpand : constant Integer := 2; + Bin_Noempty : constant Integer := 4; -------------------------------------------------------------------------------- Modified: trunk/doc/docbook/src/ada.xml =================================================================== --- trunk/doc/docbook/src/ada.xml 2009-01-06 03:29:12 UTC (rev 9256) +++ trunk/doc/docbook/src/ada.xml 2009-01-06 07:27:34 UTC (rev 9257) @@ -156,7 +156,7 @@ <sect1 id="ada_unique"> <title>Unique Features of the Ada bindings</title> - <para>The Ada bindings have been augmented with a number of features that are not present in other languages which work with PLplot. These features are intended to greatly simplify the use of PLplot; many users will find that they can do most of their work using these "Simple" plotters. Also included are facilities for easily manipulating the PLplot color tables</para> + <para>The Ada bindings have been augmented with a number of features which are intended to simplify the use of PLplot. They include high-level features for simplified plotting (such as easy foreground-background control, a collection of "simple plotters," and easy color map manipulations), integer options which have been given meaningful names, and a few other focused additions. Many users will find that they can do most of their work using the "simple plotters".</para> <sect2 id="ada_high_level"> <title>High-level features for simplified plotting</title> <sect3 id="ada_foreground_background"> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jb...@us...> - 2009-01-06 08:24:24
|
Revision: 9260 http://plplot.svn.sourceforge.net/plplot/?rev=9260&view=rev Author: jbauck Date: 2009-01-06 08:24:22 +0000 (Tue, 06 Jan 2009) Log Message: ----------- Replace all instances of Advance_To_Subpage(0) with Advance_To_Subpage(Next_Subpage) in thick Ada examples. Replace one instance of PL_PARSE_FULL in a thick Ada example with Parse_Full. Tweak ada.xml docs. Modified Paths: -------------- trunk/doc/docbook/src/ada.xml trunk/examples/ada/xthick01a.adb.cmake trunk/examples/ada/xthick02a.adb.cmake trunk/examples/ada/xthick04a.adb.cmake trunk/examples/ada/xthick06a.adb.cmake trunk/examples/ada/xthick07a.adb.cmake trunk/examples/ada/xthick08a.adb.cmake trunk/examples/ada/xthick15a.adb.cmake trunk/examples/ada/xthick16a.adb.cmake Modified: trunk/doc/docbook/src/ada.xml =================================================================== --- trunk/doc/docbook/src/ada.xml 2009-01-06 07:53:33 UTC (rev 9259) +++ trunk/doc/docbook/src/ada.xml 2009-01-06 08:24:22 UTC (rev 9260) @@ -66,7 +66,7 @@ </sect2> <sect2 id="ada_thick_enhanced"> <title>Standard Thick Binding Using Enhanced Names</title> - <para> The distinguishing feature of this thick binding (the "standard" binding) is to provide more descriptive names for PLplot subroutines, variables, constants, arguments, and other objects. Most Ada programmers will be more comfortable using these names. For example, in the C API as well as the thin Ada binding and the other thick Ada binding, the procedure <literal>plcol0(1)</literal> sets the drawing color to red. In the standard thick binding, the same thing is accomplished by writing <literal>Set_Color(Red)</literal>. The Ada program may just as well write <literal>Set_Color(1)</literal> since the binding merely sets a constant <literal>Red</literal> to be equal to the integer <literal>1</literal>. Many such numeric constants from the C API are given names in this thick binding. These renamed integers are discussed more fully in Section 7.2.</para> + <para> The distinguishing feature of this thick binding (the "standard" binding) is to provide more descriptive names for PLplot subroutines, variables, constants, arguments, and other objects. Most Ada programmers will be more comfortable using these names. For example, in the C API as well as the thin Ada binding and the other thick Ada binding, the procedure <literal>plcol0(1)</literal> sets the drawing color to red. In the standard thick binding, the same thing is accomplished by writing <literal>Set_Pen_Color(Red)</literal>. The Ada program may just as well write <literal>Set_Pen_Color(1)</literal> since the binding merely sets a constant <literal>Red</literal> to be equal to the integer <literal>1</literal>. Many such numeric constants from the C API are given names in this thick binding. These renamed integers are discussed more fully in Section 7.2.</para> <para> The disadvantage of this renaming is that it makes referring to the PLplot documentation somewhat awkward. There might be, at some time, a utility for easing this problem by providing an HTML file with links so that a "normal" PLplot name can be linked to the "Ada" name along with the appropriate entry in the Ada specification, as well as another HTML file with links from the "Ada" name directly to the PLplot web page that documents that name. It might also be possible to provide an alternate version of the documentation with the enhanced names used. (The developer of the bindings has a sed file prepared which makes most of the subroutine-name substitutions.) However, this thick binding retains the original C subprogram names as comments immediately above the function or procedure name in the code listing so it is relatively easy to locate the relevant item in the PLplot documentation.</para> <para> One simple rule applies in reading the PLplot API documentation: the argument names are in the same order in Ada as in the PLplot documentation (the names are different) except that all array lengths are eliminated. The PLplot documentation, for each subroutine, shows a "redacted" version which should be correct for Ada as well as other languages which have proper arrays.</para> <para> The standard bindings are in the Ada files <literal>plplot.ads</literal> and <literal>plplot.adb</literal>.</para> Modified: trunk/examples/ada/xthick01a.adb.cmake =================================================================== --- trunk/examples/ada/xthick01a.adb.cmake 2009-01-06 07:53:33 UTC (rev 9259) +++ trunk/examples/ada/xthick01a.adb.cmake 2009-01-06 08:24:22 UTC (rev 9260) @@ -125,7 +125,7 @@ Box_Around_Viewport("bcnst", 60.0, 2, "bcnstv", 0.2, 2); -- Superimpose a dashed line grid, with 1.5 mm marks and spaces. - -- plstyl expects a pointer! (-- Not Ada.) + -- Set_Line_Style expects a pointer! (-- Not Ada.) Set_Line_Style(mark1, space1); Set_Pen_Color(Yellow); Box_Around_Viewport("g", 30.0, 0, "g", 0.2, 0); Modified: trunk/examples/ada/xthick02a.adb.cmake =================================================================== --- trunk/examples/ada/xthick02a.adb.cmake 2009-01-06 07:53:33 UTC (rev 9259) +++ trunk/examples/ada/xthick02a.adb.cmake 2009-01-06 08:24:22 UTC (rev 9260) @@ -61,7 +61,7 @@ for i in 0..(nw-1) loop Set_Pen_Color(i+cmap0_offset); - Advance_To_Subpage(0); + Advance_To_Subpage(Next_Subpage); vmin := 0.1; vmax := 0.9; for j in 0..2 loop Modified: trunk/examples/ada/xthick04a.adb.cmake =================================================================== --- trunk/examples/ada/xthick04a.adb.cmake 2009-01-06 07:53:33 UTC (rev 9259) +++ trunk/examples/ada/xthick04a.adb.cmake 2009-01-06 08:24:22 UTC (rev 9260) @@ -90,7 +90,7 @@ begin -- Parse and process command line arguments - Parse_Command_Line_Arguments(PL_PARSE_FULL); + Parse_Command_Line_Arguments(Parse_Full); -- Initialize plplot Initialize_PLplot; Modified: trunk/examples/ada/xthick06a.adb.cmake =================================================================== --- trunk/examples/ada/xthick06a.adb.cmake 2009-01-06 07:53:33 UTC (rev 9259) +++ trunk/examples/ada/xthick06a.adb.cmake 2009-01-06 08:24:22 UTC (rev 9260) @@ -52,7 +52,7 @@ -- Initialize plplot Initialize_PLplot; - Advance_To_Subpage(0); + Advance_To_Subpage(Next_Subpage); -- Set up viewport and window Set_Pen_Color(2); Modified: trunk/examples/ada/xthick07a.adb.cmake =================================================================== --- trunk/examples/ada/xthick07a.adb.cmake 2009-01-06 07:53:33 UTC (rev 9259) +++ trunk/examples/ada/xthick07a.adb.cmake 2009-01-06 08:24:22 UTC (rev 9260) @@ -56,7 +56,7 @@ Set_Characer_Set(1); for l in 0 .. 16 loop - Advance_To_Subpage(0); + Advance_To_Subpage(Next_Subpage); -- Set up viewport and window Set_Pen_Color(2); Modified: trunk/examples/ada/xthick08a.adb.cmake =================================================================== --- trunk/examples/ada/xthick08a.adb.cmake 2009-01-06 07:53:33 UTC (rev 9259) +++ trunk/examples/ada/xthick08a.adb.cmake 2009-01-06 08:24:22 UTC (rev 9260) @@ -154,7 +154,7 @@ for k in alt'range loop for ifshade in 0 .. 3 loop - Advance_To_Subpage(0); + Advance_To_Subpage(Next_Subpage); Set_Viewport_Normalized(0.0, 1.0, 0.0, 0.9); Set_Viewport_World(-1.0, 1.0, -0.9, 1.1); Set_Pen_Color(Green); Modified: trunk/examples/ada/xthick15a.adb.cmake =================================================================== --- trunk/examples/ada/xthick15a.adb.cmake 2009-01-06 07:53:33 UTC (rev 9259) +++ trunk/examples/ada/xthick15a.adb.cmake 2009-01-06 08:24:22 UTC (rev 9260) @@ -94,7 +94,7 @@ sh_width : Integer; min_color, min_width, max_color, max_width : Integer; begin - Advance_To_Subpage(0); + Advance_To_Subpage(Next_Subpage); Set_Viewport_Normalized(0.1, 0.9, 0.1, 0.9); Set_Viewport_World(-1.0, 1.0, -1.0, 1.0); @@ -158,7 +158,7 @@ sh_width := 2; - Advance_To_Subpage(0); + Advance_To_Subpage(Next_Subpage); Set_Viewport_Normalized(0.1, 0.9, 0.1, 0.9); Set_Viewport_World(-1.0, 1.0, -1.0, 1.0); Modified: trunk/examples/ada/xthick16a.adb.cmake =================================================================== --- trunk/examples/ada/xthick16a.adb.cmake 2009-01-06 07:53:33 UTC (rev 9259) +++ trunk/examples/ada/xthick16a.adb.cmake 2009-01-06 08:24:22 UTC (rev 9260) @@ -244,7 +244,7 @@ -- the input parser which handling is not implemented in this Ada example. -- exclude := True; -- if exclude then --- Advance_To_Subpage(0); +-- Advance_To_Subpage(Next_Subpage); -- Set_Viewport_Normalized(0.1, 0.9, 0.1, 0.9); -- Set_Viewport_World(-1.0, 1.0, -1.0, 1.0); -- This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <and...@us...> - 2009-01-06 15:18:56
|
Revision: 9262 http://plplot.svn.sourceforge.net/plplot/?rev=9262&view=rev Author: andrewross Date: 2009-01-06 15:18:53 +0000 (Tue, 06 Jan 2009) Log Message: ----------- Add example 14 to the list of non-interactive tests. For most languages this involves redirecting stdin to input the file name for the output file in the second stream. Fix up various implementations of example 14 to ensure consistent results with C version. Update C version of example 14 to set familying settings for 2nd stream based on 1st stream to ensure that devices like png work correctly. (Change not yet propagated to all other languages - see plplot-devel list for other related issues.) Modified Paths: -------------- trunk/bindings/octave/demos/x14c.m trunk/examples/ada/x14a.adb.cmake trunk/examples/ada/xthick14a.adb.cmake trunk/examples/c/x14c.c trunk/examples/c++/x14.cc trunk/examples/f77/x14f.fm4 trunk/examples/f95/x14f.f90 trunk/examples/java/x14.java trunk/examples/perl/x14.pl trunk/plplot_test/test_ada.sh.in trunk/plplot_test/test_c.sh.in trunk/plplot_test/test_cxx.sh.in trunk/plplot_test/test_diff.sh.in trunk/plplot_test/test_f77.sh.in trunk/plplot_test/test_f95.sh.in trunk/plplot_test/test_java.sh.in trunk/plplot_test/test_ocaml.sh.in trunk/plplot_test/test_octave.sh.in trunk/plplot_test/test_perl.sh.in trunk/plplot_test/test_python.sh.in trunk/plplot_test/test_tcl.sh.in Modified: trunk/bindings/octave/demos/x14c.m =================================================================== --- trunk/bindings/octave/demos/x14c.m 2009-01-06 10:35:23 UTC (rev 9261) +++ trunk/bindings/octave/demos/x14c.m 2009-01-06 15:18:53 UTC (rev 9262) @@ -24,8 +24,12 @@ 1; -function ix14c +function ix14c(fname2,strm) + if (nargin < 2) + strm = stdout; + endif + if (!exist("plinit")) plplot_stub endif @@ -33,9 +37,10 @@ device = sprintf("%s",plgdev'); if(isempty(device)) device = "xwin"; - plsdev(device); endif + [fam, num, bmax] = plgfam(); + xleng0 = 400; yleng0 = 300; xoff0 = 200; yoff0 = 200; xleng1 = 400; yleng1 = 300; xoff1 = 500; yoff1 = 500; @@ -44,16 +49,24 @@ geometry_master = "500x410+100+200"; geometry_slave = "500x410+650+200"; - printf("Demo of multiple output streams via the %s driver.\n", device); - printf("Running with the second (right) window as slave.\n"); - printf("To advance to the next plot, press the third mouse button\n"); - printf("or the enter key in the first (left) window\n"); + fprintf(strm,"Demo of multiple output streams via the %s driver.\n", device); + fprintf(strm,"Running with the second stream as slave to the first.\n"); + ##fprintf(strm,"To advance to the next plot, press the third mouse button\n"); + ##fprintf(strm,"or the enter key in the first (left) window\n"); + ## This is an entirely bogus message since the output file name is + ## set by the function arguments - but it does ensure that stdout + ## is identical to the C version of the example for ctest. + if (strm != stdout) + fprintf(strm,"\nEnter graphics output file name: "); + endif + fflush(stdout); ## Set up first stream */ plSetOpt("geometry", geometry_master); + plsdev(device); plssub(2,2); plinit(); @@ -66,7 +79,14 @@ plSetOpt("geometry", geometry_slave); plspause(0); - plsdev(device) + ## This is an addition to C version to allow second file name to be + ## set as a function argument. This is required for the test scripts. + if (nargin >= 1) + plsfnam(fname2); + endif + + plsdev(device); + plsfam(fam,num,bmax); plinit(); ## Set up the data & plot */ @@ -248,7 +268,7 @@ function plot4() - dtr = 3.141592654 / 180.0; + dtr = pi / 180.0; zz=0:360; x0 = cos(dtr * zz'); @@ -281,7 +301,7 @@ ## Write labels for angle */ - if (dx >= 0) + if (dx >= -0.00001) plptex(dx, dy, dx, dy, -0.15, text); else plptex(dx, dy, -dx, -dy, 1.15, text); @@ -329,9 +349,9 @@ ## Set up function arrays */ for i = 0:XPTS-1 - xx = (i - (XPTS / 2)) / (XPTS / 2); + xx = (i - fix(XPTS / 2)) / fix(XPTS / 2); for j = 0:YPTS-1 - yy = (j - (YPTS / 2)) / (YPTS / 2) - 1.0; + yy = (j - fix(YPTS / 2)) / fix(YPTS / 2) - 1.0; z(i+1,j+1) = xx * xx - yy * yy; w(i+1,j+1) = 2 * xx * yy; endfor @@ -348,4 +368,12 @@ plflush;#pleop(); endfunction -ix14c +if (exist("file2","var")) + if (exist("strm","var")) + ix14c(file2,strm); + else + ix14c(file2); + endif +else + ix14c() +endif Modified: trunk/examples/ada/x14a.adb.cmake =================================================================== --- trunk/examples/ada/x14a.adb.cmake 2009-01-06 10:35:23 UTC (rev 9261) +++ trunk/examples/ada/x14a.adb.cmake 2009-01-06 15:18:53 UTC (rev 9262) @@ -296,7 +296,7 @@ driver := To_Unbounded_String(plgdev); - Put_Line("Demo of multiple output streams via the " & plgdev & "driver."); + Put_Line("Demo of multiple output streams via the " & plgdev & " driver."); Put_Line("Running with the second stream as slave to the first."); New_Line; Modified: trunk/examples/ada/xthick14a.adb.cmake =================================================================== --- trunk/examples/ada/xthick14a.adb.cmake 2009-01-06 10:35:23 UTC (rev 9261) +++ trunk/examples/ada/xthick14a.adb.cmake 2009-01-06 15:18:53 UTC (rev 9262) @@ -296,7 +296,7 @@ driver := To_Unbounded_String(Get_Device_Name); - Put_Line("Demo of multiple output streams via the " & Get_Device_Name & "driver."); + Put_Line("Demo of multiple output streams via the " & Get_Device_Name & " driver."); Put_Line("Running with the second stream as slave to the first."); New_Line; Modified: trunk/examples/c/x14c.c =================================================================== --- trunk/examples/c/x14c.c 2009-01-06 10:35:23 UTC (rev 9261) +++ trunk/examples/c/x14c.c 2009-01-06 15:18:53 UTC (rev 9262) @@ -60,12 +60,15 @@ char driver[80]; + PLINT fam, num, bmax; + /* plplot initialization */ /* Parse and process command line arguments */ (void) plparseopts(&argc, argv, PL_PARSE_FULL); plgdev(driver); + plgfam(&fam,&num,&bmax); printf("Demo of multiple output streams via the %s driver.\n", driver); printf("Running with the second stream as slave to the first.\n"); @@ -88,6 +91,7 @@ plsetopt("geometry", geometry_slave); plspause(0); plsdev(driver); + plsfam(fam,num,bmax); plinit(); /* Set up the data & plot */ Modified: trunk/examples/c++/x14.cc =================================================================== --- trunk/examples/c++/x14.cc 2009-01-06 10:35:23 UTC (rev 9261) +++ trunk/examples/c++/x14.cc 2009-01-06 15:18:53 UTC (rev 9262) @@ -107,7 +107,7 @@ cout << "Demo of multiple output streams via the " << driver << " driver." << endl; - cout << "Running with the second stream as slave.\n" << endl; + cout << "Running with the second stream as slave to the first.\n" << endl; // Set up first stream Modified: trunk/examples/f77/x14f.fm4 =================================================================== --- trunk/examples/f77/x14f.fm4 2009-01-06 10:35:23 UTC (rev 9261) +++ trunk/examples/f77/x14f.fm4 2009-01-06 15:18:53 UTC (rev 9262) @@ -62,9 +62,9 @@ call plgdev(driver) - write(*,*) 'Demo of multiple output streams via the ', + write(*,'(3A)') 'Demo of multiple output streams via the ', & driver(:lnblnk(driver)), ' driver.' - write(*,*) 'Running with the second stream as slave ', + write(*,'(A)') 'Running with the second stream as slave '// & 'to the first.' write(*,*) Modified: trunk/examples/f95/x14f.f90 =================================================================== --- trunk/examples/f95/x14f.f90 2009-01-06 10:35:23 UTC (rev 9261) +++ trunk/examples/f95/x14f.f90 2009-01-06 15:18:53 UTC (rev 9262) @@ -59,9 +59,9 @@ call plgdev(driver) - write(*,*) 'Demo of multiple output streams via the ', & + write(*,'(3A)') 'Demo of multiple output streams via the ', & trim(driver), ' driver.' - write(*,*) 'Running with the second stream as slave ', & + write(*,'(A)') 'Running with the second stream as slave '// & 'to the first.' write(*,*) Modified: trunk/examples/java/x14.java =================================================================== --- trunk/examples/java/x14.java 2009-01-06 10:35:23 UTC (rev 9261) +++ trunk/examples/java/x14.java 2009-01-06 15:18:53 UTC (rev 9262) @@ -38,7 +38,8 @@ class x14 { double xscale, yscale, xoff, yoff; - PLStream pls = new PLStream(); + PLStream pls1 = new PLStream(); + PLStream pls2 = new PLStream(); public static void main( String[] args ) { @@ -52,11 +53,11 @@ // Parse and process command line arguments. - pls.parseopts( args, PLStream.PL_PARSE_FULL|PLStream.PL_PARSE_NOPROGRAM ); + pls1.parseopts( args, PLStream.PL_PARSE_FULL|PLStream.PL_PARSE_NOPROGRAM ); StringBuffer driver = new StringBuffer(80); - pls.gdev(driver); + pls1.gdev(driver); String sdriver = new String(driver); System.out.println("Demo of multiple output streams via the " + sdriver + " driver."); System.out.println("Running with the second stream as slave to the first."); @@ -64,47 +65,43 @@ // Set up first stream - pls.setopt("geometry", geometry_master); + pls1.setopt("geometry", geometry_master); - pls.sdev(sdriver); - pls.ssub(2, 2); - pls.init(); + pls1.sdev(sdriver); + pls1.ssub(2, 2); + pls1.init(); // Start next stream - pls.sstrm(1); - // Turn off pause to make this a slave (must follow master) - pls.setopt("geometry", geometry_slave); - pls.spause(false); - pls.sdev(sdriver); - pls.init(); + pls2.setopt("geometry", geometry_slave); + pls2.spause(false); + pls2.sdev(sdriver); + pls2.init(); //Set up the data & plot // Original case - pls.sstrm(0); - xscale = 6.; yscale = 1.; xoff = 0.; yoff = 0.; - plot1(); + plot1(pls1); // Set up the data & plot xscale = 1.; yscale = 1.e+6; - plot1(); + plot1(pls1); // Set up the data & plot xscale = 1.; yscale = 1.e-6; int digmax = 2; - pls.syax(digmax, 0); - plot1(); + pls1.syax(digmax, 0); + plot1(pls1); // Set up the data & plot @@ -112,39 +109,36 @@ yscale = 0.0014; yoff = 0.0185; digmax = 5; - pls.syax(digmax, 0); - plot1(); + pls1.syax(digmax, 0); + plot1(pls1); // To slave // The pleop() ensures the eop indicator gets lit. - pls.sstrm(1); - plot4(); - pls.eop(); + plot4(pls2); + pls2.eop(); // Back to master - pls.sstrm(0); - plot2(); - plot3(); + plot2(pls1); + plot3(pls1); // To slave - pls.sstrm(1); - plot5(); - pls.eop(); + plot5(pls2); + pls2.eop(); // Back to master to wait for user to advance - pls.sstrm(0); - pls.eop(); + pls1.eop(); // Call plend to finish off. - pls.end(); + //pls2.endl(); + pls1.end(); } - void plot1() + void plot1(PLStream pls) { int i; double xmin, xmax, ymin, ymax; @@ -191,7 +185,7 @@ pls.flush(); } - void plot2() + void plot2(PLStream pls) { int i; double x[] = new double[100]; @@ -222,7 +216,7 @@ pls.flush(); } - void plot3() + void plot3(PLStream pls) { int i; int space0[] = {}; @@ -270,7 +264,7 @@ pls.flush(); } - void plot4() + void plot4(PLStream pls) { NumberFormat nf = NumberFormat.getNumberInstance(); @@ -347,7 +341,7 @@ // Transformation function final double tr[] = {XSPA, 0.0, -1.0, 0.0, YSPA, -1.0}; - void plot5() + void plot5(PLStream pls) { int i, j; Modified: trunk/examples/perl/x14.pl =================================================================== --- trunk/examples/perl/x14.pl 2009-01-06 10:35:23 UTC (rev 9261) +++ trunk/examples/perl/x14.pl 2009-01-06 15:18:53 UTC (rev 9262) @@ -260,10 +260,9 @@ # Set up viewport and window, but do not draw box plenv (-1.3, 1.3, -1.3, 1.3, 1, -2); - for (my $i = 1; $i <= 10; $i++) { - my $j = sequence (361); - my $x = 0.1 * $i * $x0; - my $y = 0.1 * $i * $y0; + for my $i (1 .. 10) { + my $x = pdl (0.1 * $i * $x0); + my $y = pdl (0.1 * $i * $y0); # Draw circles for polar grid @@ -271,7 +270,7 @@ } plcol0 (2); - for (my $i = 1; $i <= 11; $i++) { + for my $i (0 .. 11) { my $theta = 30 * $i; my $dx = cos ($dtr * $theta); my $dy = sin ($dtr * $theta); @@ -287,14 +286,13 @@ if ($dx >= -0.00001) { plptex ($dx, $dy, $dx, $dy, -0.15, $text); } else { - plptex($dx, $dy, -$dx, -$dy, 1.15, $text); + plptex ($dx, $dy, -$dx, -$dy, 1.15, $text); } } # Draw the graph - $i = sequence (361); - my $r = sin ($dtr * (5 * $i)); + my $r = sin ($dtr * 5 * sequence(361)); $x = $x0 * $r; $y = $y0 * $r; @@ -331,9 +329,9 @@ my $mark = 1500; my $space = 1500; - my $xx = ((sequence (XPTS) - (XPTS / 2)) / (XPTS / 2))->dummy (1, YPTS); - my $yy = ((sequence (YPTS) - (YPTS / 2)) - / (YPTS / 2) - 1.0)->dummy (0, XPTS); + my $xx = ((sequence (XPTS) - int(XPTS / 2)) / int(XPTS / 2))->dummy (1, YPTS); + my $yy = ((sequence (YPTS) - int(YPTS / 2)) + / int(YPTS / 2) - 1.0)->dummy (0, XPTS); my $z = $xx * $xx - $yy * $yy; my $w = 2 * $xx * $yy; Modified: trunk/plplot_test/test_ada.sh.in =================================================================== --- trunk/plplot_test/test_ada.sh.in 2009-01-06 10:35:23 UTC (rev 9261) +++ trunk/plplot_test/test_ada.sh.in 2009-01-06 15:18:53 UTC (rev 9262) @@ -27,21 +27,27 @@ # pushd $adadir; make; popd # Do the standard non-interactive examples. -# Skip 14 because it requires two output files. # Skip 17 because it is interactive. lang="a" for index in \ 01 02 03 04 05 06 07 08 09 \ -10 11 12 13 15 16 18 19 20 \ +10 11 12 13 14 15 16 18 19 20 \ 21 22 23 24 25 26 27 28 29 30 31 \ thick01 thick02 thick03 thick04 thick05 thick06 thick07 thick08 thick09 \ -thick10 thick11 thick12 thick13 thick15 thick16 thick18 thick19 thick20 \ +thick10 thick11 thick12 thick13 thick14 thick15 thick16 thick18 thick19 thick20 \ thick21 thick22 thick23 thick24 thick25 thick26 thick27 thick28 thick29 thick30 thick31; do if [ "$verbose_test" ]; then echo "x${index}" fi - $adadir/x${index}${lang} -dev $device -o ${OUTPUT_DIR}/x${index}${lang}%n.$dsuffix $options 2> test.error >| ${OUTPUT_DIR}/x${index}${lang}_${dsuffix}.txt - status_code=$? + if [ "$index" = "14" -o "$index" = "thick14" ] ; then + $adadir/x${index}${lang} -dev $device -o ${OUTPUT_DIR}/x${index}${lang}%n.$dsuffix $options 2> test.error >| ${OUTPUT_DIR}/x${index}${lang}_${dsuffix}.txt << EOF +${OUTPUT_DIR}/x${index}a${lang}%n.$dsuffix +EOF + status_code=$? + else + $adadir/x${index}${lang} -dev $device -o ${OUTPUT_DIR}/x${index}${lang}%n.$dsuffix $options 2> test.error >| ${OUTPUT_DIR}/x${index}${lang}_${dsuffix}.txt + status_code=$? + fi cat test.error if [ "$status_code" -ne 0 ]; then exit $status_code Modified: trunk/plplot_test/test_c.sh.in =================================================================== --- trunk/plplot_test/test_c.sh.in 2009-01-06 10:35:23 UTC (rev 9261) +++ trunk/plplot_test/test_c.sh.in 2009-01-06 15:18:53 UTC (rev 9262) @@ -27,19 +27,27 @@ # pushd $cdir; make; popd # Do the standard non-interactive examples. -# skip 14 because it requires two output files. # skip 17 because it is interactive. lang="c" export index lang -for index in 01 02 03 04 05 06 07 08 09 10 11 12 13 15 16 18 19 20 \ +for index in 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 18 19 20 \ 21 22 23 24 25 26 27 28 29 30 31; do if [ "$verbose_test" ]; then echo "x${index}${lang}" fi + if [ "$index" = "14" ] ; then + $DEBUG_CMD $cdir/x${index}${lang} -dev $device -o ${OUTPUT_DIR}/x${index}${lang}%n.$dsuffix \ + $options 2> test.error >| ${OUTPUT_DIR}/x${index}${lang}_${dsuffix}.txt << EOF +${OUTPUT_DIR}/x${index}a${lang}%n.$dsuffix +EOF + # Look for any status codes (segfaults, plexit) from the examples themselves. + status_code=$? + else $DEBUG_CMD $cdir/x${index}${lang} -dev $device -o ${OUTPUT_DIR}/x${index}${lang}%n.$dsuffix \ $options 2> test.error >| ${OUTPUT_DIR}/x${index}${lang}_${dsuffix}.txt - # Look for any status codes (segfaults, plexit) from the examples themselves. - status_code=$? + # Look for any status codes (segfaults, plexit) from the examples themselves. + status_code=$? + fi cat test.error if [ "$status_code" -ne 0 ]; then exit $status_code Modified: trunk/plplot_test/test_cxx.sh.in =================================================================== --- trunk/plplot_test/test_cxx.sh.in 2009-01-06 10:35:23 UTC (rev 9261) +++ trunk/plplot_test/test_cxx.sh.in 2009-01-06 15:18:53 UTC (rev 9262) @@ -36,14 +36,20 @@ $DEBUG_CMD $cxxdir/x01cc -dev $device -o ${OUTPUT_DIR}/x01cc%n.$dsuffix $options # Do the standard non-interactive examples. -# skip 14 because it requires two output files. # skip 17 because it is interactive. -for index in 01 02 03 04 05 06 07 08 09 10 11 12 13 15 16 18 19 20 21 22 23 24 25 26 27 28 29 30 31; do +for index in 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 18 19 20 21 22 23 24 25 26 27 28 29 30 31; do if [ "$verbose_test" ]; then echo "x${index}" fi - $DEBUG_CMD $cxxdir/x${index} -dev $device -o ${OUTPUT_DIR}/x${index}cxx%n.$dsuffix $options 2> test.error >| ${OUTPUT_DIR}/x${index}${lang}_${dsuffix}.txt - status_code=$? + if [ "$index" = "14" ] ; then + $DEBUG_CMD $cxxdir/x${index} -dev $device -o ${OUTPUT_DIR}/x${index}cxx%n.$dsuffix $options 2> test.error >| ${OUTPUT_DIR}/x${index}${lang}_${dsuffix}.txt << EOF +${OUTPUT_DIR}/x${index}acxx%n.$dsuffix +EOF + status_code=$? + else + $DEBUG_CMD $cxxdir/x${index} -dev $device -o ${OUTPUT_DIR}/x${index}cxx%n.$dsuffix $options 2> test.error >| ${OUTPUT_DIR}/x${index}${lang}_${dsuffix}.txt + status_code=$? + fi cat test.error if [ "$status_code" -ne 0 ]; then exit $status_code Modified: trunk/plplot_test/test_diff.sh.in =================================================================== --- trunk/plplot_test/test_diff.sh.in 2009-01-06 10:35:23 UTC (rev 9261) +++ trunk/plplot_test/test_diff.sh.in 2009-01-06 15:18:53 UTC (rev 9262) @@ -84,9 +84,8 @@ if [ -f x${xsuffix}01${suffix}.psc ] ; then # Standard non-interactive examples - # Skip example 14 because it requires two output files # Skip example 17 because it is interactive - for index in 01 02 03 04 05 06 07 08 09 10 11 12 13 15 16 18 19 20 \ + for index in 01 02 03 04 05 06 07 08 09 10 11 12 13 14 14a 15 16 18 19 20 \ 21 22 23 24 25 26 27 28 29 30 31 ; do if [ ! -f x${xsuffix}${index}c.psc ] ; then echo "C example ${index} is missing" @@ -100,13 +99,15 @@ if [ $? != 0 ] ; then different="${different} ${index}" fi - if [ -f x${xsuffix}${index}${suffix}_psc.txt ] ; then - @DIFF_EXECUTABLE@ -q x${xsuffix}${index}c_psc.txt x${xsuffix}${index}${suffix}_psc.txt 2>&1 > /dev/null - if [ $? != 0 ] ; then - diffstdout="${diffstdout} ${index}" + if [ "$index" != "14a" ] ; then + if [ -f x${xsuffix}${index}${suffix}_psc.txt ] ; then + @DIFF_EXECUTABLE@ -q x${xsuffix}${index}c_psc.txt x${xsuffix}${index}${suffix}_psc.txt 2>&1 > /dev/null + if [ $? != 0 ] ; then + diffstdout="${diffstdout} ${index}" + fi + else + missingstdout="${missingstdout} ${index}" fi - else - missingstdout="${missingstdout} ${index}" fi fi fi @@ -116,7 +117,7 @@ echo " Differing postscript output : ${different}" echo " Missing stdout : ${missingstdout}" echo " Differing stdout : ${diffstdout}" - if [ "${different}" != "" ] || [ "${diffstdout}" != "" ] ; then + if [ "${different}" != "" -o "${diffstdout}" != "" ] ; then ret=1 fi fi Modified: trunk/plplot_test/test_f77.sh.in =================================================================== --- trunk/plplot_test/test_f77.sh.in 2009-01-06 10:35:23 UTC (rev 9261) +++ trunk/plplot_test/test_f77.sh.in 2009-01-06 15:18:53 UTC (rev 9262) @@ -54,13 +54,20 @@ fi # Do the standard non-interactive examples. -# skip 14 and 17 because they are interactive. - for index in 01 02 03 04 05 06 07 08 09 10 11 12 13 15 16 18 19 20 21 22 23 24 25 26 27 28 29 30 31 ; do +# skip 17 because it is interactive. + for index in 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 18 19 20 21 22 23 24 25 26 27 28 29 30 31 ; do if [ "$verbose_test" ]; then echo "x${index}f" fi - $DEBUG_CMD $f77dir/x${index}f -dev $device -o ${OUTPUT_DIR}/x${index}f%n.$dsuffix $options 2> test.error >| ${OUTPUT_DIR}/x${index}${lang}_${dsuffix}.txt - status_code=$? + if [ "${index}" = "14" ] ; then + $DEBUG_CMD $f77dir/x${index}f -dev $device -o ${OUTPUT_DIR}/x${index}f%n.$dsuffix $options 2> test.error >| ${OUTPUT_DIR}/x${index}${lang}_${dsuffix}.txt << EOF +${OUTPUT_DIR}/x${index}af%n.$dsuffix +EOF + status_code=$? + else + $DEBUG_CMD $f77dir/x${index}f -dev $device -o ${OUTPUT_DIR}/x${index}f%n.$dsuffix $options 2> test.error >| ${OUTPUT_DIR}/x${index}${lang}_${dsuffix}.txt + status_code=$? + fi cat test.error if [ "$status_code" -ne 0 ]; then exit $status_code @@ -99,16 +106,26 @@ fi # Do the standard non-interactive examples. -# skip 14 and 17 because they are interactive. - for index in 01 02 03 04 05 06 07 08 09 10 11 12 13 15 16 18 19 20 21 22 23 24 25 26 27 28 29 30 31 ; do +# skip 17 because it is interactive. + for index in 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 18 19 20 21 22 23 24 25 26 27 28 29 30 31 ; do if [ "$verbose_test" ]; then echo "x${index}f" fi + if [ "$index" = "14" ] ; then $DEBUG_CMD $f77dir/x${index}f <<EOF 2> test.error >| ${OUTPUT_DIR}/x${index}${lang}_${dsuffix}.txt $device ${OUTPUT_DIR}/x${index}f%n.$dsuffix +$device +${OUTPUT_DIR}/x${index}af%n.$dsuffix EOF - status_code=$? + status_code=$? + else + $DEBUG_CMD $f77dir/x${index}f <<EOF 2> test.error >| ${OUTPUT_DIR}/x${index}${lang}_${dsuffix}.txt +$device +${OUTPUT_DIR}/x${index}f%n.$dsuffix +EOF + status_code=$? + fi cat test.error if [ "$status_code" -ne 0 ]; then exit $status_code Modified: trunk/plplot_test/test_f95.sh.in =================================================================== --- trunk/plplot_test/test_f95.sh.in 2009-01-06 10:35:23 UTC (rev 9261) +++ trunk/plplot_test/test_f95.sh.in 2009-01-06 15:18:53 UTC (rev 9262) @@ -55,13 +55,20 @@ # Do the standard non-interactive examples. -# skip 14 and 17 because they are interactive. - for index in 01 02 03 04 05 06 07 08 09 10 11 12 13 15 16 18 19 20 21 22 23 24 25 26 27 28 29 30 31; do +# skip 17 because it is interactive. + for index in 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 18 19 20 21 22 23 24 25 26 27 28 29 30 31; do if [ "$verbose_test" ]; then echo "x${index}f" fi - $DEBUG_CMD $f95dir/x${index}f -dev $device -o ${OUTPUT_DIR}/x${index}f95%n.$dsuffix $options 2> test.error >| ${OUTPUT_DIR}/x${index}${lang}_${dsuffix}.txt - status_code=$? + if [ "${index}" = "14" ] ; then + $DEBUG_CMD $f95dir/x${index}f -dev $device -o ${OUTPUT_DIR}/x${index}f95%n.$dsuffix $options 2> test.error >| ${OUTPUT_DIR}/x${index}${lang}_${dsuffix}.txt << EOF +${OUTPUT_DIR}/x${index}af95%n.$dsuffix +EOF + status_code=$? + else + $DEBUG_CMD $f95dir/x${index}f -dev $device -o ${OUTPUT_DIR}/x${index}f95%n.$dsuffix $options 2> test.error >| ${OUTPUT_DIR}/x${index}${lang}_${dsuffix}.txt + status_code=$? + fi cat test.error if [ "$status_code" -ne 0 ]; then exit $status_code @@ -100,16 +107,26 @@ # Do the standard non-interactive examples. -# skip 14 and 17 because they are interactive. - for index in 01 02 03 04 05 06 07 08 09 10 11 12 13 15 16 18 19 20 21 22 23 24 25 26 27 28 29 30 31; do +# skip 17 because it is interactive. + for index in 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 18 19 20 21 22 23 24 25 26 27 28 29 30 31; do if [ "$verbose_test" ]; then echo "x${index}f" fi + if [ "${index}" = "14" ] ; then $DEBUG_CMD $f95dir/x${index}f <<EOF 2> test.error >| ${OUTPUT_DIR}/x${index}${lang}_${dsuffix}.txt $device ${OUTPUT_DIR}/x${index}f95%n.$dsuffix +$device +${OUTPUT_DIR}/x${index}af95%n.$dsuffix EOF - status_code=$? + status_code=$? + else + $DEBUG_CMD $f95dir/x${index}f <<EOF 2> test.error >| ${OUTPUT_DIR}/x${index}${lang}_${dsuffix}.txt +$device +${OUTPUT_DIR}/x${index}f95%n.$dsuffix +EOF + status_code=$? + fi cat test.error if [ "$status_code" -ne 0 ]; then exit $status_code Modified: trunk/plplot_test/test_java.sh.in =================================================================== --- trunk/plplot_test/test_java.sh.in 2009-01-06 10:35:23 UTC (rev 9261) +++ trunk/plplot_test/test_java.sh.in 2009-01-06 15:18:53 UTC (rev 9262) @@ -31,9 +31,8 @@ # pushd $javadir; make; popd # Do the standard non-interactive examples. -# skip 14 because it requires two output files. -# skip 19 because it is not implemented -# skip 17 because it is interactive and not implemented. +# skip 19 because it is not implemented. +# skip 17 because it is interactive. # # Set up option to point to java bindings jar file and wrapper if needed. lang="j" @@ -43,17 +42,23 @@ if test -z "$PLPLOT_CLASSPATH" ; then PLPLOT_CLASSPATH=@JAVADATA_HARDDIR@/plplot.jar fi +if test "@WIN32@" != "1" ; then + PLPLOT_CLASSPATH=${javadir}:${PLPLOT_CLASSPATH} +fi -for index in 01 02 03 04 05 06 07 08 09 10 11 12 13 15 16 18 20 21 22 23 24 25 26 27 28 29 30 31 ; do +for index in 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 18 20 21 22 23 24 25 26 27 28 29 30 31 ; do if [ "$verbose_test" ]; then echo "x${index}" fi - if test "@WIN32@" = "1"; then + if [ "$index" = "14" ] ; then + java -classpath ${PLPLOT_CLASSPATH} ${JAVA_TEST_OPTS} plplot.examples.x${index} -dev $device -o ${OUTPUT_DIR}/x${index}${lang}%n.$dsuffix $options 2> test.error >| ${OUTPUT_DIR}/x${index}${lang}_${dsuffix}.txt << EOF +${OUTPUT_DIR}/x${index}a${lang}%n.$dsuffix +EOF + status_code=$? + else java -classpath ${PLPLOT_CLASSPATH} ${JAVA_TEST_OPTS} plplot.examples.x${index} -dev $device -o ${OUTPUT_DIR}/x${index}${lang}%n.$dsuffix $options 2> test.error >| ${OUTPUT_DIR}/x${index}${lang}_${dsuffix}.txt - else - java -classpath ${javadir}:${PLPLOT_CLASSPATH} ${JAVA_TEST_OPTS} plplot.examples.x${index} -dev $device -o ${OUTPUT_DIR}/x${index}${lang}%n.$dsuffix $options 2> test.error >| ${OUTPUT_DIR}/x${index}${lang}_${dsuffix}.txt + status_code=$? fi - status_code=$? cat test.error if [ "$status_code" -ne 0 ]; then exit $status_code Modified: trunk/plplot_test/test_ocaml.sh.in =================================================================== --- trunk/plplot_test/test_ocaml.sh.in 2009-01-06 10:35:23 UTC (rev 9261) +++ trunk/plplot_test/test_ocaml.sh.in 2009-01-06 15:18:53 UTC (rev 9262) @@ -24,14 +24,23 @@ # Do the standard non-interactive examples. lang="ocaml" -for index in 01 02 03 04 05 06 07 08 09 10 11 12 13 15 16 18 19 20 21 22 23 24 25 26 27 28 29 30 31; do +for index in 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 18 19 20 21 22 23 24 25 26 27 28 29 30 31; do if [ "$verbose_test" ]; then echo "x${index}ocaml" fi - $ocamldir/x${index}ocaml -dev $device -o ${OUTPUT_DIR}/x${index}${lang}%n.$dsuffix \ - $options 2> test.error >| ${OUTPUT_DIR}/x${index}${lang}_${dsuffix}.txt - # Look for any status codes (segfaults, plexit) from the examples themselves. - status_code=$? + if [ "$index" = "14" ] ; then + $ocamldir/x${index}ocaml -dev $device -o ${OUTPUT_DIR}/x${index}${lang}%n.$dsuffix \ + $options 2> test.error >| ${OUTPUT_DIR}/x${index}${lang}_${dsuffix}.txt << EOF +${OUTPUT_DIR}/x${index}a${lang}%n.$dsuffix +EOF + # Look for any status codes (segfaults, plexit) from the examples themselves. + status_code=$? + else + $ocamldir/x${index}ocaml -dev $device -o ${OUTPUT_DIR}/x${index}${lang}%n.$dsuffix \ + $options 2> test.error >| ${OUTPUT_DIR}/x${index}${lang}_${dsuffix}.txt + # Look for any status codes (segfaults, plexit) from the examples themselves. + status_code=$? + fi cat test.error if [ "$status_code" -ne 0 ]; then exit $status_code Modified: trunk/plplot_test/test_octave.sh.in =================================================================== --- trunk/plplot_test/test_octave.sh.in 2009-01-06 10:35:23 UTC (rev 9261) +++ trunk/plplot_test/test_octave.sh.in 2009-01-06 15:18:53 UTC (rev 9262) @@ -71,14 +71,14 @@ closefig endfor #plot equivalent of x??c examples. These only required octave-2.0.x -#For file output 14 and 17 are not suitable, and 19 is not done +#For file output 17 is not suitable, and 19 is not done #(and should probably be dropped anyway since the map stuff is not #in the API that is supposed to be common to all front ends.) failed = []; -for i=[1:13 15 16 18 20:31 ]; +for i=[1:16 18 20:31 ]; ofile = sprintf("${OUTPUT_DIR}/x%.2d${lang}_${dsuffix}.txt",i); strm = fopen(ofile,"w"); - cmd = sprintf("x%.2dc",i); + cmd = sprintf("x%.2dc",i); if (verbose_test) printf("%s\n",cmd); endif @@ -95,8 +95,12 @@ #common examples. file = sprintf("${OUTPUT_DIR}/x%.2d${lang}%%n.$dsuffix",i); plSetOpt("o", file); + if i == 14 + file2 = sprintf("${OUTPUT_DIR}/x%.2da${lang}.${dsuffix}",i); + endif eval(cmd, "failed = [failed, i];"); fclose(strm); + clear file2; endfor if ! isempty (failed) printf ("Failed tests: "); Modified: trunk/plplot_test/test_perl.sh.in =================================================================== --- trunk/plplot_test/test_perl.sh.in 2009-01-06 10:35:23 UTC (rev 9261) +++ trunk/plplot_test/test_perl.sh.in 2009-01-06 15:18:53 UTC (rev 9262) @@ -26,7 +26,6 @@ # pushd $cdir; make; popd # Do the standard non-interactive examples. -# skip 14 because it requires two output files. # skip 17 because it is interactive. # Ensure correct version of the libraries are picked up in both the build @@ -39,19 +38,26 @@ fi if [ "@HAVE_PDL_GRAPHICS_PLPLOT_40@" = "ON" ] ; then - INDEX_LIST="01 02 03 04 05 06 07 08 09 10 11 12 13 15 16 18 19 20 21 22 23 24 25 26 27 28 29 30 31" + INDEX_LIST="01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 18 19 20 21 22 23 24 25 26 27 28 29 30 31" else # Examples 02, 20, 21, 23, 24, 28, 29, and 30 require PDL::Graphics::PLplot # version 0.46 or later. - INDEX_LIST="01 03 04 05 06 07 08 09 10 11 12 13 15 16 18 19 22 25 26 27" + INDEX_LIST="01 03 04 05 06 07 08 09 10 11 12 13 14 15 16 18 19 22 25 26 27" fi for index in $INDEX_LIST ; do if [ "$verbose_test" ]; then echo "x${index}.pl" fi - $perldir/x${index}.pl -dev $device -o ${OUTPUT_DIR}/x${index}${lang}%n.$dsuffix $options 2> test.error >| ${OUTPUT_DIR}/x${index}${lang}_${dsuffix}.txt - status_code=$? + if [ "$index" = "14" ] ; then + $perldir/x${index}.pl -dev $device -o ${OUTPUT_DIR}/x${index}${lang}%n.$dsuffix $options 2> test.error >| ${OUTPUT_DIR}/x${index}${lang}_${dsuffix}.txt << EOF +${OUTPUT_DIR}/x${index}a${lang}%n.$dsuffix +EOF + status_code=$? + else + $perldir/x${index}.pl -dev $device -o ${OUTPUT_DIR}/x${index}${lang}%n.$dsuffix $options 2> test.error >| ${OUTPUT_DIR}/x${index}${lang}_${dsuffix}.txt + status_code=$? + fi cat test.error if [ "$status_code" -ne 0 ]; then exit $status_code Modified: trunk/plplot_test/test_python.sh.in =================================================================== --- trunk/plplot_test/test_python.sh.in 2009-01-06 10:35:23 UTC (rev 9261) +++ trunk/plplot_test/test_python.sh.in 2009-01-06 15:18:53 UTC (rev 9262) @@ -26,19 +26,25 @@ # $pythondir must be the build tree and not the source tree (if separate from # build tree) since must access plplot_python_start.py in build tree and # paths in that file are relative to build tree. -# Skip 14 and 17 because they are interactive. +# Skip 17 because it is interactive and not currently implemented. # Skip 19 because it is just a placeholder without a real implementation. -# Skip 20 because it is not (yet) implemented. # Skip 21 if using Numeric - it doesn't work # For 24 you need special fonts installed to get good result. lang="p" -for index in 01 02 03 04 05 06 07 08 09 10 11 12 13 15 16 18 \ +for index in 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 18 \ 20 22 23 24 25 26 27 28 29 30 31 @NUMPY_EXAMPLES@ ; do if [ "$verbose_test" ]; then echo "x${index}" fi - @PYTHON_EXECUTABLE@ $pythondir/x$index -dev $device -o ${OUTPUT_DIR}/x${index}${lang}%n.$dsuffix $options 2> test.error >| ${OUTPUT_DIR}/x${index}${lang}_${dsuffix}.txt - status_code=$? + if [ "$index" = "14" ] ; then + @PYTHON_EXECUTABLE@ $pythondir/x$index -dev $device -o ${OUTPUT_DIR}/x${index}${lang}%n.$dsuffix $options 2> test.error >| ${OUTPUT_DIR}/x${index}${lang}_${dsuffix}.txt << EOF +${OUTPUT_DIR}/x${index}a${lang}%n.$dsuffix +EOF + status_code=$? + else + @PYTHON_EXECUTABLE@ $pythondir/x$index -dev $device -o ${OUTPUT_DIR}/x${index}${lang}%n.$dsuffix $options 2> test.error >| ${OUTPUT_DIR}/x${index}${lang}_${dsuffix}.txt + status_code=$? + fi cat test.error if [ "$status_code" -ne 0 ]; then exit $status_code Modified: trunk/plplot_test/test_tcl.sh.in =================================================================== --- trunk/plplot_test/test_tcl.sh.in 2009-01-06 10:35:23 UTC (rev 9261) +++ trunk/plplot_test/test_tcl.sh.in 2009-01-06 15:18:53 UTC (rev 9262) @@ -71,16 +71,22 @@ if test -n "$is_error"; then exit 1 fi -# Skip 14th example because requires two output files. # Skip 17th example because it is not implemented (and if it was, it # would be interactive only). # Other examples are not yet implemented. -for index in 01 02 03 04 05 06 07 08 09 10 11 12 13 15 16 18 20 21 22 23 24 25 26 27 28 29 30 31; do +for index in 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 18 20 21 22 23 24 25 26 27 28 29 30 31; do if [ "$verbose_test" ]; then echo "x${index}" fi - ./x${index} -dev $device -o $results/x${index}${lang}%n.$dsuffix $options 2> test.error >| ${results}/x${index}${lang}_${dsuffix}.txt - status_code=$? + if [ "$index" = "14" ] ; then + ./x${index} -dev $device -o $results/x${index}${lang}%n.$dsuffix $options 2> test.error >| ${results}/x${index}${lang}_${dsuffix}.txt << EOF +${results}/x${index}a${lang}%n.$dsuffix +EOF + status_code=$? + else + ./x${index} -dev $device -o $results/x${index}${lang}%n.$dsuffix $options 2> test.error >| ${results}/x${index}${lang}_${dsuffix}.txt + status_code=$? + fi cat test.error if [ "$status_code" -ne 0 ]; then exit $status_code This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <and...@us...> - 2009-01-07 12:13:15
|
Revision: 9271 http://plplot.svn.sourceforge.net/plplot/?rev=9271&view=rev Author: andrewross Date: 2009-01-07 12:13:11 +0000 (Wed, 07 Jan 2009) Log Message: ----------- Fix xfig driver so it is safe to use with multiple streams. Example 14 now works again with the xfig driver. Re-enable xfig driver by default. Modified Paths: -------------- trunk/cmake/modules/drivers-init.cmake trunk/drivers/xfig.c Modified: trunk/cmake/modules/drivers-init.cmake =================================================================== --- trunk/cmake/modules/drivers-init.cmake 2009-01-07 09:23:31 UTC (rev 9270) +++ trunk/cmake/modules/drivers-init.cmake 2009-01-07 12:13:11 UTC (rev 9271) @@ -128,7 +128,7 @@ "wingcc:wingcc:ON" "wxwidgets:wxwidgets:ON" "wxpng:wxwidgets:OFF" -"xfig:xfig:OFF" +"xfig:xfig:ON" "xwin:xwin:ON" ) Modified: trunk/drivers/xfig.c =================================================================== --- trunk/drivers/xfig.c 2009-01-07 09:23:31 UTC (rev 9270) +++ trunk/drivers/xfig.c 2009-01-07 12:13:11 UTC (rev 9271) @@ -12,6 +12,25 @@ /* Device info */ PLDLLIMPEXP_DRIVER const char* plD_DEVICE_INFO_xfig = "xfig:Fig file:0:xfig:31:xfig"; +typedef struct { + PLINT xold, yold; + + PLINT xmin, xmax; + PLINT ymin, ymax; + + PLFLT xscale_dev, yscale_dev; + + int *buffptr, bufflen; + int count; + int curwid; + int curcol; + int firstline; + long cmap0_pos, cmap1_pos; + int cmap0_ncol, cmap1_ncol; + int offset, offset_inc; + +} xfig_Dev; + /* Function prototypes */ void plD_dispatch_init_xfig ( PLDispatchTable *pdt ); @@ -41,14 +60,6 @@ #define XFIG_COLBASE 33 /* xfig first user color, plplot colormap0[0], the background color */ -static int *buffptr, bufflen; -static int count; -static int curwid = 1; -static int curcol = 1; -static int firstline = 1; -static long cmap0_pos, cmap1_pos; -static int cmap0_ncol, cmap1_ncol; -static int offset, offset_inc; static void stcmap0(PLStream *); static void stcmap1(PLStream *); @@ -86,7 +97,7 @@ void plD_init_xfig(PLStream *pls) { - PLDev *dev; + xfig_Dev *dev; plParseDrvOpts(xfig_options); if (text) @@ -102,8 +113,19 @@ /* Allocate and initialize device-specific data */ - dev = plAllocDev(pls); + if (pls->dev != NULL) + free((void *) pls->dev); + pls->dev = calloc(1, (size_t) sizeof(xfig_Dev)); + + if (pls->dev == NULL) + plexit("plD_init_xfig: cannot allocate memory\n"); + + dev = (xfig_Dev *) pls->dev; + + dev->curwid = pls->width < 1 ? 1: pls->width; + dev->firstline = 1; + dev->xold = PL_UNDEFINED; dev->yold = PL_UNDEFINED; dev->xmin = 0; @@ -112,8 +134,8 @@ dev->ymax = FIGY; dev->xscale_dev = DPI/25.4; dev->yscale_dev = DPI/25.4; - offset_inc = dev->ymax * (PLINT)dev->yscale_dev; - offset = - offset_inc; + dev->offset_inc = dev->ymax * (PLINT)dev->yscale_dev; + dev->offset = - dev->offset_inc; pls->dev_fill0 = 1; /* Handle solid fills */ if (!pls->colorset) pls->color = 1; /* Is a color device */ @@ -134,33 +156,36 @@ fprintf(pls->OutFile, "%d 2\n", DPI); /* user defined colors, for colormap0 */ - cmap0_ncol = 2 * pls->ncol0; /* allow for a maximum of 2x the default cmap0 entries */ - cmap0_pos = ftell(pls->OutFile); + dev->cmap0_ncol = 2 * pls->ncol0; /* allow for a maximum of 2x the default cmap0 entries */ + dev->cmap0_pos = ftell(pls->OutFile); stcmap0(pls); /* user defined colors, for colormap1 */ - cmap1_ncol = 2 * pls->ncol1; /* allow for a maximum of 2x the default cmap1 entries */ - cmap1_pos = ftell(pls->OutFile); + dev->cmap1_ncol = 2 * pls->ncol1; /* allow for a maximum of 2x the default cmap1 entries */ + dev->cmap1_pos = ftell(pls->OutFile); stcmap1(pls); - bufflen = 2 * BSIZE; - buffptr = (int *) malloc(sizeof(int) * bufflen); - if (buffptr == NULL) + dev->bufflen = 2 * BSIZE; + dev->buffptr = (int *) malloc(sizeof(int) * dev->bufflen); + if (dev->buffptr == NULL) plexit("plD_init_xfig: Out of memory!"); } void stcmap0(PLStream *pls) { + xfig_Dev *dev; long cur_pos; int i; - if (pls->ncol0 > cmap0_ncol) - plwarn("Too much colors for cmap0. Preallocate using command line '-ncol0 n.\n'"); + dev = (xfig_Dev *) pls->dev; + if (pls->ncol0 > dev->cmap0_ncol) + plwarn("Too many colors for cmap0. Preallocate using command line '-ncol0 n.\n'"); + cur_pos = ftell(pls->OutFile); - if (fseek(pls->OutFile, cmap0_pos, SEEK_SET)) + if (fseek(pls->OutFile, dev->cmap0_pos, SEEK_SET)) plexit("Sorry, only file based output, no pipes.\n"); /* fill the colormap */ @@ -169,37 +194,40 @@ pls->cmap0[i].r, pls->cmap0[i].g, pls->cmap0[i].b); /* fill the nonspecified entries colormap */ - for (i=pls->ncol0; i<cmap0_ncol; i++) + for (i=pls->ncol0; i<dev->cmap0_ncol; i++) fprintf(pls->OutFile,"0 %d #000000\n", i+XFIG_COLBASE); - if (cur_pos != cmap0_pos) + if (cur_pos != dev->cmap0_pos) fseek(pls->OutFile, cur_pos, SEEK_SET); } void stcmap1(PLStream *pls) { + xfig_Dev *dev; long cur_pos; int i; - if (pls->ncol1 > cmap1_ncol) - plwarn("Too much colors for cmap1. Preallocate using command line '-ncol1 n.\n'"); + dev = (xfig_Dev *) pls->dev; + if (pls->ncol1 > dev->cmap1_ncol) + plwarn("Too many colors for cmap1. Preallocate using command line '-ncol1 n.\n'"); + cur_pos = ftell(pls->OutFile); - if (fseek(pls->OutFile, cmap1_pos, SEEK_SET)) + if (fseek(pls->OutFile, dev->cmap1_pos, SEEK_SET)) plexit("Sorry, only file based output, no pipes.\n"); /* fill the colormap */ for (i=0; i<pls->ncol1; i++) - fprintf(pls->OutFile,"0 %d #%.2x%.2x%.2x\n", i+XFIG_COLBASE+cmap0_ncol, + fprintf(pls->OutFile,"0 %d #%.2x%.2x%.2x\n", i+XFIG_COLBASE+dev->cmap0_ncol, pls->cmap1[i].r, pls->cmap1[i].g, pls->cmap1[i].b); /* fill the nonspecified entries colormap */ - for (i=pls->ncol1; i<cmap1_ncol; i++) - fprintf(pls->OutFile,"0 %d #000000\n", i+XFIG_COLBASE+cmap0_ncol); + for (i=pls->ncol1; i<dev->cmap1_ncol; i++) + fprintf(pls->OutFile,"0 %d #000000\n", i+XFIG_COLBASE+dev->cmap0_ncol); - if (cur_pos != cmap1_pos) + if (cur_pos != dev->cmap1_pos) fseek(pls->OutFile, cur_pos, SEEK_SET); } @@ -212,43 +240,47 @@ void plD_line_xfig(PLStream *pls, short x1a, short y1a, short x2a, short y2a) { - PLDev *dev = (PLDev *) pls->dev; + xfig_Dev *dev = (xfig_Dev *) pls->dev; int x1 = x1a, y1 = y1a, x2 = x2a, y2 = y2a; int *tempptr; + int count; /* If starting point of this line is the same as the ending point of */ /* the previous line then don't raise the pen. (This really speeds up */ /* plotting and reduces the size of the file. */ - if (firstline) { + if (dev->firstline) { count = 0; - *(buffptr + count++) = x1; - *(buffptr + count++) = y1; - *(buffptr + count++) = x2; - *(buffptr + count++) = y2; - firstline = 0; + *(dev->buffptr + count++) = x1; + *(dev->buffptr + count++) = y1; + *(dev->buffptr + count++) = x2; + *(dev->buffptr + count++) = y2; + dev->firstline = 0; } else if (x1 == dev->xold && y1 == dev->yold) { - if (count + 2 >= bufflen) { - bufflen += 2 * BSIZE; + count = dev->count; + if (count + 2 >= dev->bufflen) { + dev->bufflen += 2 * BSIZE; tempptr = (int *) - realloc((void *) buffptr, bufflen * sizeof(int)); + realloc((void *) dev->buffptr, dev->bufflen * sizeof(int)); if (tempptr == NULL) { - free((void *) buffptr); + free((void *) dev->buffptr); plexit("plD_line_xfig: Out of memory!"); } - buffptr = tempptr; + dev->buffptr = tempptr; } - *(buffptr + count++) = x2; - *(buffptr + count++) = y2; + *(dev->buffptr + count++) = x2; + *(dev->buffptr + count++) = y2; } else { flushbuffer(pls); - *(buffptr + count++) = x1; - *(buffptr + count++) = y1; - *(buffptr + count++) = x2; - *(buffptr + count++) = y2; + count = dev->count; + *(dev->buffptr + count++) = x1; + *(dev->buffptr + count++) = y1; + *(dev->buffptr + count++) = x2; + *(dev->buffptr + count++) = y2; } + dev->count = count; dev->xold = x2; dev->yold = y2; } @@ -277,7 +309,10 @@ void plD_eop_xfig(PLStream *pls) { - if (!firstline) + + xfig_Dev *dev = (xfig_Dev *) pls->dev; + + if (!dev->firstline) flushbuffer(pls); } @@ -291,30 +326,32 @@ void plD_bop_xfig(PLStream *pls) { - PLDev *dev = (PLDev *) pls->dev; + xfig_Dev *dev; + if (!pls->termin) + plGetFam(pls); + + dev = (xfig_Dev *) pls->dev; + dev->xold = PL_UNDEFINED; dev->yold = PL_UNDEFINED; - firstline = 1; + dev->firstline = 1; - if (!pls->termin) - plGetFam(pls); - pls->famadv = 1; pls->page++; - offset += offset_inc; + dev->offset += dev->offset_inc; flushbuffer(pls); /* create background FIXME -- sync with orientation in header and pls->diorot */ - curcol = XFIG_COLBASE; /* colormap entry 0, background */ - fprintf(pls->OutFile, "2 1 0 1 %d %d 50 0 20 0.0 0 0 -1 0 0 5\n", curcol, curcol ); + dev->curcol = XFIG_COLBASE; /* colormap entry 0, background */ + fprintf(pls->OutFile, "2 1 0 1 %d %d 50 0 20 0.0 0 0 -1 0 0 5\n", dev->curcol, dev->curcol ); fprintf(pls->OutFile, "%d %d %d %d %d %d %d %d %d %d\n", - 0, offset, - 0, (int) (FIGY * dev->yscale_dev) + offset, - (int) (FIGX * dev->xscale_dev), (int) (FIGY * dev->yscale_dev) + offset, - (int) (FIGX * dev->xscale_dev), offset, - 0, offset); + 0, dev->offset, + 0, (int) (FIGY * dev->yscale_dev) + dev->offset, + (int) (FIGX * dev->xscale_dev), (int) (FIGY * dev->yscale_dev) + dev->offset, + (int) (FIGX * dev->xscale_dev), dev->offset, + 0, dev->offset); } @@ -327,8 +364,10 @@ void plD_tidy_xfig(PLStream *pls) { + xfig_Dev *dev = (xfig_Dev *) pls->dev; + flushbuffer(pls); - free((void *) buffptr); + free((void *) dev->buffptr); fclose(pls->OutFile); } @@ -341,22 +380,24 @@ void plD_state_xfig(PLStream *pls, PLINT op) { + xfig_Dev *dev = (xfig_Dev *) pls->dev; + switch (op) { case PLSTATE_WIDTH: flushbuffer(pls); - firstline = 1; - curwid = pls->width < 1 ? 1: pls->width; + dev->firstline = 1; + dev->curwid = pls->width < 1 ? 1: pls->width; break; case PLSTATE_COLOR0: flushbuffer(pls); - curcol = pls->icol0 + XFIG_COLBASE; + dev->curcol = pls->icol0 + XFIG_COLBASE; break; case PLSTATE_COLOR1: flushbuffer(pls); - curcol = pls->icol1 + XFIG_COLBASE + pls->ncol0; + dev->curcol = pls->icol1 + XFIG_COLBASE + pls->ncol0; break; case PLSTATE_CMAP0: @@ -380,7 +421,7 @@ void plD_esc_xfig(PLStream *pls, PLINT op, void *ptr) { - PLDev *dev = pls->dev; + xfig_Dev *dev = pls->dev; int i, npts; switch (op) { @@ -392,11 +433,11 @@ flushbuffer(pls); fprintf(pls->OutFile, "2 1 0 1 %d %d 50 0 20 0.0 0 0 0 0 0 %d\n", - curcol, curcol, npts); + dev->curcol, dev->curcol, npts); for (i = 0; i < npts; i++) fprintf(pls->OutFile,"%d %d ", pls->dev_x[i], - offset + dev->ymax * (int)dev->xscale_dev - pls->dev_y[i]); + dev->offset + dev->ymax * (int)dev->xscale_dev - pls->dev_y[i]); fprintf(pls->OutFile, "\n"); break; @@ -414,21 +455,21 @@ static void flushbuffer(PLStream *pls) { - PLDev *dev = pls->dev; + xfig_Dev *dev = pls->dev; int i = 0; - if (count == 0) + if (dev->count == 0) return; fprintf(pls->OutFile, "2 1 0 %d %d 0 50 0 -1 0.0 0 0 0 0 0 %d\n", - curwid, curcol, count/2); - while (i < count) { - fprintf(pls->OutFile, "%d %d ", *(buffptr + i), - offset + dev->ymax * (int)dev->yscale_dev - *(buffptr + i + 1)); + dev->curwid, dev->curcol, dev->count/2); + while (i < dev->count) { + fprintf(pls->OutFile, "%d %d ", *(dev->buffptr + i), + dev->offset + dev->ymax * (int)dev->yscale_dev - *(dev->buffptr + i + 1)); i += 2; } fprintf(pls->OutFile, "\n"); - count = 0; + dev->count = 0; } void @@ -436,7 +477,7 @@ { PLFLT *t = args->xform; PLFLT a1, alpha, ft_ht, angle, ref; - PLDev *dev = (PLDev *) pls->dev; + xfig_Dev *dev = (xfig_Dev *) pls->dev; PLINT clxmin, clxmax, clymin, clymax; int jst, font; @@ -500,7 +541,7 @@ ref = DPI/72. * ft_ht / 2.; /* rotate point in xfig is lower left corner, compensate */ - args->y = offset + dev->ymax * (int)dev->xscale_dev - (args->y - ref*cos(alpha)); + args->y = dev->offset + dev->ymax * (int)dev->xscale_dev - (args->y - ref*cos(alpha)); args->x = args->x + ref*sin(alpha); /* @@ -522,7 +563,7 @@ } fprintf(pls->OutFile,"4 %d %d 50 0 %d %f %f 4 1 1 %d %d %s\\001\n", - jst, curcol, font, 1.8 /*!*/ * ft_ht, alpha, args->x, args->y, args->string); + jst, dev->curcol, font, 1.8 /*!*/ * ft_ht, alpha, args->x, args->y, args->string); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <and...@us...> - 2009-01-07 15:15:05
|
Revision: 9272 http://plplot.svn.sourceforge.net/plplot/?rev=9272&view=rev Author: andrewross Date: 2009-01-07 15:14:56 +0000 (Wed, 07 Jan 2009) Log Message: ----------- Add example 17 to the standard test suite. Update implementations of example 17 so that this works consistently. Tcl and ocaml are currently missing an implementation of example 17. For ada the legend labels on plstripa are not correctly displayed. Modified Paths: -------------- trunk/bindings/octave/demos/x17c.m trunk/examples/ada/x17a.adb.cmake trunk/examples/ada/xthick17a.adb.cmake trunk/examples/c/x17c.c trunk/examples/c++/x17.cc trunk/examples/f77/x17f.fm4 trunk/examples/f95/x17f.f90 trunk/examples/java/x17.java trunk/examples/perl/x17.pl trunk/examples/python/xw17.py trunk/plplot_test/test_ada.sh.in trunk/plplot_test/test_c.sh.in trunk/plplot_test/test_cxx.sh.in trunk/plplot_test/test_diff.sh.in trunk/plplot_test/test_f77.sh.in trunk/plplot_test/test_f95.sh.in trunk/plplot_test/test_java.sh.in trunk/plplot_test/test_octave.sh.in trunk/plplot_test/test_perl.sh.in trunk/plplot_test/test_python.sh.in Modified: trunk/bindings/octave/demos/x17c.m =================================================================== --- trunk/bindings/octave/demos/x17c.m 2009-01-07 12:13:11 UTC (rev 9271) +++ trunk/bindings/octave/demos/x17c.m 2009-01-07 15:14:56 UTC (rev 9272) @@ -24,17 +24,19 @@ plsdev("xwin"); endif + nsteps = 1000; + ## If db is used the plot is much more smooth. However, because of the ## async X behaviour, one does not have a real-time scripcharter. ## plSetOpt("db", ""); - plSetOpt("np", ""); + ## plSetOpt("np", ""); ## Specify some reasonable defaults for ymin and ymax */ ## The plot will grow automatically if needed (but not shrink) */ - ymin = -1.0; - ymax = 1.0; + ymin = -0.1; + ymax = 0.1; ## Specify initial tmin and tmax -- this determines length of window. */ ## Also specify maximum jump in t */ @@ -60,7 +62,7 @@ xlab = 0.; ylab = 0.25; ## legend position - autoy = 0; ## autoscale y + autoy = 1; ## autoscale y acc = 1; ## dont strip, accumulate ## Initialize plplot */ @@ -73,21 +75,24 @@ autoy, acc, colbox, collab, colline', styline', "sum", "sin", "sin*noi", "sin+noi", - "t", "pois", "Strip chart demo"); + "t", "", "Strip chart demo"); + autoy = 0; + acc = 1; + ## This is to represent a loop over time */ ## Let's try a random walk process */ y1 = y2 = y3 = y4 = 0.0; dt = 0.1; - for n = 0:1000 + for n = 0:nsteps-1 t = n * dt; - noise = randn/2; + noise = plrandd()-0.5; y1 = y1 + noise; y2 = sin(t*pi/18.); y3 = y2 * noise; - y4 = y2 + noise; + y4 = y2 + noise/3.; ## there is no need for all pens to have the same number of points ## or beeing equally time spaced. Modified: trunk/examples/ada/x17a.adb.cmake =================================================================== --- trunk/examples/ada/x17a.adb.cmake 2009-01-07 12:13:11 UTC (rev 9271) +++ trunk/examples/ada/x17a.adb.cmake 2009-01-07 15:14:56 UTC (rev 9272) @@ -25,7 +25,6 @@ Ada.Strings.Unbounded, Ada.Numerics, Ada.Numerics.Long_Elementary_Functions, - Ada.Numerics.Float_Random, PLplot_Auxiliary, PLplot_Traditional; use @@ -33,7 +32,6 @@ Ada.Strings.Unbounded, Ada.Numerics, Ada.Numerics.Long_Elementary_Functions, - Ada.Numerics.Float_Random, PLplot_Auxiliary, PLplot_Traditional; @@ -56,7 +54,6 @@ To_Unbounded_String("sin"), To_Unbounded_String("sin*noi"), To_Unbounded_String("sin+noi")); - Random_Generator : Generator; -- From Ada.Numerics.Float_Random begin -- plplot initialization -- Parse and process command line arguments @@ -64,8 +61,8 @@ -- If db is used the plot is much more smooth. However, because of the -- async X behaviour, one does not have a real-time scripcharter. - plsetopt("db", ""); - plsetopt("np", ""); + -- plsetopt("db", ""); + -- plsetopt("np", ""); -- User sets up plot completely except for window and data -- Eventually settings in place when strip chart is created will be @@ -156,7 +153,7 @@ -- the delay to 0.02. delay 0.01; -- wait a little (10 ms) to simulate time elapsing t := Long_Float(n) * dt; - noise := Long_Float(Random(Random_Generator)) - 0.5; + noise := plrandd - 0.5; y1 := y1 + noise; y2 := sin(t * pi / 18.0); y3 := y2 * noise; @@ -179,7 +176,7 @@ if n mod 5 /= 0 then plstripa(id1, 3, t, y4); end if; - pleop; -- use double buffer (-db on command line) + -- pleop; -- use double buffer (-db on command line) end loop; -- Destroy strip chart and its memory Modified: trunk/examples/ada/xthick17a.adb.cmake =================================================================== --- trunk/examples/ada/xthick17a.adb.cmake 2009-01-07 12:13:11 UTC (rev 9271) +++ trunk/examples/ada/xthick17a.adb.cmake 2009-01-07 15:14:56 UTC (rev 9272) @@ -25,7 +25,6 @@ Ada.Strings.Unbounded, Ada.Numerics, Ada.Numerics.Long_Elementary_Functions, - Ada.Numerics.Float_Random, PLplot_Auxiliary, PLplot; use @@ -33,7 +32,6 @@ Ada.Strings.Unbounded, Ada.Numerics, Ada.Numerics.Long_Elementary_Functions, - Ada.Numerics.Float_Random, PLplot_Auxiliary, PLplot; @@ -56,7 +54,6 @@ To_Unbounded_String("sin"), To_Unbounded_String("sin*noi"), To_Unbounded_String("sin+noi")); - Random_Generator : Generator; -- From Ada.Numerics.Float_Random begin -- plplot initialization -- Parse and process command line arguments @@ -64,8 +61,8 @@ -- If db is used the plot is much more smooth. However, because of the -- async X behaviour, one does not have a real-time scripcharter. - Set_Command_Line_Option("db", ""); - Set_Command_Line_Option("np", ""); + -- Set_Command_Line_Option("db", ""); + -- Set_Command_Line_Option("np", ""); -- User sets up plot completely except for window and data -- Eventually settings in place when strip chart is created will be @@ -156,7 +153,7 @@ -- the delay to 0.02. delay 0.01; -- wait a little (10 ms) to simulate time elapsing t := Long_Float(n) * dt; - noise := Long_Float(Random(Random_Generator)) - 0.5; + noise := Random_Number- 0.5; y1 := y1 + noise; y2 := sin(t * pi / 18.0); y3 := y2 * noise; @@ -179,7 +176,7 @@ if n mod 5 /= 0 then Update_Stripchart(id1, 3, t, y4); end if; - Eject_Current_Page; -- use double buffer (-db on command line) + -- Eject_Current_Page; -- use double buffer (-db on command line) end loop; -- Destroy strip chart and its memory Modified: trunk/examples/c/x17c.c =================================================================== --- trunk/examples/c/x17c.c 2009-01-07 12:13:11 UTC (rev 9271) +++ trunk/examples/c/x17c.c 2009-01-07 15:14:56 UTC (rev 9272) @@ -40,9 +40,13 @@ /* If db is used the plot is much more smooth. However, because of the async X behaviour, one does not have a real-time scripcharter. + This is now disabled since it does not significantly improve the + performance on new machines and makes it difficult to use this + example non-interactively since it requires an extra pleop call after + each call to plstripa. */ - plsetopt("db", ""); - plsetopt("np", ""); + /*plsetopt("db", "");*/ + /*plsetopt("np", "");*/ /* User sets up plot completely except for window and data * Eventually settings in place when strip chart is created will be @@ -150,7 +154,9 @@ plstripa(id1, 2, t, y3); if (n%5) plstripa(id1, 3, t, y4); - pleop(); /* use double buffer (-db on command line) */ + + /* needed if using double buffering (-db on command line) */ + /*pleop();*/ } /* Destroy strip chart and it's memory */ Modified: trunk/examples/c++/x17.cc =================================================================== --- trunk/examples/c++/x17.cc 2009-01-07 12:13:11 UTC (rev 9271) +++ trunk/examples/c++/x17.cc 2009-01-07 15:14:56 UTC (rev 9272) @@ -74,8 +74,8 @@ // If db is used the plot is much more smooth. However, because of the // async X behaviour, one does not have a real-time scripcharter. - pls->SetOpt("db", ""); - pls->SetOpt("np", ""); + //pls->SetOpt("db", ""); + //pls->SetOpt("np", ""); // Specify some reasonable defaults for ymin and ymax // The plot will grow automatically if needed (but not shrink) @@ -177,7 +177,7 @@ pls->stripa(id1, 2, t, y3); if (n%5) pls->stripa(id1, 3, t, y4); - pls->eop(); // use double buffer (-db on command line) + //pls->eop(); // use double buffer (-db on command line) } // Destroy strip chart and it's memory Modified: trunk/examples/f77/x17f.fm4 =================================================================== --- trunk/examples/f77/x17f.fm4 2009-01-07 12:13:11 UTC (rev 9271) +++ trunk/examples/f77/x17f.fm4 2009-01-07 15:14:56 UTC (rev 9272) @@ -32,6 +32,9 @@ integer colbox, collab, colline(4), styline(4) character*20 legline(4) + external plrandd + real*8 plrandd + real*8 PI parameter ( PI = 3.1415926535897932384d0 ) @@ -41,11 +44,6 @@ integer PL_PARSE_FULL parameter(PL_PARSE_FULL = 1) -C some fortran compilers demand typing of intrinsic rand, and -C although this is not demanded on g77 it also works there. -C n.b. real*4 will be left alone by double2single.sed script. - real*4 rand - C Process command-line arguments call plparseopts(PL_PARSE_FULL) @@ -54,8 +52,8 @@ C If db is used the plot is much more smooth. However, because of the C async X behaviour, one does not have a real-time scripcharter. C - call plsetopt('db', '') - call plsetopt('np', '') +C call plsetopt('db', '') +C call plsetopt('np', '') C User sets up plot completely except for window and data C Eventually settings in place when strip chart is created will be @@ -126,7 +124,7 @@ & autoy, acc, & colbox, collab, & colline, styline, legline, - & 't', ' ', 'Strip chart demo') + & 't', '', 'Strip chart demo') pl_errcode = .false. if ( pl_errcode ) then @@ -151,11 +149,8 @@ y3 = 0.0d0 y4 = 0.0d0 dt = 0.1d0 -C start random number generator. -C (This use_ of rand should work for g77 and Solaris and ?) - noise = rand(1) - do n = 1,nsteps + do n = 0,nsteps-1 C wait a little (10 ms) to simulate time elapsing. C g77 sleep has resolution of 1 sec so the call below is commented out C because it is like watching paint dry. In any case, @@ -164,8 +159,7 @@ ! call sleep(1) t = dble(n) * dt -C (This use_ of rand should work for g77 and Solaris and ?) - noise = rand(0) - 0.5d0 + noise = plrandd() - 0.5d0 y1 = y1 + noise y2 = sin(t*PI/18.d0) y3 = y2 * noise @@ -187,7 +181,7 @@ call plstripa(id1, 3, t, y4) endif C use_ double buffer (-db on command line) - call pleop() +C call pleop() enddo C Destroy strip chart and it's memory Modified: trunk/examples/f95/x17f.f90 =================================================================== --- trunk/examples/f95/x17f.f90 2009-01-07 12:13:11 UTC (rev 9271) +++ trunk/examples/f95/x17f.f90 2009-01-07 15:14:56 UTC (rev 9272) @@ -38,11 +38,6 @@ logical pl_errcode character*80 errmsg -! some fortran compilers demand typing of intrinsic rand, and -! although this is not demanded on g77 it also works there. -! n.b. real*4 will be left alone by double2single.sed script. - real*4 rand - ! Process command-line arguments call plparseopts(PL_PARSE_FULL) @@ -51,8 +46,8 @@ ! If db is used the plot is much more smooth. However, because of the ! async X behaviour, one does not have a real-time scripcharter. ! - call plsetopt('db', '') - call plsetopt('np', '') +! call plsetopt('db', '') +! call plsetopt('np', '') ! User sets up plot completely except for window and data ! Eventually settings in place when strip chart is created will be @@ -123,7 +118,7 @@ autoy, acc, & colbox, collab, & colline, styline, legline, & - 't', ' ', 'Strip chart demo') + 't', '', 'Strip chart demo') pl_errcode = .false. if ( pl_errcode ) then @@ -148,11 +143,8 @@ y3 = 0.0_plflt y4 = 0.0_plflt dt = 0.1_plflt -! start random number generator. -! (This use_ of rand should work for g77 and Solaris and ?) - noise = rand(1) - do n = 1,nsteps + do n = 0,nsteps-1 ! wait a little (10 ms) to simulate time elapsing. ! g77 sleep has resolution of 1 sec so the call below is commented out ! because it is like watching paint dry. In any case, @@ -161,8 +153,7 @@ ! call sleep(1) t = dble(n) * dt -! (This use_ of rand should work for g77 and Solaris and ?) - noise = rand(0) - 0.5_plflt + noise = plrandd() - 0.5_plflt y1 = y1 + noise y2 = sin(t*PI/18._plflt) y3 = y2 * noise @@ -184,7 +175,7 @@ call plstripa(id1, 3, t, y4) endif ! use_ double buffer (-db on command line) - call pleop() +! call pleop() enddo ! Destroy strip chart and it's memory Modified: trunk/examples/java/x17.java =================================================================== --- trunk/examples/java/x17.java 2009-01-07 12:13:11 UTC (rev 9271) +++ trunk/examples/java/x17.java 2009-01-07 15:14:56 UTC (rev 9272) @@ -30,8 +30,6 @@ import plplot.core.*; -import java.util.Random; - class x17 { // Class data @@ -60,8 +58,8 @@ // If db is used the plot is much more smooth. However, because of the // async X behaviour, one does not have a real-time scripcharter. - pls.setopt("db", ""); - pls.setopt("np", ""); + // pls.setopt("db", ""); + // pls.setopt("np", ""); // Specify some reasonable defaults for ymin and ymax // The plot will grow automatically if needed (but not shrink) @@ -135,8 +133,6 @@ y1 = y2 = y3 = y4 = 0.0; dt = 0.1; - Random rnd = new Random(); - for (n = 0; n < nsteps; n++) { try { Thread.sleep(10); @@ -144,7 +140,7 @@ catch (InterruptedException e) { } t = (double)n * dt; - noise = rnd.nextDouble() - 0.5; + noise = pls.randd() - 0.5; y1 = y1 + noise; y2 = Math.sin(t*Math.PI/18.); y3 = y2 * noise; @@ -161,7 +157,7 @@ pls.stripa(id1[0], 2, t, y3); if (n%5 != 0) pls.stripa(id1[0], 3, t, y4); - pls.eop(); // use double buffer (-db on command line) + // pls.eop(); // use double buffer (-db on command line) } // Destroy strip chart and it's memory Modified: trunk/examples/perl/x17.pl =================================================================== --- trunk/examples/perl/x17.pl 2009-01-07 12:13:11 UTC (rev 9271) +++ trunk/examples/perl/x17.pl 2009-01-07 15:14:56 UTC (rev 9272) @@ -38,8 +38,8 @@ # If db is used the plot is much more smooth. However, because of the # async X behaviour, one does not have a real-time scripcharter. -plsetopt ("db", ""); -plsetopt ("np", ""); +# plsetopt ("db", ""); +# plsetopt ("np", ""); # User sets up plot completely except for window and data # Eventually settings in place when strip chart is created will be @@ -123,7 +123,7 @@ for (my $n = 0; $n < $nsteps; $n++) { usleep (10000); # wait a little (10 ms) to simulate time elapsing my $t = $n * $dt; - $noise = rand (1.0) - 0.5; + $noise = plrandd () - 0.5; $y1 = $y1 + $noise; $y2 = sin ($t * pi / 18); $y3 = $y2 * $noise; @@ -144,7 +144,7 @@ if ($n % 5) { plstripa ($id1, 3, $t, $y4); } - pleop (); # use double buffer (-db on command line) +# pleop (); # use double buffer (-db on command line) } # Destroy strip chart and it's memory Modified: trunk/examples/python/xw17.py =================================================================== --- trunk/examples/python/xw17.py 2009-01-07 12:13:11 UTC (rev 9271) +++ trunk/examples/python/xw17.py 2009-01-07 15:14:56 UTC (rev 9272) @@ -38,8 +38,8 @@ # If db is used the plot is much more smooth. However, because of the # async X behaviour, one does not have a real-time scripcharter. - plsetopt("db", "") - plsetopt("np", "") +# plsetopt("db", "") +# plsetopt("np", "") # User sets up plot completely except for window and data # Eventually settings in place when strip chart is created will be Modified: trunk/plplot_test/test_ada.sh.in =================================================================== --- trunk/plplot_test/test_ada.sh.in 2009-01-07 12:13:11 UTC (rev 9271) +++ trunk/plplot_test/test_ada.sh.in 2009-01-07 15:14:56 UTC (rev 9272) @@ -31,10 +31,10 @@ lang="a" for index in \ 01 02 03 04 05 06 07 08 09 \ - 10 11 12 13 14 15 16 18 19 20 \ + 10 11 12 13 14 15 16 17 18 19 20 \ 21 22 23 24 25 26 27 28 29 30 31 \ thick01 thick02 thick03 thick04 thick05 thick06 thick07 thick08 thick09 \ - thick10 thick11 thick12 thick13 thick14 thick15 thick16 thick18 thick19 thick20 \ + thick10 thick11 thick12 thick13 thick14 thick15 thick16 thick17 thick18 thick19 thick20 \ thick21 thick22 thick23 thick24 thick25 thick26 thick27 thick28 thick29 thick30 thick31; do if [ "$verbose_test" ] ; then echo "x${index}" Modified: trunk/plplot_test/test_c.sh.in =================================================================== --- trunk/plplot_test/test_c.sh.in 2009-01-07 12:13:11 UTC (rev 9271) +++ trunk/plplot_test/test_c.sh.in 2009-01-07 15:14:56 UTC (rev 9272) @@ -27,10 +27,9 @@ # pushd $cdir; make; popd # Do the standard non-interactive examples. -# skip 17 because it is interactive. lang="c" export index lang -for index in 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 18 19 20 \ +for index in 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 \ 21 22 23 24 25 26 27 28 29 30 31; do if [ "$verbose_test" ] ; then echo "x${index}${lang}" Modified: trunk/plplot_test/test_cxx.sh.in =================================================================== --- trunk/plplot_test/test_cxx.sh.in 2009-01-07 12:13:11 UTC (rev 9271) +++ trunk/plplot_test/test_cxx.sh.in 2009-01-07 15:14:56 UTC (rev 9272) @@ -36,8 +36,7 @@ $DEBUG_CMD $cxxdir/x01cc -dev $device -o ${OUTPUT_DIR}/x01cc%n.$dsuffix $options # Do the standard non-interactive examples. -# skip 17 because it is interactive. -for index in 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 18 19 20 21 22 23 24 25 26 27 28 29 30 31; do +for index in 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31; do if [ "$verbose_test" ] ; then echo "x${index}" fi Modified: trunk/plplot_test/test_diff.sh.in =================================================================== --- trunk/plplot_test/test_diff.sh.in 2009-01-07 12:13:11 UTC (rev 9271) +++ trunk/plplot_test/test_diff.sh.in 2009-01-07 15:14:56 UTC (rev 9272) @@ -84,8 +84,7 @@ if [ -f x${xsuffix}01${suffix}.psc ] ; then # Standard non-interactive examples - # Skip example 17 because it is interactive - for index in 01 02 03 04 05 06 07 08 09 10 11 12 13 14 14a 15 16 18 19 20 \ + for index in 01 02 03 04 05 06 07 08 09 10 11 12 13 14 14a 15 16 17 18 19 20 \ 21 22 23 24 25 26 27 28 29 30 31 ; do if [ ! -f x${xsuffix}${index}c.psc ] ; then echo "C example ${index} is missing" Modified: trunk/plplot_test/test_f77.sh.in =================================================================== --- trunk/plplot_test/test_f77.sh.in 2009-01-07 12:13:11 UTC (rev 9271) +++ trunk/plplot_test/test_f77.sh.in 2009-01-07 15:14:56 UTC (rev 9272) @@ -54,8 +54,7 @@ fi # Do the standard non-interactive examples. -# skip 17 because it is interactive. - for index in 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 18 19 20 21 22 23 24 25 26 27 28 29 30 31 ; do + for index in 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 ; do if [ "$verbose_test" ] ; then echo "x${index}f" fi @@ -107,7 +106,7 @@ # Do the standard non-interactive examples. # skip 17 because it is interactive. - for index in 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 18 19 20 21 22 23 24 25 26 27 28 29 30 31 ; do + for index in 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 ; do if [ "$verbose_test" ] ; then echo "x${index}f" fi Modified: trunk/plplot_test/test_f95.sh.in =================================================================== --- trunk/plplot_test/test_f95.sh.in 2009-01-07 12:13:11 UTC (rev 9271) +++ trunk/plplot_test/test_f95.sh.in 2009-01-07 15:14:56 UTC (rev 9272) @@ -55,8 +55,7 @@ # Do the standard non-interactive examples. -# skip 17 because it is interactive. - for index in 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 18 19 20 21 22 23 24 25 26 27 28 29 30 31; do + for index in 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31; do if [ "$verbose_test" ] ; then echo "x${index}f" fi @@ -107,8 +106,7 @@ # Do the standard non-interactive examples. -# skip 17 because it is interactive. - for index in 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 18 19 20 21 22 23 24 25 26 27 28 29 30 31; do + for index in 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31; do if [ "$verbose_test" ] ; then echo "x${index}f" fi Modified: trunk/plplot_test/test_java.sh.in =================================================================== --- trunk/plplot_test/test_java.sh.in 2009-01-07 12:13:11 UTC (rev 9271) +++ trunk/plplot_test/test_java.sh.in 2009-01-07 15:14:56 UTC (rev 9272) @@ -32,7 +32,6 @@ # Do the standard non-interactive examples. # skip 19 because it is not implemented. -# skip 17 because it is interactive. # # Set up option to point to java bindings jar file and wrapper if needed. lang="j" @@ -46,7 +45,7 @@ PLPLOT_CLASSPATH=${javadir}:${PLPLOT_CLASSPATH} fi -for index in 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 18 20 21 22 23 24 25 26 27 28 29 30 31 ; do +for index in 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 20 21 22 23 24 25 26 27 28 29 30 31 ; do if [ "$verbose_test" ] ; then echo "x${index}" fi Modified: trunk/plplot_test/test_octave.sh.in =================================================================== --- trunk/plplot_test/test_octave.sh.in 2009-01-07 12:13:11 UTC (rev 9271) +++ trunk/plplot_test/test_octave.sh.in 2009-01-07 15:14:56 UTC (rev 9272) @@ -71,11 +71,11 @@ closefig endfor #plot equivalent of x??c examples. These only required octave-2.0.x -#For file output 17 is not suitable, and 19 is not done +#Example 19 is not implemented #(and should probably be dropped anyway since the map stuff is not #in the API that is supposed to be common to all front ends.) failed = [] ; - for i=[1:16 18 20:31 ] ; + for i=[1:18 20:31 ] ; ofile = sprintf("${OUTPUT_DIR}/x%.2d${lang}_${dsuffix}.txt",i); strm = fopen(ofile,"w"); cmd = sprintf("x%.2dc",i); Modified: trunk/plplot_test/test_perl.sh.in =================================================================== --- trunk/plplot_test/test_perl.sh.in 2009-01-07 12:13:11 UTC (rev 9271) +++ trunk/plplot_test/test_perl.sh.in 2009-01-07 15:14:56 UTC (rev 9272) @@ -26,7 +26,6 @@ # pushd $cdir; make; popd # Do the standard non-interactive examples. -# skip 17 because it is interactive. # Ensure correct version of the libraries are picked up in both the build # tree and install tree. @@ -38,11 +37,11 @@ fi if [ "@HAVE_PDL_GRAPHICS_PLPLOT_40@" = "ON" ] ; then - INDEX_LIST="01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 18 19 20 21 22 23 24 25 26 27 28 29 30 31" + INDEX_LIST="01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31" else # Examples 02, 20, 21, 23, 24, 28, 29, and 30 require PDL::Graphics::PLplot # version 0.46 or later. - INDEX_LIST="01 03 04 05 06 07 08 09 10 11 12 13 14 15 16 18 19 22 25 26 27" + INDEX_LIST="01 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 22 25 26 27" fi for index in $INDEX_LIST ; do Modified: trunk/plplot_test/test_python.sh.in =================================================================== --- trunk/plplot_test/test_python.sh.in 2009-01-07 12:13:11 UTC (rev 9271) +++ trunk/plplot_test/test_python.sh.in 2009-01-07 15:14:56 UTC (rev 9272) @@ -26,12 +26,11 @@ # $pythondir must be the build tree and not the source tree (if separate from # build tree) since must access plplot_python_start.py in build tree and # paths in that file are relative to build tree. -# Skip 17 because it is interactive and not currently implemented. # Skip 19 because it is just a placeholder without a real implementation. # Skip 21 if using Numeric - it doesn't work # For 24 you need special fonts installed to get good result. lang="p" -for index in 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 18 \ +for index in 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 \ 20 22 23 24 25 26 27 28 29 30 31 @NUMPY_EXAMPLES@ ; do if [ "$verbose_test" ] ; then echo "x${index}" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <and...@us...> - 2009-01-08 14:30:31
|
Revision: 9278 http://plplot.svn.sourceforge.net/plplot/?rev=9278&view=rev Author: andrewross Date: 2009-01-08 14:30:16 +0000 (Thu, 08 Jan 2009) Log Message: ----------- Add plseed call to all implementations of example 21. This function is not currently tested in any of the examples. The seed value used is the same as the default in the library so the output should remain unchanged. Update fortran 77 and 95 bindings to fix the implementation of plseed in these languages. Modified Paths: -------------- trunk/bindings/f77/scstubs.c trunk/bindings/f95/plstubs.h trunk/bindings/f95/scstubs.c trunk/examples/ada/x21a.adb.cmake trunk/examples/ada/xthick21a.adb.cmake trunk/examples/c/x21c.c trunk/examples/c++/x21.cc trunk/examples/f77/x21f.fm4 trunk/examples/f95/x21f.f90 trunk/examples/java/x21.java trunk/examples/ocaml/x21.ml trunk/examples/perl/x21.pl trunk/examples/python/xw21.py trunk/examples/tcl/x21.tcl Modified: trunk/bindings/f77/scstubs.c =================================================================== --- trunk/bindings/f77/scstubs.c 2009-01-08 09:17:50 UTC (rev 9277) +++ trunk/bindings/f77/scstubs.c 2009-01-08 14:30:16 UTC (rev 9278) @@ -738,9 +738,9 @@ } void -PLSEED(unsigned int s) +PLSEED(unsigned int *s) { - c_plseed(s); + c_plseed(*s); } void Modified: trunk/bindings/f95/plstubs.h =================================================================== --- trunk/bindings/f95/plstubs.h 2009-01-08 09:17:50 UTC (rev 9277) +++ trunk/bindings/f95/plstubs.h 2009-01-08 14:30:16 UTC (rev 9278) @@ -294,7 +294,7 @@ #define PLSDIORI FNAME(PLSDIORI,plsdiori) #define PLSDIPLT FNAME(PLSDIPLT,plsdiplt) #define PLSDIPLZ FNAME(PLSDIPLZ,plsdiplz) -#define PLSEED FNAME(PLSEEDF77,plseedf77) +#define PLSEED FNAME(PLSEED,plseed) #define PLSESC FNAME(PLSESC,plsesc) #define PLSETOPT7 FNAME(PLSETOPT7,plsetopt7) #define PLSFAM FNAME(PLSFAM,plsfam) Modified: trunk/bindings/f95/scstubs.c =================================================================== --- trunk/bindings/f95/scstubs.c 2009-01-08 09:17:50 UTC (rev 9277) +++ trunk/bindings/f95/scstubs.c 2009-01-08 14:30:16 UTC (rev 9278) @@ -797,9 +797,9 @@ } void -PLSEED(unsigned int s) +PLSEED(unsigned int *s) { - c_plseed(s); + c_plseed(*s); } void Modified: trunk/examples/ada/x21a.adb.cmake =================================================================== --- trunk/examples/ada/x21a.adb.cmake 2009-01-08 09:17:50 UTC (rev 9277) +++ trunk/examples/ada/x21a.adb.cmake 2009-01-08 14:30:16 UTC (rev 9278) @@ -170,6 +170,8 @@ -- Initialize plplot plinit; + plseed(5489); + create_data(x, y, z); -- the sampled data zmin := Vector_Min(z); zmax := Vector_Max(z); Modified: trunk/examples/ada/xthick21a.adb.cmake =================================================================== --- trunk/examples/ada/xthick21a.adb.cmake 2009-01-08 09:17:50 UTC (rev 9277) +++ trunk/examples/ada/xthick21a.adb.cmake 2009-01-08 14:30:16 UTC (rev 9278) @@ -170,6 +170,8 @@ -- Initialize plplot Initialize_PLplot; + Random_Number_Seed(5489); + create_data(x, y, z); -- the sampled data zmin := Vector_Min(z); zmax := Vector_Max(z); Modified: trunk/examples/c/x21c.c =================================================================== --- trunk/examples/c/x21c.c 2009-01-08 09:17:50 UTC (rev 9277) +++ trunk/examples/c/x21c.c 2009-01-08 14:30:16 UTC (rev 9278) @@ -180,6 +180,9 @@ plinit(); + /* Initialise random number generator */ + plseed(5489); + create_data(&x, &y, &z, pts); /* the sampled data */ zmin = z[0]; zmax = z[0]; Modified: trunk/examples/c++/x21.cc =================================================================== --- trunk/examples/c++/x21.cc 2009-01-08 09:17:50 UTC (rev 9277) +++ trunk/examples/c++/x21.cc 2009-01-08 14:30:16 UTC (rev 9278) @@ -189,6 +189,8 @@ // plplot initialization pls = new plstream(); + + pls->seed(5489); // Parse and process command line arguments. pls->MergeOpts(options, "x21c options", NULL); Modified: trunk/examples/f77/x21f.fm4 =================================================================== --- trunk/examples/f77/x21f.fm4 2009-01-08 09:17:50 UTC (rev 9277) +++ trunk/examples/f77/x21f.fm4 2009-01-08 14:30:16 UTC (rev 9278) @@ -105,6 +105,8 @@ call plinit + call plseed(5489) + do i=1,pts xt = (xmax-xmin)*plrandd() yt = (ymax-ymin)*plrandd() Modified: trunk/examples/f95/x21f.f90 =================================================================== --- trunk/examples/f95/x21f.f90 2009-01-08 09:17:50 UTC (rev 9277) +++ trunk/examples/f95/x21f.f90 2009-01-08 14:30:16 UTC (rev 9278) @@ -98,6 +98,8 @@ call plinit + call plseed(5489) + do i=1,pts xt = (xmax-xmin)*plrandd() yt = (ymax-ymin)*plrandd() Modified: trunk/examples/java/x21.java =================================================================== --- trunk/examples/java/x21.java 2009-01-08 09:17:50 UTC (rev 9277) +++ trunk/examples/java/x21.java 2009-01-08 14:30:16 UTC (rev 9278) @@ -162,6 +162,8 @@ // Initialize PLplot. pls.init(); + pls.seed(5489); + x = new double[pts]; y = new double[pts]; z = new double[pts]; Modified: trunk/examples/ocaml/x21.ml =================================================================== --- trunk/examples/ocaml/x21.ml 2009-01-08 09:17:50 UTC (rev 9277) +++ trunk/examples/ocaml/x21.ml 2009-01-08 14:30:16 UTC (rev 9278) @@ -107,6 +107,8 @@ (* Initialize plplot *) plinit (); + plseed (5489L); + (* The sampled data *) let x, y, z = create_data pts in let zmin = Array.fold_left min infinity z in Modified: trunk/examples/perl/x21.pl =================================================================== --- trunk/examples/perl/x21.pl 2009-01-08 09:17:50 UTC (rev 9277) +++ trunk/examples/perl/x21.pl 2009-01-08 14:30:16 UTC (rev 9278) @@ -113,6 +113,8 @@ plinit (); + plseed (5489); + my ($x, $y, $z) = create_data ($pts); # the sampled data my $zmin = min ($z); my $zmax = max ($z); Modified: trunk/examples/python/xw21.py =================================================================== --- trunk/examples/python/xw21.py 2009-01-08 09:17:50 UTC (rev 9277) +++ trunk/examples/python/xw21.py 2009-01-08 14:30:16 UTC (rev 9278) @@ -69,6 +69,8 @@ opt[2] = wmin opt[3] = knn_order opt[4] = threshold + + plseed(5489) # Create the sampled data # For consistency across languages use plrandd to create the Modified: trunk/examples/tcl/x21.tcl =================================================================== --- trunk/examples/tcl/x21.tcl 2009-01-08 09:17:50 UTC (rev 9277) +++ trunk/examples/tcl/x21.tcl 2009-01-08 14:30:16 UTC (rev 9278) @@ -82,6 +82,8 @@ opt 3 = [expr {double($knn_order)}] opt 4 = $threshold + $w cmd plseed 5489 + for {set i 0} {$i < $pts} {incr i} { set xt [expr {($xmax-$xmin)*[plrandd]}] set yt [expr {($ymax-$ymin)*[plrandd]}] This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <and...@us...> - 2009-01-09 00:48:55
|
Revision: 9287 http://plplot.svn.sourceforge.net/plplot/?rev=9287&view=rev Author: andrewross Date: 2009-01-09 00:48:43 +0000 (Fri, 09 Jan 2009) Log Message: ----------- Update example 12 so it actually does use plcol1, as documented in api.xml. Previously it was commented out. Set up a colour map to use with this. Modified Paths: -------------- trunk/bindings/octave/demos/x12c.m trunk/examples/ada/x12a.adb.cmake trunk/examples/ada/xthick12a.adb.cmake trunk/examples/c/x12c.c trunk/examples/c++/x12.cc trunk/examples/f77/x12f.fm4 trunk/examples/f95/x12f.f90 trunk/examples/java/x12.java trunk/examples/ocaml/x12.ml trunk/examples/perl/x12.pl trunk/examples/python/xw12.py trunk/examples/tcl/x12.tcl Modified: trunk/bindings/octave/demos/x12c.m =================================================================== --- trunk/bindings/octave/demos/x12c.m 2009-01-09 00:25:36 UTC (rev 9286) +++ trunk/bindings/octave/demos/x12c.m 2009-01-09 00:48:43 UTC (rev 9287) @@ -45,10 +45,18 @@ y0 = [5; 15; 12; 24; 28;30; 20; 8; 12; 3]; + pos = [0.0; 0.25; 0.5; 0.75; 1.0]; + red = [0.0; 0.25; 0.5; 1.00; 1.0]; + green = [1.0; 0.50; 0.5; 0.50; 1.0]; + blue = [1.0; 1.0; 0.5; 0.25; 0.0]; + rev = [0; 0; 0; 0; 0]; + + plscmap1l(1,pos,red,green,blue,rev); + for i=0:9 - plcol(i + 1); + ##plcol(i + 1); - ## plcol1((PLFLT) ((i + 1)/10.0)); + plcol1(i/9.0); plpsty(0); plfbox((1980. + i), y0(i+1)); Modified: trunk/examples/ada/x12a.adb.cmake =================================================================== --- trunk/examples/ada/x12a.adb.cmake 2009-01-09 00:25:36 UTC (rev 9286) +++ trunk/examples/ada/x12a.adb.cmake 2009-01-09 00:48:43 UTC (rev 9287) @@ -36,7 +36,7 @@ PLplot_Auxiliary, PLplot_Traditional; --- COMMENT THIS LINE IF YOUR COMPILER DOES NOT INCLUDE THESE +-- COMMENT THIS LINE IF YOUR COMPILER DOES NOT INCLUDE THESE -- DEFINITIONS, FOR EXAMPLE, IF IT IS NOT ADA 2005 WITH ANNEX G.3 COMPLIANCE. --with Ada.Numerics.Long_Real_Arrays; use Ada.Numerics.Long_Real_Arrays; @Ada_Is_2007_With_and_Use_Numerics@ @@ -48,6 +48,12 @@ procedure x12a is y0 : Real_Vector (0 .. 9); + + pos : Real_Vector (0 .. 4) := (0.0, 0.25, 0.5, 0.75, 1.0); + red : Real_Vector (0 .. 4) := (0.0, 0.25, 0.5, 1.0, 1.0); + green : Real_Vector (0 .. 4) := (1.0, 0.5, 0.5, 0.5, 1.0); + blue : Real_Vector (0 .. 4) := (1.0, 1.0, 0.5, 0.25, 0.0); + A_Boolean :Boolean_Array_1D(0 .. 4) := (False, False, False, False, False); procedure plfbox (x0, y0 : Long_Float) is x, y : Real_Vector (0 ..3); @@ -69,10 +75,10 @@ pllsty(1); plline(x, y); end plfbox; - + begin -- Parse and process command line arguments. - plparseopts(PL_PARSE_FULL); + plparseopts(PL_PARSE_FULL); -- Initialize plplot. plinit; @@ -95,8 +101,11 @@ y0(8) := 12.0; y0(9) := 3.0; + plscmap1l(RGB, pos, red, green, blue, A_Boolean); + for i in y0'range loop - plcol0(i + 1); + -- plcol0(i + 1); + plcol1(Long_Float(i)/9.0); plpsty(0); plfbox((1980.0 + Long_Float(i)), y0(i)); plptex(1980.0 + Long_Float(i) + 0.5, y0(i) + 1.0, 1.0, 0.0, 0.5, Trim(Integer'image(Integer(y0(i))), Left)); Modified: trunk/examples/ada/xthick12a.adb.cmake =================================================================== --- trunk/examples/ada/xthick12a.adb.cmake 2009-01-09 00:25:36 UTC (rev 9286) +++ trunk/examples/ada/xthick12a.adb.cmake 2009-01-09 00:48:43 UTC (rev 9287) @@ -47,6 +47,12 @@ procedure xthick12a is y0 : Real_Vector (0 .. 9); + + pos : Real_Vector (0 .. 4) := (0.0, 0.25, 0.5, 0.75, 1.0); + r : Real_Vector (0 .. 4) := (0.0, 0.25, 0.5, 1.0, 1.0); + g : Real_Vector (0 .. 4) := (1.0, 0.5, 0.5, 0.5, 1.0); + b : Real_Vector (0 .. 4) := (1.0, 1.0, 0.5, 0.25, 0.0); + A_Boolean :Boolean_Array_1D(0 .. 4) := (False, False, False, False, False); procedure plfbox (x0, y0 : Long_Float) is x, y : Real_Vector (0 ..3); @@ -69,7 +75,7 @@ Draw_Curve(x, y); end plfbox; -begin + begin -- Parse and process command line arguments. Parse_Command_Line_Arguments(Parse_Full); @@ -94,8 +100,11 @@ y0(8) := 12.0; y0(9) := 3.0; + Set_Color_Map_1_Piecewise(RGB, pos, r, g, b, A_Boolean); + for i in y0'range loop - Set_Pen_Color(i + 1); + --Set_Pen_Color(i + 1); + Set_Color_Map_1(Long_Float(i)/9.0); Select_Fill_Pattern(0); plfbox((1980.0 + Long_Float(i)), y0(i)); Write_Text_World(1980.0 + Long_Float(i) + 0.5, y0(i) + 1.0, 1.0, 0.0, 0.5, Trim(Integer'image(Integer(y0(i))), Left)); Modified: trunk/examples/c/x12c.c =================================================================== --- trunk/examples/c/x12c.c 2009-01-09 00:25:36 UTC (rev 9286) +++ trunk/examples/c/x12c.c 2009-01-09 00:48:43 UTC (rev 9287) @@ -22,6 +22,11 @@ char string[20]; PLFLT y0[10]; + static PLFLT pos[] = {0.0, 0.25, 0.5, 0.75, 1.0}; + static PLFLT red[] = {0.0, 0.25, 0.5, 1.0, 1.0}; + static PLFLT green[] = {1.0, 0.5, 0.5, 0.5, 1.0}; + static PLFLT blue[] = {1.0, 1.0, 0.5, 0.25, 0.0}; + /* Parse and process command line arguments */ (void) plparseopts(&argc, argv, PL_PARSE_FULL); @@ -48,11 +53,11 @@ y0[8] = 12; y0[9] = 3; + plscmap1l(1,5,pos,red,green,blue,NULL); + for (i = 0; i < 10; i++) { - plcol0(i + 1); - /* - plcol1((PLFLT) ((i + 1)/10.0)); - */ + /*plcol0(i + 1);*/ + plcol1(i/9.0); plpsty(0); plfbox((1980. + i), y0[i]); sprintf(string, "%.0f", y0[i]); Modified: trunk/examples/c++/x12.cc =================================================================== --- trunk/examples/c++/x12.cc 2009-01-09 00:25:36 UTC (rev 9286) +++ trunk/examples/c++/x12.cc 2009-01-09 00:48:43 UTC (rev 9287) @@ -42,11 +42,17 @@ static const PLFLT y0[]; + static PLFLT pos[], red[], green[], blue[]; }; const PLFLT x12::y0[10] = {5., 15., 12., 24., 28., 30., 20., 8., 12., 3.}; +PLFLT x12::pos[] = {0.0, 0.25, 0.5, 0.75, 1.0}; +PLFLT x12::red[] = {0.0, 0.25, 0.5, 1.0, 1.0}; +PLFLT x12::green[] = {1.0, 0.5, 0.5, 0.5, 1.0}; +PLFLT x12::blue[] = {1.0, 1.0, 0.5, 0.25, 0.0}; + x12::x12( int argc, const char **argv ) { int i; @@ -71,9 +77,12 @@ pls->box("bc", 1.0, 0, "bcnv", 10.0, 0); pls->col0(2); pls->lab("Year", "Widget Sales (millions)", "#frPLplot Example 12"); + + pls->scmap1l(true,5,pos,red,green,blue,NULL); + for (i = 0; i < 10; i++) { - pls->col0(i + 1); - // pls->col1((PLFLT) ((i + 1)/10.0)); + //pls->col0(i + 1); + pls->col1(i/9.0); pls->psty(0); plfbox((1980. + i), y0[i]); sprintf(string, "%.0f", y0[i]); Modified: trunk/examples/f77/x12f.fm4 =================================================================== --- trunk/examples/f77/x12f.fm4 2009-01-09 00:25:36 UTC (rev 9286) +++ trunk/examples/f77/x12f.fm4 2009-01-09 00:48:43 UTC (rev 9287) @@ -24,8 +24,17 @@ character*20 string integer i real*8 y0(10) + real*8 pos(5), rcoord(5), gcoord(5), bcoord(5) + integer rev(5) integer PL_PARSE_FULL parameter(PL_PARSE_FULL = 1) + + data pos /0.0d0, 0.25d0, 0.5d0, 0.75d0, 1.0d0/ + data rcoord /0.0d0, 0.25d0, 0.5d0, 1.0d0, 1.0d0/ + data gcoord /1.0d0, 0.5d0, 0.5d0, 0.5d0, 1.0d0/ + data bcoord /1.0d0, 1.0d0, 0.5d0, 0.25d0, 0.0d0/ + data rev /0, 0, 0, 0, 0/ + C Process command-line arguments call plparseopts(PL_PARSE_FULL) @@ -50,8 +59,11 @@ y0(9) = 12 y0(10) = 3 + call plscmap1l(1,5,pos,rcoord,gcoord,bcoord,rev) + do i = 0, 9 - call plcol0(i + 1) +C call plcol0(i + 1) + call plcol1(dble(i)/9.0d0) call plpsty(0) call plfbox( dble (1980.d0+i), y0(i+1) ) write (string, '(i8)')int(y0(i+1)) Modified: trunk/examples/f95/x12f.f90 =================================================================== --- trunk/examples/f95/x12f.f90 2009-01-09 00:25:36 UTC (rev 9286) +++ trunk/examples/f95/x12f.f90 2009-01-09 00:48:43 UTC (rev 9287) @@ -25,6 +25,13 @@ character*20 string integer i real(kind=plflt) y0(10) + real(kind=plflt) pos(5), red(5), green(5), blue(5) + + data pos /0.0_plflt, 0.25_plflt, 0.5_plflt, 0.75_plflt, 1.0_plflt/ + data red /0.0_plflt, 0.25_plflt, 0.5_plflt, 1.0_plflt, 1.0_plflt/ + data green /1.0_plflt, 0.5_plflt, 0.5_plflt, 0.5_plflt, 1.0_plflt/ + data blue /1.0_plflt, 1.0_plflt, 0.5_plflt, 0.25_plflt, 0.0_plflt/ + ! Process command-line arguments call plparseopts(PL_PARSE_FULL) @@ -48,9 +55,12 @@ y0(8) = 8 y0(9) = 12 y0(10) = 3 + + call plscmap1l(.true.,pos,red,green,blue) do i = 0, 9 - call plcol0(i + 1) +! call plcol0(i + 1) + call plcol1(dble(i)/9.0_plflt) call plpsty(0) call plfbox( 1980._plflt+i, y0(i+1) ) write (string, '(i8)')int(y0(i+1)) Modified: trunk/examples/java/x12.java =================================================================== --- trunk/examples/java/x12.java 2009-01-09 00:25:36 UTC (rev 9286) +++ trunk/examples/java/x12.java 2009-01-09 00:48:43 UTC (rev 9287) @@ -36,6 +36,12 @@ class x12 { static double y0[] = {5., 15., 12., 24., 28., 30., 20., 8., 12., 3.}; + + static double[] pos = {0.0, 0.25, 0.5, 0.75, 1.0}; + static double[] red = {0.0, 0.25, 0.5, 1.0, 1.0}; + static double[] green = {1.0, 0.5, 0.5, 0.5, 1.0}; + static double[] blue = {1.0, 1.0, 0.5, 0.25, 0.0}; + PLStream pls = new PLStream(); @@ -62,9 +68,12 @@ pls.box("bc", 1.0, 0, "bcnv", 10.0, 0); pls.col0(2); pls.lab("Year", "Widget Sales (millions)", "#frPLplot Example 12"); + + pls.scmap1l(true,pos,red,green,blue); + for (i = 0; i < 10; i++) { - pls.col0(i + 1); -// pls.col1((double) ((i + 1)/10.0)); +// pls.col0(i + 1); + pls.col1((double) i/9.0); pls.psty(0); plfbox((1980. + i), y0[i]); // sprintf(string, "%.0f", y0[i]); Modified: trunk/examples/ocaml/x12.ml =================================================================== --- trunk/examples/ocaml/x12.ml 2009-01-09 00:25:36 UTC (rev 9286) +++ trunk/examples/ocaml/x12.ml 2009-01-09 00:48:43 UTC (rev 9287) @@ -18,6 +18,11 @@ * unavailable, pattern fill is used instead (automatic). \*--------------------------------------------------------------------------*) +let pos = [|0.0; 0.25; 0.5; 0.75; 1.0|] +let red = [|0.0; 0.25; 0.5; 1.00; 1.0|] +let green = [|1.0; 0.50; 0.5; 0.50; 1.0|] +let blue = [|1.0; 1.0; 0.5; 0.25; 0.0|] + let () = (* Parse and process command line arguments *) ignore (plparseopts Sys.argv [PL_PARSE_FULL]); @@ -34,8 +39,11 @@ let y0 = [|5.0; 15.0; 12.0; 24.0; 28.0; 30.0; 20.0; 8.0; 12.0; 3.0|] in + plscmap1l true pos red green blue None; + for i = 0 to 9 do - plcol0 (i + 1); + (* plcol0 (i + 1); *) + plcol1(float_of_int i /. 9.0); plpsty 0; plfbox (1980.0 +. float_of_int i) y0.(i); let text = Printf.sprintf "%.0f" y0.(i) in Modified: trunk/examples/perl/x12.pl =================================================================== --- trunk/examples/perl/x12.pl 2009-01-09 00:25:36 UTC (rev 9286) +++ trunk/examples/perl/x12.pl 2009-01-09 00:48:43 UTC (rev 9287) @@ -27,6 +27,11 @@ use PDL; use PDL::Graphics::PLplot; +my $pos = double (0.0, 0.25, 0.5, 0.75, 1.0); +my $red = double (0.0, 0.25, 0.5, 1.0, 1.0); +my $green = double (1.0, 0.5, 0.5, 0.5, 1.0); +my $blue = double (1.0, 1.0, 0.5, 0.25, 0.0); + # Parse and process command line arguments plParseOpts (\@ARGV, PL_PARSE_SKIP | PL_PARSE_NOPROGRAM); @@ -45,8 +50,11 @@ my $y0 = pdl [5, 15, 12, 24, 28, 30, 20, 8, 12, 3]; +plscmap1l(1, $pos, $red, $green, $blue, pdl []); + for (my $i = 0; $i < 10; $i++) { - plcol0 ($i + 1); + # plcol0 ($i + 1); + plcol1 ($i/9.0); plpsty (0); myplfbox ((1980. + $i), $y0->index ($i)); my $string = sprintf ("%.0f", $y0->index ($i)); Modified: trunk/examples/python/xw12.py =================================================================== --- trunk/examples/python/xw12.py 2009-01-09 00:25:36 UTC (rev 9286) +++ trunk/examples/python/xw12.py 2009-01-09 00:48:43 UTC (rev 9287) @@ -30,6 +30,11 @@ def main(): + pos = array ([0.0, 0.25, 0.5, 0.75, 1.0]) + red = array ([0.0, 0.25, 0.5, 1.0, 1.0]) + green = array ([1.0, 0.5, 0.5, 0.5, 1.0]) + blue = array ([1.0, 1.0, 0.5, 0.25, 0.0]) + pladv(0) plvsta() plwind(1980.0, 1990.0, 0.0, 35.0) @@ -39,8 +44,11 @@ y0 = [5, 15, 12, 24, 28, 30, 20, 8, 12, 3] + plscmap1l(1, pos, red, green, blue) + for i in range(10): - plcol0(i + 1) + # plcol0(i + 1) + plcol1(i / 9.0) plpsty(0) fbox( (1980. + i), y0[i] ) string = `y0[i]` Modified: trunk/examples/tcl/x12.tcl =================================================================== --- trunk/examples/tcl/x12.tcl 2009-01-09 00:25:36 UTC (rev 9286) +++ trunk/examples/tcl/x12.tcl 2009-01-09 00:48:43 UTC (rev 9287) @@ -9,6 +9,12 @@ matrix y0 f 10 = {5., 15., 12., 24., 28., 30., 20., 8., 12., 3.} + matrix pos f 5 = {0.0, 0.25, 0.5, 0.75, 1.0} + matrix red f 5 = {0.0, 0.25, 0.5, 1.0, 1.0} + matrix green f 5 = {1.0, 0.5, 0.5, 0.5, 1.0} + matrix blue f 5 = {1.0, 1.0, 0.5, 0.25, 0.0} + matrix rev i 5 = {0, 0, 0, 0, 0} + $w cmd pladv 0 $w cmd plvsta $w cmd plwind 1980.0 1990.0 0.0 35.0 @@ -16,10 +22,12 @@ $w cmd plcol0 2 $w cmd pllab "Year" "Widget Sales (millions)" "#frPLplot Example 12" + $w cmd plscmap1l 1 5 pos red green blue rev + for {set i 0} {$i < 10} {incr i} { - $w cmd plcol0 [expr $i+1] +# $w cmd plcol0 [expr $i+1] -# $w cmd plcol1 [expr ($i + 1.)/10.0 ] + $w cmd plcol1 [expr ($i / 9.0) ] $w cmd plpsty 0 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jb...@us...> - 2009-01-09 05:56:10
|
Revision: 9289 http://plplot.svn.sourceforge.net/plplot/?rev=9289&view=rev Author: jbauck Date: 2009-01-09 05:56:04 +0000 (Fri, 09 Jan 2009) Log Message: ----------- In the Ada bindings, remove the procedure versions of Get_Device_Name, Get_Version_Number, and Get_Output_File_Name (plgdev, plgver, and plgfnam in traditional-name binding)?\226?\128?\148the function versions are to be used. Remove the null character terminator when converting from C strings to Ada Strings in these functions. Make examples 31 use function-only versions of Get_Output_File_Name and plgfnam. Modified Paths: -------------- trunk/bindings/ada/plplot.adb.cmake trunk/bindings/ada/plplot.ads.cmake trunk/bindings/ada/plplot_traditional.adb.cmake trunk/bindings/ada/plplot_traditional.ads.cmake trunk/doc/docbook/src/ada.xml trunk/examples/ada/x31a.adb.cmake trunk/examples/ada/xthick31a.adb.cmake Modified: trunk/bindings/ada/plplot.adb.cmake =================================================================== --- trunk/bindings/ada/plplot.adb.cmake 2009-01-09 00:49:14 UTC (rev 9288) +++ trunk/bindings/ada/plplot.adb.cmake 2009-01-09 05:56:04 UTC (rev 9289) @@ -1497,26 +1497,19 @@ end Get_Compression_Level; - -- Get the current device (keyword) name - -- plgdev - procedure Get_Device_Name(Device_Name : out String) is - PL_Device_Name : char_array(0..79); - begin - plgdev(PL_Device_Name); - Device_Name := To_Ada(PL_Device_Name, False); - end Get_Device_Name; - - - -- Make a function version of plgdev so that the caller can use it whereever + -- Make a function version of Get_Device_Name so that the caller can use it whereever -- a String type is expected without fooling around with conversions between -- Ada string types. See Example 14 for useage. + -- This _replaces_ the procedure version. -- THIS IS NOT IN THE C API. + + -- Get the current device (keyword) name -- plgdev function Get_Device_Name return String is PL_Device_Name : char_array(0..79); begin plgdev(PL_Device_Name); - return To_Ada(PL_Device_Name, True); + return To_Ada(PL_Device_Name, False); end Get_Device_Name; @@ -1587,23 +1580,19 @@ end Get_File_Family_Parameters; + -- Make a function version of Get_Output_File_Name so that the caller can use it whereever + -- a String type is expected without fooling around with conversions between + -- Ada string types. See Example 14 for useage. + -- This _replaces_ the procedure version. + -- THIS IS NOT IN THE C API. + -- Get the (current) output file name. -- plgfnam - procedure Get_Output_File_Name(Output_File_Name : out String) is - PL_Output_File_Name : char_array(0..79); - begin - plgfnam(PL_Output_File_Name); - Output_File_Name := To_Ada(PL_Output_File_Name, False); - end Get_Output_File_Name; - - - -- Function version of the procedure Get_Output_File_Name; not part of the PLplot API. - -- plgfnam function Get_Output_File_Name return String is Output_File_Name : char_array(0..79); begin plgfnam(Output_File_Name); - return To_Ada(Output_File_Name, True); + return To_Ada(Output_File_Name, False); end Get_Output_File_Name; @@ -1669,23 +1658,19 @@ end Get_Stream_Number; + -- Make a function version of Get_Version_Number so that the caller can use it whereever + -- a String type is expected without fooling around with conversions between + -- Ada string types. See Example 14 for useage. + -- This _replaces_ the procedure version. + -- THIS IS NOT IN THE C API. + -- Get the current library version number -- plgver - procedure Get_Version_Number(Version_Number : out String) is - PL_Version_Number : char_array(0..79); - begin - plgver(PL_Version_Number); - Version_Number := To_Ada(PL_Version_Number, False); - end Get_Version_Number; - - - -- Function version of the procedure Get_Version_Number; not part of the PLplot API. - -- plgver function Get_Version_Number return String is PL_Version_Number : char_array(0..79); begin plgver(PL_Version_Number); - return To_Ada(PL_Version_Number, True); + return To_Ada(PL_Version_Number, False); end Get_Version_Number; Modified: trunk/bindings/ada/plplot.ads.cmake =================================================================== --- trunk/bindings/ada/plplot.ads.cmake 2009-01-09 00:49:14 UTC (rev 9288) +++ trunk/bindings/ada/plplot.ads.cmake 2009-01-09 05:56:04 UTC (rev 9289) @@ -895,15 +895,14 @@ procedure Get_Compression_Level(Compression_Level : out Integer); - -- Get the current device (keyword) name - -- plgdev - procedure Get_Device_Name(Device_Name : out String); - - - -- Make a function version of plgdev so that the caller can use it whereever + -- Make a function version of Get_Device_Name so that the caller can use it whereever -- a String type is expected without fooling around with conversions between -- Ada string types. See Example 14 for useage. + -- This _replaces_ the procedure version. -- THIS IS NOT IN THE C API. + + -- Get the current device (keyword) name + -- plgdev function Get_Device_Name return String; @@ -948,13 +947,14 @@ Maximum_File_Size : out Integer); + -- Make a function version of Get_Output_File_Name so that the caller can use it whereever + -- a String type is expected without fooling around with conversions between + -- Ada string types. See Example 14 for useage. + -- This _replaces_ the procedure version. + -- THIS IS NOT IN THE C API. + -- Get the (current) output file name. -- plgfnam - procedure Get_Output_File_Name(Output_File_Name : out String); - - - -- Function version of the procedure Get_Output_File_Name; not part of the PLplot API. - -- plgver function Get_Output_File_Name return String; @@ -998,12 +998,14 @@ procedure Get_Stream_Number(Stream_Number : out Integer); + -- Make a function version of Get_Version_Number so that the caller can use it whereever + -- a String type is expected without fooling around with conversions between + -- Ada string types. See Example 14 for useage. + -- This _replaces_ the procedure version. + -- THIS IS NOT IN THE C API. + -- Get the current library version number -- plgver - procedure Get_Version_Number(Version_Number : out String); - - -- Function version of the procedure Get_Version_Number; not part of the PLplot API. - -- plgver function Get_Version_Number return String; -- Get viewport boundaries in normalized device coordinates Modified: trunk/bindings/ada/plplot_traditional.adb.cmake =================================================================== --- trunk/bindings/ada/plplot_traditional.adb.cmake 2009-01-09 00:49:14 UTC (rev 9288) +++ trunk/bindings/ada/plplot_traditional.adb.cmake 2009-01-09 05:56:04 UTC (rev 9289) @@ -1461,24 +1461,18 @@ end plgcompression; - -- Get the current device (keyword) name - procedure plgdev(Device_Name : out String) is - PL_Device_Name : char_array(0..79); - begin - PLplot_Thin.plgdev(PL_Device_Name); - Device_Name := To_Ada(PL_Device_Name, False); - end plgdev; - - -- Make a function version of plgdev so that the caller can use it whereever -- a String type is expected without fooling around with conversions between -- Ada string types. See Example 14 for useage. + -- This _replaces_ the procedure version. -- THIS IS NOT IN THE C API. + + -- Get the current device (keyword) name function plgdev return String is PL_Device_Name : char_array(0..79); begin PLplot_Thin.plgdev(PL_Device_Name); - return To_Ada(PL_Device_Name, True); + return To_Ada(PL_Device_Name, False); end plgdev; @@ -1543,21 +1537,18 @@ end plgfam; - -- Get the (current) output file name. - procedure plgfnam(Output_File_Name : out String) is - PL_Output_File_Name : char_array(0..79); - begin - PLplot_Thin.plgfnam(PL_Output_File_Name); - Output_File_Name := To_Ada(PL_Output_File_Name, False); - end plgfnam; + -- Make a function version of plgfnam so that the caller can use it whereever + -- a String type is expected without fooling around with conversions between + -- Ada string types. See Example 14 for useage. + -- This _replaces_ the procedure version. + -- THIS IS NOT IN THE C API. - - -- Function version of the procedure plgfnam; not part of the PLplot API. + -- Get the (current) output file name. function plgfnam return String is PL_Output_File_Name : char_array(0..79); begin PLplot_Thin.plgfnam(PL_Output_File_Name); - return To_Ada(PL_Output_File_Name, True); + return To_Ada(PL_Output_File_Name, False); end plgfnam; @@ -1617,21 +1608,18 @@ end plgstrm; - -- Get the current library version number - procedure plgver(Version_Number : out String) is - PL_Version_Number : char_array(0..79); - begin - PLplot_Thin.plgver(PL_Version_Number); - Version_Number := To_Ada(PL_Version_Number, False); - end plgver; + -- Make a function version of plgver so that the caller can use it whereever + -- a String type is expected without fooling around with conversions between + -- Ada string types. See Example 14 for useage. + -- This _replaces_ the procedure version. + -- THIS IS NOT IN THE C API. - - -- Function version of the procedure plgver; not part of the PLplot API. + -- Get the current library version number function plgver return String is PL_Version_Number : char_array(0..79); begin PLplot_Thin.plgver(PL_Version_Number); - return To_Ada(PL_Version_Number, True); + return To_Ada(PL_Version_Number, False); end plgver; Modified: trunk/bindings/ada/plplot_traditional.ads.cmake =================================================================== --- trunk/bindings/ada/plplot_traditional.ads.cmake 2009-01-09 00:49:14 UTC (rev 9288) +++ trunk/bindings/ada/plplot_traditional.ads.cmake 2009-01-09 05:56:04 UTC (rev 9289) @@ -856,14 +856,13 @@ procedure plgcompression(Compression_Level : out Integer); - -- Get the current device (keyword) name - procedure plgdev(Device_Name : out String); - - -- Make a function version of plgdev so that the caller can use it whereever -- a String type is expected without fooling around with conversions between -- Ada string types. See Example 14 for useage. + -- This _replaces_ the procedure version. -- THIS IS NOT IN THE C API. + + -- Get the current device (keyword) name function plgdev return String; @@ -902,11 +901,13 @@ Maximum_File_Size : out Integer); + -- Make a function version of plgfnam so that the caller can use it whereever + -- a String type is expected without fooling around with conversions between + -- Ada string types. See Example 14 for useage. + -- This _replaces_ the procedure version. + -- THIS IS NOT IN THE C API. + -- Get the (current) output file name. - procedure plgfnam(Output_File_Name : out String); - - - -- Function version of the procedure plgfnam; not part of the PLplot API. function plgfnam return String; -- Get the (current) run level. @@ -943,10 +944,13 @@ procedure plgstrm(Stream_Number : out Integer); + -- Make a function version of plgver so that the caller can use it whereever + -- a String type is expected without fooling around with conversions between + -- Ada string types. See Example 14 for useage. + -- This _replaces_ the procedure version. + -- THIS IS NOT IN THE C API. + -- Get the current library version number - procedure plgver(Version_Number : out String); - - -- Function version of the procedure plgver; not part of the PLplot API. function plgver return String; -- Get viewport boundaries in normalized device coordinates Modified: trunk/doc/docbook/src/ada.xml =================================================================== --- trunk/doc/docbook/src/ada.xml 2009-01-09 00:49:14 UTC (rev 9288) +++ trunk/doc/docbook/src/ada.xml 2009-01-09 05:56:04 UTC (rev 9289) @@ -278,7 +278,7 @@ </sect2> <sect2 id="ada_one_offs"> <title>One-offs</title> - <para> Convenient string handling for Get_Device_Name (<literal>plgdev</literal> in the traditional binding); a function version is provided that simplifies the string handling associated with this feature.</para> + <para> To provide convenient string handling in a fashion that is familiar to Ada programmers, function versions which return a <literal>String</literal> type are provided of <literal>Get_Device_Name</literal>, <literal>Get_Version_Number</literal>, and <literal>Get_Output_File_Name</literal> (<literal>plgdev</literal>, <literal>plgver</literal>, and <literal>plgfnam</literal> in the traditional binding). These functions replace the procedure-style subprograms that are described in the C API documentation.</para> <para> Overloaded <literal>Set_Line_Style</literal> (<literal>plstyl</literal> in the traditional binding) with a version that takes a single argument, <literal>Default_Continuous_Line</literal>. This replaces the awkward situation of calling the normal versions of these procedures with unused arguments simply to set the line style to the default, continuous, line.</para> <para> The contour plotter <literal>Contour_Plot_Irregular_Data</literal> (<literal>plfcont</literal> in the traditional binding) is provided for making contour plots from irregularly spaced data. This feature is not documented in the PLplot API documentation. </para> </sect2> Modified: trunk/examples/ada/x31a.adb.cmake =================================================================== --- trunk/examples/ada/x31a.adb.cmake 2009-01-09 00:49:14 UTC (rev 9288) +++ trunk/examples/ada/x31a.adb.cmake 2009-01-09 05:56:04 UTC (rev 9289) @@ -25,6 +25,7 @@ Ada.Long_Float_Text_IO, Ada.Strings, Ada.Strings.Fixed, + Ada.Strings.Unbounded, Ada.Numerics, Ada.Numerics.Long_Elementary_Functions, PLplot_Auxiliary, @@ -34,6 +35,7 @@ Ada.Long_Float_Text_IO, Ada.Strings, Ada.Strings.Fixed, + Ada.Strings.Unbounded, Ada.Numerics, Ada.Numerics.Long_Elementary_Functions, PLplot_Auxiliary, @@ -64,7 +66,7 @@ b1 : Integer_0_255_Array(0 .. 1) := (0, 0); a1 : Real_Vector(0 .. 1) := (1.0, 1.0); status : Integer; - fnam : String(1 .. 80); + fnam : Unbounded_String; -- Convert a boolean to integers 0 or 1. function Boolean_To_Integer(B : Boolean) return Integer is @@ -193,8 +195,8 @@ -- Retrieve and print the name of the output file (if any). -- This goes to stderr not stdout since it will vary between tests and -- we want stdout to be identical for compare test. - plgfnam(fnam); - if fnam(1) = Character'Val(0) then + fnam := To_Unbounded_String(plgfnam); + if fnam = Null_Unbounded_String then Put_Line("No output file name is set"); else Put_Line("Output file name read"); Modified: trunk/examples/ada/xthick31a.adb.cmake =================================================================== --- trunk/examples/ada/xthick31a.adb.cmake 2009-01-09 00:49:14 UTC (rev 9288) +++ trunk/examples/ada/xthick31a.adb.cmake 2009-01-09 05:56:04 UTC (rev 9289) @@ -25,6 +25,7 @@ Ada.Long_Float_Text_IO, Ada.Strings, Ada.Strings.Fixed, + Ada.Strings.Unbounded, Ada.Numerics, Ada.Numerics.Long_Elementary_Functions, PLplot_Auxiliary, @@ -34,6 +35,7 @@ Ada.Long_Float_Text_IO, Ada.Strings, Ada.Strings.Fixed, + Ada.Strings.Unbounded, Ada.Numerics, Ada.Numerics.Long_Elementary_Functions, PLplot_Auxiliary, @@ -64,7 +66,7 @@ b1 : Integer_0_255_Array(0 .. 1) := (0, 0); a1 : Real_Vector(0 .. 1) := (1.0, 1.0); status : Integer; - fnam : String(1 .. 80); + fnam : Unbounded_String; -- Convert a boolean to integers 0 or 1. function Boolean_To_Integer(B : Boolean) return Integer is @@ -193,8 +195,8 @@ -- Retrieve and print the name of the output file (if any). -- This goes to stderr not stdout since it will vary between tests and -- we want stdout to be identical for compare test. - Get_Output_File_Name(fnam); - if fnam(1) = Character'Val(0) then + fnam := To_Unbounded_String(Get_Output_File_Name); + if fnam = Null_Unbounded_String then Put_Line("No output file name is set"); else Put_Line("Output file name read"); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jb...@us...> - 2009-01-13 10:25:01
|
Revision: 9295 http://plplot.svn.sourceforge.net/plplot/?rev=9295&view=rev Author: jbauck Date: 2009-01-13 10:24:55 +0000 (Tue, 13 Jan 2009) Log Message: ----------- In the Ada examples, changed the last argument of Set_Color_Map_1_Piecewise and plscmap1l to be a properly-dimensioned array rather than a length-1 array. Modified Paths: -------------- trunk/doc/docbook/src/ada.xml trunk/examples/ada/x11a.adb.cmake trunk/examples/ada/x12a.adb.cmake trunk/examples/ada/x15a.adb.cmake trunk/examples/ada/x20a.adb.cmake trunk/examples/ada/x21a.adb.cmake trunk/examples/ada/xthick11a.adb.cmake trunk/examples/ada/xthick12a.adb.cmake trunk/examples/ada/xthick15a.adb.cmake trunk/examples/ada/xthick20a.adb.cmake trunk/examples/ada/xthick21a.adb.cmake Modified: trunk/doc/docbook/src/ada.xml =================================================================== --- trunk/doc/docbook/src/ada.xml 2009-01-11 12:06:27 UTC (rev 9294) +++ trunk/doc/docbook/src/ada.xml 2009-01-13 10:24:55 UTC (rev 9295) @@ -291,13 +291,14 @@ <para> This is the only place in the PLplot bindings where a C subprogram calls an Ada subprogram while passing an array. If the array is unconstrained, there is no guarantee that it will work because C has no way of telling Ada what offset to use for the beginning of the array. But passing a constrained array is acceptable with the downside that the array size must be fixed within the bindings as being large enough to handle any situation; currently, it is sized as <literal>0 .. 2000</literal>. See Example 19 for how this is handled in by the user program. The constrained array is called <literal>Map_Form_Constrained_Array</literal>.</para> </sect1> - <sect1 id="ada_known_issues"> - <title>Known Issues</title> + <sect1 id="ada_known_variances"> + <title>Known Variances</title> <!-- 200:'Normal' --><para><emphasis role="bold"> 9.1 Stripchart labelling</emphasis></para> <para> In Example 17, all of the stripchart labels are the same regardless of the fact that the calling program sets them to be different. This is likely to affect user programs in the same manner.</para> <para><emphasis role="bold"> 9.2 Documentation</emphasis></para> <para> In numerous places in the documentation, a feature is listed or described as "C only." Many of these features are actually available in Ada. For example, in <literal>Contour_Plot</literal> (<literal>plcont</literal> in the traditional binding), the transformation from array indices to world coordinates is mentioned as "C only" but is actually available in Ada.</para> - + <para><emphasis role="bold"> 9.3 API</emphasis></para> + <para> The C documentation for <literal>plscmap1l</literal> (<literal>Set_Color_Map_1_Piecewise</literal> in the thick binding) states that if the last argument is a null pointer, the behavior is as though a proper-length array of all <literal>False</literal> values was passed. In Ada, the last parameter should always be an array of Boolean of the same length as the other array arguments.</para> </sect1> <sect1 id="ada_compilation_notes"> <title>Compilation notes</title> Modified: trunk/examples/ada/x11a.adb.cmake =================================================================== --- trunk/examples/ada/x11a.adb.cmake 2009-01-11 12:06:27 UTC (rev 9294) +++ trunk/examples/ada/x11a.adb.cmake 2009-01-13 10:24:55 UTC (rev 9295) @@ -56,7 +56,7 @@ clevel : Real_Vector(0 .. LEVELS - 1); zmin, zmax, step : Long_Float; - A_Boolean : Boolean_Array_1D(1 .. 1); + Reverse_Flag : Boolean_Array_1D(0 .. 1) := (False, False); procedure cmap1_init is i, h, l, s : Real_Vector(0 .. 1); @@ -74,7 +74,7 @@ s(1) := 0.8; plscmap1n(256); - plscmap1l(HLS, i, h, l, s, A_Boolean); + plscmap1l(HLS, i, h, l, s, Reverse_Flag); end cmap1_init; @@ -87,8 +87,6 @@ -- Initialize plplot plinit; - - A_Boolean(1) := False; for i in x'range loop x(i) := 3.0 * Long_Float(i - XPTS / 2) / Long_Float(XPTS / 2); Modified: trunk/examples/ada/x12a.adb.cmake =================================================================== --- trunk/examples/ada/x12a.adb.cmake 2009-01-11 12:06:27 UTC (rev 9294) +++ trunk/examples/ada/x12a.adb.cmake 2009-01-13 10:24:55 UTC (rev 9295) @@ -48,12 +48,11 @@ procedure x12a is y0 : Real_Vector (0 .. 9); - pos : Real_Vector (0 .. 4) := (0.0, 0.25, 0.5, 0.75, 1.0); - red : Real_Vector (0 .. 4) := (0.0, 0.25, 0.5, 1.0, 1.0); - green : Real_Vector (0 .. 4) := (1.0, 0.5, 0.5, 0.5, 1.0); - blue : Real_Vector (0 .. 4) := (1.0, 1.0, 0.5, 0.25, 0.0); - A_Boolean :Boolean_Array_1D(0 .. 4) := (False, False, False, False, False); + r : Real_Vector (0 .. 4) := (0.0, 0.25, 0.5, 1.0, 1.0); + g : Real_Vector (0 .. 4) := (1.0, 0.5, 0.5, 0.5, 1.0); + b : Real_Vector (0 .. 4) := (1.0, 1.0, 0.5, 0.25, 0.0); + Reverse_Flag : Boolean_Array_1D (0 .. 4) := (False, False, False, False, False); procedure plfbox (x0, y0 : Long_Float) is x, y : Real_Vector (0 ..3); @@ -101,10 +100,9 @@ y0(8) := 12.0; y0(9) := 3.0; - plscmap1l(RGB, pos, red, green, blue, A_Boolean); + plscmap1l(RGB, pos, r, g, b, Reverse_Flag); for i in y0'range loop - -- plcol0(i + 1); plcol1(Long_Float(i)/9.0); plpsty(0); plfbox((1980.0 + Long_Float(i)), y0(i)); Modified: trunk/examples/ada/x15a.adb.cmake =================================================================== --- trunk/examples/ada/x15a.adb.cmake 2009-01-11 12:06:27 UTC (rev 9294) +++ trunk/examples/ada/x15a.adb.cmake 2009-01-13 10:24:55 UTC (rev 9295) @@ -53,10 +53,8 @@ ---------------------------------------------------------------------------- procedure cmap1_init2 is i, h, l, s : Real_Vector(0 .. 3); - A_Boolean : Boolean_Array_1D(1 .. 1); + Reverse_Flag : Boolean_Array_1D(0 .. 3) := (False, False, False, False); begin - A_Boolean(1) := False; -- Don't reverse direction of control points - -- Set control points. i(0) := 0.0; -- left boundary i(1) := 0.45; -- just before center @@ -81,7 +79,7 @@ s(2) := 0.5; -- center s(3) := 1.0; -- high - plscmap1l(HLS, i, h, l, s, A_Boolean); + plscmap1l(HLS, i, h, l, s, Reverse_Flag); end cmap1_init2; ---------------------------------------------------------------------------- Modified: trunk/examples/ada/x20a.adb.cmake =================================================================== --- trunk/examples/ada/x20a.adb.cmake 2009-01-11 12:06:27 UTC (rev 9294) +++ trunk/examples/ada/x20a.adb.cmake 2009-01-13 10:24:55 UTC (rev 9295) @@ -217,7 +217,7 @@ -- Set gray colormap. procedure gray_cmap(num_col : Integer) is r, g, b, pos : Real_Vector(0 .. 1); - A_Boolean : Boolean_Array_1D(1 .. 1); + Reverse_Flag : Boolean_Array_1D(0 .. 1) := (False, False); begin r(0) := 0.0; g(0) := 0.0; @@ -231,8 +231,7 @@ pos(1) := 1.0; plscmap1n(num_col); - A_Boolean(1) := False; - plscmap1l(RGB, pos, r, g, b, A_Boolean); + plscmap1l(RGB, pos, r, g, b, Reverse_Flag); end gray_cmap; Modified: trunk/examples/ada/x21a.adb.cmake =================================================================== --- trunk/examples/ada/x21a.adb.cmake 2009-01-11 12:06:27 UTC (rev 9294) +++ trunk/examples/ada/x21a.adb.cmake 2009-01-13 10:24:55 UTC (rev 9295) @@ -85,10 +85,8 @@ procedure cmap1_init is i, h, l, s : Real_Vector(0 .. 1); - A_Boolean : Boolean_Array_1D(1 .. 1); + Reverse_Flag : Boolean_Array_1D(0 .. 1) := (False, False); begin - A_Boolean(1) := False; -- Don't reverse direction of control points - i(0) := 0.0; -- left boundary i(1) := 1.0; -- right boundary @@ -102,7 +100,7 @@ s(1) := 0.8; plscmap1n(256); - plscmap1l(HLS, i, h, l, s, A_Boolean); + plscmap1l(HLS, i, h, l, s, Reverse_Flag); end cmap1_init; Modified: trunk/examples/ada/xthick11a.adb.cmake =================================================================== --- trunk/examples/ada/xthick11a.adb.cmake 2009-01-11 12:06:27 UTC (rev 9294) +++ trunk/examples/ada/xthick11a.adb.cmake 2009-01-13 10:24:55 UTC (rev 9295) @@ -56,7 +56,7 @@ clevel : Real_Vector(0 .. LEVELS - 1); zmin, zmax, step : Long_Float; - A_Boolean : Boolean_Array_1D(1 .. 1); + Reverse_Flag : Boolean_Array_1D(0 .. 1) := (False, False); procedure cmap1_init is i, h, l, s : Real_Vector(0 .. 1); @@ -74,7 +74,7 @@ s(1) := 0.8; Set_Number_Of_Colors_In_Color_Map_1(256); - Set_Color_Map_1_Piecewise(HLS, i, h, l, s, A_Boolean); + Set_Color_Map_1_Piecewise(HLS, i, h, l, s, Reverse_Flag); end cmap1_init; @@ -87,8 +87,6 @@ -- Initialize plplot Initialize_PLplot; - - A_Boolean(1) := False; for i in x'range loop x(i) := 3.0 * Long_Float(i - XPTS / 2) / Long_Float(XPTS / 2); Modified: trunk/examples/ada/xthick12a.adb.cmake =================================================================== --- trunk/examples/ada/xthick12a.adb.cmake 2009-01-11 12:06:27 UTC (rev 9294) +++ trunk/examples/ada/xthick12a.adb.cmake 2009-01-13 10:24:55 UTC (rev 9295) @@ -47,12 +47,11 @@ procedure xthick12a is y0 : Real_Vector (0 .. 9); - pos : Real_Vector (0 .. 4) := (0.0, 0.25, 0.5, 0.75, 1.0); - r : Real_Vector (0 .. 4) := (0.0, 0.25, 0.5, 1.0, 1.0); - g : Real_Vector (0 .. 4) := (1.0, 0.5, 0.5, 0.5, 1.0); - b : Real_Vector (0 .. 4) := (1.0, 1.0, 0.5, 0.25, 0.0); - A_Boolean :Boolean_Array_1D(0 .. 4) := (False, False, False, False, False); + r : Real_Vector (0 .. 4) := (0.0, 0.25, 0.5, 1.0, 1.0); + g : Real_Vector (0 .. 4) := (1.0, 0.5, 0.5, 0.5, 1.0); + b : Real_Vector (0 .. 4) := (1.0, 1.0, 0.5, 0.25, 0.0); + Reverse_Flag : Boolean_Array_1D (0 .. 4) := (False, False, False, False, False); procedure plfbox (x0, y0 : Long_Float) is x, y : Real_Vector (0 ..3); @@ -100,11 +99,10 @@ y0(8) := 12.0; y0(9) := 3.0; - Set_Color_Map_1_Piecewise(RGB, pos, r, g, b, A_Boolean); + Set_Color_Map_1_Piecewise(RGB, pos, r, g, b, Reverse_Flag); for i in y0'range loop - --Set_Pen_Color(i + 1); - Set_Color_Map_1(Long_Float(i)/9.0); + Set_Color_Map_1(Long_Float(i)/9.0); Select_Fill_Pattern(0); plfbox((1980.0 + Long_Float(i)), y0(i)); Write_Text_World(1980.0 + Long_Float(i) + 0.5, y0(i) + 1.0, 1.0, 0.0, 0.5, Trim(Integer'image(Integer(y0(i))), Left)); Modified: trunk/examples/ada/xthick15a.adb.cmake =================================================================== --- trunk/examples/ada/xthick15a.adb.cmake 2009-01-11 12:06:27 UTC (rev 9294) +++ trunk/examples/ada/xthick15a.adb.cmake 2009-01-13 10:24:55 UTC (rev 9295) @@ -53,10 +53,8 @@ ---------------------------------------------------------------------------- procedure cmap1_init2 is i, h, l, s : Real_Vector(0 .. 3); - A_Boolean : Boolean_Array_1D(1 .. 1); + Reverse_Flag : Boolean_Array_1D(0 .. 3) := (False, False, False, False); begin - A_Boolean(1) := False; -- Don't reverse direction of control points - -- Set control points. i(0) := 0.0; -- left boundary i(1) := 0.45; -- just before center @@ -81,7 +79,7 @@ s(2) := 0.5; -- center s(3) := 1.0; -- high - Set_Color_Map_1_Piecewise(HLS, i, h, l, s, A_Boolean); + Set_Color_Map_1_Piecewise(HLS, i, h, l, s, Reverse_Flag); end cmap1_init2; ---------------------------------------------------------------------------- Modified: trunk/examples/ada/xthick20a.adb.cmake =================================================================== --- trunk/examples/ada/xthick20a.adb.cmake 2009-01-11 12:06:27 UTC (rev 9294) +++ trunk/examples/ada/xthick20a.adb.cmake 2009-01-13 10:24:55 UTC (rev 9295) @@ -217,7 +217,7 @@ -- Set gray colormap. procedure gray_cmap(num_col : Integer) is r, g, b, pos : Real_Vector(0 .. 1); - A_Boolean : Boolean_Array_1D(1 .. 1); + Reverse_Flag : Boolean_Array_1D(0 .. 1) := (False, False); begin r(0) := 0.0; g(0) := 0.0; @@ -231,8 +231,7 @@ pos(1) := 1.0; Set_Number_Of_Colors_In_Color_Map_1(num_col); - A_Boolean(1) := False; - Set_Color_Map_1_Piecewise(RGB, pos, r, g, b, A_Boolean); + Set_Color_Map_1_Piecewise(RGB, pos, r, g, b, Reverse_Flag); end gray_cmap; Modified: trunk/examples/ada/xthick21a.adb.cmake =================================================================== --- trunk/examples/ada/xthick21a.adb.cmake 2009-01-11 12:06:27 UTC (rev 9294) +++ trunk/examples/ada/xthick21a.adb.cmake 2009-01-13 10:24:55 UTC (rev 9295) @@ -85,10 +85,8 @@ procedure cmap1_init is i, h, l, s : Real_Vector(0 .. 1); - A_Boolean : Boolean_Array_1D(1 .. 1); + Reverse_Flag : Boolean_Array_1D(0 .. 1) := (False, False); begin - A_Boolean(1) := False; -- Don't reverse direction of control points - i(0) := 0.0; -- left boundary i(1) := 1.0; -- right boundary @@ -102,7 +100,7 @@ s(1) := 0.8; Set_Number_Of_Colors_In_Color_Map_1(256); - Set_Color_Map_1_Piecewise(HLS, i, h, l, s, A_Boolean); + Set_Color_Map_1_Piecewise(HLS, i, h, l, s, Reverse_Flag); end cmap1_init; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jb...@us...> - 2009-01-14 05:59:04
|
Revision: 9300 http://plplot.svn.sourceforge.net/plplot/?rev=9300&view=rev Author: jbauck Date: 2009-01-14 05:59:01 +0000 (Wed, 14 Jan 2009) Log Message: ----------- Add overloaded versions of plscmap1, Set_Color_Map_1_RGB, plscmap1a, Set_Color_Map_1_RGB_And_Alpha to allow simplified hue reversal. Added checks for array length consistency in same. Modified Paths: -------------- trunk/bindings/ada/plplot.adb.cmake trunk/bindings/ada/plplot.ads.cmake trunk/bindings/ada/plplot_traditional.adb.cmake trunk/bindings/ada/plplot_traditional.ads.cmake trunk/examples/ada/x08a.adb.cmake trunk/examples/ada/x11a.adb.cmake trunk/examples/ada/x12a.adb.cmake trunk/examples/ada/x15a.adb.cmake trunk/examples/ada/x20a.adb.cmake trunk/examples/ada/x21a.adb.cmake trunk/examples/ada/x30a.adb.cmake trunk/examples/ada/xthick08a.adb.cmake trunk/examples/ada/xthick11a.adb.cmake trunk/examples/ada/xthick12a.adb.cmake trunk/examples/ada/xthick15a.adb.cmake trunk/examples/ada/xthick20a.adb.cmake trunk/examples/ada/xthick21a.adb.cmake trunk/examples/ada/xthick30a.adb.cmake Modified: trunk/bindings/ada/plplot.adb.cmake =================================================================== --- trunk/bindings/ada/plplot.adb.cmake 2009-01-13 21:00:09 UTC (rev 9299) +++ trunk/bindings/ada/plplot.adb.cmake 2009-01-14 05:59:01 UTC (rev 9300) @@ -2202,7 +2202,7 @@ -- intensity [0,1] (cmap 1 index) and position in HLS or RGB color space. -- plscmap1l procedure Set_Color_Map_1_Piecewise - (Color_Model : Color_Model_Type; -- HLS or RGB + (Color_Model : Color_Model_Type; -- HLS or RGB Control_Points : Real_Vector; -- range 0.0 .. 1.0; not checked here H_Or_R : Real_Vector; -- range 0.0 .. 1.0; not checked here -- Note: Hue is 0.0 .. 360.0. @@ -2214,6 +2214,13 @@ PL_Reverse_Hue : PL_Bool_Array (Reverse_Hue'range); begin + -- Check for consistent array lengths. + if Control_Points'length /= H_Or_R'length or Control_Points'length /= L_or_G'length or + Control_Points'length /= S_Or_B'length or Control_Points'length /= Reverse_Hue'length + then + Put_Line("*** WARNING: Inconsistent array lengths when setting color map 1 ***"); + end if; + if Color_Model = RGB then PL_Color_Model := PLtrue; else @@ -2230,6 +2237,35 @@ plscmap1l(PL_Color_Model, Control_Points'Length, Control_Points, H_Or_R, L_Or_G, S_Or_B, PL_Reverse_Hue); end Set_Color_Map_1_Piecewise; + + + -- Overloaded version of Set_Color_Map_1_Piecewise which allows simplified (non-)reversal of + -- the traversed hue range. This is an Ada-like way of doing what is described + -- in the PLplot documentation when a C user passes a null pointer as the + -- final argument instead of an array of booleans to indicate hue reversal. + -- plscmap1l + procedure Set_Color_Map_1_Piecewise + (Color_Model : Color_Model_Type; -- HLS or RGB + Control_Points : Real_Vector; -- range 0.0 .. 1.0; not checked here + H_Or_R : Real_Vector; -- range 0.0 .. 1.0; not checked here + -- Note: Hue is 0.0 .. 360.0. + L_Or_G : Real_Vector; -- range 0.0 .. 1.0; not checked here + S_Or_B : Real_Vector; -- range 0.0 .. 1.0; not checked here + Reverse_Hue : Reverse_Hue_Type) is + + Reverse_Hue_Array : Boolean_Array_1D(Control_Points'range); + begin + if Reverse_Hue = Reverse_Hue_All then + for i in Reverse_Hue_Array'range loop + Reverse_Hue_Array(i) := True; + end loop; + elsif Reverse_Hue = Reverse_Hue_None then + for i in Reverse_Hue_Array'range loop + Reverse_Hue_Array(i) := False; + end loop; + end if; + Set_Color_Map_1_Piecewise(Color_Model, Control_Points, H_Or_R, L_Or_G, S_Or_B, Reverse_Hue_Array); + end Set_Color_Map_1_Piecewise; -- Set color map 1 colors using a piece-wise linear relationship between @@ -2237,7 +2273,7 @@ -- Will also linear interpolate alpha values. -- plscmap1la procedure Set_Color_Map_1_Piecewise_And_Alpha - (Color_Model : Color_Model_Type; -- HLS or RGB + (Color_Model : Color_Model_Type; -- HLS or RGB Control_Points : Real_Vector; -- range 0.0 .. 1.0; not checked here H_Or_R : Real_Vector; -- range 0.0 .. 1.0; not checked here L_Or_G : Real_Vector; -- range 0.0 .. 1.0; not checked here @@ -2249,8 +2285,13 @@ PL_Reverse_Hue : PL_Bool_Array (Reverse_Hue'range); begin - -- fix this Should check that arrays H_Or_R, S_Or_B, S_Or_B and - -- Reverse_Hue should be the same length. + -- Check for consistent array lengths. + if Control_Points'length /= H_Or_R'length or Control_Points'length /= L_or_G'length or + Control_Points'length /= S_Or_B'length or Control_Points'length /= Reverse_Hue'length + then + Put_Line("*** WARNING: Inconsistent array lengths when setting color map 1 ***"); + end if; + if Color_Model = RGB then PL_Color_Model := PLtrue; else @@ -2267,9 +2308,37 @@ plscmap1la(PL_Color_Model, Control_Points'Length, Control_Points, H_Or_R, L_Or_G, S_Or_B, Alpha, PL_Reverse_Hue); end Set_Color_Map_1_Piecewise_And_Alpha; + + + -- Overloaded version of Set_Color_Map_1_Piecewise_And_Alpha which allows simplified (non-)reversal of + -- the traversed hue range. This is an Ada-like way of doing what is described + -- in the PLplot documentation when a C user passes a null pointer as the + -- final argument instead of an array of booleans to indicate hue reversal. + -- plscmap1la + procedure Set_Color_Map_1_Piecewise_And_Alpha + (Color_Model : Color_Model_Type; -- HLS or RGB + Control_Points : Real_Vector; -- range 0.0 .. 1.0; not checked here + H_Or_R : Real_Vector; -- range 0.0 .. 1.0; not checked here + L_Or_G : Real_Vector; -- range 0.0 .. 1.0; not checked here + S_Or_B : Real_Vector; -- range 0.0 .. 1.0; not checked here + Alpha : Real_Vector; -- range 0.0 .. 1.0; not checked here + Reverse_Hue : Reverse_Hue_Type) is + + Reverse_Hue_Array : Boolean_Array_1D(Control_Points'range); + begin + if Reverse_Hue = Reverse_Hue_All then + for i in Reverse_Hue_Array'range loop + Reverse_Hue_Array(i) := True; + end loop; + elsif Reverse_Hue = Reverse_Hue_None then + for i in Reverse_Hue_Array'range loop + Reverse_Hue_Array(i) := False; + end loop; + end if; + Set_Color_Map_1_Piecewise_And_Alpha(Color_Model, Control_Points, H_Or_R, L_Or_G, S_Or_B, Alpha, Reverse_Hue_Array); + end Set_Color_Map_1_Piecewise_And_Alpha; - -- Set number of colors in cmap 1 -- plscmap1n procedure Set_Number_Of_Colors_In_Color_Map_1(Number_Of_Colors : Integer) is Modified: trunk/bindings/ada/plplot.ads.cmake =================================================================== --- trunk/bindings/ada/plplot.ads.cmake 2009-01-13 21:00:09 UTC (rev 9299) +++ trunk/bindings/ada/plplot.ads.cmake 2009-01-14 05:59:01 UTC (rev 9300) @@ -576,6 +576,7 @@ type Color_Themes_For_Map_1_Type is (Gray, Blue_Green_Red, Red_Green_Blue, Red_Cyan_Blue, Blue_Black_Red, Red_Blue_Green, Red_Yellow); + type Reverse_Hue_Type is (Reverse_Hue_None, Reverse_Hue_All); -- Quick application of pre-fabricated color schemes to color map 1. @@ -1351,6 +1352,20 @@ L_Or_G : Real_Vector; -- range 0.0 .. 1.0; not checked here S_Or_B : Real_Vector; -- range 0.0 .. 1.0; not checked here Reverse_Hue : Boolean_Array_1D); -- False means red<->green<->blue<->red, True reverses + + + -- Overloaded version of Set_Color_Map_1_Piecewise which allows simplified (non-)reversal of + -- the traversed hue range. This is an Ada-like way of doing what is described + -- in the PLplot documentation when a C user passes a null pointer as the + -- final argument instead of an array of booleans to indicate hue reversal. + procedure Set_Color_Map_1_Piecewise + (Color_Model : Color_Model_Type; -- HLS or RGB + Control_Points : Real_Vector; -- range 0.0 .. 1.0; not checked here + H_Or_R : Real_Vector; -- range 0.0 .. 1.0; not checked here + -- Note: Hue is 0.0 .. 360.0. + L_Or_G : Real_Vector; -- range 0.0 .. 1.0; not checked here + S_Or_B : Real_Vector; -- range 0.0 .. 1.0; not checked here + Reverse_Hue : Reverse_Hue_Type); -- Set color map 1 colors using a piece-wise linear relationship between @@ -1365,6 +1380,20 @@ S_Or_B : Real_Vector; -- range 0.0 .. 1.0; not checked here Alpha : Real_Vector; -- range 0.0 .. 1.0; not checked here Reverse_Hue : Boolean_Array_1D); -- False means red<->green<->blue<->red, True reverses + + + -- Overloaded version of Set_Color_Map_1_Piecewise_And_Alpha which allows simplified (non-)reversal of + -- the traversed hue range. This is an Ada-like way of doing what is described + -- in the PLplot documentation when a C user passes a null pointer as the + -- final argument instead of an array of booleans to indicate hue reversal. + procedure Set_Color_Map_1_Piecewise_And_Alpha + (Color_Model : Color_Model_Type; -- HLS or RGB + Control_Points : Real_Vector; -- range 0.0 .. 1.0; not checked here + H_Or_R : Real_Vector; -- range 0.0 .. 1.0; not checked here + L_Or_G : Real_Vector; -- range 0.0 .. 1.0; not checked here + S_Or_B : Real_Vector; -- range 0.0 .. 1.0; not checked here + Alpha : Real_Vector; -- range 0.0 .. 1.0; not checked here + Reverse_Hue : Reverse_Hue_Type); -- Set number of colors in cmap 1 Modified: trunk/bindings/ada/plplot_traditional.adb.cmake =================================================================== --- trunk/bindings/ada/plplot_traditional.adb.cmake 2009-01-13 21:00:09 UTC (rev 9299) +++ trunk/bindings/ada/plplot_traditional.adb.cmake 2009-01-14 05:59:01 UTC (rev 9300) @@ -2105,7 +2105,7 @@ -- Set color map 1 colors using a piece-wise linear relationship between -- intensity [0,1] (cmap 1 index) and position in HLS or RGB color space. procedure plscmap1l - (Color_Model : Color_Model_Type; -- HLS or RGB + (Color_Model : Color_Model_Type; -- HLS or RGB Control_Points : Real_Vector; -- range 0.0 .. 1.0; not checked here H_Or_R : Real_Vector; -- range 0.0 .. 1.0; not checked here -- Note: Hue is 0.0 .. 360.0. @@ -2117,6 +2117,13 @@ PL_Reverse_Hue : PL_Bool_Array (Reverse_Hue'range); begin + -- Check for consistent array lengths. + if Control_Points'length /= H_Or_R'length or Control_Points'length /= L_or_G'length or + Control_Points'length /= S_Or_B'length or Control_Points'length /= Reverse_Hue'length + then + Put_Line("*** WARNING: Inconsistent array lengths when setting color map 1 ***"); + end if; + if Color_Model = RGB then PL_Color_Model := PLtrue; else @@ -2133,13 +2140,41 @@ PLplot_Thin.plscmap1l(PL_Color_Model, Control_Points'Length, Control_Points, H_Or_R, L_Or_G, S_Or_B, PL_Reverse_Hue); end plscmap1l; + + + -- Overloaded version of plscmap1l which allows simplified (non-)reversal of + -- the traversed hue range. This is an Ada-like way of doing what is described + -- in the PLplot documentation when a C user passes a null pointer as the + -- final argument instead of an array of booleans to indicate hue reversal. + procedure plscmap1l + (Color_Model : Color_Model_Type; -- HLS or RGB + Control_Points : Real_Vector; -- range 0.0 .. 1.0; not checked here + H_Or_R : Real_Vector; -- range 0.0 .. 1.0; not checked here + -- Note: Hue is 0.0 .. 360.0. + L_Or_G : Real_Vector; -- range 0.0 .. 1.0; not checked here + S_Or_B : Real_Vector; -- range 0.0 .. 1.0; not checked here + Reverse_Hue : Reverse_Hue_Type) is + + Reverse_Hue_Array : Boolean_Array_1D(Control_Points'range); + begin + if Reverse_Hue = Reverse_Hue_All then + for i in Reverse_Hue_Array'range loop + Reverse_Hue_Array(i) := True; + end loop; + elsif Reverse_Hue = Reverse_Hue_None then + for i in Reverse_Hue_Array'range loop + Reverse_Hue_Array(i) := False; + end loop; + end if; + plscmap1l(Color_Model, Control_Points, H_Or_R, L_Or_G, S_Or_B, Reverse_Hue_Array); + end plscmap1l; -- Set color map 1 colors using a piece-wise linear relationship between -- intensity [0,1] (cmap 1 index) and position in HLS or RGB color space. -- Will also linear interpolate alpha values. procedure plscmap1la - (Color_Model : Color_Model_Type; -- HLS or RGB + (Color_Model : Color_Model_Type; -- HLS or RGB Control_Points : Real_Vector; -- range 0.0 .. 1.0; not checked here H_Or_R : Real_Vector; -- range 0.0 .. 1.0; not checked here L_Or_G : Real_Vector; -- range 0.0 .. 1.0; not checked here @@ -2151,8 +2186,13 @@ PL_Reverse_Hue : PL_Bool_Array (Reverse_Hue'range); begin - -- fix this Should check that arrays H_Or_R, S_Or_B, S_Or_B and - -- Reverse_Hue should be the same length. + -- Check for consistent array lengths. + if Control_Points'length /= H_Or_R'length or Control_Points'length /= L_or_G'length or + Control_Points'length /= S_Or_B'length or Control_Points'length /= Reverse_Hue'length + then + Put_Line("*** WARNING: Inconsistent array lengths when setting color map 1 ***"); + end if; + if Color_Model = RGB then PL_Color_Model := PLtrue; else @@ -2169,6 +2209,34 @@ PLplot_Thin.plscmap1la(PL_Color_Model, Control_Points'Length, Control_Points, H_Or_R, L_Or_G, S_Or_B, Alpha, PL_Reverse_Hue); end plscmap1la; + + + -- Overloaded version of plscmap1la which allows simplified (non-)reversal of + -- the traversed hue range. This is an Ada-like way of doing what is described + -- in the PLplot documentation when a C user passes a null pointer as the + -- final argument instead of an array of booleans to indicate hue reversal. + procedure plscmap1la + (Color_Model : Color_Model_Type; -- HLS or RGB + Control_Points : Real_Vector; -- range 0.0 .. 1.0; not checked here + H_Or_R : Real_Vector; -- range 0.0 .. 1.0; not checked here + L_Or_G : Real_Vector; -- range 0.0 .. 1.0; not checked here + S_Or_B : Real_Vector; -- range 0.0 .. 1.0; not checked here + Alpha : Real_Vector; -- range 0.0 .. 1.0; not checked here + Reverse_Hue : Reverse_Hue_Type) is + + Reverse_Hue_Array : Boolean_Array_1D(Control_Points'range); + begin + if Reverse_Hue = Reverse_Hue_All then + for i in Reverse_Hue_Array'range loop + Reverse_Hue_Array(i) := True; + end loop; + elsif Reverse_Hue = Reverse_Hue_None then + for i in Reverse_Hue_Array'range loop + Reverse_Hue_Array(i) := False; + end loop; + end if; + plscmap1la(Color_Model, Control_Points, H_Or_R, L_Or_G, S_Or_B, Alpha, Reverse_Hue_Array); + end plscmap1la; -- Set number of colors in cmap 1 Modified: trunk/bindings/ada/plplot_traditional.ads.cmake =================================================================== --- trunk/bindings/ada/plplot_traditional.ads.cmake 2009-01-13 21:00:09 UTC (rev 9299) +++ trunk/bindings/ada/plplot_traditional.ads.cmake 2009-01-14 05:59:01 UTC (rev 9300) @@ -575,6 +575,7 @@ type Color_Themes_For_Map_1_Type is (Gray, Blue_Green_Red, Red_Green_Blue, Red_Cyan_Blue, Blue_Black_Red, Red_Blue_Green, Red_Yellow); + type Reverse_Hue_Type is (Reverse_Hue_None, Reverse_Hue_All); -- Quick application of pre-fabricated color schemes to color map 1. @@ -1250,6 +1251,20 @@ L_Or_G : Real_Vector; -- range 0.0 .. 1.0; not checked here S_Or_B : Real_Vector; -- range 0.0 .. 1.0; not checked here Reverse_Hue : Boolean_Array_1D); -- False means red<->green<->blue<->red, True reverses + + + -- Overloaded version of plscmap1l which allows simplified (non-)reversal of + -- the traversed hue range. This is an Ada-like way of doing what is described + -- in the PLplot documentation when a C user passes a null pointer as the + -- final argument instead of an array of booleans to indicate hue reversal. + procedure plscmap1l + (Color_Model : Color_Model_Type; -- HLS or RGB + Control_Points : Real_Vector; -- range 0.0 .. 1.0; not checked here + H_Or_R : Real_Vector; -- range 0.0 .. 1.0; not checked here + -- Note: Hue is 0.0 .. 360.0. + L_Or_G : Real_Vector; -- range 0.0 .. 1.0; not checked here + S_Or_B : Real_Vector; -- range 0.0 .. 1.0; not checked here + Reverse_Hue : Reverse_Hue_Type); -- Set color map 1 colors using a piece-wise linear relationship between @@ -1263,6 +1278,20 @@ S_Or_B : Real_Vector; -- range 0.0 .. 1.0; not checked here Alpha : Real_Vector; -- range 0.0 .. 1.0; not checked here Reverse_Hue : Boolean_Array_1D); -- False means red<->green<->blue<->red, True reverses + + + -- Overloaded version of plscmap1la which allows simplified (non-)reversal of + -- the traversed hue range. This is an Ada-like way of doing what is described + -- in the PLplot documentation when a C user passes a null pointer as the + -- final argument instead of an array of booleans to indicate hue reversal. + procedure plscmap1la + (Color_Model : Color_Model_Type; -- HLS or RGB + Control_Points : Real_Vector; -- range 0.0 .. 1.0; not checked here + H_Or_R : Real_Vector; -- range 0.0 .. 1.0; not checked here + L_Or_G : Real_Vector; -- range 0.0 .. 1.0; not checked here + S_Or_B : Real_Vector; -- range 0.0 .. 1.0; not checked here + Alpha : Real_Vector; -- range 0.0 .. 1.0; not checked here + Reverse_Hue : Reverse_Hue_Type); -- Set number of colors in cmap 1 Modified: trunk/examples/ada/x08a.adb.cmake =================================================================== --- trunk/examples/ada/x08a.adb.cmake 2009-01-13 21:00:09 UTC (rev 9299) +++ trunk/examples/ada/x08a.adb.cmake 2009-01-14 05:59:01 UTC (rev 9300) @@ -69,7 +69,6 @@ procedure cmap1_init(gray : Boolean) is i, h, l, s : Real_Vector(0 .. 1); - Reverse_Hue : Boolean_Array_1D(0 .. 1) := (False, False); begin i(0) := 0.0; -- left boundary i(1) := 1.0; -- right boundary @@ -95,7 +94,7 @@ end if; plscmap1n(256); - plscmap1l(HLS, i, h, l, s, Reverse_Hue); + plscmap1l(HLS, i, h, l, s, Reverse_Hue_None); end cmap1_init; Modified: trunk/examples/ada/x11a.adb.cmake =================================================================== --- trunk/examples/ada/x11a.adb.cmake 2009-01-13 21:00:09 UTC (rev 9299) +++ trunk/examples/ada/x11a.adb.cmake 2009-01-14 05:59:01 UTC (rev 9300) @@ -56,8 +56,6 @@ clevel : Real_Vector(0 .. LEVELS - 1); zmin, zmax, step : Long_Float; - Reverse_Flag : Boolean_Array_1D(0 .. 1) := (False, False); - procedure cmap1_init is i, h, l, s : Real_Vector(0 .. 1); begin @@ -74,7 +72,7 @@ s(1) := 0.8; plscmap1n(256); - plscmap1l(HLS, i, h, l, s, Reverse_Flag); + plscmap1l(HLS, i, h, l, s, Reverse_Hue_None); end cmap1_init; Modified: trunk/examples/ada/x12a.adb.cmake =================================================================== --- trunk/examples/ada/x12a.adb.cmake 2009-01-13 21:00:09 UTC (rev 9299) +++ trunk/examples/ada/x12a.adb.cmake 2009-01-14 05:59:01 UTC (rev 9300) @@ -52,7 +52,6 @@ r : Real_Vector (0 .. 4) := (0.0, 0.25, 0.5, 1.0, 1.0); g : Real_Vector (0 .. 4) := (1.0, 0.5, 0.5, 0.5, 1.0); b : Real_Vector (0 .. 4) := (1.0, 1.0, 0.5, 0.25, 0.0); - Reverse_Flag : Boolean_Array_1D (0 .. 4) := (False, False, False, False, False); procedure plfbox (x0, y0 : Long_Float) is x, y : Real_Vector (0 ..3); @@ -100,7 +99,7 @@ y0(8) := 12.0; y0(9) := 3.0; - plscmap1l(RGB, pos, r, g, b, Reverse_Flag); + plscmap1l(RGB, pos, r, g, b, Reverse_Hue_None); for i in y0'range loop plcol1(Long_Float(i)/9.0); Modified: trunk/examples/ada/x15a.adb.cmake =================================================================== --- trunk/examples/ada/x15a.adb.cmake 2009-01-13 21:00:09 UTC (rev 9299) +++ trunk/examples/ada/x15a.adb.cmake 2009-01-14 05:59:01 UTC (rev 9300) @@ -53,7 +53,6 @@ ---------------------------------------------------------------------------- procedure cmap1_init2 is i, h, l, s : Real_Vector(0 .. 3); - Reverse_Flag : Boolean_Array_1D(0 .. 3) := (False, False, False, False); begin -- Set control points. i(0) := 0.0; -- left boundary @@ -79,7 +78,7 @@ s(2) := 0.5; -- center s(3) := 1.0; -- high - plscmap1l(HLS, i, h, l, s, Reverse_Flag); + plscmap1l(HLS, i, h, l, s, Reverse_Hue_None); end cmap1_init2; ---------------------------------------------------------------------------- Modified: trunk/examples/ada/x20a.adb.cmake =================================================================== --- trunk/examples/ada/x20a.adb.cmake 2009-01-13 21:00:09 UTC (rev 9299) +++ trunk/examples/ada/x20a.adb.cmake 2009-01-14 05:59:01 UTC (rev 9300) @@ -217,7 +217,6 @@ -- Set gray colormap. procedure gray_cmap(num_col : Integer) is r, g, b, pos : Real_Vector(0 .. 1); - Reverse_Flag : Boolean_Array_1D(0 .. 1) := (False, False); begin r(0) := 0.0; g(0) := 0.0; @@ -231,7 +230,7 @@ pos(1) := 1.0; plscmap1n(num_col); - plscmap1l(RGB, pos, r, g, b, Reverse_Flag); + plscmap1l(RGB, pos, r, g, b, Reverse_Hue_None); end gray_cmap; Modified: trunk/examples/ada/x21a.adb.cmake =================================================================== --- trunk/examples/ada/x21a.adb.cmake 2009-01-13 21:00:09 UTC (rev 9299) +++ trunk/examples/ada/x21a.adb.cmake 2009-01-14 05:59:01 UTC (rev 9300) @@ -85,7 +85,6 @@ procedure cmap1_init is i, h, l, s : Real_Vector(0 .. 1); - Reverse_Flag : Boolean_Array_1D(0 .. 1) := (False, False); begin i(0) := 0.0; -- left boundary i(1) := 1.0; -- right boundary @@ -100,7 +99,7 @@ s(1) := 0.8; plscmap1n(256); - plscmap1l(HLS, i, h, l, s, Reverse_Flag); + plscmap1l(HLS, i, h, l, s, Reverse_Hue_None); end cmap1_init; Modified: trunk/examples/ada/x30a.adb.cmake =================================================================== --- trunk/examples/ada/x30a.adb.cmake 2009-01-13 21:00:09 UTC (rev 9299) +++ trunk/examples/ada/x30a.adb.cmake 2009-01-14 05:59:01 UTC (rev 9300) @@ -52,7 +52,6 @@ gcoord : Real_Vector(0 .. 1) := (0.0, 0.0); bcoord : Real_Vector(0 .. 1) := (0.0, 0.0); acoord : Real_Vector(0 .. 1) := (0.0, 1.0); - rev : Boolean_Array_1D(0 .. 1) := (False, False); icol, r, g, b : Integer; a : Long_Float; @@ -137,7 +136,7 @@ -- Create the color map with 128 colors and use plscmap1la to initialize -- the color values with a linear varying transparency (or alpha). plscmap1n(128); - plscmap1la(RGB, pos, rcoord, gcoord, bcoord, acoord, rev); + plscmap1la(RGB, pos, rcoord, gcoord, bcoord, acoord, Reverse_Hue_None); -- Create a 2 x 2 array that contains the z values (0.0 to 1.0) that will -- used for the shade plot. plshades will use linear interpolation to Modified: trunk/examples/ada/xthick08a.adb.cmake =================================================================== --- trunk/examples/ada/xthick08a.adb.cmake 2009-01-13 21:00:09 UTC (rev 9299) +++ trunk/examples/ada/xthick08a.adb.cmake 2009-01-14 05:59:01 UTC (rev 9300) @@ -69,7 +69,6 @@ procedure cmap1_init(gray : Boolean) is i, h, l, s : Real_Vector(0 .. 1); - Reverse_Hue : Boolean_Array_1D(0 .. 1) := (False, False); begin i(0) := 0.0; -- left boundary i(1) := 1.0; -- right boundary @@ -95,7 +94,7 @@ end if; Set_Number_Of_Colors_In_Color_Map_1(256); - Set_Color_Map_1_Piecewise(HLS, i, h, l, s, Reverse_Hue); + Set_Color_Map_1_Piecewise(HLS, i, h, l, s, Reverse_Hue_None); end cmap1_init; Modified: trunk/examples/ada/xthick11a.adb.cmake =================================================================== --- trunk/examples/ada/xthick11a.adb.cmake 2009-01-13 21:00:09 UTC (rev 9299) +++ trunk/examples/ada/xthick11a.adb.cmake 2009-01-14 05:59:01 UTC (rev 9300) @@ -56,8 +56,6 @@ clevel : Real_Vector(0 .. LEVELS - 1); zmin, zmax, step : Long_Float; - Reverse_Flag : Boolean_Array_1D(0 .. 1) := (False, False); - procedure cmap1_init is i, h, l, s : Real_Vector(0 .. 1); begin @@ -74,7 +72,7 @@ s(1) := 0.8; Set_Number_Of_Colors_In_Color_Map_1(256); - Set_Color_Map_1_Piecewise(HLS, i, h, l, s, Reverse_Flag); + Set_Color_Map_1_Piecewise(HLS, i, h, l, s, Reverse_Hue_None); end cmap1_init; Modified: trunk/examples/ada/xthick12a.adb.cmake =================================================================== --- trunk/examples/ada/xthick12a.adb.cmake 2009-01-13 21:00:09 UTC (rev 9299) +++ trunk/examples/ada/xthick12a.adb.cmake 2009-01-14 05:59:01 UTC (rev 9300) @@ -51,7 +51,6 @@ r : Real_Vector (0 .. 4) := (0.0, 0.25, 0.5, 1.0, 1.0); g : Real_Vector (0 .. 4) := (1.0, 0.5, 0.5, 0.5, 1.0); b : Real_Vector (0 .. 4) := (1.0, 1.0, 0.5, 0.25, 0.0); - Reverse_Flag : Boolean_Array_1D (0 .. 4) := (False, False, False, False, False); procedure plfbox (x0, y0 : Long_Float) is x, y : Real_Vector (0 ..3); @@ -99,7 +98,7 @@ y0(8) := 12.0; y0(9) := 3.0; - Set_Color_Map_1_Piecewise(RGB, pos, r, g, b, Reverse_Flag); + Set_Color_Map_1_Piecewise(RGB, pos, r, g, b, Reverse_Hue_None); for i in y0'range loop Set_Color_Map_1(Long_Float(i)/9.0); Modified: trunk/examples/ada/xthick15a.adb.cmake =================================================================== --- trunk/examples/ada/xthick15a.adb.cmake 2009-01-13 21:00:09 UTC (rev 9299) +++ trunk/examples/ada/xthick15a.adb.cmake 2009-01-14 05:59:01 UTC (rev 9300) @@ -53,7 +53,6 @@ ---------------------------------------------------------------------------- procedure cmap1_init2 is i, h, l, s : Real_Vector(0 .. 3); - Reverse_Flag : Boolean_Array_1D(0 .. 3) := (False, False, False, False); begin -- Set control points. i(0) := 0.0; -- left boundary @@ -79,7 +78,7 @@ s(2) := 0.5; -- center s(3) := 1.0; -- high - Set_Color_Map_1_Piecewise(HLS, i, h, l, s, Reverse_Flag); + Set_Color_Map_1_Piecewise(HLS, i, h, l, s, Reverse_Hue_None); end cmap1_init2; ---------------------------------------------------------------------------- Modified: trunk/examples/ada/xthick20a.adb.cmake =================================================================== --- trunk/examples/ada/xthick20a.adb.cmake 2009-01-13 21:00:09 UTC (rev 9299) +++ trunk/examples/ada/xthick20a.adb.cmake 2009-01-14 05:59:01 UTC (rev 9300) @@ -217,7 +217,6 @@ -- Set gray colormap. procedure gray_cmap(num_col : Integer) is r, g, b, pos : Real_Vector(0 .. 1); - Reverse_Flag : Boolean_Array_1D(0 .. 1) := (False, False); begin r(0) := 0.0; g(0) := 0.0; @@ -231,7 +230,7 @@ pos(1) := 1.0; Set_Number_Of_Colors_In_Color_Map_1(num_col); - Set_Color_Map_1_Piecewise(RGB, pos, r, g, b, Reverse_Flag); + Set_Color_Map_1_Piecewise(RGB, pos, r, g, b, Reverse_Hue_None); end gray_cmap; Modified: trunk/examples/ada/xthick21a.adb.cmake =================================================================== --- trunk/examples/ada/xthick21a.adb.cmake 2009-01-13 21:00:09 UTC (rev 9299) +++ trunk/examples/ada/xthick21a.adb.cmake 2009-01-14 05:59:01 UTC (rev 9300) @@ -85,7 +85,6 @@ procedure cmap1_init is i, h, l, s : Real_Vector(0 .. 1); - Reverse_Flag : Boolean_Array_1D(0 .. 1) := (False, False); begin i(0) := 0.0; -- left boundary i(1) := 1.0; -- right boundary @@ -100,7 +99,7 @@ s(1) := 0.8; Set_Number_Of_Colors_In_Color_Map_1(256); - Set_Color_Map_1_Piecewise(HLS, i, h, l, s, Reverse_Flag); + Set_Color_Map_1_Piecewise(HLS, i, h, l, s, Reverse_Hue_None); end cmap1_init; Modified: trunk/examples/ada/xthick30a.adb.cmake =================================================================== --- trunk/examples/ada/xthick30a.adb.cmake 2009-01-13 21:00:09 UTC (rev 9299) +++ trunk/examples/ada/xthick30a.adb.cmake 2009-01-14 05:59:01 UTC (rev 9300) @@ -52,7 +52,6 @@ gcoord : Real_Vector(0 .. 1) := (0.0, 0.0); bcoord : Real_Vector(0 .. 1) := (0.0, 0.0); acoord : Real_Vector(0 .. 1) := (0.0, 1.0); - rev : Boolean_Array_1D(0 .. 1) := (False, False); icol, r, g, b : Integer; a : Long_Float; @@ -137,7 +136,7 @@ -- Create the color map with 128 colors and use Set_Color_Map_1_RGBla to initialize -- the color values with a linear varying transparency (or alpha). Set_Number_Of_Colors_In_Color_Map_1(128); - Set_Color_Map_1_Piecewise_And_Alpha(RGB, pos, rcoord, gcoord, bcoord, acoord, rev); + Set_Color_Map_1_Piecewise_And_Alpha(RGB, pos, rcoord, gcoord, bcoord, acoord, Reverse_Hue_None); -- Create a 2 x 2 array that contains the z values (0.0 to 1.0) that will -- used for the shade plot. Shade_Regions will use linear interpolation to This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <and...@us...> - 2009-01-14 10:13:17
|
Revision: 9305 http://plplot.svn.sourceforge.net/plplot/?rev=9305&view=rev Author: andrewross Date: 2009-01-14 10:13:07 +0000 (Wed, 14 Jan 2009) Log Message: ----------- ANR for Hezekiah M. Carty. Add plstripc to ocaml bindings and implement example 17. Update ocaml documentation to reflect the fact that the ocaml examples are now complete and give identical results to the C versions. Modified Paths: -------------- trunk/bindings/ocaml/plplot.idl trunk/bindings/ocaml/plplot_impl.c trunk/doc/docbook/src/ocaml.xml trunk/examples/ocaml/CMakeLists.txt trunk/plplot_test/test_ocaml.sh.in Added Paths: ----------- trunk/examples/ocaml/x17.ml Modified: trunk/bindings/ocaml/plplot.idl =================================================================== --- trunk/bindings/ocaml/plplot.idl 2009-01-14 10:09:09 UTC (rev 9304) +++ trunk/bindings/ocaml/plplot.idl 2009-01-14 10:13:07 UTC (rev 9305) @@ -116,6 +116,13 @@ #define QUOTEME(x) #x #define RAW_ML(x) quote(mlmli, QUOTEME(x)); +// plstripc function +quote(mlmli, + "external plstripc : string -> string -> float -> float -> float -> float -> \ + float -> float -> float -> bool -> bool -> int -> int -> \ + int array -> int array -> string array -> string -> \ + string -> string -> int = \"ml_plstripc_byte\" \"ml_plstripc\""); + // pltr callback functions, hand-wrapped quote(mlmli, "external pltr1 : float -> float -> float array -> float array -> float * float \ Modified: trunk/bindings/ocaml/plplot_impl.c =================================================================== --- trunk/bindings/ocaml/plplot_impl.c 2009-01-14 10:09:09 UTC (rev 9304) +++ trunk/bindings/ocaml/plplot_impl.c 2009-01-14 10:13:07 UTC (rev 9305) @@ -449,6 +449,45 @@ CAMLreturn( Val_int(result) ); } +value ml_plstripc(value xspec, value yspec, value xmin, value xmax, value xjump, + value ymin, value ymax, value xlpos, value ylpos, value y_ascl, + value acc, value colbox, value collab, value colline, value styline, + value legline, value labx, value laby, value labtop) { + // Function parameters + CAMLparam5(xspec, yspec, xmin, xmax, xjump); + CAMLxparam5(ymin, ymax, xlpos, ylpos, y_ascl); + CAMLxparam5(acc, colbox, collab, colline, styline); + CAMLxparam4(legline, labx, laby, labtop); + // Line attribute array copies + int colline_copy[4]; + int styline_copy[4]; + const char* legend_copy[4]; + int i; + for (i = 0; i < 4; i++) { + colline_copy[i] = Int_val(Field(colline, i)); + styline_copy[i] = Int_val(Field(styline, i)); + legend_copy[i] = String_val(Field(legline, i)); + } + // The returned value + int id; + plstripc(&id, String_val(xspec), String_val(yspec), + Double_val(xmin), Double_val(xmax), + Double_val(xjump), Double_val(ymin), Double_val(ymax), + Double_val(xlpos), Double_val(ylpos), Bool_val(y_ascl), + Bool_val(acc), Int_val(colbox), Int_val(collab), + colline_copy, styline_copy, legend_copy, + String_val(labx), String_val(laby), String_val(labtop)); + // Make me do something! + CAMLreturn(Val_int(id)); +} + +value ml_plstripc_byte(value* argv, int argn) { + return ml_plstripc(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]); +} + /* pltr* function implementations */ void ml_pltr0(double x, double y, double* tx, double* ty) { pltr0(x, y, tx, ty, NULL); Modified: trunk/doc/docbook/src/ocaml.xml =================================================================== --- trunk/doc/docbook/src/ocaml.xml 2009-01-14 10:09:09 UTC (rev 9304) +++ trunk/doc/docbook/src/ocaml.xml 2009-01-14 10:13:07 UTC (rev 9305) @@ -59,7 +59,7 @@ </sect1> <sect1 id="ocaml_examples"> <title> The Examples</title> - <para> An important part of the OCaml bindings is the examples, some 28 of which demonstrate how to use many of the features of the PLplot package. These examples also serve as a testbed for the bindings in OCaml and other languages by checking the Postscript files that are generated by each example against those generated by the C versions. These examples have been completely re-written in OCaml (but retain a C flavor in the names that are given to objects). All of the OCaml examples generate exactly the same Postscript as the C versions, examples 14 and 17 excepted since they have not been translated yet.</para> + <para> An important part of the OCaml bindings is the examples, some 31 of which demonstrate how to use many of the features of the PLplot package. These examples also serve as a testbed for the bindings in OCaml and other languages by checking the Postscript files that are generated by each example against those generated by the C versions. These examples have been completely re-written in OCaml (but retain a C flavor in the names that are given to objects). All of the OCaml examples generate exactly the same Postscript as the C versions.</para> </sect1> <sect1 id="ocaml_obtaining"> <title>Obtaining the Software</title> Modified: trunk/examples/ocaml/CMakeLists.txt =================================================================== --- trunk/examples/ocaml/CMakeLists.txt 2009-01-14 10:09:09 UTC (rev 9304) +++ trunk/examples/ocaml/CMakeLists.txt 2009-01-14 10:13:07 UTC (rev 9305) @@ -37,6 +37,7 @@ "14" "15" "16" + "17" "18" "19" "20" Added: trunk/examples/ocaml/x17.ml =================================================================== --- trunk/examples/ocaml/x17.ml (rev 0) +++ trunk/examples/ocaml/x17.ml 2009-01-14 10:13:07 UTC (rev 9305) @@ -0,0 +1,165 @@ +(* $Id$ + Copyright (C) 2009 Hezekiah M. Carty + + Plots a simple stripchart with four pens. + Direct adaptation of the C version. + + This file is part of PLplot. + + PLplot is free software; you can redistribute it and/or modify + it under the terms of the GNU General Library Public License as published + by the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + 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 + +*) + +open Plplot + +let pi = atan 1.0 *. 4.0 + +let () = + let nsteps = 1000 in + + (* plplot initialization *) + (* Parse and process command line arguments *) + + ignore (plparseopts Sys.argv [PL_PARSE_FULL]); + + (* If db is used the plot is much more smooth. However, because of the + async X behaviour, one does not have a real-time scripcharter. *) + (* + ignore (plsetopt "db" ""); + ignore (plsetopt "np" ""); + *) + + (* User sets up plot completely except for window and data + Eventually settings in place when strip chart is created will be + remembered so that multiple strip charts can be used simultaneously. *) + + (* Specify some reasonable defaults for ymin and ymax *) + (* The plot will grow automatically if needed (but not shrink) *) + + let ymin = -0.1 in + let ymax = 0.1 in + + (* Specify initial tmin and tmax -- this determines length of window. *) + (* Also specify maximum jump in t *) + (* This can accomodate adaptive timesteps *) + + let tmin = 0.0 in + let tmax = 10.0 in + let tjump = 0.3 in (* percentage of plot to jump *) + + (* Axes options same as plbox. *) + (* Only automatic tick generation and label placement allowed *) + (* Eventually I'll make this fancier *) + + let colbox = 1 in + let collab = 3 in + (* pens' color and line style *) + let styline = [|2; 3; 4; 5|] in + let colline = [|2; 3; 4; 5|] in + (* pens legend *) + let legline = [|"sum"; "sin"; "sin*noi"; "sin+noi"|] in + + (* legend position *) + let xlab = 0.0 in + let ylab = 0.25 in + + let autoy = true in (* autoscale y *) + let acc = true in (* don't scrip, accumulate *) + + (* Initialize plplot *) + plinit (); + + pladv 0; + plvsta (); + + (* Register our error variables with PLplot *) + (* From here on, we're handling all errors here *) + (* TODO : Eventually wrap plsError + plsError pl_errcode errmsg; + *) + + let id1 = + plstripc + "bcnst" "bcnstv" + tmin tmax tjump ymin ymax + xlab ylab + autoy acc + colbox collab + colline styline legline + "t" "" "Strip chart demo" + in + + (* TODO : This should either be removed or plsError should be + properly wrapped. + if pl_errcode then ( + eprintf "%s\n" errmsg; + exit 1; + ); + *) + + (* Let plplot handle errors from here on *) + (* plsError(NULL, NULL); *) + + (* XXX : These seem unused? + let autoy = 0 in (* autoscale y *) + let acc = 1 in (* accumulate *) + *) + + (* This is to represent a loop over time *) + (* Let's try a random walk process *) + + let y1 = ref 0.0 in + let y2 = ref 0.0 in + let y3 = ref 0.0 in + let y4 = ref 0.0 in + let dt = 0.1 in + + for n = 0 to nsteps - 1 do + (* TODO : Add some sort of sleeping here +#ifdef PL_HAVE_USLEEP + usleep(10000); /* wait a little (10 ms) to simulate time elapsing */ +#else +# ifdef HAS_POLL + poll(0,0,10); +# else + { int i; for( i=0; i<1000000; i++ ); } +# endif +#endif + *) + let t = float_of_int n *. dt in + let noise = plrandd () -. 0.5 in + y1 := !y1 +. noise; + y2 := sin (t *. pi /. 18.0); + y3 := !y2 *. noise; + y4 := !y2 +. noise /. 3.0; + + (* There is no need for all pens to have the same number of + points or beeing equally time spaced. *) + if n mod 2 <> 0 then + plstripa id1 0 t !y1; + if n mod 3 <> 0 then + plstripa id1 1 t !y2; + if n mod 4 <> 0 then + plstripa id1 2 t !y3; + if n mod 5 <> 0 then + plstripa id1 3 t !y4; + (*pleop (); use double buffer (-db on command line) *) + done; + + (* Destroy strip chart and it's memory *) + plstripd id1; + plend (); + () + Property changes on: trunk/examples/ocaml/x17.ml ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Modified: trunk/plplot_test/test_ocaml.sh.in =================================================================== --- trunk/plplot_test/test_ocaml.sh.in 2009-01-14 10:09:09 UTC (rev 9304) +++ trunk/plplot_test/test_ocaml.sh.in 2009-01-14 10:13:07 UTC (rev 9305) @@ -24,7 +24,7 @@ # Do the standard non-interactive examples. lang="ocaml" -for index in 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 18 19 20 21 22 23 24 25 26 27 28 29 30 31; do +for index in 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31; do if [ "$verbose_test" ] ; then echo "x${index}ocaml" fi This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <and...@us...> - 2009-01-14 10:39:45
|
Revision: 9306 http://plplot.svn.sourceforge.net/plplot/?rev=9306&view=rev Author: andrewross Date: 2009-01-14 10:39:41 +0000 (Wed, 14 Jan 2009) Log Message: ----------- Fix pstex driver so it is safe for use with multiple streams (e.g. example 14). Modified Paths: -------------- trunk/drivers/pstex.c trunk/include/ps.h Modified: trunk/drivers/pstex.c =================================================================== --- trunk/drivers/pstex.c 2009-01-14 10:13:07 UTC (rev 9305) +++ trunk/drivers/pstex.c 2009-01-14 10:39:41 UTC (rev 9306) @@ -24,8 +24,6 @@ static void parse_str(const char *str, char *dest); static void proc_str (PLStream *pls, EscText *args); -static long cur_pos; -static FILE *fp; static int color = 1; static DrvOpt pstex_options[] = {{"color", DRV_INT, &color, @@ -54,6 +52,8 @@ plD_init_pstex(PLStream *pls) { char ofile[80]; + PSDev *dev; + FILE *fp; plParseDrvOpts(pstex_options); if (color) @@ -61,13 +61,16 @@ else plD_init_psm(pls); /* init monochrome postscript driver */ + dev = (PSDev *) pls->dev; + pls->dev_text = 1; /* want to draw text */ - pls->dev_unicode = 0; /* don't want unicode */ + pls->dev_unicode = 0; /* don't want unicode */ /* open latex output file */ strncpy(ofile, pls->FileName, 80); strcat(ofile, "_t"); fp = fopen(ofile, "w"); + dev->fp = fp; fprintf(fp,"\\begin{picture}(0,0)(0,0)%%\n"); fprintf(fp,"\\includegraphics[scale=1.,clip]{%s}%%\n",pls->FileName); @@ -81,7 +84,7 @@ fprintf(fp,"\\selectfont}%%\n"); fprintf(fp,"\\fi\\endgroup%%\n"); - cur_pos = ftell(fp); + dev->cur_pos = ftell(fp); fprintf(fp,"\\begin{picture}(xxxxxx,xxxxxx)(xxxxxx,xxxxxx)%%\n"); } @@ -109,14 +112,16 @@ { PSDev *dev = (PSDev *) pls->dev; PLFLT scale; + FILE *fp; plD_tidy_ps(pls); scale = pls->xpmm * 25.4 / 72.; + fp = dev->fp; fprintf(fp,"\\end{picture}\n"); - fseek(fp, cur_pos, SEEK_SET); + fseek(fp, dev->cur_pos, SEEK_SET); fprintf(fp,"\\begin{picture}(%d,%d)(%d,%d)%%\n%%", ROUND((dev->urx - dev->llx) * scale), ROUND((dev->ury - dev->lly) * scale), @@ -134,7 +139,10 @@ char cptr[256], jst, ref; PSDev *dev = (PSDev *) pls->dev; PLINT clxmin, clxmax, clymin, clymax; + FILE *fp; + fp = dev->fp; + /* font height */ ft_ht = 1.6 /*!*/ * pls->chrht * 72.0/25.4; /* ft_ht in points. ht is in mm */ Modified: trunk/include/ps.h =================================================================== --- trunk/include/ps.h 2009-01-14 10:13:07 UTC (rev 9305) +++ trunk/include/ps.h 2009-01-14 10:39:41 UTC (rev 9306) @@ -46,6 +46,12 @@ PLFLT xscale_dev, yscale_dev; int llx, lly, urx, ury, ptcnt; + + /* These are only used by the pstex driver for the additional + * file required in this case */ + long cur_pos; + FILE *fp; + } PSDev; void plD_init_pstex (PLStream *); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <and...@us...> - 2009-01-15 09:57:34
|
Revision: 9310 http://plplot.svn.sourceforge.net/plplot/?rev=9310&view=rev Author: andrewross Date: 2009-01-15 09:57:31 +0000 (Thu, 15 Jan 2009) Log Message: ----------- Implement plmap and plmeridians in java bindings. Add implementation of example 19. Add example 19 to standard java tests. Modified Paths: -------------- trunk/bindings/java/CMakeLists.txt trunk/bindings/java/PLStream.java trunk/bindings/java/plplotjavac.i trunk/bindings/swig-support/plplotcapi.i trunk/examples/java/x19.java trunk/plplot_test/test_java.sh.in Modified: trunk/bindings/java/CMakeLists.txt =================================================================== --- trunk/bindings/java/CMakeLists.txt 2009-01-14 21:22:14 UTC (rev 9309) +++ trunk/bindings/java/CMakeLists.txt 2009-01-15 09:57:31 UTC (rev 9310) @@ -53,6 +53,8 @@ JAVA_FILES_FULL ${JAVA_GEN_FILES_FULL} ${CMAKE_CURRENT_SOURCE_DIR}/PLStream.java +${CMAKE_CURRENT_SOURCE_DIR}/PLCallback.java + ) # Explicit full-path class dependencies for the foreach loop below which @@ -67,6 +69,11 @@ set(class_root ${CMAKE_CURRENT_BINARY_DIR}/plplot/core) set( +${class_root}/plplotjavacJNI.class_DEPENDS +${class_root}/PLCallback.class +) + +set( ${class_root}/PLGraphicsIn.class_DEPENDS ${class_root}/plplotjavacJNI.class ) @@ -81,6 +88,7 @@ ${class_root}/plplotjavacConstants.class ${class_root}/PLGraphicsIn.class ${class_root}/plplotjavacJNI.class +${class_root}/PLCallback.class ) set( @@ -88,6 +96,7 @@ ${class_root}/plplotjavacConstants.class ${class_root}/config.class ${class_root}/plplotjavac.class +${class_root}/PLCallback.class ) # This is currently the include list for swig, the C wrapper and the Modified: trunk/bindings/java/PLStream.java =================================================================== --- trunk/bindings/java/PLStream.java 2009-01-14 21:22:14 UTC (rev 9309) +++ trunk/bindings/java/PLStream.java 2009-01-15 09:57:31 UTC (rev 9310) @@ -445,6 +445,16 @@ plplotjavac.pllsty(lin); } +public void map(PLCallback mapform, String type, double minlong, double maxlong, double minlat, double maxlat) { + if (set_stream() == -1) return; + plplotjavac.plmap(mapform, type, minlong, maxlong, minlat, maxlat); +} + +public void meridians(PLCallback mapform, double dlong, double dlat, double minlong, double maxlong, double minlat, double maxlat) { + if (set_stream() == -1) return; + plplotjavac.plmeridians(mapform, dlong, dlat, minlong, maxlong, minlat, maxlat); +} + public void minMax2dGrid(double[][]f, double[] fmax, double[] fmin) { if (set_stream() == -1) return; plplotjavac.plMinMax2dGrid(f,fmax,fmin); Modified: trunk/bindings/java/plplotjavac.i =================================================================== --- trunk/bindings/java/plplotjavac.i 2009-01-14 21:22:14 UTC (rev 9309) +++ trunk/bindings/java/plplotjavac.i 2009-01-15 09:57:31 UTC (rev 9310) @@ -254,6 +254,48 @@ } } + +/* Setup java arrays (for callback functions) */ + +#ifdef PL_DOUBLE +#define jPLFLT jdouble +#define jPLFLTArray jdoubleArray +#define NewPLFLTArray NewDoubleArray +#define SetPLFLTArrayRegion SetDoubleArrayRegion +#define GetPLFLTArrayElements GetDoubleArrayElements +#define ReleasePLFLTArrayElements ReleaseDoubleArrayElements +#else +#define jPLFLT jfloat +#define jPLFLTArray jfloatArray +#define NewPLFLTArray NewFloatArray +#define SetPLFLTArrayRegion SetFloatArrayRegion +#define GetPLFLTArrayElements GetFloatArrayElements +#define ReleasePLFLTArrayElements ReleaseFloatArrayElements +#endif + +/* Create a jPLFLTArray and fill it from the C array dat */ +static jPLFLTArray +setup_java_array_1d_PLFLT( JNIEnv *jenv, PLFLT *dat, PLINT n) +{ + jPLFLTArray jadat = (*jenv)->NewPLFLTArray(jenv, n); + (*jenv)->SetPLFLTArrayRegion(jenv, jadat, 0, n, dat); + return jadat; +} + +/* Copy back data from jPLFLTArray to C array then release java array */ +static void +release_java_array_1d_PLFLT(JNIEnv *jenv, jPLFLTArray jadat, PLFLT *dat, PLINT n) +{ + PLINT i; + jPLFLT *jdata = (*jenv)->GetPLFLTArrayElements( jenv, jadat, 0 ); + for (i=0;i<n;i++) { + dat[i] = jdata[i]; + } + (*jenv)->ReleasePLFLTArrayElements( jenv, jadat, jdata, 0 ); +} + + + %} @@ -1033,6 +1075,7 @@ 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); %} @@ -1103,6 +1146,46 @@ return $jnicall; } +%{ + + jobject mapformClass; + jmethodID mapformID; + JNIEnv *cbenv; + + /* C mapform callback function which calls the java + * mapform function in a PLCallback object. */ + void mapform_java(PLINT n, PLFLT *x, PLFLT *y) { + jPLFLTArray jx = setup_java_array_1d_PLFLT(cbenv,x,n); + jPLFLTArray jy = setup_java_array_1d_PLFLT(cbenv,y,n); + (*cbenv)->CallVoidMethod(cbenv,mapformClass, mapformID,jx,jy); + release_java_array_1d_PLFLT(cbenv,jx,x,n); + release_java_array_1d_PLFLT(cbenv,jy,y,n); + } +%} + + +/* Handle function pointers to mapform function using an java class */ +%typemap(in) mapform_func mapform { + + jobject obj = $input; + if (obj != NULL) { + jclass cls = (*jenv)->GetObjectClass(jenv,obj); + mapformID = (*jenv)->GetMethodID(jenv,cls, "mapform","([D[D)V" ); + mapformClass = obj; + cbenv = jenv; + $1 = mapform_java; + } + else { + $1 = NULL; + } + +} + +%typemap(jni) mapform_func "jobject" +%typemap(jtype) mapform_func "PLCallback" +%typemap(jstype) mapform_func "PLCallback" +%typemap(javain) mapform_func mapform "$javainput" + /* Second of two object arrays, where we check X and Y with previous object. */ %typemap(in) PLPointer OBJECT_DATA { jPLFLT **adat; Modified: trunk/bindings/swig-support/plplotcapi.i =================================================================== --- trunk/bindings/swig-support/plplotcapi.i 2009-01-14 21:22:14 UTC (rev 9309) +++ trunk/bindings/swig-support/plplotcapi.i 2009-01-15 09:57:31 UTC (rev 9310) @@ -931,19 +931,28 @@ PLINT ky, PLINT ly, PLFLT *clevel, PLINT nlevel, pltr_func pltr, PLPointer SWIG_OBJECT_DATA); + +#endif + +#ifdef SWIG_JAVA + /* plot continental outline in world coordinates */ void -plmap( void (*mapform)(PLINT, PLFLT *, PLFLT *), const char *type, +plmap( mapform_func mapform, const char *type, PLFLT minlong, PLFLT maxlong, PLFLT minlat, PLFLT maxlat ); /* Plot the latitudes and longitudes on the background. */ void -plmeridians( void (*mapform)(PLINT, PLFLT *, PLFLT *), +plmeridians( mapform_func mapform, PLFLT dlong, PLFLT dlat, PLFLT minlong, PLFLT maxlong, PLFLT minlat, PLFLT maxlat ); +#endif + +#if 0 + void plfshade(f2eval_func, PLPointer SWIG_OBJECT_DATA, Modified: trunk/examples/java/x19.java =================================================================== --- trunk/examples/java/x19.java 2009-01-14 21:22:14 UTC (rev 9309) +++ trunk/examples/java/x19.java 2009-01-15 09:57:31 UTC (rev 9310) @@ -27,12 +27,88 @@ package plplot.examples; +import plplot.core.*; + +import java.lang.Math; + +class Mapform19 implements PLCallback { + + public void mapform(double[] x, double[] y) { + int i; + double xp, yp, radius; + for (i=0;i< x.length;i++) { + radius = 90.0-y[i]; + xp = radius * Math.cos(x[i] * Math.PI / 180.0); + yp = radius * Math.sin(x[i] * Math.PI / 180.0); + x[i] = xp; + y[i] = yp; + } + + + } + +} + class x19 { + PLStream pls = new PLStream(); + public static void main( String[] args ) { - System.out.println( "x19 not implemented yet." ); + new x19(args); } + + public x19 (String[] args) + { + double minx, maxx, miny,maxy; + PLCallback nullCallback = null; + + // Parse and process command line arguments. + pls.parseopts( args, PLStream.PL_PARSE_FULL | PLStream.PL_PARSE_NOPROGRAM ); + + // Longitude (x) and latitude (y) + + miny = -70; + maxy = 80; + + // Initialize PLplot. + pls.init(); + // Cartesian plots + // Most of world + + minx = 190; + maxx = 190+360; + + pls.col0(1); + pls.env(minx, maxx, miny, maxy, 1, -1); + pls.map(nullCallback, "usaglobe", minx, maxx, miny, maxy); + + // The Americas + + minx = 190; + maxx = 340; + + pls.col0(1); + pls.env(minx, maxx, miny, maxy, 1, -1); + pls.map(nullCallback, "usaglobe", minx, maxx, miny, maxy); + + // Polar, Northern hemisphere + + // Create callback object containing mapform function + Mapform19 mapform19 = new Mapform19(); + + minx = 0; + maxx = 360; + + pls.env(-75., 75., -75., 75., 1, -1); + pls.map(mapform19,"globe", minx, maxx, miny, maxy); + + pls.lsty(2); + pls.meridians(mapform19,10.0, 10.0, 0.0, 360.0, -10.0, 80.0); + + pls.end(); + + } } //---------------------------------------------------------------------------// Modified: trunk/plplot_test/test_java.sh.in =================================================================== --- trunk/plplot_test/test_java.sh.in 2009-01-14 21:22:14 UTC (rev 9309) +++ trunk/plplot_test/test_java.sh.in 2009-01-15 09:57:31 UTC (rev 9310) @@ -31,7 +31,6 @@ # pushd $javadir; make; popd # Do the standard non-interactive examples. -# skip 19 because it is not implemented. # # Set up option to point to java bindings jar file and wrapper if needed. lang="j" @@ -45,7 +44,7 @@ PLPLOT_CLASSPATH=${javadir}:${PLPLOT_CLASSPATH} fi -for index in 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 20 21 22 23 24 25 26 27 28 29 30 31 ; do +for index in 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 ; do if [ "$verbose_test" ] ; then echo "x${index}" fi This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <and...@us...> - 2009-01-15 16:05:55
|
Revision: 9311 http://plplot.svn.sourceforge.net/plplot/?rev=9311&view=rev Author: andrewross Date: 2009-01-15 16:05:35 +0000 (Thu, 15 Jan 2009) Log Message: ----------- Add plmap / plmeridians to python bindings. Implement example 19 in python and add the example to the standard python tests. Modified Paths: -------------- trunk/bindings/python/plplotcmodule.i trunk/bindings/swig-support/plplotcapi.i trunk/examples/python/xw19.py trunk/plplot_test/test_python.sh.in Modified: trunk/bindings/python/plplotcmodule.i =================================================================== --- trunk/bindings/python/plplotcmodule.i 2009-01-15 09:57:31 UTC (rev 9310) +++ trunk/bindings/python/plplotcmodule.i 2009-01-15 16:05:35 UTC (rev 9311) @@ -613,12 +613,14 @@ 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); %} @@ -642,6 +644,7 @@ enum callback_type { CB_0, CB_1, CB_2, CB_Python } pltr_type; PyObject* python_pltr = NULL; PyObject* python_f2eval = NULL; + PyObject* python_mapform = NULL; #if 0 #define MY_BLOCK_THREADS { \ @@ -753,6 +756,60 @@ return fresult; } + void do_mapform_callback(PLINT n, PLFLT *x, PLFLT *y) + { + PyObject *px, *py, *arglist, *result; + PyArrayObject *tmpx, *tmpy; + PLFLT *xx, *yy; + PLINT i; + + if(python_mapform) { /* if not something is terribly wrong */ + /* grab the Global Interpreter Lock to be sure threads don't mess us up */ + MY_BLOCK_THREADS + /* build the argument list */ +#ifdef PL_DOUBLE + px = PyArray_FromDimsAndData(1, &n, PyArray_DOUBLE,(char *)x); + py = PyArray_FromDimsAndData(1, &n, PyArray_DOUBLE,(char *)y); +#else + px = PyArray_FromDimsAndData(1, &n, PyArray_FLOAT,(char *)x); + py = PyArray_FromDimsAndData(1, &n, PyArray_FLOAT,(char *)y); +#endif + arglist = Py_BuildValue("(iOO)", n, px, py); + /* call the python function */ + result = PyEval_CallObject(python_mapform, arglist); + /* release the argument list */ + Py_DECREF(arglist); + Py_DECREF(px); + Py_DECREF(py); + /* check and unpack the result */ + if(result == NULL) { + fprintf(stderr, "call to python mapform function with 3 arguments failed\n"); + PyErr_SetString(PyExc_RuntimeError, "mapform callback must take 3 arguments."); + } /* else { + PyArg_ParseTuple(result,"OO",&px,&py); + PyArrayObject *tmpx = (PyArrayObject *)myArray_ContiguousFromObject(px, PyArray_PLFLT, 1, 1); + PyArrayObject *tmpy = (PyArrayObject *)myArray_ContiguousFromObject(py, PyArray_PLFLT, 1, 1); + if(tmpx == 0 || tmpy == 0 || tmpx->dimensions[0] != 1 ||tmpy->dimensions[0] != 1) { + fprintf(stderr, "pltr callback must return a 1-D vector or sequence\n"); + PyErr_SetString(PyExc_RuntimeError, "pltr callback must return a 1-sequence."); + } else { + xx = (PLFLT*)tmpx->data; + yy = (PLFLT*)tmpy->data; + for (i=0;i<n;i++) { + x[i] = xx[i]; + y[i] = yy[1]; + } + Py_XDECREF(tmpx); + Py_XDECREF(tmpy); + } + } */ + /* release the result */ + Py_XDECREF(result); + /* release the global interpreter lock */ + MY_UNBLOCK_THREADS + } + } + /* marshal the pltr function pointer argument */ pltr_func marshal_pltr(PyObject* input) { pltr_func result = do_pltr_callback; @@ -790,6 +847,19 @@ python_pltr = 0; } +/* marshal the mapform function pointer argument */ + mapform_func marshal_mapform(PyObject* input) { + mapform_func result = do_mapform_callback; + python_mapform = input; + Py_XINCREF(input); + return result; + } + + void cleanup_mapform(void) { + Py_XDECREF(python_mapform); + python_mapform = 0; + } + PLPointer marshal_PLPointer(PyObject* input,int isimg) { PLPointer result = NULL; switch(pltr_type) { @@ -854,6 +924,24 @@ $1 = NULL; } +%typemap(in) mapform_func mapform { + /* it must be a callable */ + if(!PyCallable_Check((PyObject*)$input)) { + PyErr_SetString(PyExc_ValueError, "mapform argument must be callable"); + return NULL; + } + $1 = marshal_mapform($input); +} +%typemap(freearg) mapform_func mapform { + cleanup_mapform(); +} + +/* you can omit the mapform func */ +%typemap(default) mapform_func mapform { + python_mapform = 0; + $1 = NULL; +} + /* convert an arbitrary Python object into the void* pointer they want */ %typemap(in) PLPointer PYOBJECT_DATA { if($input == Py_None) Modified: trunk/bindings/swig-support/plplotcapi.i =================================================================== --- trunk/bindings/swig-support/plplotcapi.i 2009-01-15 09:57:31 UTC (rev 9310) +++ trunk/bindings/swig-support/plplotcapi.i 2009-01-15 16:05:35 UTC (rev 9311) @@ -934,8 +934,6 @@ #endif -#ifdef SWIG_JAVA - /* plot continental outline in world coordinates */ void @@ -949,7 +947,6 @@ PLFLT dlong, PLFLT dlat, PLFLT minlong, PLFLT maxlong, PLFLT minlat, PLFLT maxlat ); -#endif #if 0 Modified: trunk/examples/python/xw19.py =================================================================== --- trunk/examples/python/xw19.py 2009-01-15 09:57:31 UTC (rev 9310) +++ trunk/examples/python/xw19.py 2009-01-15 16:05:35 UTC (rev 9311) @@ -1,2 +1,89 @@ +# $Id$ -print "This python equivalent of x19c not implemented yet" +# Copyright (C) Wesley Ebisuzaki +# Copyright (C) 2009 Andrew Ross +# +# Illustrates backdrop plotting of world, US maps. +# +# This file is part of PLplot. +# +# PLplot is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Library Public License as published +# by the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# 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 +# + +from plplot_py_demos import * + +# mapform19 +# +# Defines specific coordinate transformation for example 19. +# Not to be confused with mapform in src/plmap.c. +# x[], y[] are the coordinates to be plotted. +def mapform19(n, x, y): + for i in range(n): + radius = 90.0 - y[i] + xp = radius * cos(x[i] * pi / 180.0) + yp = radius * sin(x[i] * pi / 180.0) + x[i] = xp + y[i] = yp + return [x,y] + +# Null coordinate transform (equivalent to passing NULL to C +# version of plmap / plmeridians. +def nullmapform(n,x,y): + return [x,y] + +# main +# +# Does a series of 3-d plots for a given data set, with different +# viewing options in each plot. + +def main(): + + # Longitude (x) and latitude (y) + + miny = -70 + maxy = 80 + + # Cartesian plots + # Most of world + + minx = 190 + maxx = 190+360 + + plcol0(1) + plenv(minx, maxx, miny, maxy, 1, -1) + plmap(nullmapform,"usaglobe", minx, maxx, miny, maxy) + + # The Americas + + minx = 190 + maxx = 340 + + plcol0(1) + plenv(minx, maxx, miny, maxy, 1, -1) + plmap(nullmapform, "usaglobe", minx, maxx, miny, maxy) + + # Polar, Northern hemisphere + + minx = 0 + maxx = 360 + + plenv(-75., 75., -75., 75., 1, -1) + plmap(mapform19,"globe", minx, maxx, miny, maxy) + + pllsty(2) + plmeridians(mapform19,10.0, 10.0, 0.0, 360.0, -10.0, 80.0) + plend() + +main() Modified: trunk/plplot_test/test_python.sh.in =================================================================== --- trunk/plplot_test/test_python.sh.in 2009-01-15 09:57:31 UTC (rev 9310) +++ trunk/plplot_test/test_python.sh.in 2009-01-15 16:05:35 UTC (rev 9311) @@ -26,11 +26,10 @@ # $pythondir must be the build tree and not the source tree (if separate from # build tree) since must access plplot_python_start.py in build tree and # paths in that file are relative to build tree. -# Skip 19 because it is just a placeholder without a real implementation. # Skip 21 if using Numeric - it doesn't work # For 24 you need special fonts installed to get good result. lang="p" -for index in 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 \ +for index in 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 \ 20 22 23 24 25 26 27 28 29 30 31 @NUMPY_EXAMPLES@ ; do if [ "$verbose_test" ] ; then echo "x${index}" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <and...@us...> - 2009-01-16 13:35:18
|
Revision: 9325 http://plplot.svn.sourceforge.net/plplot/?rev=9325&view=rev Author: andrewross Date: 2009-01-16 13:35:11 +0000 (Fri, 16 Jan 2009) Log Message: ----------- Fix visibility issues for plplotcanvas. Python script to generate python bindings did not understand PLDLLIMPEXP macros in plplotcanvas.h. Strip these out first using sed before processing and everything works again. Modified Paths: -------------- trunk/bindings/gnome2/python/CMakeLists.txt trunk/include/plplotcanvas.h Modified: trunk/bindings/gnome2/python/CMakeLists.txt =================================================================== --- trunk/bindings/gnome2/python/CMakeLists.txt 2009-01-16 11:12:39 UTC (rev 9324) +++ trunk/bindings/gnome2/python/CMakeLists.txt 2009-01-16 13:35:11 UTC (rev 9325) @@ -60,14 +60,24 @@ ### gcwmodule_SRCS is now prepared. ### Prepare cplplotcanvasmodule_SRCS +# First strip out visibility macros so h2def.py can interpret header file +add_custom_command( +OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/plplotcanvas_strip.h +COMMAND sed -e s/PLDLLIMPEXP_GNOME2\ // ${CMAKE_SOURCE_DIR}/include/plplotcanvas.h +> ${CMAKE_CURRENT_BINARY_DIR}/plplotcanvas_strip.h +DEPENDS +${CMAKE_SOURCE_DIR}/include/plplotcanvas.h +) # Use sed to rename PLINT, PLFLT and PLUNICODE so that h2def.py knows what to do. add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/plplotcanvas.defs COMMAND ${PYTHON_EXECUTABLE} ${codegen}/h2def.py -${CMAKE_SOURCE_DIR}/include/plplotcanvas.h +${CMAKE_CURRENT_BINARY_DIR}/plplotcanvas_strip.h | sed -e s/PLINT/gint32/ -e s/PLFLT/double/ -e s/PLUNICODE/guint32/ > ${CMAKE_CURRENT_BINARY_DIR}/plplotcanvas.defs +DEPENDS +${CMAKE_CURRENT_BINARY_DIR}/plplotcanvas_strip.h ) add_custom_command( @@ -83,6 +93,7 @@ > ${CMAKE_CURRENT_BINARY_DIR}/cplplotcanvas.c DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/cplplotcanvas.override +${CMAKE_CURRENT_BINARY_DIR}/plplotcanvas_strip.h ${CMAKE_CURRENT_BINARY_DIR}/plplotcanvas.defs ) Modified: trunk/include/plplotcanvas.h =================================================================== --- trunk/include/plplotcanvas.h 2009-01-16 11:12:39 UTC (rev 9324) +++ trunk/include/plplotcanvas.h 2009-01-16 13:35:11 UTC (rev 9325) @@ -66,16 +66,16 @@ GType plplot_canvas_get_type(); -PlplotCanvas* plplot_canvas_new(); -void plplot_canvas_devinit(PlplotCanvas* self); -void plplot_canvas_dispose(PlplotCanvas *self); +PLDLLIMPEXP_GNOME2 PlplotCanvas* plplot_canvas_new(); +PLDLLIMPEXP_GNOME2 void plplot_canvas_devinit(PlplotCanvas* self); +PLDLLIMPEXP_GNOME2 void plplot_canvas_dispose(PlplotCanvas *self); -gint plplot_canvas_get_stream_number(PlplotCanvas* self); -void plplot_canvas_set_size(PlplotCanvas* self,gint width,gint height); -void plplot_canvas_set_zoom(PlplotCanvas* self,gdouble magnification); -void plplot_canvas_use_text(PlplotCanvas* self,gboolean use_text); -void plplot_canvas_use_pixmap(PlplotCanvas* self,gboolean use_pixmap); -void plplot_canvas_use_persistence(PlplotCanvas* self,gboolean use_persistence); +PLDLLIMPEXP_GNOME2 gint plplot_canvas_get_stream_number(PlplotCanvas* self); +PLDLLIMPEXP_GNOME2 void plplot_canvas_set_size(PlplotCanvas* self,gint width,gint height); +PLDLLIMPEXP_GNOME2 void plplot_canvas_set_zoom(PlplotCanvas* self,gdouble magnification); +PLDLLIMPEXP_GNOME2 void plplot_canvas_use_text(PlplotCanvas* self,gboolean use_text); +PLDLLIMPEXP_GNOME2 void plplot_canvas_use_pixmap(PlplotCanvas* self,gboolean use_pixmap); +PLDLLIMPEXP_GNOME2 void plplot_canvas_use_persistence(PlplotCanvas* self,gboolean use_persistence); /*--------------------------------------------------------------------------* @@ -88,573 +88,573 @@ /* set the format of the contour labels */ -void plplot_canvas_setcontlabelformat(PlplotCanvas* self, PLINT lexp, PLINT sigdig); +PLDLLIMPEXP_GNOME2 void plplot_canvas_setcontlabelformat(PlplotCanvas* self, PLINT lexp, PLINT sigdig); /* set offset and spacing of contour labels */ -void plplot_canvas_setcontlabelparam(PlplotCanvas* self, PLFLT offset, PLFLT size, PLFLT spacing, PLINT active); +PLDLLIMPEXP_GNOME2 void plplot_canvas_setcontlabelparam(PlplotCanvas* self, PLFLT offset, PLFLT size, PLFLT spacing, PLINT active); /* Advance to subpage "page", or to the next one if "page" = 0. */ -void plplot_canvas_adv(PlplotCanvas* self, PLINT page); +PLDLLIMPEXP_GNOME2 void plplot_canvas_adv(PlplotCanvas* self, PLINT page); /* simple arrow plotter. */ -void plplot_canvas_arrows(PlplotCanvas* self, PLFLT *u, PLFLT *v, PLFLT *x, PLFLT *y, PLINT n, PLFLT scale, PLFLT dx, PLFLT dy); +PLDLLIMPEXP_GNOME2 void plplot_canvas_arrows(PlplotCanvas* self, PLFLT *u, PLFLT *v, PLFLT *x, PLFLT *y, PLINT n, PLFLT scale, PLFLT dx, PLFLT dy); -void plplot_canvas_vect(PlplotCanvas* self, PLFLT **u, PLFLT **v, PLINT nx, PLINT ny, PLFLT scale, void (*pltr) (PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer), PLPointer pltr_data); +PLDLLIMPEXP_GNOME2 void plplot_canvas_vect(PlplotCanvas* self, PLFLT **u, PLFLT **v, PLINT nx, PLINT ny, PLFLT scale, void (*pltr) (PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer), PLPointer pltr_data); -void plplot_canvas_svect(PlplotCanvas* self, PLFLT *arrowx, PLFLT *arrowy, PLINT npts, PLINT fill); +PLDLLIMPEXP_GNOME2 void plplot_canvas_svect(PlplotCanvas* self, PLFLT *arrowx, PLFLT *arrowy, PLINT npts, PLINT fill); /* This functions similarly to plbox() except that the origin of the axes */ /* is placed at the user-specified point (x0, y0). */ -void plplot_canvas_axes(PlplotCanvas* self, PLFLT x0, PLFLT y0, const char *xopt, PLFLT xtick, PLINT nxsub, const char *yopt, PLFLT ytick, PLINT nysub); +PLDLLIMPEXP_GNOME2 void plplot_canvas_axes(PlplotCanvas* self, PLFLT x0, PLFLT y0, const char *xopt, PLFLT xtick, PLINT nxsub, const char *yopt, PLFLT ytick, PLINT nysub); /* Plot a histogram using x to store data values and y to store frequencies */ -void plplot_canvas_bin(PlplotCanvas* self, PLINT nbin, PLFLT *x, PLFLT *y, PLINT center); +PLDLLIMPEXP_GNOME2 void plplot_canvas_bin(PlplotCanvas* self, PLINT nbin, PLFLT *x, PLFLT *y, PLINT center); /* Start new page. Should only be used with pleop(). */ -void plplot_canvas_bop(PlplotCanvas* self); +PLDLLIMPEXP_GNOME2 void plplot_canvas_bop(PlplotCanvas* self); /* This draws a box around the current viewport. */ -void plplot_canvas_box(PlplotCanvas* self, const char *xopt, PLFLT xtick, PLINT nxsub, const char *yopt, PLFLT ytick, PLINT nysub); +PLDLLIMPEXP_GNOME2 void plplot_canvas_box(PlplotCanvas* self, const char *xopt, PLFLT xtick, PLINT nxsub, const char *yopt, PLFLT ytick, PLINT nysub); /* This is the 3-d analogue of plbox(). */ -void plplot_canvas_box3(PlplotCanvas* self, const char *xopt, const char *xlabel, PLFLT xtick, PLINT nsubx, const char *yopt, const char *ylabel, PLFLT ytick, PLINT nsuby, const char *zopt, const char *zlabel, PLFLT ztick, PLINT nsubz); +PLDLLIMPEXP_GNOME2 void plplot_canvas_box3(PlplotCanvas* self, const char *xopt, const char *xlabel, PLFLT xtick, PLINT nsubx, const char *yopt, const char *ylabel, PLFLT ytick, PLINT nsuby, const char *zopt, const char *zlabel, PLFLT ztick, PLINT nsubz); /* Calculate world coordinates and subpage from relative device coordinates. */ -void plplot_canvas_calc_world(PlplotCanvas* self, PLFLT rx, PLFLT ry, PLFLT *wx, PLFLT *wy, PLINT *window); +PLDLLIMPEXP_GNOME2 void plplot_canvas_calc_world(PlplotCanvas* self, PLFLT rx, PLFLT ry, PLFLT *wx, PLFLT *wy, PLINT *window); /* Clear current subpage. */ -void plplot_canvas_clear(PlplotCanvas* self); +PLDLLIMPEXP_GNOME2 void plplot_canvas_clear(PlplotCanvas* self); /* Set color, map 0. Argument is integer between 0 and 15. */ -void plplot_canvas_col0(PlplotCanvas* self, PLINT icol0); +PLDLLIMPEXP_GNOME2 void plplot_canvas_col0(PlplotCanvas* self, PLINT icol0); /* Set color, map 1. Argument is a float between 0. and 1. */ -void plplot_canvas_col1(PlplotCanvas* self, PLFLT col1); +PLDLLIMPEXP_GNOME2 void plplot_canvas_col1(PlplotCanvas* self, PLFLT col1); /* Draws a contour plot from data in f(nx,ny). Is just a front-end to * plfcont, with a particular choice for f2eval and f2eval_data. */ -void plplot_canvas_cont(PlplotCanvas* self, PLFLT **f, PLINT nx, PLINT ny, PLINT kx, PLINT lx, PLINT ky, PLINT ly, PLFLT *clevel, PLINT nlevel, void (*pltr) (PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer), PLPointer pltr_data); +PLDLLIMPEXP_GNOME2 void plplot_canvas_cont(PlplotCanvas* self, PLFLT **f, PLINT nx, PLINT ny, PLINT kx, PLINT lx, PLINT ky, PLINT ly, PLFLT *clevel, PLINT nlevel, void (*pltr) (PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer), PLPointer pltr_data); /* Draws a contour plot using the function evaluator f2eval and data stored * by way of the f2eval_data pointer. This allows arbitrary organizations * of 2d array data to be used. */ -void plplot_canvas_fcont(PlplotCanvas* self, PLFLT (*f2eval) (PLINT, PLINT, PLPointer), PLPointer f2eval_data, PLINT nx, PLINT ny, PLINT kx, PLINT lx, PLINT ky, PLINT ly, PLFLT *clevel, PLINT nlevel, void (*pltr) (PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer), PLPointer pltr_data); +PLDLLIMPEXP_GNOME2 void plplot_canvas_fcont(PlplotCanvas* self, PLFLT (*f2eval) (PLINT, PLINT, PLPointer), PLPointer f2eval_data, PLINT nx, PLINT ny, PLINT kx, PLINT lx, PLINT ky, PLINT ly, PLFLT *clevel, PLINT nlevel, void (*pltr) (PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer), PLPointer pltr_data); /* /\* Copies state parameters from the reference stream to the current stream. *\/ */ -/* void plplot_canvas_cpstrm(PlplotCanvas* self, PLINT iplsr, PLINT flags); */ +/* PLDLLIMPEXP_GNOME2 void plplot_canvas_cpstrm(PlplotCanvas* self, PLINT iplsr, PLINT flags); */ /* Converts input values from relative device coordinates to relative plot */ /* coordinates. */ -void plplot_canvas_did2pc(PlplotCanvas* self, PLFLT *xmin, PLFLT *ymin, PLFLT *xmax, PLFLT *ymax); +PLDLLIMPEXP_GNOME2 void plplot_canvas_did2pc(PlplotCanvas* self, PLFLT *xmin, PLFLT *ymin, PLFLT *xmax, PLFLT *ymax); /* Converts input values from relative plot coordinates to relative */ /* device coordinates. */ -void plplot_canvas_dip2dc(PlplotCanvas* self, PLFLT *xmin, PLFLT *ymin, PLFLT *xmax, PLFLT *ymax); +PLDLLIMPEXP_GNOME2 void plplot_canvas_dip2dc(PlplotCanvas* self, PLFLT *xmin, PLFLT *ymin, PLFLT *xmax, PLFLT *ymax); /* /\* End a plotting session for all open streams. *\/ */ -/* void plplot_canvas_plend(PlplotCanvas* self); */ +/* PLDLLIMPEXP_GNOME2 void plplot_canvas_plend(PlplotCanvas* self); */ /* /\* End a plotting session for the current stream only. *\/ */ -/* void plplot_canvas_plend1(PlplotCanvas* self); */ +/* PLDLLIMPEXP_GNOME2 void plplot_canvas_plend1(PlplotCanvas* self); */ /* /\* Simple interface for defining viewport and window. *\/ */ -/* void plplot_canvas_plenv(PlplotCanvas* self, PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax, PLINT just, PLINT axis); */ +/* PLDLLIMPEXP_GNOME2 void plplot_canvas_plenv(PlplotCanvas* self, PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax, PLINT just, PLINT axis); */ /* /\* similar to plenv() above, but in multiplot mode does not advance the subpage, */ /* instead the current subpage is cleared *\/ */ -/* void plplot_canvas_plenv0(PlplotCanvas* self, PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax, PLINT just, PLINT axis); */ +/* PLDLLIMPEXP_GNOME2 void plplot_canvas_plenv0(PlplotCanvas* self, PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax, PLINT just, PLINT axis); */ /* End current page. Should only be used with plbop(). */ -void plplot_canvas_eop(PlplotCanvas* self); +PLDLLIMPEXP_GNOME2 void plplot_canvas_eop(PlplotCanvas* self); /* Plot horizontal error bars (xmin(i),y(i)) to (xmax(i),y(i)) */ -void plplot_canvas_errx(PlplotCanvas* self, PLINT n, PLFLT *xmin, PLFLT *xmax, PLFLT *y); +PLDLLIMPEXP_GNOME2 void plplot_canvas_errx(PlplotCanvas* self, PLINT n, PLFLT *xmin, PLFLT *xmax, PLFLT *y); /* Plot vertical error bars (x,ymin(i)) to (x(i),ymax(i)) */ -void plplot_canvas_erry(PlplotCanvas* self, PLINT n, PLFLT *x, PLFLT *ymin, PLFLT *ymax); +PLDLLIMPEXP_GNOME2 void plplot_canvas_erry(PlplotCanvas* self, PLINT n, PLFLT *x, PLFLT *ymin, PLFLT *ymax); /* /\* Advance to the next family file on the next new page *\/ */ -/* void plplot_canvas_famadv(PlplotCanvas* self); */ +/* PLDLLIMPEXP_GNOME2 void plplot_canvas_famadv(PlplotCanvas* self); */ /* Pattern fills the polygon bounded by the input points. */ -void plplot_canvas_fill(PlplotCanvas* self, PLINT n, PLFLT *x, PLFLT *y); +PLDLLIMPEXP_GNOME2 void plplot_canvas_fill(PlplotCanvas* self, PLINT n, PLFLT *x, PLFLT *y); /* Pattern fills the 3d polygon bounded by the input points. */ -void plplot_canvas_fill3(PlplotCanvas* self, PLINT n, PLFLT *x, PLFLT *y, PLFLT *z); +PLDLLIMPEXP_GNOME2 void plplot_canvas_fill3(PlplotCanvas* self, PLINT n, PLFLT *x, PLFLT *y, PLFLT *z); /* /\* Flushes the output stream. Use sparingly, if at all. *\/ */ -/* void plplot_canvas_flush(PlplotCanvas* self); */ +/* PLDLLIMPEXP_GNOME2 void plplot_canvas_flush(PlplotCanvas* self); */ /* Sets the global font flag to 'ifont'. */ -void plplot_canvas_font(PlplotCanvas* self, PLINT ifont); +PLDLLIMPEXP_GNOME2 void plplot_canvas_font(PlplotCanvas* self, PLINT ifont); /* Load specified font set. */ -void plplot_canvas_fontld(PlplotCanvas* self, PLINT fnt); +PLDLLIMPEXP_GNOME2 void plplot_canvas_fontld(PlplotCanvas* self, PLINT fnt); /* Get character default height and current (scaled) height */ -void plplot_canvas_gchr(PlplotCanvas* self, PLFLT *p_def, PLFLT *p_ht); +PLDLLIMPEXP_GNOME2 void plplot_canvas_gchr(PlplotCanvas* self, PLFLT *p_def, PLFLT *p_ht); /* Returns 8 bit RGB values for given color from color map 0 */ -void plplot_canvas_gcol0(PlplotCanvas* self, PLINT icol0, PLINT *r, PLINT *g, PLINT *b); +PLDLLIMPEXP_GNOME2 void plplot_canvas_gcol0(PlplotCanvas* self, PLINT icol0, PLINT *r, PLINT *g, PLINT *b); /* Returns the background color by 8 bit RGB value */ -void plplot_canvas_gcolbg(PlplotCanvas* self, PLINT *r, PLINT *g, PLINT *b); +PLDLLIMPEXP_GNOME2 void plplot_canvas_gcolbg(PlplotCanvas* self, PLINT *r, PLINT *g, PLINT *b); /* Returns the current compression setting */ -void plplot_canvas_gcompression(PlplotCanvas* self, PLINT *compression); +PLDLLIMPEXP_GNOME2 void plplot_canvas_gcompression(PlplotCanvas* self, PLINT *compression); /* Get the current device (keyword) name */ -void plplot_canvas_gdev(PlplotCanvas* self, char *p_dev); +PLDLLIMPEXP_GNOME2 void plplot_canvas_gdev(PlplotCanvas* self, char *p_dev); /* Retrieve current window into device space */ -void plplot_canvas_gdidev(PlplotCanvas* self, PLFLT *p_mar, PLFLT *p_aspect, PLFLT *p_jx, PLFLT *p_jy); +PLDLLIMPEXP_GNOME2 void plplot_canvas_gdidev(PlplotCanvas* self, PLFLT *p_mar, PLFLT *p_aspect, PLFLT *p_jx, PLFLT *p_jy); /* Get plot orientation */ -void plplot_canvas_gdiori(PlplotCanvas* self, PLFLT *p_rot); +PLDLLIMPEXP_GNOME2 void plplot_canvas_gdiori(PlplotCanvas* self, PLFLT *p_rot); /* Retrieve current window into plot space */ -void plplot_canvas_gdiplt(PlplotCanvas* self, PLFLT *p_xmin, PLFLT *p_ymin, PLFLT *p_xmax, PLFLT *p_ymax); +PLDLLIMPEXP_GNOME2 void plplot_canvas_gdiplt(PlplotCanvas* self, PLFLT *p_xmin, PLFLT *p_ymin, PLFLT *p_xmax, PLFLT *p_ymax); /* Get FCI (font characterization integer) */ -void plplot_canvas_gfci(PlplotCanvas* self, PLUNICODE *pfci); +PLDLLIMPEXP_GNOME2 void plplot_canvas_gfci(PlplotCanvas* self, PLUNICODE *pfci); /* /\* Get family file parameters *\/ */ -/* void plplot_canvas_gfam(PlplotCanvas* self, PLINT *p_fam, PLINT *p_num, PLINT *p_bmax); */ +/* PLDLLIMPEXP_GNOME2 void plplot_canvas_gfam(PlplotCanvas* self, PLINT *p_fam, PLINT *p_num, PLINT *p_bmax); */ /* Get the (current) output file name. Must be preallocated to >80 bytes */ -void plplot_canvas_gfnam(PlplotCanvas* self, char *fnam); +PLDLLIMPEXP_GNOME2 void plplot_canvas_gfnam(PlplotCanvas* self, char *fnam); /* Get the (current) run level. */ -void plplot_canvas_glevel(PlplotCanvas* self, PLINT *p_level); +PLDLLIMPEXP_GNOME2 void plplot_canvas_glevel(PlplotCanvas* self, PLINT *p_level); /* Get output device parameters. */ -void plplot_canvas_gpage(PlplotCanvas* self, PLFLT *p_xp, PLFLT *p_yp, PLINT *p_xleng, PLINT *p_yleng, PLINT *p_xoff, PLINT *p_yoff); +PLDLLIMPEXP_GNOME2 void plplot_canvas_gpage(PlplotCanvas* self, PLFLT *p_xp, PLFLT *p_yp, PLINT *p_xleng, PLINT *p_yleng, PLINT *p_xoff, PLINT *p_yoff); /* /\* Switches to graphics screen. *\/ */ -/* void plplot_canvas_gra(PlplotCanvas* self); */ +/* PLDLLIMPEXP_GNOME2 void plplot_canvas_gra(PlplotCanvas* self); */ /* grid irregularly sampled data */ -void plplot_canvas_griddata(PlplotCanvas* self, PLFLT *x, PLFLT *y, PLFLT *z, PLINT npts, PLFLT *xg, PLINT nptsx, PLFLT *yg, PLINT nptsy, PLFLT **zg, PLINT type, PLFLT data); +PLDLLIMPEXP_GNOME2 void plplot_canvas_griddata(PlplotCanvas* self, PLFLT *x, PLFLT *y, PLFLT *z, PLINT npts, PLFLT *xg, PLINT nptsx, PLFLT *yg, PLINT nptsy, PLFLT **zg, PLINT type, PLFLT data); /* Get subpage boundaries in absolute coordinates */ -void plplot_canvas_gspa(PlplotCanvas* self, PLFLT *xmin, PLFLT *xmax, PLFLT *ymin, PLFLT *ymax); +PLDLLIMPEXP_GNOME2 void plplot_canvas_gspa(PlplotCanvas* self, PLFLT *xmin, PLFLT *xmax, PLFLT *ymin, PLFLT *ymax); /* /\* Get current stream number. *\/ */ -/* void plplot_canvas_gstrm(PlplotCanvas* self, PLINT *p_strm); */ +/* PLDLLIMPEXP_GNOME2 void plplot_canvas_gstrm(PlplotCanvas* self, PLINT *p_strm); */ /* Get the current library version number */ -void plplot_canvas_gver(PlplotCanvas* self, char *p_ver); +PLDLLIMPEXP_GNOME2 void plplot_canvas_gver(PlplotCanvas* self, char *p_ver); /* Get viewport boundaries in normalized device coordinates */ -void plplot_canvas_gvpd(PlplotCanvas* self, PLFLT *p_xmin, PLFLT *p_xmax, PLFLT *p_ymin, PLFLT *p_ymax); +PLDLLIMPEXP_GNOME2 void plplot_canvas_gvpd(PlplotCanvas* self, PLFLT *p_xmin, PLFLT *p_xmax, PLFLT *p_ymin, PLFLT *p_ymax); /* Get viewport boundaries in world coordinates */ -void plplot_canvas_gvpw(PlplotCanvas* self, PLFLT *p_xmin, PLFLT *p_xmax, PLFLT *p_ymin, PLFLT *p_ymax); +PLDLLIMPEXP_GNOME2 void plplot_canvas_gvpw(PlplotCanvas* self, PLFLT *p_xmin, PLFLT *p_xmax, PLFLT *p_ymin, PLFLT *p_ymax); /* Get x axis labeling parameters */ -void plplot_canvas_gxax(PlplotCanvas* self, PLINT *p_digmax, PLINT *p_digits); +PLDLLIMPEXP_GNOME2 void plplot_canvas_gxax(PlplotCanvas* self, PLINT *p_digmax, PLINT *p_digits); /* Get y axis labeling parameters */ -void plplot_canvas_gyax(PlplotCanvas* self, PLINT *p_digmax, PLINT *p_digits); +PLDLLIMPEXP_GNOME2 void plplot_canvas_gyax(PlplotCanvas* self, PLINT *p_digmax, PLINT *p_digits); /* Get z axis labeling parameters */ -void plplot_canvas_gzax(PlplotCanvas* self, PLINT *p_digmax, PLINT *p_digits); +PLDLLIMPEXP_GNOME2 void plplot_canvas_gzax(PlplotCanvas* self, PLINT *p_digmax, PLINT *p_digits); /* Draws a histogram of n values of a variable in array data[0..n-1] */ -void plplot_canvas_hist(PlplotCanvas* self, PLINT n, PLFLT *data, PLFLT datmin, PLFLT datmax, PLINT nbin, PLINT oldwin); +PLDLLIMPEXP_GNOME2 void plplot_canvas_hist(PlplotCanvas* self, PLINT n, PLFLT *data, PLFLT datmin, PLFLT datmax, PLINT nbin, PLINT oldwin); /* Set current color (map 0) by hue, lightness, and saturation. */ -void plplot_canvas_hls(PlplotCanvas* self, PLFLT h, PLFLT l, PLFLT s); +PLDLLIMPEXP_GNOME2 void plplot_canvas_hls(PlplotCanvas* self, PLFLT h, PLFLT l, PLFLT s); /* /\* Initializes PLplot, using preset or default options *\/ */ -/* void plplot_canvas_plinit(PlplotCanvas* self); */ +/* PLDLLIMPEXP_GNOME2 void plplot_canvas_plinit(PlplotCanvas* self); */ /* Draws a line segment from (x1, y1) to (x2, y2). */ -void plplot_canvas_join(PlplotCanvas* self, PLFLT x1, PLFLT y1, PLFLT x2, PLFLT y2); +PLDLLIMPEXP_GNOME2 void plplot_canvas_join(PlplotCanvas* self, PLFLT x1, PLFLT y1, PLFLT x2, PLFLT y2); /* Simple routine for labelling graphs. */ -void plplot_canvas_lab(PlplotCanvas* self, const char *xlabel, const char *ylabel, const char *tlabel); +PLDLLIMPEXP_GNOME2 void plplot_canvas_lab(PlplotCanvas* self, const char *xlabel, const char *ylabel, const char *tlabel); /* Sets position of the light source */ -void plplot_canvas_lightsource(PlplotCanvas* self, PLFLT x, PLFLT y, PLFLT z); +PLDLLIMPEXP_GNOME2 void plplot_canvas_lightsource(PlplotCanvas* self, PLFLT x, PLFLT y, PLFLT z); /* Draws line segments connecting a series of points. */ -void plplot_canvas_line(PlplotCanvas* self, PLINT n, PLFLT *x, PLFLT *y); +PLDLLIMPEXP_GNOME2 void plplot_canvas_line(PlplotCanvas* self, PLINT n, PLFLT *x, PLFLT *y); /* Draws a line in 3 space. */ -void plplot_canvas_line3(PlplotCanvas* self, PLINT n, PLFLT *x, PLFLT *y, PLFLT *z); +PLDLLIMPEXP_GNOME2 void plplot_canvas_line3(PlplotCanvas* self, PLINT n, PLFLT *x, PLFLT *y, PLFLT *z); /* Set line style. */ -void plplot_canvas_lsty(PlplotCanvas* self, PLINT lin); +PLDLLIMPEXP_GNOME2 void plplot_canvas_lsty(PlplotCanvas* self, PLINT lin); /* plot continental outline in world coordinates */ -void plplot_canvas_map(PlplotCanvas* self, void (*mapform)(PLINT, PLFLT *, PLFLT *), char *type, PLFLT minlong, PLFLT maxlong, PLFLT minlat, PLFLT maxlat); +PLDLLIMPEXP_GNOME2 void plplot_canvas_map(PlplotCanvas* self, void (*mapform)(PLINT, PLFLT *, PLFLT *), char *type, PLFLT minlong, PLFLT maxlong, PLFLT minlat, PLFLT maxlat); /* Plot the latitudes and longitudes on the background. */ -void plplot_canvas_meridians(PlplotCanvas* self, void (*mapform)(PLINT, PLFLT *, PLFLT *), PLFLT dlong, PLFLT dlat, PLFLT minlong, PLFLT maxlong, PLFLT minlat, PLFLT maxlat); +PLDLLIMPEXP_GNOME2 void plplot_canvas_meridians(PlplotCanvas* self, void (*mapform)(PLINT, PLFLT *, PLFLT *), PLFLT dlong, PLFLT dlat, PLFLT minlong, PLFLT maxlong, PLFLT minlat, PLFLT maxlat); /* Plots a mesh representation of the function z[x][y]. */ -void plplot_canvas_mesh(PlplotCanvas* self, PLFLT *x, PLFLT *y, PLFLT **z, PLINT nx, PLINT ny, PLINT opt); +PLDLLIMPEXP_GNOME2 void plplot_canvas_mesh(PlplotCanvas* self, PLFLT *x, PLFLT *y, PLFLT **z, PLINT nx, PLINT ny, PLINT opt); /* Plots a mesh representation of the function z[x][y] with contour */ -void plplot_canvas_meshc(PlplotCanvas* self, PLFLT *x, PLFLT *y, PLFLT **z, PLINT nx, PLINT ny, PLINT opt, PLFLT *clevel, PLINT nlevel); +PLDLLIMPEXP_GNOME2 void plplot_canvas_meshc(PlplotCanvas* self, PLFLT *x, PLFLT *y, PLFLT **z, PLINT nx, PLINT ny, PLINT opt, PLFLT *clevel, PLINT nlevel); /* /\* Creates a new stream and makes it the default. *\/ */ -/* void plplot_canvas_mkstrm(PlplotCanvas* self, PLINT *p_strm); */ +/* PLDLLIMPEXP_GNOME2 void plplot_canvas_mkstrm(PlplotCanvas* self, PLINT *p_strm); */ /* Prints out "text" at specified position relative to viewport */ -void plplot_canvas_mtex(PlplotCanvas* self, const char *side, PLFLT disp, PLFLT pos, PLFLT just, const char *text); +PLDLLIMPEXP_GNOME2 void plplot_canvas_mtex(PlplotCanvas* self, const char *side, PLFLT disp, PLFLT pos, PLFLT just, const char *text); /* Plots a 3-d representation of the function z[x][y]. */ -void plplot_canvas_plot3d(PlplotCanvas* self, PLFLT *x, PLFLT *y, PLFLT **z, PLINT nx, PLINT ny, PLINT opt, PLINT side); +PLDLLIMPEXP_GNOME2 void plplot_canvas_plot3d(PlplotCanvas* self, PLFLT *x, PLFLT *y, PLFLT **z, PLINT nx, PLINT ny, PLINT opt, PLINT side); /* Plots a 3-d representation of the function z[x][y] with contour. */ -void plplot_canvas_plot3dc(PlplotCanvas* self, PLFLT *x, PLFLT *y, PLFLT **z, PLINT nx, PLINT ny, PLINT opt, PLFLT *clevel, PLINT nlevel); +PLDLLIMPEXP_GNOME2 void plplot_canvas_plot3dc(PlplotCanvas* self, PLFLT *x, PLFLT *y, PLFLT **z, PLINT nx, PLINT ny, PLINT opt, PLFLT *clevel, PLINT nlevel); /* Plots a 3-d representation of the function z[x][y] with contour and * y index limits. */ -void plplot_canvas_plot3dcl(PlplotCanvas* self, PLFLT *x, PLFLT *y, PLFLT **z, PLINT nx, PLINT ny, PLINT opt, PLFLT *clevel, PLINT nlevel, PLINT ixstart, PLINT ixn, PLINT *indexymin, PLINT*indexymax); +PLDLLIMPEXP_GNOME2 void plplot_canvas_plot3dcl(PlplotCanvas* self, PLFLT *x, PLFLT *y, PLFLT **z, PLINT nx, PLINT ny, PLINT opt, PLFLT *clevel, PLINT nlevel, PLINT ixstart, PLINT ixn, PLINT *indexymin, PLINT*indexymax); /* Set fill pattern directly. */ -void plplot_canvas_pat(PlplotCanvas* self, PLINT nlin, PLINT *inc, PLINT *del); +PLDLLIMPEXP_GNOME2 void plplot_canvas_pat(PlplotCanvas* self, PLINT nlin, PLINT *inc, PLINT *del); /* Plots array y against x for n points using ASCII code "code".*/ -void plplot_canvas_poin(PlplotCanvas* self, PLINT n, PLFLT *x, PLFLT *y, PLINT code); +PLDLLIMPEXP_GNOME2 void plplot_canvas_poin(PlplotCanvas* self, PLINT n, PLFLT *x, PLFLT *y, PLINT code); /* Draws a series of points in 3 space. */ -void plplot_canvas_poin3(PlplotCanvas* self, PLINT n, PLFLT *x, PLFLT *y, PLFLT *z, PLINT code); +PLDLLIMPEXP_GNOME2 void plplot_canvas_poin3(PlplotCanvas* self, PLINT n, PLFLT *x, PLFLT *y, PLFLT *z, PLINT code); /* Draws a polygon in 3 space. */ -void plplot_canvas_poly3(PlplotCanvas* self, PLINT n, PLFLT *x, PLFLT *y, PLFLT *z, PLINT *draw, PLINT ifcc); +PLDLLIMPEXP_GNOME2 void plplot_canvas_poly3(PlplotCanvas* self, PLINT n, PLFLT *x, PLFLT *y, PLFLT *z, PLINT *draw, PLINT ifcc); /* Set the floating point precision (in number of places) in numeric labels. */ -void plplot_canvas_prec(PlplotCanvas* self, PLINT setp, PLINT prec); +PLDLLIMPEXP_GNOME2 void plplot_canvas_prec(PlplotCanvas* self, PLINT setp, PLINT prec); /* Set fill pattern, using one of the predefined patterns.*/ -void plplot_canvas_psty(PlplotCanvas* self, PLINT patt); +PLDLLIMPEXP_GNOME2 void plplot_canvas_psty(PlplotCanvas* self, PLINT patt); /* Prints out "text" at world cooordinate (x,y). */ -void plplot_canvas_ptex(PlplotCanvas* self, PLFLT x, PLFLT y, PLFLT dx, PLFLT dy, PLFLT just, const char *text); +PLDLLIMPEXP_GNOME2 void plplot_canvas_ptex(PlplotCanvas* self, PLFLT x, PLFLT y, PLFLT dx, PLFLT dy, PLFLT just, const char *text); /* Replays contents of plot buffer to current device/file. */ -void plplot_canvas_replot(PlplotCanvas* self); +PLDLLIMPEXP_GNOME2 void plplot_canvas_replot(PlplotCanvas* self); /* Set line color by red, green, blue from 0. to 1. */ -void plplot_canvas_rgb(PlplotCanvas* self, PLFLT r, PLFLT g, PLFLT b); +PLDLLIMPEXP_GNOME2 void plplot_canvas_rgb(PlplotCanvas* self, PLFLT r, PLFLT g, PLFLT b); /* Set line color by 8 bit RGB values. */ -void plplot_canvas_rgb1(PlplotCanvas* self, PLINT r, PLINT g, PLINT b); +PLDLLIMPEXP_GNOME2 void plplot_canvas_rgb1(PlplotCanvas* self, PLINT r, PLINT g, PLINT b); /* Set character height. */ -void plplot_canvas_schr(PlplotCanvas* self, PLFLT def, PLFLT scale); +PLDLLIMPEXP_GNOME2 void plplot_canvas_schr(PlplotCanvas* self, PLFLT def, PLFLT scale); /* Set color map 0 colors by 8 bit RGB values */ -void plplot_canvas_scmap0(PlplotCanvas* self, PLINT *r, PLINT *g, PLINT *b, PLINT ncol0); +PLDLLIMPEXP_GNOME2 void plplot_canvas_scmap0(PlplotCanvas* self, PLINT *r, PLINT *g, PLINT *b, PLINT ncol0); /* Set number of colors in cmap 0 */ -void plplot_canvas_scmap0n(PlplotCanvas* self, PLINT ncol0); +PLDLLIMPEXP_GNOME2 void plplot_canvas_scmap0n(PlplotCanvas* self, PLINT ncol0); /* Set color map 1 colors by 8 bit RGB values */ -void plplot_canvas_scmap1(PlplotCanvas* self, PLINT *r, PLINT *g, PLINT *b, PLINT ncol1); +PLDLLIMPEXP_GNOME2 void plplot_canvas_scmap1(PlplotCanvas* self, PLINT *r, PLINT *g, PLINT *b, PLINT ncol1); /* Set color map 1 colors using a piece-wise linear relationship between */ /* intensity [0,1] (cmap 1 index) and position in HLS or RGB color space. */ -void plplot_canvas_scmap1l(PlplotCanvas* self, PLINT itype, PLINT npts, PLFLT *intensity, PLFLT *coord1, PLFLT *coord2, PLFLT *coord3, PLINT *rev); +PLDLLIMPEXP_GNOME2 void plplot_canvas_scmap1l(PlplotCanvas* self, PLINT itype, PLINT npts, PLFLT *intensity, PLFLT *coord1, PLFLT *coord2, PLFLT *coord3, PLINT *rev); /* Set number of colors in cmap 1 */ -void plplot_canvas_scmap1n(PlplotCanvas* self, PLINT ncol1); +PLDLLIMPEXP_GNOME2 void plplot_canvas_scmap1n(PlplotCanvas* self, PLINT ncol1); /* Set a given color from color map 0 by 8 bit RGB value */ -void plplot_canvas_scol0(PlplotCanvas* self, PLINT icol0, PLINT r, PLINT g, PLINT b); +PLDLLIMPEXP_GNOME2 void plplot_canvas_scol0(PlplotCanvas* self, PLINT icol0, PLINT r, PLINT g, PLINT b); /* Set the background color by 8 bit RGB value */ -void plplot_canvas_scolbg(PlplotCanvas* self, PLINT r, PLINT g, PLINT b); +PLDLLIMPEXP_GNOME2 void plplot_canvas_scolbg(PlplotCanvas* self, PLINT r, PLINT g, PLINT b); /* Used to globally turn color output on/off */ -void plplot_canvas_scolor(PlplotCanvas* self, PLINT color); +PLDLLIMPEXP_GNOME2 void plplot_canvas_scolor(PlplotCanvas* self, PLINT color); /* Set the compression level */ -void plplot_canvas_scompression(PlplotCanvas* self, PLINT compression); +PLDLLIMPEXP_GNOME2 void plplot_canvas_scompression(PlplotCanvas* self, PLINT compression); /* /\* Set the device (keyword) name *\/ */ -/* void plplot_canvas_sdev(PlplotCanvas* self, const char *devname); */ +/* PLDLLIMPEXP_GNOME2 void plplot_canvas_sdev(PlplotCanvas* self, const char *devname); */ /* Set window into device space using margin, aspect ratio, and */ /* justification */ -void plplot_canvas_sdidev(PlplotCanvas* self, PLFLT mar, PLFLT aspect, PLFLT jx, PLFLT jy); +PLDLLIMPEXP_GNOME2 void plplot_canvas_sdidev(PlplotCanvas* self, PLFLT mar, PLFLT aspect, PLFLT jx, PLFLT jy); /* Set up transformation from metafile coordinates. */ -void plplot_canvas_sdimap(PlplotCanvas* self, PLINT dimxmin, PLINT dimxmax, PLINT dimymin, PLINT dimymax, PLFLT dimxpmm, PLFLT dimypmm); +PLDLLIMPEXP_GNOME2 void plplot_canvas_sdimap(PlplotCanvas* self, PLINT dimxmin, PLINT dimxmax, PLINT dimymin, PLINT dimymax, PLFLT dimxpmm, PLFLT dimypmm); /* Set plot orientation, specifying rotation in units of pi/2. */ -void plplot_canvas_sdiori(PlplotCanvas* self, PLFLT rot); +PLDLLIMPEXP_GNOME2 void plplot_canvas_sdiori(PlplotCanvas* self, PLFLT rot); /* Set window into plot space */ -void plplot_canvas_sdiplt(PlplotCanvas* self, PLFLT xmin, PLFLT ymin, PLFLT xmax, PLFLT ymax); +PLDLLIMPEXP_GNOME2 void plplot_canvas_sdiplt(PlplotCanvas* self, PLFLT xmin, PLFLT ymin, PLFLT xmax, PLFLT ymax); /* Set window into plot space incrementally (zoom) */ -void plplot_canvas_sdiplz(PlplotCanvas* self, PLFLT xmin, PLFLT ymin, PLFLT xmax, PLFLT ymax); +PLDLLIMPEXP_GNOME2 void plplot_canvas_sdiplz(PlplotCanvas* self, PLFLT xmin, PLFLT ymin, PLFLT xmax, PLFLT ymax); /* Set the escape character for text strings. */ -void plplot_canvas_sesc(PlplotCanvas* self, char esc); +PLDLLIMPEXP_GNOME2 void plplot_canvas_sesc(PlplotCanvas* self, char esc); /* /\* Set family file parameters *\/ */ -/* void plplot_canvas_sfam(PlplotCanvas* self, PLINT fam, PLINT num, PLINT bmax); */ +/* PLDLLIMPEXP_GNOME2 void plplot_canvas_sfam(PlplotCanvas* self, PLINT fam, PLINT num, PLINT bmax); */ /* Set FCI (font characterization integer) */ -void plplot_canvas_sfci(PlplotCanvas* self, PLUNICODE fci); +PLDLLIMPEXP_GNOME2 void plplot_canvas_sfci(PlplotCanvas* self, PLUNICODE fci); /* Set the output file name. */ -void plplot_canvas_sfnam(PlplotCanvas* self, const char *fnam); +PLDLLIMPEXP_GNOME2 void plplot_canvas_sfnam(PlplotCanvas* self, const char *fnam); /* Shade region. */ -void plplot_canvas_shade(PlplotCanvas* self, PLFLT **a, PLINT nx, PLINT ny, PLINT (*defined) (PLFLT, PLFLT), PLFLT left, PLFLT right, PLFLT bottom, PLFLT top, PLFLT shade_min, PLFLT shade_max, PLINT sh_cmap, PLFLT sh_color, PLINT sh_width, PLINT min_color, PLINT min_width, PLINT max_color, PLINT max_width, void (*fill) (PLINT, PLFLT *, PLFLT *), PLINT rectangular, void (*pltr) (PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer), PLPointer pltr_data); +PLDLLIMPEXP_GNOME2 void plplot_canvas_shade(PlplotCanvas* self, PLFLT **a, PLINT nx, PLINT ny, PLINT (*defined) (PLFLT, PLFLT), PLFLT left, PLFLT right, PLFLT bottom, PLFLT top, PLFLT shade_min, PLFLT shade_max, PLINT sh_cmap, PLFLT sh_color, PLINT sh_width, PLINT min_color, PLINT min_width, PLINT max_color, PLINT max_width, void (*fill) (PLINT, PLFLT *, PLFLT *), PLINT rectangular, void (*pltr) (PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer), PLPointer pltr_data); -void plplot_canvas_shade1(PlplotCanvas* self, PLFLT *a, PLINT nx, PLINT ny, PLINT (*defined) (PLFLT, PLFLT), PLFLT left, PLFLT right, PLFLT bottom, PLFLT top, PLFLT shade_min, PLFLT shade_max, PLINT sh_cmap, PLFLT sh_color, PLINT sh_width, PLINT min_color, PLINT min_width, PLINT max_color, PLINT max_width, void (*fill) (PLINT, PLFLT *, PLFLT *), PLINT rectangular, void (*pltr) (PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer), PLPointer pltr_data); +PLDLLIMPEXP_GNOME2 void plplot_canvas_shade1(PlplotCanvas* self, PLFLT *a, PLINT nx, PLINT ny, PLINT (*defined) (PLFLT, PLFLT), PLFLT left, PLFLT right, PLFLT bottom, PLFLT top, PLFLT shade_min, PLFLT shade_max, PLINT sh_cmap, PLFLT sh_color, PLINT sh_width, PLINT min_color, PLINT min_width, PLINT max_color, PLINT max_width, void (*fill) (PLINT, PLFLT *, PLFLT *), PLINT rectangular, void (*pltr) (PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer), PLPointer pltr_data); -void plplot_canvas_shades(PlplotCanvas* self, PLFLT **a, PLINT nx, PLINT ny, PLINT (*defined) (PLFLT, PLFLT), PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax, PLFLT *clevel, PLINT nlevel, PLINT fill_width, PLINT cont_color, PLINT cont_width, void (*fill) (PLINT, PLFLT *, PLFLT *), PLINT rectangular, void (*pltr) (PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer), PLPointer pltr_data); +PLDLLIMPEXP_GNOME2 void plplot_canvas_shades(PlplotCanvas* self, PLFLT **a, PLINT nx, PLINT ny, PLINT (*defined) (PLFLT, PLFLT), PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax, PLFLT *clevel, PLINT nlevel, PLINT fill_width, PLINT cont_color, PLINT cont_width, void (*fill) (PLINT, PLFLT *, PLFLT *), PLINT rectangular, void (*pltr) (PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer), PLPointer pltr_data); -void plplot_canvas_fshade(PlplotCanvas* self, PLFLT (*f2eval) (PLINT, PLINT, PLPointer), PLPointer f2eval_data, PLFLT (*c2eval) (PLINT, PLINT, PLPointer), PLPointer c2eval_data, PLINT nx, PLINT ny, PLFLT left, PLFLT right, PLFLT bottom, PLFLT top, PLFLT shade_min, PLFLT shade_max, PLINT sh_cmap, PLFLT sh_color, PLINT sh_width, PLINT min_color, PLINT min_width, PLINT max_color, PLINT max_width, void (*fill) (PLINT, PLFLT *, PLFLT *), PLINT rectangular, void (*pltr) (PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer), PLPointer pltr_data); +PLDLLIMPEXP_GNOME2 void plplot_canvas_fshade(PlplotCanvas* self, PLFLT (*f2eval) (PLINT, PLINT, PLPointer), PLPointer f2eval_data, PLFLT (*c2eval) (PLINT, PLINT, PLPointer), PLPointer c2eval_data, PLINT nx, PLINT ny, PLFLT left, PLFLT right, PLFLT bottom, PLFLT top, PLFLT shade_min, PLFLT shade_max, PLINT sh_cmap, PLFLT sh_color, PLINT sh_width, PLINT min_color, PLINT min_width, PLINT max_color, PLINT max_width, void (*fill) (PLINT, PLFLT *, PLFLT *), PLINT rectangular, void (*pltr) (PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer), PLPointer pltr_data); /* Set up lengths of major tick marks. */ -void plplot_canvas_smaj(PlplotCanvas* self, PLFLT def, PLFLT scale); +PLDLLIMPEXP_GNOME2 void plplot_canvas_smaj(PlplotCanvas* self, PLFLT def, PLFLT scale); /* /\* Set the memory area to be plotted (with the 'mem' driver) *\/ */ -/* void plplot_canvas_smem(PlplotCanvas* self, PLINT maxx, PLINT maxy, void *plotmem); */ +/* PLDLLIMPEXP_GNOME2 void plplot_canvas_smem(PlplotCanvas* self, PLINT maxx, PLINT maxy, void *plotmem); */ /* Set up lengths of minor tick marks. */ -void plplot_canvas_smin(PlplotCanvas* self, PLFLT def, PLFLT scale); +PLDLLIMPEXP_GNOME2 void plplot_canvas_smin(PlplotCanvas* self, PLFLT def, PLFLT scale); /* /\* Set orientation. Must be done before calling plinit. *\/ */ -/* void plplot_canvas_sori(PlplotCanvas* self, PLINT ori); */ +/* PLDLLIMPEXP_GNOME2 void plplot_canvas_sori(PlplotCanvas* self, PLINT ori); */ /* Set output device parameters. Usually ignored by the driver. */ -void plplot_canvas_spage(PlplotCanvas* self, PLFLT xp, PLFLT yp, PLINT xleng, PLINT yleng, PLINT xoff, PLINT yoff); +PLDLLIMPEXP_GNOME2 void plplot_canvas_spage(PlplotCanvas* self, PLFLT xp, PLFLT yp, PLINT xleng, PLINT yleng, PLINT xoff, PLINT yoff); /* /\* Set the pause (on end-of-page) status *\/ */ -/* void plplot_canvas_spause(PlplotCanvas* self, PLINT pause); */ +/* PLDLLIMPEXP_GNOME2 void plplot_canvas_spause(PlplotCanvas* self, PLINT pause); */ /* /\* Set stream number. *\/ */ -/* void plplot_canvas_sstrm(PlplotCanvas* self, PLINT strm); */ +/* PLDLLIMPEXP_GNOME2 void plplot_canvas_sstrm(PlplotCanvas* self, PLINT strm); */ /* Set the number of subwindows in x and y */ -void plplot_canvas_ssub(PlplotCanvas* self, PLINT nx, PLINT ny); +PLDLLIMPEXP_GNOME2 void plplot_canvas_ssub(PlplotCanvas* self, PLINT nx, PLINT ny); /* Set symbol height. */ -void plplot_canvas_ssym(PlplotCanvas* self, PLFLT def, PLFLT scale); +PLDLLIMPEXP_GNOME2 void plplot_canvas_ssym(PlplotCanvas* self, PLFLT def, PLFLT scale); /* /\* Initialize PLplot, passing in the windows/page settings. *\/ */ -/* void plplot_canvas_star(PlplotCanvas* self, PLINT nx, PLINT ny); */ +/* PLDLLIMPEXP_GNOME2 void plplot_canvas_star(PlplotCanvas* self, PLINT nx, PLINT ny); */ /* /\* Initialize PLplot, passing the device name and windows/page settings. *\/ */ -/* void plplot_canvas_start(PlplotCanvas* self, const char *devname, PLINT nx, PLINT ny); */ +/* PLDLLIMPEXP_GNOME2 void plplot_canvas_start(PlplotCanvas* self, const char *devname, PLINT nx, PLINT ny); */ /* /\* Add a point to a stripchart. *\/ */ -/* void plplot_canvas_stripa(PlplotCanvas* self, PLINT id, PLINT pen, PLFLT x, PLFLT y); */ +/* PLDLLIMPEXP_GNOME2 void plplot_canvas_stripa(PlplotCanvas* self, PLINT id, PLINT pen, PLFLT x, PLFLT y); */ /* /\* Create 1d stripchart *\/ */ -/* void plplot_canvas_stripc(PlplotCanvas* self, PLINT *id, char *xspec, char *yspec, PLFLT xmin, PLFLT xmax, PLFLT xjump, PLFLT ymin, PLFLT ymax, PLFLT xlpos, PLFLT ylpos, PLINT y_ascl, PLINT acc, PLINT colbox, PLINT collab, PLINT colline[], PLINT styline[], char *legline[], char *labx, char *laby, char *labtop); */ +/* PLDLLIMPEXP_GNOME2 void plplot_canvas_stripc(PlplotCanvas* self, PLINT *id, char *xspec, char *yspec, PLFLT xmin, PLFLT xmax, PLFLT xjump, PLFLT ymin, PLFLT ymax, PLFLT xlpos, PLFLT ylpos, PLINT y_ascl, PLINT acc, PLINT colbox, PLINT collab, PLINT colline[], PLINT styline[], char *legline[], char *labx, char *laby, char *labtop); */ /* /\* Deletes and releases memory used by a stripchart. *\/ */ -/* void plplot_canvas_stripd(PlplotCanvas* self, PLINT id); */ +/* PLDLLIMPEXP_GNOME2 void plplot_canvas_stripd(PlplotCanvas* self, PLINT id); */ /* plots a 2d image (or a matrix too large for plshade() ) */ -void plplot_canvas_image(PlplotCanvas* self, PLFLT **data, PLINT nx, PLINT ny, PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax, PLFLT zmin, PLFLT zmax, PLFLT Dxmin, PLFLT Dxmax, PLFLT Dymin, PLFLT Dymax); +PLDLLIMPEXP_GNOME2 void plplot_canvas_image(PlplotCanvas* self, PLFLT **data, PLINT nx, PLINT ny, PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax, PLFLT zmin, PLFLT zmax, PLFLT Dxmin, PLFLT Dxmax, PLFLT Dymin, PLFLT Dymax); /* Set up a new line style */ -void plplot_canvas_styl(PlplotCanvas* self, PLINT nms, PLINT *mark, PLINT *space); +PLDLLIMPEXP_GNOME2 void plplot_canvas_styl(PlplotCanvas* self, PLINT nms, PLINT *mark, PLINT *space); /* Plots the 3d surface representation of the function z[x][y]. */ -void plplot_canvas_surf3d(PlplotCanvas* self, PLFLT *x, PLFLT *y, PLFLT **z, PLINT nx, PLINT ny, PLINT opt, PLFLT *clevel, PLINT nlevel); +PLDLLIMPEXP_GNOME2 void plplot_canvas_surf3d(PlplotCanvas* self, PLFLT *x, PLFLT *y, PLFLT **z, PLINT nx, PLINT ny, PLINT opt, PLFLT *clevel, PLINT nlevel); /* Plots the 3d surface representation of the function z[x][y] with y * index limits. */ -void plplot_canvas_surf3dl(PlplotCanvas* self, PLFLT *x, PLFLT *y, PLFLT **z, PLINT nx, PLINT ny, PLINT opt, PLFLT *clevel, PLINT nlevel, PLINT ixstart, PLINT ixn, PLINT *indexymin, PLINT*indexymax); +PLDLLIMPEXP_GNOME2 void plplot_canvas_surf3dl(PlplotCanvas* self, PLFLT *x, PLFLT *y, PLFLT **z, PLINT nx, PLINT ny, PLINT opt, PLFLT *clevel, PLINT nlevel, PLINT ixstart, PLINT ixn, PLINT *indexymin, PLINT*indexymax); /* Sets the edges of the viewport to the specified absolute coordinates */ -void plplot_canvas_svpa(PlplotCanvas* self, PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax); +PLDLLIMPEXP_GNOME2 void plplot_canvas_svpa(PlplotCanvas* self, PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax); /* Set x axis labeling parameters */ -void plplot_canvas_sxax(PlplotCanvas* self, PLINT digmax, PLINT digits); +PLDLLIMPEXP_GNOME2 void plplot_canvas_sxax(PlplotCanvas* self, PLINT digmax, PLINT digits); /* Set inferior X window */ -void plplot_canvas_sxwin(PlplotCanvas* self, PLINT window_id); +PLDLLIMPEXP_GNOME2 void plplot_canvas_sxwin(PlplotCanvas* self, PLINT window_id); /* Set y axis labeling parameters */ -void plplot_canvas_syax(PlplotCanvas* self, PLINT digmax, PLINT digits); +PLDLLIMPEXP_GNOME2 void plplot_canvas_syax(PlplotCanvas* self, PLINT digmax, PLINT digits); /* Plots array y against x for n points using Hershey symbol "code" */ -void plplot_canvas_sym(PlplotCanvas* self, PLINT n, PLFLT *x, PLFLT *y, PLINT code); +PLDLLIMPEXP_GNOME2 void plplot_canvas_sym(PlplotCanvas* self, PLINT n, PLFLT *x, PLFLT *y, PLINT code); /* Set z axis labeling parameters */ -void plplot_canvas_szax(PlplotCanvas* self, PLINT digmax, PLINT digits); +PLDLLIMPEXP_GNOME2 void plplot_canvas_szax(PlplotCanvas* self, PLINT digmax, PLINT digits); /* Switches to text screen. */ -void plplot_canvas_text(PlplotCanvas* self); +PLDLLIMPEXP_GNOME2 void plplot_canvas_text(PlplotCanvas* self); /* Sets the edges of the viewport with the given aspect ratio, leaving */ /* room for labels. */ -void plplot_canvas_vasp(PlplotCanvas* self, PLFLT aspect); +PLDLLIMPEXP_GNOME2 void plplot_canvas_vasp(PlplotCanvas* self, PLFLT aspect); /* Creates the largest viewport of the specified aspect ratio that fits */ /* within the specified normalized subpage coordinates. */ -void plplot_canvas_vpas(PlplotCanvas* self, PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax, PLFLT aspect); +PLDLLIMPEXP_GNOME2 void plplot_canvas_vpas(PlplotCanvas* self, PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax, PLFLT aspect); /* Creates a viewport with the specified normalized subpage coordinates. */ -void plplot_canvas_vpor(PlplotCanvas* self, PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax); +PLDLLIMPEXP_GNOME2 void plplot_canvas_vpor(PlplotCanvas* self, PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax); /* Defines a "standard" viewport with seven character heights for */ /* the left margin and four character heights everywhere else. */ -void plplot_canvas_vsta(PlplotCanvas* self); +PLDLLIMPEXP_GNOME2 void plplot_canvas_vsta(PlplotCanvas* self); /* Set up a window for three-dimensional plotting. */ -void plplot_canvas_w3d(PlplotCanvas* self, PLFLT basex, PLFLT basey, PLFLT height, PLFLT xmin0, PLFLT xmax0, PLFLT ymin0, PLFLT ymax0, PLFLT zmin0, PLFLT zmax0, PLFLT alt, PLFLT az); +PLDLLIMPEXP_GNOME2 void plplot_canvas_w3d(PlplotCanvas* self, PLFLT basex, PLFLT basey, PLFLT height, PLFLT xmin0, PLFLT xmax0, PLFLT ymin0, PLFLT ymax0, PLFLT zmin0, PLFLT zmax0, PLFLT alt, PLFLT az); /* Set pen width. */ -void plplot_canvas_wid(PlplotCanvas* self, PLINT width); +PLDLLIMPEXP_GNOME2 void plplot_canvas_wid(PlplotCanvas* self, PLINT width); /* Set up world coordinates of the viewport boundaries (2d plots). */ -void plplot_canvas_wind(PlplotCanvas* self, PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax); +PLDLLIMPEXP_GNOME2 void plplot_canvas_wind(PlplotCanvas* self, PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax); /* set xor mode; mode = 1-enter, 0-leave, status = 0 if not interactive device */ -void plplot_canvas_xormod(PlplotCanvas* self, PLINT mode, PLINT *status); +PLDLLIMPEXP_GNOME2 void plplot_canvas_xormod(PlplotCanvas* self, PLINT mode, PLINT *status); G_END_DECLS This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hba...@us...> - 2009-01-18 22:39:36
|
Revision: 9340 http://plplot.svn.sourceforge.net/plplot/?rev=9340&view=rev Author: hbabcock Date: 2009-01-18 21:39:41 +0000 (Sun, 18 Jan 2009) Log Message: ----------- Updated for the 5.9.3 release. Modified Paths: -------------- trunk/OLD-README.release trunk/README.release Modified: trunk/OLD-README.release =================================================================== --- trunk/OLD-README.release 2009-01-18 21:28:45 UTC (rev 9339) +++ trunk/OLD-README.release 2009-01-18 21:39:41 UTC (rev 9340) @@ -1,3 +1,402 @@ +PLplot Release 5.9.2 +~~~~~~~~~~~~~~~~~~~~ +This is a development release of PLplot. It represents the ongoing efforts +of the community to improve the PLplot plotting package. Development +releases in the 5.9.x series will be available every few months. The next +stable release will be 5.10.0. + + If you encounter a problem that is not already documented in the +PROBLEMS file, then please send bug reports to PLplot developers via the +mailing lists at http://sourceforge.net/mail/?group_id=2915 . + + Please see the license under which this software is distributed +(LGPL), and the disclaimer of all warranties, given in the COPYING.LIB +file. + + +Notices for Users. + +I. This is the official notice that our deprecated autotools-based build +system has been removed as of release 5.9.1. Instead, use the CMake-based +build system following the directions in the INSTALL file. + +II. This is official notice that the tk, itk, and itcl components of PLplot +have been disabled by default as of 5.9.1. We reluctantly took this step +for these venerable PLplot components because we found segfaults with most +of our Tk-related interactive tests for this release which we have been, as +yet, unable to address. For now, if you want to try these components of +PLplot to help us debug the problem, you must specifically use the cmake +options -DENABLE_tk=ON -DENABLE_itk=ON -DENABLE_itcl=ON to build and install +these components. + +III. This is official notice that we (as of 5.9.1) no longer support +Octave-2.1.73 which has a variety of run-time issues in our tests of the +Octave examples on different platforms. In contrast our tests show we get +good run-time results with all our Octave examples for Octave-3.0.1. Also, +that is the recommended stable version of Octave at +http://www.gnu.org/software/octave/download.html so that is the only version +of Octave we support at this time. + +IV. This is official notice that the PLplot team have decided (as of +release 5.9.1) for consistency sake to change the PLplot stream variables +plsc->vpwxmi, plsc->vpwxma, plsc->vpwymi, and plsc->vpwyma and the results +returned by plgvpw to reflect the exact window limit values input by users +using plwind. Previously to this change, the stream variables and the values +returned by plgvpw reflected the internal slightly expanded range of window +limits used by PLplot so that the user's specified limits would be on the +graph. Two users noted this slight difference, and we agree with them it +should not be there. Note that internally, PLplot still uses the expanded +ranges so most users results will be identical. However, you may notice +some small changes to your plot results if you use these stream variables +directly (only possible in C/C++) or use plgvpw. + +INDEX + +1. Changes relative to PLplot 5.9.1 (the previous development release) + +1.1 Extension of our test framework + +2. Changes relative to PLplot 5.8.0 (the previous stable release) + +2.1 All autotools-related files have now been removed +2.2 Build system bug fixes +2.3 Build system improvements +2.4 Implement build-system infrastructure for installed Ada bindings and +examples +2.5 Code cleanup +2.6 Date / time labels for axes +2.7 Alpha value support +2.8 New PLplot functions +2.9 External libLASi library improvements affecting our psttf device. +2.10 Improvements to the cairo driver family. +2.11 wxWidgets driver improvements +2.12 pdf driver improvements +2.13 svg driver improvements +2.14 Ada language support +2.15 OCaml language support +2.16 Perl/PDL language support +2.17 Update to various language bindings +2.18 Update to various examples +2.19 Extension of our test framework +2.20 Rename test subdirectory to plplot_test +2.21 Website support files updated +2.22 Internal changes to function visibility +2.23 Dynamic driver support in Windows +2.24 Documentation updates + + +1. Changes relative to PLplot 5.9.1 (the previous development release) + +1.1 Extension of our test framework + +The standard test suite for PLplot now carries out a comparison of the +stdout output (especially important for example 31 which tests most of our +set and get functions) and PostScript output for different languages as a +check. Thanks to the addition of example 31, the inclusion of examples 14 +and 17 in the test suite and other recent extensions of the other +examples we now have rigourous testing in place for almost the entirety +of our common API. This extensive testing framework has already helped +us track down a number of bugs, and it should make it much easier for us +to maintain high quality for our ongoing PLplot releases. + +2. Changes relative to PLplot 5.8.0 (the previous stable release) + +2.1 All autotools-related files have now been removed + +CMake (with the exception of a special build script for the DJGPP platform) +is now the only supported build system. It has been tested on Linux / Unix, +Mac OS-X and Windows platforms. + +2.2 Build system bug fixes + +Various fixes include the following: + +Ctest will now work correctly when the build tree path includes symlinks. + +Dependencies for swig generated files fixed so they are not rebuilt every +time make is called. + +Various dependency fixes to ensure that parallel builds (using make -j) +work under unix. + +2.3 Build system improvements + +We now transform link flag results delivered to the CMake environment by +pkg-config into the preferred CMake form of library information. The +practical effect of this improvement is that external libraries in +non-standard locations now have their rpath options set correctly for our +build system both for the build tree and the install tree so you don't have +to fiddle with LD_LIBRARY_PATH, etc. + +2.4 Implement build-system infrastructure for installed Ada bindings and +examples + +Install source files, library information files, and the plplotada library +associated with the Ada bindings. Configure and install the pkg-config file +for the plplotada library. Install the Ada examples and a configured Makefile +to build them in the install tree. + +2.5 Code cleanup + +The PLplot source code has been cleaned up to make consistent use of +(const char *) and (char *) throughout. Some API functions have changed +to use const char * instead of char * to make it clear that the strings +are not modified by the function. The C and C++ examples have been updated +consistent with this. These changes fix a large number of warnings +with gcc-4.2. Note: this should not require programs using PLplot to be +recompiled as it is not a binary API change. + +There has also been some cleanup of include files in the C++ examples +so the code will compile with the forthcoming gcc-4.3. + +2.6 Date / time labels for axes + +PLplot now allows date / time labels to be used on axes. A new option +('d') is available for the xopt and yopt arguments to plbox which +indicates that the axis should be interpreted as a date / time. Similarly +there is a new range of options for plenv to select date / time labels. +The time format is seconds since the epoch (usually 1 Jan 1970). This +format is commonly used on most systems. The C gmtime routine can be +used to calculate this for a given date and time. The format for the +labels is controlled using a new pltimefmt function, which takes a +format string. All formatting is done using the C strftime function. +See documentation for available options on your platform. Example 29 +demonstrates the new capabilities. + +N.B. Our reliance on C library POSIX time routines to (1) convert from +broken-down time to time-epoch, (2) to convert from time-epoch to +broken-down time, and (3) to format results with strftime have proved +problematic for non-C languages which have time routines of variable +quality. Also, it is not clear that even the POSIX time routines are +available on Windows. So we have plans afoot to implement high-quality +versions of (1), (2), and (3) with additional functions to get/set the epoch +in the PLplot core library itself. These routines should work on all C +platforms and should also be uniformly accessible for all our language +bindings. + +WARNING..... Therefore, assuming these plans are implemented, the present +part of our date/time PLplot API that uses POSIX time routines will be +changed. + +2.7 Alpha value support + +PLplot core has been modified to support a transparency or alpha value +channel for each color in color map 0 and 1. In addition a number of new +functions were added the PLplot API so that the user can both set and query +alpha values for color in the two color maps. These functions have the same +name as their non-alpha value equivalents, but with a an "a" added to the +end. Example 30 demonstrates some different ways to use these functions +and the effects of alpha values, at least for those drivers that support alpha +values. This change should have no effect on the device drivers that do not +currently support alpha values. Currently only the cairo, gd, wxwidgets and +aquaterm drivers support alpha values. There are some limitations with the gd +driver due to transparency support in the underlying libgd library. + +2.8 New PLplot functions + +An enhanced version of plimage, plimagefr has been added. This allows images +to be plotted using coordinate transformation, and also for the dynamic range +of the plotted values to be altered. Example 20 has been modified to +demonstrate this new functionality. + +To ensure consistent results in example 21 between different platforms and +language bindings PLplot now includes a small random number generator within +the library. plrandd will return a PLFLT random number in the range 0.0-1.0. +plseed will allow the random number generator to be seeded. + +2.9 External libLASi library improvements affecting our psttf device. + +Our psttf device depends on the libLASi library. libLASi-1.1.0 has just been +released at http://sourceforge.net/svn/?group_id=187113 . We recommend +using this latest version of libLASi for building PLplot and the psttf +device since this version of libLASi is more robust against glyph +information returned by pango/cairo/fontconfig that on rare occasions is not +suitable for use by libLASi. + +2.10 Improvements to the cairo driver family. + +Jonathan Woithe improved the xcairo driver so that it can optionally be +used with an external user supplied X Drawable. This enables a nice +separation of graphing (PLplot) and window management (Gtk, etc..). Doug +Hunt fixed the bugs that broke the memcairo driver and it is now fully +functional. Additionally, a new extcairo driver was added that will plot +into a user supplied cairo context. + +2.11 wxWidgets driver improvements + +Complete reorganization of the driver code. A new backend was added, based +on the wxGraphicsContext class, which is available for wxWidgets 2.8.4 +and later. This backend produces antialized output similar to the +AGG backend but has no dependency on the AGG library. The basic wxDC +backend and the wxGraphicsContext backend process the text output +on their own, which results in much nicer plots than with the standard +Hershey fonts and is much faster than using the freetype library. New +options were introduced in the wxWidgets driver: + - backend: Choose backend: (0) standard, (1) using AGG library, + (2) using wxGraphicsContext + - hrshsym: Use Hershey symbol set (hrshsym=0|1) + - text: Use own text routines (text=0|1) + - freetype: Use FreeType library (freetype=0|1) +The option "text" changed its meaning, since it enabled the FreeType library +support, while now the option enables the driver's own text routines. + +Some other features were added: + * the wxWidgets driver now correctly clears the background (or parts of it) + * transparency support was added + * the "locate mode" (already availale in the xwin and tk driver) was + implemented, where graphics input events are processed and translated + to world coordinates + +2.12 pdf driver improvements + +The pdf driver (which is based on the haru library http://www.libharu.org) +processes the text output now on its own. So far only the Adobe Type1 +fonts are supported. TrueType font support will follow. Full unicode +support will follow after the haru library will support unicode strings. The +driver is now able to produce A4, letter, A5 and A3 pages. The Hershey font +may be used only for symbols. Output can now be compressed, resulting in +much smaller file sizes. +Added new options: + - text: Use own text routines (text=0|1) + - compress: Compress pdf output (compress=0|1) + - hrshsym: Use Hershey symbol set (hrshsym=0|1) + - pagesize: Set page size (pagesize=A4|letter|A3|A5) + +2.13 svg driver improvements + +This device driver has had the following improvements: schema for generated +file now validates properly at http://validator.w3.org/ for the +automatically detected document type of SVG 1.1; -geometry option now works; +alpha channel transparency has been implemented; file familying for +multipage examples has been implemented; coordinate scaling has been +implemented so that full internal PLplot resolution is used; extraneous +whitespace and line endings that were being injected into text in error have +now been removed; and differential correction to string justification is now +applied. + +The result of these improvements is that our SVG device now gives the +best-looking results of all our devices. However, currently you must be +careful of which SVG viewer or editor you try because a number of them have +some bugs that need to be resolved. For example, there is a librsvg bug in +text placement (http://bugzilla.gnome.org/show_bug.cgi?id=525023) that +affects all svg use within GNOME as well as the ImageMagick "display" +application. However, at least the latest konqueror and firefox as well as +inkscape and scribus-ng (but not scribus!) give outstanding looking results +for files generated by our svg device driver. + +2.14 Ada language support + +We now have a complete Ada bindings implemented for PLplot. We also have a +complete set of our standard examples implemented in Ada which give results +that are identical with corresponding results for the C standard examples. +This is an excellent test of a large subset of the Ada bindings. We now +enable Ada by default for our users and request widespread testing of this +new feature. + +2.15 OCaml language support + +Thanks primarily to Hezekiah M. Carty's efforts we now have a complete OCaml +bindings implemented for PLplot. We also have a complete set of our standard +examples implemented in OCaml which give results that are identical with +corresponding results for the C standard examples. This is an excellent test +of a large subset of the OCaml bindings. We now enable OCaml by default for +our users and request widespread testing of this new feature. + +2.16 Perl/PDL language support + +Thanks to Doug Hunt's efforts the external Perl/PDL module, +PDL::Graphics::PLplot version 0.46 available at +http://search.cpan.org/dist/PDL-Graphics-PLplot has been brought up to date +to give access to recently added PLplot API. The instructions for how to +install this module on top of an offical PDL release are given in +examples/perl/README.perldemos. Doug has also finished implementing a +complete set of standard examples in Perl/PDL which are part of PLplot and +which produce identical results to their C counterparts if the above updated +module has been installed. Our build system tests the version of +PDL::Graphics::PLplot that is available, and if it is not 0.46 or later, the +list of Perl/PDL examples that are run as part of our standard tests is +substantially reduced to avoid examples that use the new functionality. In +sum, if you use PDL::Graphics::PLplot version 0.46 or later the full +complement of PLplot commands is available to you from Perl/PDL, but +otherwise not. + +2.17 Updates to various language bindings + +A concerted effort has been made to bring all the language bindings up to +date with recently added functions. Ada, C++, f77, f95, Java, OCaml, Octave, +Perl/PDL, Python, and Tcl now all support the common PLplot API (with the +exception of the mapping functions which are not yet implemented for all +bindings due to technical issues.) This is a significant step forward for +those using languages other than C. + +2.18 Updates to various examples + +To help test the updates to the language bindings the examples have been +thoroughly checked. Ada, C, C++, f77, f95, and OCaml now contain a full set +of non-interactive tests (examples 1-31 excluding 14 and 17). Java, Octave, +Python and Tcl are missing example 19 because of the issue with the mapping +functions. The examples have also been checked to ensure consistent results +between different language bindings. Currently there are still some minor +differences in the results for the tcl examples, probably due to rounding +errors. Some of the Tcl examples (example 21) require Tcl version 8.5 for +proper support for NaNs. + +Also new is an option for the plplot_test.sh script to run the examples +using a debugging command. This is enabled using the --debug option. The +default it to use the valgrind memory checker. This has highlighted at +least one memory leaks in plplot which have been fixed. It is not part +of the standard ctest tests because it can be _very_ slow for a complete +set of language bindings and device drivers. + +2.19 Extension of our test framework + +The standard test suite for PLplot now carries out a comparison of the +stdout output (especially important for example 31 which tests most of our +set and get functions) and PostScript output for different languages as a +check. Thanks to the addition of example 31, the inclusion of examples 14 +and 17 in the test suite and other recent extensions of the other +examples we now have rigourous testing in place for almost the entirety +of our common API. This extensive testing framework has already helped +us track down a number of bugs, and it should make it much easier for us +to maintain high quality for our ongoing PLplot releases. + +2.20 Rename test subdirectory to plplot_test + +This change was necessary to quit clashing with the "make test" target which +now works for the first time ever (by executing ctest). + +2.21 Website support files updated + +Our new website content is generated with PHP and uses CSS (cascaded style +sheets) to implement a consistent style. This new approach demanded lots of +changes in the website support files that are used to generate and upload +our website and which are automatically included with the release. + +2.22 Internal changes to function visibility + +The internal definitions of functions in plplot have been significantly +tidied up to allow the use of the -fvisibility=hidden option with newer +versions of gcc. This prevents internal functions from being exported +to the user where possible. This extends the existing support for this +on windows. + +2.23 Dynamic driver support in Windows + +An interface based on the ltdl library function calls was established +which allows to open and close dynamic link libraries (DLL) during +run-time and call functions from these libraries. As a consequence +drivers can now be compiled into single DLLs separate from the core +plplot DLL also in Windows. The cmake option ENABLE_DYNDRIVERS is now +ON by default for Windows if a shared plplot library is built. + +2.24 Documentation updates + +The docbook documentation has been updated to include many of the +C-specific functions (for example plAlloc2dGrid) which are not part +of the common API, but are used in the examples and may be helpful +for plplot users. + + PLplot Release 5.9.1 ~~~~~~~~~~~~~~~~~~~~ This is a development release of PLplot. It represents the ongoing efforts Modified: trunk/README.release =================================================================== --- trunk/README.release 2009-01-18 21:28:45 UTC (rev 9339) +++ trunk/README.release 2009-01-18 21:39:41 UTC (rev 9340) @@ -1,4 +1,4 @@ -PLplot Release 5.9.2 +PLplot Release 5.9.3 ~~~~~~~~~~~~~~~~~~~~ This is a development release of PLplot. It represents the ongoing efforts of the community to improve the PLplot plotting package. Development @@ -52,9 +52,8 @@ INDEX -1. Changes relative to PLplot 5.9.1 (the previous development release) +1. Changes relative to PLplot 5.9.2 (the previous development release) -1.1 Extension of our test framework 2. Changes relative to PLplot 5.8.0 (the previous stable release) @@ -85,20 +84,9 @@ 2.24 Documentation updates -1. Changes relative to PLplot 5.9.1 (the previous development release) +1. Changes relative to PLplot 5.9.2 (the previous development release) -1.1 Extension of our test framework -The standard test suite for PLplot now carries out a comparison of the -stdout output (especially important for example 31 which tests most of our -set and get functions) and PostScript output for different languages as a -check. Thanks to the addition of example 31, the inclusion of examples 14 -and 17 in the test suite and other recent extensions of the other -examples we now have rigourous testing in place for almost the entirety -of our common API. This extensive testing framework has already helped -us track down a number of bugs, and it should make it much easier for us -to maintain high quality for our ongoing PLplot releases. - 2. Changes relative to PLplot 5.8.0 (the previous stable release) 2.1 All autotools-related files have now been removed 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:50:39
|
Revision: 9344 http://plplot.svn.sourceforge.net/plplot/?rev=9344&view=rev Author: smekal Date: 2009-01-19 09:27:22 +0000 (Mon, 19 Jan 2009) Log Message: ----------- Added svn:keywords property to added files. Modified Paths: -------------- trunk/examples/lua/x01.lua trunk/examples/lua/x05.lua trunk/examples/lua/x09.lua trunk/examples/lua/x10.lua trunk/examples/lua/x11.lua trunk/examples/lua/x12.lua trunk/examples/lua/x13.lua trunk/examples/lua/x19.lua trunk/examples/lua/x25.lua Property Changed: ---------------- trunk/bindings/lua/CMakeLists.txt trunk/bindings/lua/plplotluac.i trunk/cmake/modules/lua.cmake trunk/examples/lua/x01.lua trunk/examples/lua/x05.lua trunk/examples/lua/x09.lua trunk/examples/lua/x10.lua trunk/examples/lua/x11.lua trunk/examples/lua/x12.lua trunk/examples/lua/x13.lua trunk/examples/lua/x19.lua trunk/examples/lua/x24.lua trunk/examples/lua/x25.lua trunk/examples/lua/x30.lua Property changes on: trunk/bindings/lua/CMakeLists.txt ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Property changes on: trunk/bindings/lua/plplotluac.i ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Property changes on: trunk/cmake/modules/lua.cmake ___________________________________________________________________ Deleted: svn:executable - * Added: svn:keywords + Author Date Id Revision Modified: trunk/examples/lua/x01.lua =================================================================== --- trunk/examples/lua/x01.lua 2009-01-19 09:22:19 UTC (rev 9343) +++ trunk/examples/lua/x01.lua 2009-01-19 09:27:22 UTC (rev 9344) @@ -1,4 +1,4 @@ ---[[ $Id: $ +--[[ $Id$ Simple line plot and multiple windows demo. Property changes on: trunk/examples/lua/x01.lua ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Modified: trunk/examples/lua/x05.lua =================================================================== --- trunk/examples/lua/x05.lua 2009-01-19 09:22:19 UTC (rev 9343) +++ trunk/examples/lua/x05.lua 2009-01-19 09:27:22 UTC (rev 9344) @@ -1,4 +1,4 @@ --- $Id: $ +-- $Id$ -- Histogram demo. Property changes on: trunk/examples/lua/x05.lua ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Modified: trunk/examples/lua/x09.lua =================================================================== --- trunk/examples/lua/x09.lua 2009-01-19 09:22:19 UTC (rev 9343) +++ trunk/examples/lua/x09.lua 2009-01-19 09:27:22 UTC (rev 9344) @@ -1,4 +1,4 @@ -/* $Id: x09c.c 9117 2008-12-15 12:45:13Z andrewross $ +/* $Id$ Contour plot demo. Property changes on: trunk/examples/lua/x09.lua ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Modified: trunk/examples/lua/x10.lua =================================================================== --- trunk/examples/lua/x10.lua 2009-01-19 09:22:19 UTC (rev 9343) +++ trunk/examples/lua/x10.lua 2009-01-19 09:27:22 UTC (rev 9344) @@ -1,4 +1,4 @@ --- $Id: $ +-- $Id$ -- Window positioning demo. Property changes on: trunk/examples/lua/x10.lua ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Modified: trunk/examples/lua/x11.lua =================================================================== --- trunk/examples/lua/x11.lua 2009-01-19 09:22:19 UTC (rev 9343) +++ trunk/examples/lua/x11.lua 2009-01-19 09:27:22 UTC (rev 9344) @@ -1,4 +1,4 @@ -/* $Id: x11c.c 8033 2007-11-23 15:28:09Z andrewross $ +/* $Id$ Mesh plot demo. Property changes on: trunk/examples/lua/x11.lua ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Modified: trunk/examples/lua/x12.lua =================================================================== --- trunk/examples/lua/x12.lua 2009-01-19 09:22:19 UTC (rev 9343) +++ trunk/examples/lua/x12.lua 2009-01-19 09:27:22 UTC (rev 9344) @@ -1,4 +1,4 @@ --- $Id: $ +-- $Id$ -- Bar chart demo. Property changes on: trunk/examples/lua/x12.lua ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Modified: trunk/examples/lua/x13.lua =================================================================== --- trunk/examples/lua/x13.lua 2009-01-19 09:22:19 UTC (rev 9343) +++ trunk/examples/lua/x13.lua 2009-01-19 09:27:22 UTC (rev 9344) @@ -1,4 +1,4 @@ --- $Id: $ +-- $Id$ -- Pie chart demo. Property changes on: trunk/examples/lua/x13.lua ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Modified: trunk/examples/lua/x19.lua =================================================================== --- trunk/examples/lua/x19.lua 2009-01-19 09:22:19 UTC (rev 9343) +++ trunk/examples/lua/x19.lua 2009-01-19 09:27:22 UTC (rev 9344) @@ -1,4 +1,4 @@ --- $Id: $ +-- $Id$ -- Illustrates backdrop plotting of world, US maps. -- Contributed by Wesley Ebisuzaki. Property changes on: trunk/examples/lua/x19.lua ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Property changes on: trunk/examples/lua/x24.lua ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Modified: trunk/examples/lua/x25.lua =================================================================== --- trunk/examples/lua/x25.lua 2009-01-19 09:22:19 UTC (rev 9343) +++ trunk/examples/lua/x25.lua 2009-01-19 09:27:22 UTC (rev 9344) @@ -1,4 +1,4 @@ --- $Id: $ +-- $Id$ -- Filling and clipping polygons. Property changes on: trunk/examples/lua/x25.lua ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Property changes on: trunk/examples/lua/x30.lua ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <and...@us...> - 2009-01-19 13:22:11
|
Revision: 9346 http://plplot.svn.sourceforge.net/plplot/?rev=9346&view=rev Author: andrewross Date: 2009-01-19 12:08:22 +0000 (Mon, 19 Jan 2009) Log Message: ----------- Update instructions for example 24 since -drvopt smooth=0 is no longer required. Also add comment on which font packages are required for Ubuntu. Modified Paths: -------------- trunk/bindings/octave/demos/x24c.m trunk/examples/c/x24c.c trunk/examples/c++/x24.cc trunk/examples/f77/x24f.fm4 trunk/examples/f95/x24f.f90 trunk/examples/java/x24.java trunk/examples/ocaml/x24.ml trunk/examples/perl/x24.pl trunk/examples/python/xw24.py trunk/examples/tcl/x24.tcl Modified: trunk/bindings/octave/demos/x24c.m =================================================================== --- trunk/bindings/octave/demos/x24c.m 2009-01-19 10:07:43 UTC (rev 9345) +++ trunk/bindings/octave/demos/x24c.m 2009-01-19 12:08:22 UTC (rev 9346) @@ -30,7 +30,7 @@ ## PLPLOT_FREETYPE_MONO_FONT=$TTFDIR/ttf-devanagari-fonts/lohit_hi.ttf \ ## PLPLOT_FREETYPE_SCRIPT_FONT=$TTFDIR/unfonts/UnBatang.ttf \ ## PLPLOT_FREETYPE_SYMBOL_FONT=$TTFDIR/ttf-bengali-fonts/JamrulNormal.ttf \ -## ./x24c -dev png -drvopt smooth=0 -o x24c.png ) +## ./x24c -dev png -o x24c.png ) ## ## Packages needed: ## @@ -40,7 +40,11 @@ ## ttf-unfonts ## ttf-bengali-fonts ## +## For the latest Ubuntu systems lohit_hi.ttf has been moved to the +## ttf-indic-fonts-core package instead of ttf-devanagari-fonts so you +## will have to use this package instead and update the font path. + 1; function ix24c @@ -146,4 +150,4 @@ end -ix24c \ No newline at end of file +ix24c Modified: trunk/examples/c/x24c.c =================================================================== --- trunk/examples/c/x24c.c 2009-01-19 10:07:43 UTC (rev 9345) +++ trunk/examples/c/x24c.c 2009-01-19 12:08:22 UTC (rev 9346) @@ -29,7 +29,7 @@ PLPLOT_FREETYPE_MONO_FONT=$TTFDIR/ttf-devanagari-fonts/lohit_hi.ttf \ PLPLOT_FREETYPE_SCRIPT_FONT=$TTFDIR/unfonts/UnBatang.ttf \ PLPLOT_FREETYPE_SYMBOL_FONT=$TTFDIR/ttf-bengali-fonts/JamrulNormal.ttf \ - ./x24c -dev png -drvopt smooth=0 -o x24c.png ) + ./x24c -dev png -o x24c.png ) Packages needed: @@ -38,6 +38,10 @@ ttf-devanagari-fonts ttf-unfonts ttf-bengali-fonts + + For the latest Ubuntu systems lohit_hi.ttf has been moved to the + ttf-indic-fonts-core package instead of ttf-devanagari-fonts so you + will have to use this package instead and update the font path. */ Modified: trunk/examples/c++/x24.cc =================================================================== --- trunk/examples/c++/x24.cc 2009-01-19 10:07:43 UTC (rev 9345) +++ trunk/examples/c++/x24.cc 2009-01-19 12:08:22 UTC (rev 9346) @@ -28,7 +28,7 @@ // PLPLOT_FREETYPE_MONO_FONT=/usr/share/fonts/truetype/ttf-devanagari-fonts/lohit_hi.ttf \ // PLPLOT_FREETYPE_SCRIPT_FONT=/usr/share/fonts/truetype/unfonts/UnBatang.ttf \ // PLPLOT_FREETYPE_SYMBOL_FONT=/usr/share/fonts/truetype/ttf-bangla-fonts/JamrulNormal.ttf \ -// ./x24 -dev png -drvopt smooth=0 -o x24cxx.png +// ./x24 -dev png -o x24cxx.png // // Packages needed: // @@ -38,6 +38,9 @@ // ttf-unfonts // ttf-bangla-fonts // +// For the latest Ubuntu systems lohit_hi.ttf has been moved to the +// ttf-indic-fonts-core package instead of ttf-devanagari-fonts so you +// will have to use this package instead and update the font path. // Modified: trunk/examples/f77/x24f.fm4 =================================================================== --- trunk/examples/f77/x24f.fm4 2009-01-19 10:07:43 UTC (rev 9345) +++ trunk/examples/f77/x24f.fm4 2009-01-19 12:08:22 UTC (rev 9346) @@ -1,3 +1,4 @@ +C $Id:$ C Unicode Pace Flag C C Copyright (C) 2005 Rafael Laboissiere @@ -28,7 +29,7 @@ C PLPLOT_FREETYPE_MONO_FONT=$TTFDIR/ttf-devanagari-fonts/lohit_hi.ttf \ C PLPLOT_FREETYPE_SCRIPT_FONT=$TTFDIR/unfonts/UnBatang.ttf \ C PLPLOT_FREETYPE_SYMBOL_FONT=$TTFDIR/ttf-bengali-fonts/JamrulNormal.ttf \ -C ./x24c -dev png -drvopt smooth=0 -o x24c.png ) +C ./x24f -dev png -o x24f.png ) C C Packages needed: C @@ -38,6 +39,9 @@ C ttf-unfonts C ttf-bengali-fonts C +C For the latest Ubuntu systems lohit_hi.ttf has been moved to the +C ttf-indic-fonts-core package instead of ttf-devanagari-fonts so you +C will have to use this package instead and update the font path. program x24f implicit none Modified: trunk/examples/f95/x24f.f90 =================================================================== --- trunk/examples/f95/x24f.f90 2009-01-19 10:07:43 UTC (rev 9345) +++ trunk/examples/f95/x24f.f90 2009-01-19 12:08:22 UTC (rev 9346) @@ -1,4 +1,4 @@ -! $Id:$ +! $Id$ ! ! Unicode Pace Flag ! @@ -30,7 +30,7 @@ ! PLPLOT_FREETYPE_MONO_FONT=$TTFDIR/ttf-devanagari-fonts/lohit_hi.ttf \ ! PLPLOT_FREETYPE_SCRIPT_FONT=$TTFDIR/unfonts/UnBatang.ttf \ ! PLPLOT_FREETYPE_SYMBOL_FONT=$TTFDIR/ttf-bengali-fonts/JamrulNormal.ttf \ -! ./x24c -dev png -drvopt smooth=0 -o x24c.png ) +! ./x24f -dev png -o x24f95.png ) ! ! Packages needed: ! @@ -40,7 +40,11 @@ ! ttf-unfonts ! ttf-bengali-fonts ! +! For the latest Ubuntu systems lohit_hi.ttf has been moved to the +! ttf-indic-fonts-core package instead of ttf-devanagari-fonts so you +! will have to use this package instead and update the font path. + program x24f use plplot implicit none Modified: trunk/examples/java/x24.java =================================================================== --- trunk/examples/java/x24.java 2009-01-19 10:07:43 UTC (rev 9345) +++ trunk/examples/java/x24.java 2009-01-19 12:08:22 UTC (rev 9346) @@ -31,7 +31,7 @@ // PLPLOT_FREETYPE_MONO_FONT=/usr/share/fonts/truetype/ttf-devanagari-fonts/lohit_hi.ttf \ // PLPLOT_FREETYPE_SCRIPT_FONT=/usr/share/fonts/truetype/unfonts/UnBatang.ttf \ // PLPLOT_FREETYPE_SYMBOL_FONT=/usr/share/fonts/truetype/ttf-bangla-fonts/JamrulNormal.ttf \ -// ./x24 -dev png -drvopt smooth=0 -o x24cxx.png +// java -cp /path/to/plplot.jar plplot.examples.x24 -dev png -o x24j.png // // Packages needed: // @@ -41,6 +41,9 @@ // ttf-unfonts // ttf-bangla-fonts // +// For the latest Ubuntu systems lohit_hi.ttf has been moved to the +// ttf-indic-fonts-core package instead of ttf-devanagari-fonts so you +// will have to use this package instead and update the font path. // package plplot.examples; Modified: trunk/examples/ocaml/x24.ml =================================================================== --- trunk/examples/ocaml/x24.ml 2009-01-19 10:07:43 UTC (rev 9345) +++ trunk/examples/ocaml/x24.ml 2009-01-19 12:08:22 UTC (rev 9346) @@ -30,7 +30,7 @@ PLPLOT_FREETYPE_MONO_FONT=$TTFDIR/ttf-devanagari-fonts/lohit_hi.ttf \ PLPLOT_FREETYPE_SCRIPT_FONT=$TTFDIR/unfonts/UnBatang.ttf \ PLPLOT_FREETYPE_SYMBOL_FONT=$TTFDIR/ttf-bengali-fonts/JamrulNormal.ttf \ - ./x24c -dev png -drvopt smooth=0 -o x24c.png ) + ./x24ocaml -dev png -o x24ocaml.png ) Packages needed: @@ -39,6 +39,11 @@ ttf-devanagari-fonts ttf-unfonts ttf-bengali-fonts + + For the latest Ubuntu systems lohit_hi.ttf has been moved to the + ttf-indic-fonts-core package instead of ttf-devanagari-fonts so you + will have to use this package instead and update the font path. + *) open Plplot Modified: trunk/examples/perl/x24.pl =================================================================== --- trunk/examples/perl/x24.pl 2009-01-19 10:07:43 UTC (rev 9345) +++ trunk/examples/perl/x24.pl 2009-01-19 12:08:22 UTC (rev 9346) @@ -29,7 +29,7 @@ # PLPLOT_FREETYPE_MONO_FONT=/usr/share/fonts/truetype/ttf-devanagari-fonts/lohit_hi.ttf \ # PLPLOT_FREETYPE_SCRIPT_FONT=/usr/share/fonts/truetype/unfonts/UnBatang.ttf \ # PLPLOT_FREETYPE_SYMBOL_FONT=/usr/share/fonts/truetype/ttf-bangla-fonts/JamrulNormal.ttf \ -# ./x24.pl -dev png -drvopt smooth=0 -o x24pl.png +# ./x24.pl -dev png -o x24pdl.png # # Packages needed: # @@ -38,6 +38,11 @@ # ttf-indic-fonts # ttf-unfonts # ttf-bangla-fonts +# +# For the latest Ubuntu systems lohit_hi.ttf has been moved to the +# ttf-indic-fonts-core package instead of ttf-devanagari-fonts so you +# will have to use this package instead and update the font path. +# # SYNC: x24c.c 1.6 Modified: trunk/examples/python/xw24.py =================================================================== --- trunk/examples/python/xw24.py 2009-01-19 10:07:43 UTC (rev 9345) +++ trunk/examples/python/xw24.py 2009-01-19 12:08:22 UTC (rev 9346) @@ -31,7 +31,7 @@ # PLPLOT_FREETYPE_MONO_FONT=$TTFDIR/ttf-devanagari-fonts/lohit_hi.ttf \ # PLPLOT_FREETYPE_SCRIPT_FONT=$TTFDIR/unfonts/UnBatang.ttf \ # PLPLOT_FREETYPE_SYMBOL_FONT=$TTFDIR/ttf-bengali-fonts/JamrulNormal.ttf \ -# ./x24 -dev png -drvopt smooth=0 -o x24p.png ) +# ./x24 -dev png -o x24p.png ) # # Packages needed: # @@ -41,6 +41,9 @@ # ttf-unfonts # ttf-bengali-fonts # +# For the latest Ubuntu systems lohit_hi.ttf has been moved to the +# ttf-indic-fonts-core package instead of ttf-devanagari-fonts so you +# will have to use this package instead and update the font path. # # Translated from x24c.c into python by Thomas J. Duck Modified: trunk/examples/tcl/x24.tcl =================================================================== --- trunk/examples/tcl/x24.tcl 2009-01-19 10:07:43 UTC (rev 9345) +++ trunk/examples/tcl/x24.tcl 2009-01-19 12:08:22 UTC (rev 9346) @@ -1,5 +1,5 @@ #---------------------------------------------------------------------------- -# $Id:$ +# $Id$ #---------------------------------------------------------------------------- # Unicode Pace Flag @@ -33,7 +33,7 @@ # PLPLOT_FREETYPE_MONO_FONT=$TTFDIR/ttf-devanagari-fonts/lohit_hi.ttf \ # PLPLOT_FREETYPE_SCRIPT_FONT=$TTFDIR/unfonts/UnBatang.ttf \ # PLPLOT_FREETYPE_SYMBOL_FONT=$TTFDIR/ttf-bengali-fonts/JamrulNormal.ttf \ -# ./x24c -dev png -drvopt smooth=0 -o x24c.png ) +# ./x24 -dev png -o x24t.png ) # # Packages needed: # @@ -43,7 +43,11 @@ # ttf-unfonts # ttf-bengali-fonts # +# For the latest Ubuntu systems lohit_hi.ttf has been moved to the +# ttf-indic-fonts-core package instead of ttf-devanagari-fonts so you +# will have to use this package instead and update the font path. + proc x24 {{w loopback}} { matrix red i 7 = {240, 204, 204, 204, 0, 39, 125} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sm...@us...> - 2009-01-20 07:45:22
|
Revision: 9350 http://plplot.svn.sourceforge.net/plplot/?rev=9350&view=rev Author: smekal Date: 2009-01-20 07:45:17 +0000 (Tue, 20 Jan 2009) Log Message: ----------- The Borland compiler (5.5) should be able to find the gdi32 and comdlg32 import libraries now. The changes are actually not tested with the Borland compiler. Modified Paths: -------------- trunk/CMakeLists.txt trunk/cmake/modules/wingcc.cmake Modified: trunk/CMakeLists.txt =================================================================== --- trunk/CMakeLists.txt 2009-01-20 04:16:57 UTC (rev 9349) +++ trunk/CMakeLists.txt 2009-01-20 07:45:17 UTC (rev 9350) @@ -46,7 +46,7 @@ # Location where PLplot cmake build system first looks for cmake modules. set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake/modules) -# We need the path to the MinGW compiler in order to find +# We need the path to the MinGW/Borland compiler in order to find # the import libraries for system libraries. IF(MINGW) get_filename_component(MINGWBINPATH ${CMAKE_C_COMPILER} PATH) @@ -54,6 +54,12 @@ CACHE FILEPATH DOCSTRING "Path to MinGW import libraries") ENDIF(MINGW) +IF(BORLAND) + get_filename_component(BORLANDBINPATH ${CMAKE_C_COMPILER} PATH) + set(BORLANDLIBPATH ${BORLANDBINPATH}/../Lib/PSDK + CACHE FILEPATH + DOCSTRING "Path to Borland import libraries") +ENDIF(BORLAND) # Version data that need modification for each release. include(plplot_version) Modified: trunk/cmake/modules/wingcc.cmake =================================================================== --- trunk/cmake/modules/wingcc.cmake 2009-01-20 04:16:57 UTC (rev 9349) +++ trunk/cmake/modules/wingcc.cmake 2009-01-20 07:45:17 UTC (rev 9350) @@ -29,9 +29,9 @@ if(PLD_wingcc) message(STATUS "Looking for gdi32 header and library") - find_library(GDI32_LIBRARY gdi32 HINTS ${MINGWLIBPATH}) + find_library(GDI32_LIBRARY gdi32 HINTS ${MINGWLIBPATH} ${BORLANDLIBPATH}) if(GDI32_LIBRARY) - find_library(COMDLG32_LIBRARY comdlg32 HINTS ${MINGWLIBPATH}) + find_library(COMDLG32_LIBRARY comdlg32 HINTS ${MINGWLIBPATH} ${BORLANDLIBPATH}) endif(GDI32_LIBRARY) if(GDI32_LIBRARY AND COMDLG32_LIBRARY) message(STATUS "Looking for gdi32 header and library - found") This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <and...@us...> - 2009-01-20 12:26:08
|
Revision: 9354 http://plplot.svn.sourceforge.net/plplot/?rev=9354&view=rev Author: andrewross Date: 2009-01-20 12:25:57 +0000 (Tue, 20 Jan 2009) Log Message: ----------- Update octave bindings and examples to remove legacy code for octave 2.0 and 2.1. This was primarily to support different mechanisms for setting the path and for suppressing warnings. The changes mean octave 3.0 no long complains about variables no longer complains about obsolete variables Cmake now checks that at least octave 2.9 is installed and disables the bindings otherwise. Fix automatic_replot which was broken in octave 2.9 / 3.0 as the octave variable automatic_replot was removed. Replace with a plplot specific global variable pl_automatic_replot. This means that the p??.m examples now work correctly again. Modified Paths: -------------- trunk/bindings/octave/PLplot/autostyle.m trunk/bindings/octave/PLplot/axis.m trunk/bindings/octave/PLplot/colormap.m trunk/bindings/octave/PLplot/figure.m trunk/bindings/octave/PLplot/grid.m trunk/bindings/octave/PLplot/legend.m trunk/bindings/octave/PLplot/plot_margin.m trunk/bindings/octave/PLplot/plplot_octave_path.m.in trunk/bindings/octave/PLplot/shade.m trunk/bindings/octave/PLplot/shading.m trunk/bindings/octave/PLplot/support/__pl_contour.m trunk/bindings/octave/PLplot/support/__pl_matstr.m trunk/bindings/octave/PLplot/support/__pl_plotit.m trunk/bindings/octave/PLplot/title.m trunk/bindings/octave/PLplot/toggle_plplot_use.m trunk/bindings/octave/PLplot/xlabel.m trunk/bindings/octave/PLplot/xticks.m trunk/bindings/octave/PLplot/ylabel.m trunk/bindings/octave/PLplot/yticks.m trunk/bindings/octave/PLplot/zlabel.m trunk/bindings/octave/USAGE trunk/bindings/octave/demos/p1.m trunk/bindings/octave/demos/p10.m trunk/bindings/octave/demos/p11.m trunk/bindings/octave/demos/p12.m trunk/bindings/octave/demos/p13.m trunk/bindings/octave/demos/p14.m trunk/bindings/octave/demos/p15.m trunk/bindings/octave/demos/p16.m trunk/bindings/octave/demos/p17.m trunk/bindings/octave/demos/p18.m trunk/bindings/octave/demos/p19.m trunk/bindings/octave/demos/p2.m trunk/bindings/octave/demos/p21.m trunk/bindings/octave/demos/p3.m trunk/bindings/octave/demos/p4.m trunk/bindings/octave/demos/p5.m trunk/bindings/octave/demos/p6.m trunk/bindings/octave/demos/p7.m trunk/bindings/octave/demos/p8.m trunk/bindings/octave/demos/p9.m trunk/bindings/octave/octaverc.in trunk/cmake/modules/octave.cmake trunk/plplot_test/test_octave.sh.in Modified: trunk/bindings/octave/PLplot/autostyle.m =================================================================== --- trunk/bindings/octave/PLplot/autostyle.m 2009-01-20 08:05:23 UTC (rev 9353) +++ trunk/bindings/octave/PLplot/autostyle.m 2009-01-20 12:25:57 UTC (rev 9354) @@ -21,6 +21,7 @@ function st = autostyle(x) global __pl + global pl_automatic_replot strm = __pl_init; if (nargin == 1) @@ -49,8 +50,8 @@ st = __pl.line_style(strm); - if (exist("automatic_replot")) - if (automatic_replot) + if (exist("pl_automatic_replot")) + if (pl_automatic_replot) __pl_plotit; endif endif Modified: trunk/bindings/octave/PLplot/axis.m =================================================================== --- trunk/bindings/octave/PLplot/axis.m 2009-01-20 08:05:23 UTC (rev 9353) +++ trunk/bindings/octave/PLplot/axis.m 2009-01-20 12:25:57 UTC (rev 9354) @@ -61,6 +61,7 @@ ## as setup by the user, or automaticaly. It interacts with hold mode. global __pl + global pl_automatic_replot strm = __pl_init; if (nargin == 0) @@ -193,8 +194,8 @@ endswitch endif - if (exist("automatic_replot")) - if (automatic_replot) + if (exist("pl_automatic_replot")) + if (pl_automatic_replot) __pl_plotit; endif endif Modified: trunk/bindings/octave/PLplot/colormap.m =================================================================== --- trunk/bindings/octave/PLplot/colormap.m 2009-01-20 08:05:23 UTC (rev 9353) +++ trunk/bindings/octave/PLplot/colormap.m 2009-01-20 12:25:57 UTC (rev 9354) @@ -23,6 +23,7 @@ function ccmap = colormap(map) global __pl + global pl_automatic_replot __pl_init; if (nargin == 0) @@ -68,8 +69,8 @@ plscmap1(map(:,1), map(:,2), map(:,3)); plflush;#pleop; - if (exist("automatic_replot")) - if (automatic_replot) + if (exist("pl_automatic_replot")) + if (pl_automatic_replot) ## can cause problems on plot scripts that dont support automatic _replot __pl_plotit; endif Modified: trunk/bindings/octave/PLplot/figure.m =================================================================== --- trunk/bindings/octave/PLplot/figure.m 2009-01-20 08:05:23 UTC (rev 9353) +++ trunk/bindings/octave/PLplot/figure.m 2009-01-20 12:25:57 UTC (rev 9354) @@ -46,15 +46,15 @@ function [n, driver, intp]= figure (n, device, file, win_id, tk_file, plot_frame) global __pl __tk_name + global pl_automatic_replot if (!exist("__pl") || !struct_contains (__pl,"inited")) v = split(version ,'.'); if (! ((str2num(v(1,:)) > 2) || - (str2num(v(1,:)) == 2 && str2num(v(2,:)) > 1) || - (str2num(v(1,:)) == 2 && str2num(v(2,:)) == 1 && - str2num(v(3,:)) >= 57))) + (str2num(v(1,:)) == 2 && str2num(v(2,:)) == 9 && + str2num(v(3,:)) >= 0))) error("The PLplot-Octave scripts need an Octave version \n\ - greater than or equal to 2.1.57.\n"); + greater than or equal to 2.9.0.\n"); endif plplot_stub; @@ -65,13 +65,13 @@ __pl.inited = 1; - if (exist("automatic_replot")) - if (automatic_replot == 0) - warning("It is recommended that you set 'automatic_replot=1' \n\ - in your ~/.octaverc file."); - ##automatic_replot = 1; - endif - endif +## if (exist("pl_automatic_replot")) +## if (pl_automatic_replot == 0) +## warning("It is recommended that you set 'pl_automatic_replot=1' \n\ +## in your ~/.octaverc file."); +## ##automatic_replot = 1; +## endif +## endif endif if (nargin == 0) Modified: trunk/bindings/octave/PLplot/grid.m =================================================================== --- trunk/bindings/octave/PLplot/grid.m 2009-01-20 08:05:23 UTC (rev 9353) +++ trunk/bindings/octave/PLplot/grid.m 2009-01-20 12:25:57 UTC (rev 9354) @@ -23,6 +23,7 @@ function st = grid (x) global __pl + global pl_automatic_replot strm = __pl_init; st = __pl.grid(strm); @@ -57,8 +58,8 @@ help grid endif - if (exist("automatic_replot")) - if (automatic_replot) + if (exist("pl_automatic_replot")) + if (pl_automatic_replot) __pl_plotit; endif endif Modified: trunk/bindings/octave/PLplot/legend.m =================================================================== --- trunk/bindings/octave/PLplot/legend.m 2009-01-20 08:05:23 UTC (rev 9353) +++ trunk/bindings/octave/PLplot/legend.m 2009-01-20 12:25:57 UTC (rev 9354) @@ -29,6 +29,7 @@ function st = legend (x, xpos, varargin) global __pl + global pl_automatic_replot strm = __pl_init; if (nargin == 0) @@ -66,8 +67,8 @@ help "legend" endif - if (exist("automatic_replot")) - if (automatic_replot) + if (exist("pl_automatic_replot")) + if (pl_automatic_replot) __pl_plotit; endif endif Modified: trunk/bindings/octave/PLplot/plot_margin.m =================================================================== --- trunk/bindings/octave/PLplot/plot_margin.m 2009-01-20 08:05:23 UTC (rev 9353) +++ trunk/bindings/octave/PLplot/plot_margin.m 2009-01-20 12:25:57 UTC (rev 9354) @@ -22,6 +22,7 @@ function ost = plot_margin(st) global __pl + global pl_automatic_replot n = __pl_init; ost = __pl.margin(n); @@ -30,8 +31,8 @@ __pl.margin(n) = st; endif - if (exist("automatic_replot")) - if (automatic_replot) + if (exist("pl_automatic_replot")) + if (pl_automatic_replot) __pl_plotit; endif endif Modified: trunk/bindings/octave/PLplot/plplot_octave_path.m.in =================================================================== --- trunk/bindings/octave/PLplot/plplot_octave_path.m.in 2009-01-20 08:05:23 UTC (rev 9353) +++ trunk/bindings/octave/PLplot/plplot_octave_path.m.in 2009-01-20 12:25:57 UTC (rev 9354) @@ -22,7 +22,7 @@ global __pl_plplot_octave_path if (!exist("__pl_plplot_octave_path") || isempty(__pl_plplot_octave_path)) - __pl_plplot_octave_path = "@PLPLOT_OCTAVE_DIR@//"; + __pl_plplot_octave_path = "@PLPLOT_OCTAVE_DIR@"; endif if (nargin == 0) Modified: trunk/bindings/octave/PLplot/shade.m =================================================================== --- trunk/bindings/octave/PLplot/shade.m 2009-01-20 08:05:23 UTC (rev 9353) +++ trunk/bindings/octave/PLplot/shade.m 2009-01-20 12:25:57 UTC (rev 9354) @@ -28,13 +28,8 @@ unwind_protect - if (exist("warn_empty_list_elements")) - old_empty_list_elements_ok = warn_empty_list_elements; - warn_empty_list_elements = 0; - else - old_empty_list_elements_ok = warning("query", "Octave:empty-list-elements"); - warning("off","Octave:empty-list-elements"); - endif + old_empty_list_elements_ok = warning("query", "Octave:empty-list-elements"); + warning("off","Octave:empty-list-elements"); if (nargin == 1 && ismatrix(x)) levels = 20; @@ -177,11 +172,7 @@ unwind_protect_cleanup - if (exist("warn_empty_list_elements")) - warn_empty_list_elements = old_empty_list_elements_ok; - else - warning(old_empty_list_elements_ok.state, "Octave:empty-list-elements"); - endif + warning(old_empty_list_elements_ok.state, "Octave:empty-list-elements"); end_unwind_protect Modified: trunk/bindings/octave/PLplot/shading.m =================================================================== --- trunk/bindings/octave/PLplot/shading.m 2009-01-20 08:05:23 UTC (rev 9353) +++ trunk/bindings/octave/PLplot/shading.m 2009-01-20 12:25:57 UTC (rev 9354) @@ -19,6 +19,7 @@ function type = shading(type) global __pl + global pl_automatic_replot strm = __pl_init; if (nargin == 0) @@ -35,8 +36,8 @@ return; endif - if (exist("automatic_replot")) - if (automatic_replot) + if (exist("pl_automatic_replot")) + if (pl_automatic_replot) __pl_plotit; endif endif Modified: trunk/bindings/octave/PLplot/support/__pl_contour.m =================================================================== --- trunk/bindings/octave/PLplot/support/__pl_contour.m 2009-01-20 08:05:23 UTC (rev 9353) +++ trunk/bindings/octave/PLplot/support/__pl_contour.m 2009-01-20 12:25:57 UTC (rev 9354) @@ -21,13 +21,8 @@ unwind_protect - if (exist("warn_empty_list_elements")) - old_empty_list_elements_ok = warn_empty_list_elements; - warn_empty_list_elements = 0; - else - old_empty_list_elements_ok = warning("query","Octave:empty-list-elements"); - warning("off","Octave:empty-list-elements"); - endif + old_empty_list_elements_ok = warning("query","Octave:empty-list-elements"); + warning("off","Octave:empty-list-elements"); grid = 0; if (__pl.grid(strm)) @@ -117,11 +112,7 @@ unwind_protect_cleanup - if (exist("warn_empty_list_elements")) - warn_empty_list_elements = old_empty_list_elements_ok; - else - warning(old_empty_list_elements_ok.state,"Octave:empty-list-elements"); - endif + warning(old_empty_list_elements_ok.state,"Octave:empty-list-elements"); end_unwind_protect Modified: trunk/bindings/octave/PLplot/support/__pl_matstr.m =================================================================== --- trunk/bindings/octave/PLplot/support/__pl_matstr.m 2009-01-20 08:05:23 UTC (rev 9353) +++ trunk/bindings/octave/PLplot/support/__pl_matstr.m 2009-01-20 12:25:57 UTC (rev 9354) @@ -34,17 +34,10 @@ out(nn,:) = ""; endif endif - if (exist("warn_fortran_indexing")) - old_dofi = warn_fortran_indexing; - warn_fortran_indexing = 0; - out(toascii (out) == 0) = " "; - warn_fortran_indexing = old_dofi; - else - old_dofi = warning("query","Octave:fortran-indexing"); - warning("off","Octave:fortran-indexing"); - out(toascii (out) == 0) = " "; - warning(old_dofi.state,"Octave:fortran-indexing"); - endif + old_dofi = warning("query","Octave:fortran-indexing"); + warning("off","Octave:fortran-indexing"); + out(toascii (out) == 0) = " "; + warning(old_dofi.state,"Octave:fortran-indexing"); else help __pl_matstr Modified: trunk/bindings/octave/PLplot/support/__pl_plotit.m =================================================================== --- trunk/bindings/octave/PLplot/support/__pl_plotit.m 2009-01-20 08:05:23 UTC (rev 9353) +++ trunk/bindings/octave/PLplot/support/__pl_plotit.m 2009-01-20 12:25:57 UTC (rev 9354) @@ -28,13 +28,8 @@ unwind_protect - if (exist("warn_empty_list_elements")) - old_empty_list_elements_ok = warn_empty_list_elements; - warn_empty_list_elements = 0; - else - old_empty_list_elements_ok = warning("query","Octave:empty-list-elements"); - warning("off","Octave:empty-list-elements"); - endif + old_empty_list_elements_ok = warning("query","Octave:empty-list-elements"); + warning("off","Octave:empty-list-elements"); if (__pl.type(strm) >= 100 && __pl.type(strm) < 200) __pl_meshplotit; @@ -286,11 +281,7 @@ unwind_protect_cleanup - if (exist("warn_empty_list_elements")) - warn_empty_list_elements = old_empty_list_elements_ok; - else - warning(old_empty_list_elements_ok.state,"Octave:empty-list-elements"); - endif + warning(old_empty_list_elements_ok.state,"Octave:empty-list-elements"); end_unwind_protect Modified: trunk/bindings/octave/PLplot/title.m =================================================================== --- trunk/bindings/octave/PLplot/title.m 2009-01-20 08:05:23 UTC (rev 9353) +++ trunk/bindings/octave/PLplot/title.m 2009-01-20 12:25:57 UTC (rev 9354) @@ -40,6 +40,7 @@ function text = title (text) global __pl + global pl_automatic_replot strm = __pl_init; @@ -57,8 +58,8 @@ __pl.tlabel = __pl_matstr(__pl.tlabel, text, strm); endif - if (exist("automatic_replot")) - if (automatic_replot) + if (exist("pl_automatic_replot")) + if (pl_automatic_replot) __pl_plotit; endif endif Modified: trunk/bindings/octave/PLplot/toggle_plplot_use.m =================================================================== --- trunk/bindings/octave/PLplot/toggle_plplot_use.m 2009-01-20 08:05:23 UTC (rev 9353) +++ trunk/bindings/octave/PLplot/toggle_plplot_use.m 2009-01-20 12:25:57 UTC (rev 9354) @@ -3,7 +3,7 @@ ## Use this script to activate/deactivate the default library for the ## PLplot plotting function (plot, mesh, etc.), as both the native ## gnuplot and the new octave-plplot libraries use similar names to the -## functions. toggle_plplot_use post-/pre-pends to LOADPATH the path for +## functions. toggle_plplot_use post-/pre-pends to the path for ## the PLplot functions in successive calls. ## File: toggle_plplot_use.m @@ -23,13 +23,6 @@ if ! exist ("use_plplot_state") global use_plplot_state use_plplot_state = "on"; - # Warn user about spurious warnings with octave 2.9 - ver = str2num(split(version,".")); - if ((ver(1) == 2 && ver(2) == 9) || (ver(1) >= 3)) - if (warning("query","Octave:built-in-variable-assignment").state == "on") - warning("You may want to call\n warning(\"off\",\"Octave:built-in-variable-assignment\");\nto prevent spurious warnings from the plplot code for compatability with octave 2.0/2.1.\n"); - endif - endif else if strcmp (use_plplot_state, "on") use_plplot_state = "off"; @@ -39,38 +32,22 @@ endif use_plplot_path = plplot_octave_path; -# Strip of trailing // for octave >= 2.9 -if (!exist("LOADPATH")) - use_plplot_path = use_plplot_path(1:end-2); -endif -if (exist("LOADPATH")) - use_plplot_i = findstr (LOADPATH, use_plplot_path); - if (!isempty (use_plplot_i)) - LOADPATH (use_plplot_i(1):use_plplot_i(1)+length(use_plplot_path)-1)= ""; - LOADPATH = strrep (LOADPATH, "::", ":"); +plplot_path_to_remove = split(genpath(use_plplot_path),pathsep); +for i=1:size(plplot_path_to_remove)(1) + if (findstr(path,deblank(plplot_path_to_remove(i,:))) > 0) + rmpath(deblank(plplot_path_to_remove(i,:))); endif -else - plplot_path_to_remove = split(genpath(use_plplot_path),pathsep); - for i=1:size(plplot_path_to_remove)(1) - if (findstr(path,deblank(plplot_path_to_remove(i,:))) > 0) - rmpath(deblank(plplot_path_to_remove(i,:))); - endif - endfor -endif +endfor if (strcmp (use_plplot_state, "on")) - if (exist("LOADPATH")) - LOADPATH = [use_plplot_path, ":", LOADPATH]; - else - addpath(genpath(use_plplot_path)); - endif + addpath(genpath(use_plplot_path)); plplot_stub; -elseif (strcmp (use_plplot_state, "off")) - if (exist("LOADPATH")) - LOADPATH = [LOADPATH, ":", use_plplot_path]; - else - addpath(genpath(use_plplot_path),"-end"); + if ! exist ("pl_automatic_replot") + global pl_automatic_replot + pl_automatic_replot = 1; endif +elseif (strcmp (use_plplot_state, "off")) + addpath(genpath(use_plplot_path),"-end"); endif use_plplot_lcd = pwd; Modified: trunk/bindings/octave/PLplot/xlabel.m =================================================================== --- trunk/bindings/octave/PLplot/xlabel.m 2009-01-20 08:05:23 UTC (rev 9353) +++ trunk/bindings/octave/PLplot/xlabel.m 2009-01-20 12:25:57 UTC (rev 9354) @@ -21,6 +21,7 @@ function text = xlabel (text) global __pl + global pl_automatic_replot strm = __pl_init; @@ -38,8 +39,8 @@ __pl.xlabel = __pl_matstr(__pl.xlabel, text, strm); endif - if (exist("automatic_replot")) - if (automatic_replot) + if (exist("pl_automatic_replot")) + if (pl_automatic_replot) __pl_plotit; endif endif Modified: trunk/bindings/octave/PLplot/xticks.m =================================================================== --- trunk/bindings/octave/PLplot/xticks.m 2009-01-20 08:05:23 UTC (rev 9353) +++ trunk/bindings/octave/PLplot/xticks.m 2009-01-20 12:25:57 UTC (rev 9354) @@ -26,6 +26,7 @@ function xticks (int, num) global __pl + global pl_automatic_replot strm = __pl_init; @@ -55,8 +56,8 @@ endif endif - if (exist("automatic_replot")) - if (automatic_replot) + if (exist("pl_automatic_replot")) + if (pl_automatic_replot) __pl_plotit; endif endif Modified: trunk/bindings/octave/PLplot/ylabel.m =================================================================== --- trunk/bindings/octave/PLplot/ylabel.m 2009-01-20 08:05:23 UTC (rev 9353) +++ trunk/bindings/octave/PLplot/ylabel.m 2009-01-20 12:25:57 UTC (rev 9354) @@ -21,6 +21,7 @@ function text = ylabel (text) global __pl + global pl_automatic_replot strm = __pl_init; @@ -38,8 +39,8 @@ __pl.ylabel = __pl_matstr(__pl.ylabel, text, strm); endif - if (exist("automatic_replot")) - if (automatic_replot) + if (exist("pl_automatic_replot")) + if (pl_automatic_replot) __pl_plotit; endif endif Modified: trunk/bindings/octave/PLplot/yticks.m =================================================================== --- trunk/bindings/octave/PLplot/yticks.m 2009-01-20 08:05:23 UTC (rev 9353) +++ trunk/bindings/octave/PLplot/yticks.m 2009-01-20 12:25:57 UTC (rev 9354) @@ -26,6 +26,7 @@ function yticks (int, num) global __pl + global pl_automatic_replot strm = __pl_init; @@ -55,10 +56,10 @@ endif endif - if (exist("automatic_replot")) - if (automatic_replot) + if (exist("pl_automatic_replot")) + if (pl_automatic_replot) __pl_plotit; endif - endif +## endif endfunction Modified: trunk/bindings/octave/PLplot/zlabel.m =================================================================== --- trunk/bindings/octave/PLplot/zlabel.m 2009-01-20 08:05:23 UTC (rev 9353) +++ trunk/bindings/octave/PLplot/zlabel.m 2009-01-20 12:25:57 UTC (rev 9354) @@ -21,6 +21,7 @@ function text = zlabel (text) global __pl + global pl_automatic_replot strm =__pl_init; @@ -38,8 +39,8 @@ __pl.zlabel = __pl_matstr(__pl.zlabel, text, strm); endif - if (exist("automatic_replot")) - if (automatic_replot) + if (exist("pl_automatic_replot")) + if (pl_automatic_replot) __pl_plotit; endif endif Modified: trunk/bindings/octave/USAGE =================================================================== --- trunk/bindings/octave/USAGE 2009-01-20 08:05:23 UTC (rev 9353) +++ trunk/bindings/octave/USAGE 2009-01-20 12:25:57 UTC (rev 9354) @@ -78,19 +78,10 @@ plfill(n, x, y) ... NOTES: - You don't need to specify vector or matrix dimensions. - - When setting Octave variable "automatic_replot = 1", changes take - effect immediately, otherwise they only take effect at the next plot. - (This does not yet apply to all plot types and does not work with - octave 2.9). - - With octave 2.9 you will see various spurious warnings about variables - which are no longer builtins. These warnings can safely be ignored. - Plplot is just testing to see if these variables exist as part of - the octave 2.1 compatibility code. To suppress these warnings add - warning("off","Octave:built-in-variable-assignment"); - to your .octaverc. - + - When setting the plplot variable "pl_automatic_replot = 1", + changes take effect immediately, otherwise they only take + effect at the next plot. - --- Plot window control fig, figure -- Set the current plot window or creates a new one. Modified: trunk/bindings/octave/demos/p1.m =================================================================== --- trunk/bindings/octave/demos/p1.m 2009-01-20 08:05:23 UTC (rev 9353) +++ trunk/bindings/octave/demos/p1.m 2009-01-20 12:25:57 UTC (rev 9354) @@ -15,10 +15,9 @@ function p1 - if (exist("automatic_replot")) - t = automatic_replot; - automatic_replot = 0; - endif + global pl_automatic_replot; + t = pl_automatic_replot; + pl_automatic_replot = 0; xscale = 6.; yscale = 1.; @@ -41,9 +40,7 @@ plot(x, y, xs, ys, 'og; ;'); - if (exist("automatic_replot")) - automatic_replot = t; - endif + pl_automatic_replot = t; endfunction Modified: trunk/bindings/octave/demos/p10.m =================================================================== --- trunk/bindings/octave/demos/p10.m 2009-01-20 08:05:23 UTC (rev 9353) +++ trunk/bindings/octave/demos/p10.m 2009-01-20 12:25:57 UTC (rev 9354) @@ -15,10 +15,9 @@ function p10 - if (exist("automatic_replot")) - t = automatic_replot; - automatic_replot = 0; - endif + global pl_automatic_replot + t = pl_automatic_replot; + pl_automatic_replot = 0; title("Comet"); xlabel ""; @@ -26,9 +25,7 @@ t = -pi:pi/200:0; comet(t,tan(sin(t))-sin(tan(t))); - if (exist("automatic_replot")) - automatic_replot = t; - endif + pl_automatic_replot = t; endfunction Modified: trunk/bindings/octave/demos/p11.m =================================================================== --- trunk/bindings/octave/demos/p11.m 2009-01-20 08:05:23 UTC (rev 9353) +++ trunk/bindings/octave/demos/p11.m 2009-01-20 12:25:57 UTC (rev 9354) @@ -14,10 +14,9 @@ function p11 - if (exist("automatic_replot")) - t = automatic_replot; - automatic_replot = 0; - endif + global pl_automatic_replot + t = pl_automatic_replot; + pl_automatic_replot = 0; title("Stripchart demo 1 (sliding)"); xlabel("Time"); @@ -50,8 +49,6 @@ ## Destroy strip chart and it's memory */ stripc_del(id1); - if (exist("automatic_replot")) - automatic_replot = t; - endif + pl_automatic_replot = t; endfunction Modified: trunk/bindings/octave/demos/p12.m =================================================================== --- trunk/bindings/octave/demos/p12.m 2009-01-20 08:05:23 UTC (rev 9353) +++ trunk/bindings/octave/demos/p12.m 2009-01-20 12:25:57 UTC (rev 9354) @@ -14,10 +14,9 @@ function p12 - if (exist("automatic_replot")) - t = automatic_replot; - automatic_replot = 0; - endif + global pl_automatic_replot + t = pl_automatic_replot; + pl_automatic_replot = 0; title("War Game"); legend("off"); @@ -32,8 +31,6 @@ endif legend("on"); - if (exist("automatic_replot")) - automatic_replot = t; - endif + pl_automatic_replot = t; endfunction Modified: trunk/bindings/octave/demos/p13.m =================================================================== --- trunk/bindings/octave/demos/p13.m 2009-01-20 08:05:23 UTC (rev 9353) +++ trunk/bindings/octave/demos/p13.m 2009-01-20 12:25:57 UTC (rev 9354) @@ -14,10 +14,9 @@ function p13 - if (exist("automatic_replot")) - t = automatic_replot; - automatic_replot = 0; - endif + global pl_automatic_replot + t = pl_automatic_replot; + pl_automatic_replot = 0; legend("opaque"); title("Matrix with individual line attributes"); @@ -36,8 +35,6 @@ ## plot(randn(10,3),fmt) plot(g,fmt) - if (exist("automatic_replot")) - automatic_replot = t; - endif + pl_automatic_replot = t; endfunction Modified: trunk/bindings/octave/demos/p14.m =================================================================== --- trunk/bindings/octave/demos/p14.m 2009-01-20 08:05:23 UTC (rev 9353) +++ trunk/bindings/octave/demos/p14.m 2009-01-20 12:25:57 UTC (rev 9354) @@ -17,10 +17,9 @@ ## And now, in the Theatre near you, "Octave, the movie" - if (exist("automatic_replot")) - t = automatic_replot; - automatic_replot = 0; - endif + global pl_automatic_replot + t = pl_automatic_replot; + pl_automatic_replot = 0; if (!nargin) plsetopt "db"; @@ -64,9 +63,7 @@ closefig; # the "db" option has negative side effects on other plots. plsetopt "reset"; # reset options endif - if (exist("automatic_replot")) - automatic_replot = t; - endif + pl_automatic_replot = t; endfunction Modified: trunk/bindings/octave/demos/p15.m =================================================================== --- trunk/bindings/octave/demos/p15.m 2009-01-20 08:05:23 UTC (rev 9353) +++ trunk/bindings/octave/demos/p15.m 2009-01-20 12:25:57 UTC (rev 9354) @@ -15,10 +15,9 @@ function p15 - if (exist("automatic_replot")) - t = automatic_replot; - automatic_replot = 0; - endif + global pl_automatic_replot + t = pl_automatic_replot; + pl_automatic_replot = 0; title "Lighted and shaded surface"; xlabel ""; @@ -35,9 +34,7 @@ surf(x, y, z); colormap('default'); - if (exist("automatic_replot")) - automatic_replot = t; - endif + pl_automatic_replot = t; endfunction Modified: trunk/bindings/octave/demos/p16.m =================================================================== --- trunk/bindings/octave/demos/p16.m 2009-01-20 08:05:23 UTC (rev 9353) +++ trunk/bindings/octave/demos/p16.m 2009-01-20 12:25:57 UTC (rev 9354) @@ -14,10 +14,9 @@ function p16 - if (exist("automatic_replot")) - t = automatic_replot; - automatic_replot = 0; - endif + global pl_automatic_replot + t = pl_automatic_replot; + pl_automatic_replot = 0; multiplot(1, 2); p1; @@ -31,8 +30,6 @@ shade(x, y, z); oneplot; - if (exist("automatic_replot")) - automatic_replot = t; - endif + pl_automatic_replot = t; endfunction Modified: trunk/bindings/octave/demos/p17.m =================================================================== --- trunk/bindings/octave/demos/p17.m 2009-01-20 08:05:23 UTC (rev 9353) +++ trunk/bindings/octave/demos/p17.m 2009-01-20 12:25:57 UTC (rev 9354) @@ -14,10 +14,9 @@ function p17(fg) - if (exist("automatic_replot")) - t = automatic_replot; - automatic_replot = 0; - endif + global pl_automatic_replot + t = pl_automatic_replot; + pl_automatic_replot = 0; title "Click and Drag button 1 to select"; xlabel "Button 2 to restart and button 3 to finish"; @@ -32,8 +31,6 @@ plimage (img, x1, x2, y1, y2); endif - if (exist("automatic_replot")) - automatic_replot = t; - endif + pl_automatic_replot = t; endfunction Modified: trunk/bindings/octave/demos/p18.m =================================================================== --- trunk/bindings/octave/demos/p18.m 2009-01-20 08:05:23 UTC (rev 9353) +++ trunk/bindings/octave/demos/p18.m 2009-01-20 12:25:57 UTC (rev 9354) @@ -14,10 +14,9 @@ function p18 - if (exist("automatic_replot")) - t = automatic_replot; - automatic_replot = 0; - endif + global pl_automatic_replot + t = pl_automatic_replot; + pl_automatic_replot = 0; plsetopt "db"; fig( free_fig); # unused plot window @@ -33,8 +32,6 @@ set_view("meshc", x, y, z); closefig - if (exist("automatic_replot")) - automatic_replot = 0; - endif + pl_automatic_replot = t; endfunction Modified: trunk/bindings/octave/demos/p19.m =================================================================== --- trunk/bindings/octave/demos/p19.m 2009-01-20 08:05:23 UTC (rev 9353) +++ trunk/bindings/octave/demos/p19.m 2009-01-20 12:25:57 UTC (rev 9354) @@ -14,10 +14,9 @@ function p19 - if (exist("automatic_replot")) - t = automatic_replot; - automatic_replot = 0; - endif + global pl_automatic_replot + t = pl_automatic_replot; + pl_automatic_replot = 0; f0=figure; multiplot(1,2); @@ -100,8 +99,6 @@ closefig(f1); oneplot; - if (exist("automatic_replot")) - automatic_replot = t; - endif + pl_automatic_replot = t; endfunction Modified: trunk/bindings/octave/demos/p2.m =================================================================== --- trunk/bindings/octave/demos/p2.m 2009-01-20 08:05:23 UTC (rev 9353) +++ trunk/bindings/octave/demos/p2.m 2009-01-20 12:25:57 UTC (rev 9354) @@ -14,10 +14,9 @@ function p2 - if (exist("automatic_replot")) - t = automatic_replot; - automatic_replot = 0; - endif + global pl_automatic_replot; + t = pl_automatic_replot; + pl_automatic_replot = 0; legend("opaque",0) title("PLplot Example 2"); @@ -30,9 +29,7 @@ x, y2, 'b;sin(x)*cos(2*x);', x, y3, 'g;x*sin(x);'); - if (exist("automatic_replot")) - automatic_replot = t; - endif + pl_automatic_replot = t; endfunction Modified: trunk/bindings/octave/demos/p21.m =================================================================== --- trunk/bindings/octave/demos/p21.m 2009-01-20 08:05:23 UTC (rev 9353) +++ trunk/bindings/octave/demos/p21.m 2009-01-20 12:25:57 UTC (rev 9354) @@ -20,10 +20,9 @@ ##ocmap = colormap; colormap(bgr); - if (exist("automatic_replot")) - t = automatic_replot; - automatic_replot = 0; - endif + global pl_automatic_replot + t = pl_automatic_replot; + pl_automatic_replot = 0; gx = 30; gy = 40; @@ -52,16 +51,15 @@ pladv(j++); zg = griddata(x, y, z, xg, yg, i, opt(i)); ## zg(isnan(zg)) = 0; - ofi = do_fortran_indexing; do_fortran_indexing = 1; + old_dofi = warning("query","Octave:fortran-indexing"); + warning("off","Octave:fortran-indexing"); zg(isnan(zg)) = 0; - do_fortran_indexing = ofi; + warning(old_dofi.state,"Octave:fortran-indexing"); title(alg(i,:)); meshc(xg, yg, zg'); endfor - if (exist("automatic_replot")) - automatic_replot = t; - endif + pl_automatic_replot = t; ##colormap(ocmap); endfunction Modified: trunk/bindings/octave/demos/p3.m =================================================================== --- trunk/bindings/octave/demos/p3.m 2009-01-20 08:05:23 UTC (rev 9353) +++ trunk/bindings/octave/demos/p3.m 2009-01-20 12:25:57 UTC (rev 9354) @@ -14,10 +14,9 @@ function p3 - if (exist("automatic_replot")) - t = automatic_replot; - automatic_replot = 0; - endif + global pl_automatic_replot; + t = pl_automatic_replot; + pl_automatic_replot = 0; xscale = 6.; yscale = 1.; @@ -39,8 +38,6 @@ title("#frPLplot Example 3 - y=x#u2 #d(with error bars)"); plot(x, y, [xs' xe'], [ys' yel' yer'], '~g; ;'); - if (exist("automatic_replot")) - automatic_replot = t; - endif + pl_automatic_replot = t; endfunction Modified: trunk/bindings/octave/demos/p4.m =================================================================== --- trunk/bindings/octave/demos/p4.m 2009-01-20 08:05:23 UTC (rev 9353) +++ trunk/bindings/octave/demos/p4.m 2009-01-20 12:25:57 UTC (rev 9354) @@ -14,10 +14,9 @@ function p4 - if (exist("automatic_replot")) - t = automatic_replot; - automatic_replot = 0; - endif + global pl_automatic_replot; + t = pl_automatic_replot; + pl_automatic_replot = 0; x=0.01:0.1:10; y=exp(x); @@ -27,8 +26,6 @@ loglog(x,y,'y') grid (og); - if (exist("automatic_replot")) - automatic_replot = t; - endif + pl_automatic_replot = t; endfunction Modified: trunk/bindings/octave/demos/p5.m =================================================================== --- trunk/bindings/octave/demos/p5.m 2009-01-20 08:05:23 UTC (rev 9353) +++ trunk/bindings/octave/demos/p5.m 2009-01-20 12:25:57 UTC (rev 9354) @@ -14,10 +14,9 @@ function p5 - if (exist("automatic_replot")) - t = automatic_replot; - automatic_replot = 0; - endif + global pl_automatic_replot + t = pl_automatic_replot; + pl_automatic_replot = 0; x=-pi:0.01:pi; y=sin(x).+cos(3*x); @@ -27,8 +26,6 @@ polar(x,y,'y') grid (og); - if (exist("automatic_replot")) - automatic_replot = t; - endif + pl_automatic_replot = t; endfunction Modified: trunk/bindings/octave/demos/p6.m =================================================================== --- trunk/bindings/octave/demos/p6.m 2009-01-20 08:05:23 UTC (rev 9353) +++ trunk/bindings/octave/demos/p6.m 2009-01-20 12:25:57 UTC (rev 9354) @@ -16,10 +16,9 @@ [x y z] = rosenbrock; z = log(z); - if (exist("automatic_replot")) - t = automatic_replot; - automatic_replot = 0; - endif + global pl_automatic_replot + t = pl_automatic_replot; + pl_automatic_replot = 0; as = autostyle; autostyle "off"; @@ -28,8 +27,6 @@ contour(x,y,z) autostyle(as); - if (exist("automatic_replot")) - automatic_replot = t; - endif + pl_automatic_replot = t; endfunction Modified: trunk/bindings/octave/demos/p7.m =================================================================== --- trunk/bindings/octave/demos/p7.m 2009-01-20 08:05:23 UTC (rev 9353) +++ trunk/bindings/octave/demos/p7.m 2009-01-20 12:25:57 UTC (rev 9354) @@ -14,10 +14,9 @@ function p7 - if (exist("automatic_replot")) - t = automatic_replot; - automatic_replot = 0; - endif + global pl_automatic_replot + t = pl_automatic_replot; + pl_automatic_replot = 0; [x y z]=rosenbrock;z=log(z); @@ -36,7 +35,5 @@ shade(x,y,z,15,3); axis; - if (exist("automatic_replot")) - automatic_replot = t; - endif + pl_automatic_replot = t; endfunction Modified: trunk/bindings/octave/demos/p8.m =================================================================== --- trunk/bindings/octave/demos/p8.m 2009-01-20 08:05:23 UTC (rev 9353) +++ trunk/bindings/octave/demos/p8.m 2009-01-20 12:25:57 UTC (rev 9354) @@ -14,10 +14,9 @@ function p8 - if (exist("automatic_replot")) - t = automatic_replot; - automatic_replot = 0; - endif + global pl_automatic_replot + t = pl_automatic_replot; + pl_automatic_replot = 0; xlabel("X"); ylabel("Y"); title("Mesh example"); @@ -27,9 +26,7 @@ pause(1); meshc(x,y,z) - if (exist("automatic_replot")) - automatic_replot = t; - endif + pl_automatic_replot = t; endfunction Modified: trunk/bindings/octave/demos/p9.m =================================================================== --- trunk/bindings/octave/demos/p9.m 2009-01-20 08:05:23 UTC (rev 9353) +++ trunk/bindings/octave/demos/p9.m 2009-01-20 12:25:57 UTC (rev 9354) @@ -14,10 +14,9 @@ function p9 - if (exist("automatic_replot")) - t = automatic_replot; - automatic_replot = 0; - endif + global pl_automatic_replot + t = pl_automatic_replot; + pl_automatic_replot = 0; as = autostyle; autostyle ("off"); @@ -40,8 +39,6 @@ legend(ls); autostyle(as); - if (exist("automatic_replot")) - automatic_replot = t; - endif + pl_automatic_replot = t; endfunction Modified: trunk/bindings/octave/octaverc.in =================================================================== --- trunk/bindings/octave/octaverc.in 2009-01-20 08:05:23 UTC (rev 9353) +++ trunk/bindings/octave/octaverc.in 2009-01-20 12:25:57 UTC (rev 9354) @@ -1,9 +1,4 @@ -if (exist("LOADPATH")) - automatic_replot=1; - LOADPATH="@CMAKE_SOURCE_DIR@/bindings/octave//:@CMAKE_BINARY_DIR@/bindings/octave//:"; -else - addpath("@CMAKE_SOURCE_DIR@/bindings/octave/PLplot/","@CMAKE_SOURCE_DIR@/bindings/octave/PLplot/support/","@CMAKE_SOURCE_DIR@/bindings/octave/demos/","@CMAKE_SOURCE_DIR@/bindings/octave/misc/","@CMAKE_BINARY_DIR@/bindings/octave/","@CMAKE_BINARY_DIR@/bindings/octave/PLplot"); - # Suppress spurious warnings for the test. - warning("off","Octave:built-in-variable-assignment"); -endif +addpath("@CMAKE_SOURCE_DIR@/bindings/octave/PLplot/","@CMAKE_SOURCE_DIR@/bindings/octave/PLplot/support/","@CMAKE_SOURCE_DIR@/bindings/octave/demos/","@CMAKE_SOURCE_DIR@/bindings/octave/misc/","@CMAKE_BINARY_DIR@/bindings/octave/","@CMAKE_BINARY_DIR@/bindings/octave/PLplot"); putenv("PLPLOT_LIB","@CMAKE_SOURCE_DIR@/data/"); +global pl_automatic_replot +pl_automatic_replot=1; Modified: trunk/cmake/modules/octave.cmake =================================================================== --- trunk/cmake/modules/octave.cmake 2009-01-20 08:05:23 UTC (rev 9353) +++ trunk/cmake/modules/octave.cmake 2009-01-20 12:25:57 UTC (rev 9354) @@ -73,7 +73,25 @@ ${_OCTAVE_VERSION} ) message(STATUS "OCTAVE_VERSION = ${OCTAVE_VERSION}") + # Logic that depends on octave version + transform_version(NUMERICAL_OCTAVE_TESTING_MINIMUM_VERSION "2.9.0") + transform_version(NUMERICAL_OCTAVE_VERSION "${OCTAVE_VERSION}") + if( + NUMERICAL_OCTAVE_VERSION + LESS + "${NUMERICAL_OCTAVE_TESTING_MINIMUM_VERSION}" + ) + message(STATUS "WARNING: " + "plplot require octave version 2.9 or greater. Disabling octave bindings") + set(ENABLE_octave OFF CACHE BOOL "Enable Octave bindings" FORCE) + endif( + NUMERICAL_OCTAVE_VERSION + LESS + "${NUMERICAL_OCTAVE_TESTING_MINIMUM_VERSION}" + ) +endif(ENABLE_octave) +if(ENABLE_octave) # The following if block is required to keep from repeated pre-pending # of OCTAVE_INCLUDE_PATH_TRIMMED onto OCTAVE_INCLUDE_PATH which would # create 2^n components to OCTAVE_INCLUDE_PATH for n cmake calls. @@ -154,82 +172,28 @@ ) #message(STATUS "OCTAVE_PREFIX = ${OCTAVE_PREFIX}") - # Logic that depends on octave version - transform_version(NUMERICAL_OCTAVE_TESTING_MINIMUM_VERSION "2.1.0") - transform_version(NUMERICAL_OCTAVE_VERSION "${OCTAVE_VERSION}") - if( - NUMERICAL_OCTAVE_VERSION - LESS - "${NUMERICAL_OCTAVE_TESTING_MINIMUM_VERSION}" - ) - # octave-2.0 logic. - #_OCTAVE_M_DIR - file(WRITE ${CMAKE_BINARY_DIR}/octave_command - "printf(octave_config_info(\"localfcnfilepath\"));" - ) - execute_process( - COMMAND ${OCTAVE} -q -f octave_command - WORKING_DIRECTORY ${CMAKE_BINARY_DIR} - OUTPUT_VARIABLE __OCTAVE_M_DIR - ) - #message(STATUS "__OCTAVE_M_DIR = ${__OCTAVE_M_DIR}") - string(REGEX REPLACE - "^.*:([^:][^:]*)//$" - "\\1" - _OCTAVE_M_DIR - ${__OCTAVE_M_DIR} - ) - #message(STATUS "_OCTAVE_M_DIR = ${_OCTAVE_M_DIR}") - #OCTAVE_OCT_DIR - if(NOT DEFINED OCTAVE_OCT_DIR) - file(WRITE ${CMAKE_BINARY_DIR}/octave_command - "printf(octave_config_info(\"localoctfilepath\"));" - ) - execute_process( - COMMAND ${OCTAVE} -q -f octave_command - WORKING_DIRECTORY ${CMAKE_BINARY_DIR} - OUTPUT_VARIABLE _OCTAVE_OCT_DIR - ) - #message(STATUS "_OCTAVE_OCT_DIR = ${_OCTAVE_OCT_DIR}") - string(REGEX REPLACE - "^.*:([^:][^:]*)//$" - "\\1" - OCTAVE_OCT_DIR - ${_OCTAVE_OCT_DIR} - ) - endif(NOT DEFINED OCTAVE_OCT_DIR) - #message(STATUS "OCTAVE_OCT_DIR = ${OCTAVE_OCT_DIR}") - else( - NUMERICAL_OCTAVE_VERSION - LESS - "${NUMERICAL_OCTAVE_TESTING_MINIMUM_VERSION}" - ) - # octave-2.1 (or higher) logic. - #_OCTAVE_M_DIR - file(WRITE ${CMAKE_BINARY_DIR}/octave_command - "printf(octave_config_info(\"localfcnfiledir\"));" - ) - execute_process( - COMMAND ${OCTAVE} -q -f octave_command - WORKING_DIRECTORY ${CMAKE_BINARY_DIR} - OUTPUT_VARIABLE _OCTAVE_M_DIR - ) - #OCTAVE_OCT_DIR - if(NOT DEFINED OCTAVE_OCT_DIR) - file(WRITE ${CMAKE_BINARY_DIR}/octave_command - "printf(octave_config_info(\"localoctfiledir\"));" - ) - execute_process( - COMMAND ${OCTAVE} -q -f octave_command - WORKING_DIRECTORY ${CMAKE_BINARY_DIR} - OUTPUT_VARIABLE OCTAVE_OCT_DIR - ) - endif(NOT DEFINED OCTAVE_OCT_DIR) - endif( - NUMERICAL_OCTAVE_VERSION - LESS - "${NUMERICAL_OCTAVE_TESTING_MINIMUM_VERSION}" - ) + # octave-2.1 (or higher) logic. + #_OCTAVE_M_DIR + file(WRITE ${CMAKE_BINARY_DIR}/octave_command + "printf(octave_config_info(\"localfcnfiledir\"));" + ) + execute_process( + COMMAND ${OCTAVE} -q -f octave_command + WORKING_DIRECTORY ${CMAKE_BINARY_DIR} + OUTPUT_VARIABLE _OCTAVE_M_DIR + ) + #OCTAVE_OCT_DIR + if(NOT DEFINED OCTAVE_OCT_DIR) + file(WRITE ${CMAKE_BINARY_DIR}/octave_command + "printf(octave_config_info(\"localoctfiledir\"));" + ) + execute_process( + COMMAND ${OCTAVE} -q -f octave_command + WORKING_DIRECTORY ${CMAKE_BINARY_DIR} + OUTPUT_VARIABLE OCTAVE_OCT_DIR + ) + endif(NOT DEFINED OCTAVE_OCT_DIR) + # Replace the OCTAVE_PREFIX with the PLplot prefix in OCTAVE_M_DIR string(REPLACE "${OCTAVE_PREFIX}" Modified: trunk/plplot_test/test_octave.sh.in =================================================================== --- trunk/plplot_test/test_octave.sh.in 2009-01-20 08:05:23 UTC (rev 9353) +++ trunk/plplot_test/test_octave.sh.in 2009-01-20 12:25:57 UTC (rev 9354) @@ -35,12 +35,6 @@ # Launch an Octave script that exercises all the demos $octave -f -q -p $octavedir <<EOF 2> test.error -# Suppress spurious warnings with octave 2.9 -ver = str2num(split(version,".")); -if ((ver(1) == 2 && ver(2) == 9) || (ver(1) >= 3)) - warning("off","Octave:built-in-variable-assignment"); -endif - # Check verbose_test variable if (strcmp(getenv("verbose_test"),"on") == 1) verbose_test = 1; @@ -59,10 +53,8 @@ endfor # p7 works OK with plmeta, e.g., but not ps or psc. pleop/plbop issue? -# These require octave-2.1.50 so comment out since not everybody has -# this. - for i=[1:7 8 9 13 15 16] ; + for i=[1:7 8 9 13 15 16 21] ; if (verbose_test) printf("p%d\n",i); endif This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2009-01-22 22:18:00
|
Revision: 9375 http://plplot.svn.sourceforge.net/plplot/?rev=9375&view=rev Author: airwin Date: 2009-01-22 22:17:51 +0000 (Thu, 22 Jan 2009) Log Message: ----------- Remove Fortran workaround cruft for CMake version 2.4.x that is no longer necessary because our CMake minimum version is now 2.6.0 Modified Paths: -------------- trunk/bindings/f95/CMakeLists.txt trunk/cmake/modules/CMakeFortranInformation.cmake trunk/examples/f77/x20f.fm4 trunk/examples/f95/CMakeLists.txt trunk/examples/f95/x20f.f90 Modified: trunk/bindings/f95/CMakeLists.txt =================================================================== --- trunk/bindings/f95/CMakeLists.txt 2009-01-22 22:16:26 UTC (rev 9374) +++ trunk/bindings/f95/CMakeLists.txt 2009-01-22 22:17:51 UTC (rev 9375) @@ -158,30 +158,15 @@ RUNTIME DESTINATION ${BIN_DIR} ) - if(CMAKE_MAJOR_VERSION EQUAL 2 AND CMAKE_MINOR_VERSION EQUAL 4) - # Yuk! All Makefiles are run from the top level build directory and - # so the f90 .mod files end up there rather than in the bindings/f95 - # directory. Ifort and pgf90 both have a -module command line option to - # override this location, but I'm not sure how portable that? - install( - FILES - ${CMAKE_BINARY_DIR}/plplot.mod - ${CMAKE_BINARY_DIR}/plplotp.mod - ${CMAKE_BINARY_DIR}/plplot_flt.mod - DESTINATION ${F95_MOD_DIR} - ) - else(CMAKE_MAJOR_VERSION EQUAL 2 AND CMAKE_MINOR_VERSION EQUAL 4) - # For the current cvs version of CMake, the module files are created by - # default during the library build in the more logical bindings/f95 - # directory. - install( - FILES - ${CMAKE_BINARY_DIR}/bindings/f95/plplot.mod - ${CMAKE_BINARY_DIR}/bindings/f95/plplotp.mod - ${CMAKE_BINARY_DIR}/bindings/f95/plplot_flt.mod - DESTINATION ${F95_MOD_DIR} - ) - endif(CMAKE_MAJOR_VERSION EQUAL 2 AND CMAKE_MINOR_VERSION EQUAL 4) + # For CMake-2.6.0 and above, the module files are created by + # default during the library build in the bindings/f95 directory. + install( + FILES + ${CMAKE_BINARY_DIR}/bindings/f95/plplot.mod + ${CMAKE_BINARY_DIR}/bindings/f95/plplotp.mod + ${CMAKE_BINARY_DIR}/bindings/f95/plplot_flt.mod + DESTINATION ${F95_MOD_DIR} + ) # Configure pkg-config *.pc file corresponding to libplplotf95${LIB_TAG} if(PKG_CONFIG_EXECUTABLE) Modified: trunk/cmake/modules/CMakeFortranInformation.cmake =================================================================== --- trunk/cmake/modules/CMakeFortranInformation.cmake 2009-01-22 22:16:26 UTC (rev 9374) +++ trunk/cmake/modules/CMakeFortranInformation.cmake 2009-01-22 22:17:51 UTC (rev 9375) @@ -150,13 +150,8 @@ # compile a Fortran file into an object file IF(NOT CMAKE_Fortran_COMPILE_OBJECT) - IF(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.4) - SET(CMAKE_Fortran_COMPILE_OBJECT - "<CMAKE_Fortran_COMPILER> -o <OBJECT> <DEFINES> <FLAGS> -c <SOURCE>") - ELSE(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.4) - SET(CMAKE_Fortran_COMPILE_OBJECT - "<CMAKE_Fortran_COMPILER> -o <OBJECT> <FLAGS> -c <SOURCE>") - ENDIF(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.4) + SET(CMAKE_Fortran_COMPILE_OBJECT + "<CMAKE_Fortran_COMPILER> -o <OBJECT> <DEFINES> <FLAGS> -c <SOURCE>") ENDIF(NOT CMAKE_Fortran_COMPILE_OBJECT) # link a fortran program Modified: trunk/examples/f77/x20f.fm4 =================================================================== --- trunk/examples/f77/x20f.fm4 2009-01-22 22:16:26 UTC (rev 9374) +++ trunk/examples/f77/x20f.fm4 2009-01-22 22:17:51 UTC (rev 9375) @@ -386,11 +386,9 @@ C C Note: C The algorithm only works if the unit of record length is a byte! -C (Some compilers _use_ a word (4 bytes) instead, but often provide -C a compile switch to _use_ bytes) +C (Some compilers use a word (4 bytes) instead, but often provide +C a compile switch to use bytes) C -C NOTE: _use_ is used instead of the ordinary word because of a -C bug in CMake C open( 10, file = fname, access = 'direct', recl = 1 ) @@ -439,7 +437,7 @@ C Create a new one call plmkstrm(new_strm) -C New device type. _Use_ a known existing driver +C New device type. Use a known existing driver call plsdev('psc') call plsfnam(fname) Modified: trunk/examples/f95/CMakeLists.txt =================================================================== --- trunk/examples/f95/CMakeLists.txt 2009-01-22 22:16:26 UTC (rev 9374) +++ trunk/examples/f95/CMakeLists.txt 2009-01-22 22:17:51 UTC (rev 9375) @@ -72,27 +72,9 @@ if(BUILD_TEST) remove_definitions("-DHAVE_CONFIG_H") - if(CMAKE_MAJOR_VERSION EQUAL 2 AND CMAKE_MINOR_VERSION EQUAL 4) - # Temporary workaround for module handling bug in CMake 2.4.3. Create a - # file with arbitrary contents called plplot.mod.proxy in top-level - # build tree. As a temporary measure we use cmake_workaround.f as the - # generator of this file. (cmake_workaround.f was previously compiled, - # but that is no longer the case.) Note, once CMake is fixed this comment - # the following configure_file command and cmake_workaround.f should all - # just disappear. - configure_file( - ${CMAKE_CURRENT_SOURCE_DIR}/cmake_workaround.f - ${CMAKE_BINARY_DIR}/plplot.mod.proxy - COPYONLY - ) - # The generated module location for 2.4.x CMake is the top-level build - # tree. - include_directories(${CMAKE_BINARY_DIR}) - else(CMAKE_MAJOR_VERSION EQUAL 2 AND CMAKE_MINOR_VERSION EQUAL 4) - # The generated module location for cvs CMake is the build-tree - # location where the corresponding library is generated. - include_directories(${CMAKE_BINARY_DIR}/bindings/f95) - endif(CMAKE_MAJOR_VERSION EQUAL 2 AND CMAKE_MINOR_VERSION EQUAL 4) + # For CMake-2.6.0 and above, the module files are created by + # default during the library build in the bindings/f95 directory. + include_directories(${CMAKE_BINARY_DIR}/bindings/f95) endif(BUILD_TEST) foreach(STRING_INDEX ${f95_STRING_INDICES}) set(f95_SRCS ${f95_SRCS} x${STRING_INDEX}f.f90) Modified: trunk/examples/f95/x20f.f90 =================================================================== --- trunk/examples/f95/x20f.f90 2009-01-22 22:16:26 UTC (rev 9374) +++ trunk/examples/f95/x20f.f90 2009-01-22 22:17:51 UTC (rev 9375) @@ -373,12 +373,9 @@ ! ! Note: ! The algorithm only works if the unit of record length is a byte! -! (Some compilers _use_ a word (4 bytes) instead, but often provide -! a compile switch to _use_ bytes) +! (Some compilers use a word (4 bytes) instead, but often provide +! a compile switch to use bytes) ! -! NOTE: _use_ is used instead of the ordinary word because of a -! bug in CMake -! open( 10, file = fname, access = 'direct', recl = 1 ) record = 0 @@ -428,7 +425,7 @@ ! Create a new one call plmkstrm(new_strm) -! New device type. _Use_ a known existing driver +! New device type. Use a known existing driver call plsdev('psc') call plsfnam(fname) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jb...@us...> - 2009-01-23 09:13:41
|
Revision: 9378 http://plplot.svn.sourceforge.net/plplot/?rev=9378&view=rev Author: jbauck Date: 2009-01-23 09:13:27 +0000 (Fri, 23 Jan 2009) Log Message: ----------- Remove three cruft lines (comments) from most of the Ada source files which used to be used to control compilation for Ada 95 or Ada 2005 (aka Ada 2007). This task has long been handled by the cmake system with specially-prepared files whose names end in .adb.cmake or .ads.cmake. Modified Paths: -------------- trunk/bindings/ada/plplot.adb.cmake trunk/bindings/ada/plplot.ads.cmake trunk/bindings/ada/plplot_auxiliary.ads.cmake trunk/bindings/ada/plplot_thin.ads.cmake trunk/bindings/ada/plplot_traditional.adb.cmake trunk/bindings/ada/plplot_traditional.ads.cmake trunk/examples/ada/x01a.adb.cmake trunk/examples/ada/x02a.adb.cmake trunk/examples/ada/x03a.adb.cmake trunk/examples/ada/x04a.adb.cmake trunk/examples/ada/x05a.adb.cmake trunk/examples/ada/x06a.adb.cmake trunk/examples/ada/x07a.adb.cmake trunk/examples/ada/x08a.adb.cmake trunk/examples/ada/x09a.adb.cmake trunk/examples/ada/x10a.adb.cmake trunk/examples/ada/x11a.adb.cmake trunk/examples/ada/x12a.adb.cmake trunk/examples/ada/x13a.adb.cmake trunk/examples/ada/x14a.adb.cmake trunk/examples/ada/x15a.adb.cmake trunk/examples/ada/x16a.adb.cmake trunk/examples/ada/x17a.adb.cmake trunk/examples/ada/x18a.adb.cmake trunk/examples/ada/x19a.adb.cmake trunk/examples/ada/x20a.adb.cmake trunk/examples/ada/x21a.adb.cmake trunk/examples/ada/x22a.adb.cmake trunk/examples/ada/x23a.adb.cmake trunk/examples/ada/x24a.adb.cmake trunk/examples/ada/x25a.adb.cmake trunk/examples/ada/x26a.adb.cmake trunk/examples/ada/x27a.adb.cmake trunk/examples/ada/x28a.adb.cmake trunk/examples/ada/x29a.adb.cmake trunk/examples/ada/x30a.adb.cmake trunk/examples/ada/x31a.adb.cmake trunk/examples/ada/xthick01a.adb.cmake trunk/examples/ada/xthick02a.adb.cmake trunk/examples/ada/xthick03a.adb.cmake trunk/examples/ada/xthick04a.adb.cmake trunk/examples/ada/xthick05a.adb.cmake trunk/examples/ada/xthick06a.adb.cmake trunk/examples/ada/xthick07a.adb.cmake trunk/examples/ada/xthick08a.adb.cmake trunk/examples/ada/xthick09a.adb.cmake trunk/examples/ada/xthick10a.adb.cmake trunk/examples/ada/xthick11a.adb.cmake trunk/examples/ada/xthick12a.adb.cmake trunk/examples/ada/xthick13a.adb.cmake trunk/examples/ada/xthick14a.adb.cmake trunk/examples/ada/xthick15a.adb.cmake trunk/examples/ada/xthick16a.adb.cmake trunk/examples/ada/xthick17a.adb.cmake trunk/examples/ada/xthick18a.adb.cmake trunk/examples/ada/xthick19a.adb.cmake trunk/examples/ada/xthick20a.adb.cmake trunk/examples/ada/xthick21a.adb.cmake trunk/examples/ada/xthick22a.adb.cmake trunk/examples/ada/xthick23a.adb.cmake trunk/examples/ada/xthick24a.adb.cmake trunk/examples/ada/xthick25a.adb.cmake trunk/examples/ada/xthick26a.adb.cmake trunk/examples/ada/xthick27a.adb.cmake trunk/examples/ada/xthick28a.adb.cmake trunk/examples/ada/xthick29a.adb.cmake trunk/examples/ada/xthick30a.adb.cmake trunk/examples/ada/xthick31a.adb.cmake Modified: trunk/bindings/ada/plplot.adb.cmake =================================================================== --- trunk/bindings/ada/plplot.adb.cmake 2009-01-22 22:34:06 UTC (rev 9377) +++ trunk/bindings/ada/plplot.adb.cmake 2009-01-23 09:13:27 UTC (rev 9378) @@ -41,9 +41,6 @@ Ada.Strings.Unbounded, Interfaces.C; --- COMMENT THIS LINE IF YOUR COMPILER DOES NOT INCLUDE THESE --- DEFINITIONS, FOR EXAMPLE, IF IT IS NOT ADA 2005 WITH ANNEX G.3 COMPLIANCE. ---with Ada.Numerics.Long_Real_Arrays; use Ada.Numerics.Long_Real_Arrays; @Ada_Is_2007_With_and_Use_Numerics@ package body PLplot is Modified: trunk/bindings/ada/plplot.ads.cmake =================================================================== --- trunk/bindings/ada/plplot.ads.cmake 2009-01-22 22:34:06 UTC (rev 9377) +++ trunk/bindings/ada/plplot.ads.cmake 2009-01-23 09:13:27 UTC (rev 9378) @@ -32,9 +32,6 @@ PLplot_Auxiliary, Ada.Strings.Unbounded; --- COMMENT THIS LINE IF YOUR COMPILER DOES NOT INCLUDE THESE --- DEFINITIONS, FOR EXAMPLE, IF IT IS NOT ADA 2005 WITH ANNEX G.3 COMPLIANCE. ---with Ada.Numerics.Long_Real_Arrays; use Ada.Numerics.Long_Real_Arrays; @Ada_Is_2007_With_and_Use_Numerics@ package PLplot is Modified: trunk/bindings/ada/plplot_auxiliary.ads.cmake =================================================================== --- trunk/bindings/ada/plplot_auxiliary.ads.cmake 2009-01-22 22:34:06 UTC (rev 9377) +++ trunk/bindings/ada/plplot_auxiliary.ads.cmake 2009-01-23 09:13:27 UTC (rev 9378) @@ -29,9 +29,6 @@ Ada.Strings.Bounded, Ada.Strings.Unbounded; --- COMMENT THIS LINE IF YOUR COMPILER DOES NOT INCLUDE THESE --- DEFINITIONS, FOR EXAMPLE, IF IT IS NOT ADA 2005 WITH ANNEX G.3 COMPLIANCE. ---with Ada.Numerics.Long_Real_Arrays; use Ada.Numerics.Long_Real_Arrays; @Ada_Is_2007_With_and_Use_Numerics@ package PLplot_Auxiliary is Modified: trunk/bindings/ada/plplot_thin.ads.cmake =================================================================== --- trunk/bindings/ada/plplot_thin.ads.cmake 2009-01-22 22:34:06 UTC (rev 9377) +++ trunk/bindings/ada/plplot_thin.ads.cmake 2009-01-23 09:13:27 UTC (rev 9378) @@ -47,9 +47,6 @@ Ada.Strings.Bounded, Ada.Strings.Unbounded; --- COMMENT THIS LINE IF YOUR COMPILER DOES NOT INCLUDE THESE --- DEFINITIONS, FOR EXAMPLE, IF IT IS NOT ADA 2005 WITH ANNEX G.3 COMPLIANCE. ---with Ada.Numerics.Long_Real_Arrays; use Ada.Numerics.Long_Real_Arrays; @Ada_Is_2007_With_and_Use_Numerics@ package PLplot_Thin is Modified: trunk/bindings/ada/plplot_traditional.adb.cmake =================================================================== --- trunk/bindings/ada/plplot_traditional.adb.cmake 2009-01-22 22:34:06 UTC (rev 9377) +++ trunk/bindings/ada/plplot_traditional.adb.cmake 2009-01-23 09:13:27 UTC (rev 9378) @@ -40,9 +40,6 @@ Ada.Strings.Unbounded, Interfaces.C; --- COMMENT THIS LINE IF YOUR COMPILER DOES NOT INCLUDE THESE --- DEFINITIONS, FOR EXAMPLE, IF IT IS NOT ADA 2005 WITH ANNEX G.3 COMPLIANCE. ---with Ada.Numerics.Long_Real_Arrays; use Ada.Numerics.Long_Real_Arrays; @Ada_Is_2007_With_and_Use_Numerics@ package body PLplot_Traditional is Modified: trunk/bindings/ada/plplot_traditional.ads.cmake =================================================================== --- trunk/bindings/ada/plplot_traditional.ads.cmake 2009-01-22 22:34:06 UTC (rev 9377) +++ trunk/bindings/ada/plplot_traditional.ads.cmake 2009-01-23 09:13:27 UTC (rev 9378) @@ -32,9 +32,6 @@ PLplot_Auxiliary, Ada.Strings.Unbounded; --- COMMENT THIS LINE IF YOUR COMPILER DOES NOT INCLUDE THESE --- DEFINITIONS, FOR EXAMPLE, IF IT IS NOT ADA 2005 WITH ANNEX G.3 COMPLIANCE. ---with Ada.Numerics.Long_Real_Arrays; use Ada.Numerics.Long_Real_Arrays; @Ada_Is_2007_With_and_Use_Numerics@ package PLplot_Traditional is Modified: trunk/examples/ada/x01a.adb.cmake =================================================================== --- trunk/examples/ada/x01a.adb.cmake 2009-01-22 22:34:06 UTC (rev 9377) +++ trunk/examples/ada/x01a.adb.cmake 2009-01-23 09:13:27 UTC (rev 9378) @@ -33,9 +33,6 @@ PLplot_Auxiliary, PLplot_Traditional; --- COMMENT THIS LINE IF YOUR COMPILER DOES NOT INCLUDE THESE --- DEFINITIONS, FOR EXAMPLE, IF IT IS NOT ADA 2005 WITH ANNEX G.3 COMPLIANCE. ---with Ada.Numerics.Long_Real_Arrays; use Ada.Numerics.Long_Real_Arrays; @Ada_Is_2007_With_and_Use_Numerics@ procedure x01a is Modified: trunk/examples/ada/x02a.adb.cmake =================================================================== --- trunk/examples/ada/x02a.adb.cmake 2009-01-22 22:34:06 UTC (rev 9377) +++ trunk/examples/ada/x02a.adb.cmake 2009-01-23 09:13:27 UTC (rev 9378) @@ -36,9 +36,6 @@ PLplot_Auxiliary, PLplot_Traditional; --- COMMENT THIS LINE IF YOUR COMPILER DOES NOT INCLUDE THESE --- DEFINITIONS, FOR EXAMPLE, IF IT IS NOT ADA 2005 WITH ANNEX G.3 COMPLIANCE. ---with Ada.Numerics.Long_Real_Arrays; use Ada.Numerics.Long_Real_Arrays; @Ada_Is_2007_With_and_Use_Numerics@ ------------------------------------------------------------------------------ Modified: trunk/examples/ada/x03a.adb.cmake =================================================================== --- trunk/examples/ada/x03a.adb.cmake 2009-01-22 22:34:06 UTC (rev 9377) +++ trunk/examples/ada/x03a.adb.cmake 2009-01-23 09:13:27 UTC (rev 9378) @@ -36,9 +36,6 @@ PLplot_Auxiliary, PLplot_Traditional; --- COMMENT THIS LINE IF YOUR COMPILER DOES NOT INCLUDE THESE --- DEFINITIONS, FOR EXAMPLE, IF IT IS NOT ADA 2005 WITH ANNEX G.3 COMPLIANCE. ---with Ada.Numerics.Long_Real_Arrays; use Ada.Numerics.Long_Real_Arrays; @Ada_Is_2007_With_and_Use_Numerics@ procedure x03a is Modified: trunk/examples/ada/x04a.adb.cmake =================================================================== --- trunk/examples/ada/x04a.adb.cmake 2009-01-22 22:34:06 UTC (rev 9377) +++ trunk/examples/ada/x04a.adb.cmake 2009-01-23 09:13:27 UTC (rev 9378) @@ -31,9 +31,6 @@ PLplot_Auxiliary, PLplot_Traditional; --- COMMENT THIS LINE IF YOUR COMPILER DOES NOT INCLUDE THESE --- DEFINITIONS, FOR EXAMPLE, IF IT IS NOT ADA 2005 WITH ANNEX G.3 COMPLIANCE. ---with Ada.Numerics.Long_Real_Arrays; use Ada.Numerics.Long_Real_Arrays; @Ada_Is_2007_With_and_Use_Numerics@ procedure x04a is Modified: trunk/examples/ada/x05a.adb.cmake =================================================================== --- trunk/examples/ada/x05a.adb.cmake 2009-01-22 22:34:06 UTC (rev 9377) +++ trunk/examples/ada/x05a.adb.cmake 2009-01-23 09:13:27 UTC (rev 9378) @@ -32,9 +32,6 @@ PLplot_Auxiliary, PLplot_Traditional; --- COMMENT THIS LINE IF YOUR COMPILER DOES NOT INCLUDE THESE --- DEFINITIONS, FOR EXAMPLE, IF IT IS NOT ADA 2005 WITH ANNEX G.3 COMPLIANCE. ---with Ada.Numerics.Long_Real_Arrays; use Ada.Numerics.Long_Real_Arrays; @Ada_Is_2007_With_and_Use_Numerics@ procedure x05a is Modified: trunk/examples/ada/x06a.adb.cmake =================================================================== --- trunk/examples/ada/x06a.adb.cmake 2009-01-22 22:34:06 UTC (rev 9377) +++ trunk/examples/ada/x06a.adb.cmake 2009-01-23 09:13:27 UTC (rev 9378) @@ -35,9 +35,6 @@ PLplot_Auxiliary, PLplot_Traditional; --- COMMENT THIS LINE IF YOUR COMPILER DOES NOT INCLUDE THESE --- DEFINITIONS, FOR EXAMPLE, IF IT IS NOT ADA 2005 WITH ANNEX G.3 COMPLIANCE. ---with Ada.Numerics.Long_Real_Arrays; use Ada.Numerics.Long_Real_Arrays; @Ada_Is_2007_With_and_Use_Numerics@ procedure x06a is Modified: trunk/examples/ada/x07a.adb.cmake =================================================================== --- trunk/examples/ada/x07a.adb.cmake 2009-01-22 22:34:06 UTC (rev 9377) +++ trunk/examples/ada/x07a.adb.cmake 2009-01-23 09:13:27 UTC (rev 9378) @@ -35,9 +35,6 @@ PLplot_Auxiliary, PLplot_Traditional; --- COMMENT THIS LINE IF YOUR COMPILER DOES NOT INCLUDE THESE --- DEFINITIONS, FOR EXAMPLE, IF IT IS NOT ADA 2005 WITH ANNEX G.3 COMPLIANCE. ---with Ada.Numerics.Long_Real_Arrays; use Ada.Numerics.Long_Real_Arrays; @Ada_Is_2007_With_and_Use_Numerics@ procedure x07a is Modified: trunk/examples/ada/x08a.adb.cmake =================================================================== --- trunk/examples/ada/x08a.adb.cmake 2009-01-22 22:34:06 UTC (rev 9377) +++ trunk/examples/ada/x08a.adb.cmake 2009-01-23 09:13:27 UTC (rev 9378) @@ -31,9 +31,6 @@ PLplot_Traditional, PLplot_Auxiliary; --- COMMENT THIS LINE IF YOUR COMPILER DOES NOT INCLUDE THESE --- DEFINITIONS, FOR EXAMPLE, IF IT IS NOT ADA 2005 WITH ANNEX G.3 COMPLIANCE. ---with Ada.Numerics.Long_Real_Arrays; use Ada.Numerics.Long_Real_Arrays; @Ada_Is_2007_With_and_Use_Numerics@ procedure x08a is Modified: trunk/examples/ada/x09a.adb.cmake =================================================================== --- trunk/examples/ada/x09a.adb.cmake 2009-01-22 22:34:06 UTC (rev 9377) +++ trunk/examples/ada/x09a.adb.cmake 2009-01-23 09:13:27 UTC (rev 9378) @@ -33,9 +33,6 @@ PLplot_Traditional, PLplot_Auxiliary; --- COMMENT THIS LINE IF YOUR COMPILER DOES NOT INCLUDE THESE --- DEFINITIONS, FOR EXAMPLE, IF IT IS NOT ADA 2005 WITH ANNEX G.3 COMPLIANCE. ---with Ada.Numerics.Long_Real_Arrays; use Ada.Numerics.Long_Real_Arrays; @Ada_Is_2007_With_and_Use_Numerics@ -------------------------------------------------------------------------- Modified: trunk/examples/ada/x10a.adb.cmake =================================================================== --- trunk/examples/ada/x10a.adb.cmake 2009-01-22 22:34:06 UTC (rev 9377) +++ trunk/examples/ada/x10a.adb.cmake 2009-01-23 09:13:27 UTC (rev 9378) @@ -31,9 +31,6 @@ PLplot_Auxiliary, PLplot_Traditional; --- COMMENT THIS LINE IF YOUR COMPILER DOES NOT INCLUDE THESE --- DEFINITIONS, FOR EXAMPLE, IF IT IS NOT ADA 2005 WITH ANNEX G.3 COMPLIANCE. ---with Ada.Numerics.Long_Real_Arrays; use Ada.Numerics.Long_Real_Arrays; @Ada_Is_2007_With_and_Use_Numerics@ procedure x10a is Modified: trunk/examples/ada/x11a.adb.cmake =================================================================== --- trunk/examples/ada/x11a.adb.cmake 2009-01-22 22:34:06 UTC (rev 9377) +++ trunk/examples/ada/x11a.adb.cmake 2009-01-23 09:13:27 UTC (rev 9378) @@ -31,9 +31,6 @@ PLplot_Traditional, PLplot_Auxiliary; --- COMMENT THIS LINE IF YOUR COMPILER DOES NOT INCLUDE THESE --- DEFINITIONS, FOR EXAMPLE, IF IT IS NOT ADA 2005 WITH ANNEX G.3 COMPLIANCE. ---with Ada.Numerics.Long_Real_Arrays; use Ada.Numerics.Long_Real_Arrays; @Ada_Is_2007_With_and_Use_Numerics@ procedure x11a is Modified: trunk/examples/ada/x12a.adb.cmake =================================================================== --- trunk/examples/ada/x12a.adb.cmake 2009-01-22 22:34:06 UTC (rev 9377) +++ trunk/examples/ada/x12a.adb.cmake 2009-01-23 09:13:27 UTC (rev 9378) @@ -36,9 +36,6 @@ PLplot_Auxiliary, PLplot_Traditional; --- COMMENT THIS LINE IF YOUR COMPILER DOES NOT INCLUDE THESE --- DEFINITIONS, FOR EXAMPLE, IF IT IS NOT ADA 2005 WITH ANNEX G.3 COMPLIANCE. ---with Ada.Numerics.Long_Real_Arrays; use Ada.Numerics.Long_Real_Arrays; @Ada_Is_2007_With_and_Use_Numerics@ ------------------------------------------------------------------------------ Modified: trunk/examples/ada/x13a.adb.cmake =================================================================== --- trunk/examples/ada/x13a.adb.cmake 2009-01-22 22:34:06 UTC (rev 9377) +++ trunk/examples/ada/x13a.adb.cmake 2009-01-23 09:13:27 UTC (rev 9378) @@ -31,9 +31,6 @@ PLplot_Auxiliary, PLplot_Traditional; --- COMMENT THIS LINE IF YOUR COMPILER DOES NOT INCLUDE THESE --- DEFINITIONS, FOR EXAMPLE, IF IT IS NOT ADA 2005 WITH ANNEX G.3 COMPLIANCE. ---with Ada.Numerics.Long_Real_Arrays; use Ada.Numerics.Long_Real_Arrays; @Ada_Is_2007_With_and_Use_Numerics@ ------------------------------------------------------------------------------ Modified: trunk/examples/ada/x14a.adb.cmake =================================================================== --- trunk/examples/ada/x14a.adb.cmake 2009-01-22 22:34:06 UTC (rev 9377) +++ trunk/examples/ada/x14a.adb.cmake 2009-01-23 09:13:27 UTC (rev 9378) @@ -43,9 +43,6 @@ PLplot_Auxiliary, PLplot_Traditional; --- COMMENT THIS LINE IF YOUR COMPILER DOES NOT INCLUDE THESE --- DEFINITIONS, FOR EXAMPLE, IF IT IS NOT ADA 2005 WITH ANNEX G.3 COMPLIANCE. ---with Ada.Numerics.Long_Real_Arrays; use Ada.Numerics.Long_Real_Arrays; @Ada_Is_2007_With_and_Use_Numerics@ ------------------------------------------------------------------------------ Modified: trunk/examples/ada/x15a.adb.cmake =================================================================== --- trunk/examples/ada/x15a.adb.cmake 2009-01-22 22:34:06 UTC (rev 9377) +++ trunk/examples/ada/x15a.adb.cmake 2009-01-23 09:13:27 UTC (rev 9378) @@ -36,9 +36,6 @@ PLplot_Traditional, PLplot_Auxiliary; --- COMMENT THIS LINE IF YOUR COMPILER DOES NOT INCLUDE THESE --- DEFINITIONS, FOR EXAMPLE, IF IT IS NOT ADA 2005 WITH ANNEX G.3 COMPLIANCE. ---with Ada.Numerics.Long_Real_Arrays; use Ada.Numerics.Long_Real_Arrays; @Ada_Is_2007_With_and_Use_Numerics@ procedure x15a is Modified: trunk/examples/ada/x16a.adb.cmake =================================================================== --- trunk/examples/ada/x16a.adb.cmake 2009-01-22 22:34:06 UTC (rev 9377) +++ trunk/examples/ada/x16a.adb.cmake 2009-01-23 09:13:27 UTC (rev 9378) @@ -36,9 +36,6 @@ PLplot_Traditional, PLplot_Auxiliary; --- COMMENT THIS LINE IF YOUR COMPILER DOES NOT INCLUDE THESE --- DEFINITIONS, FOR EXAMPLE, IF IT IS NOT ADA 2005 WITH ANNEX G.3 COMPLIANCE. ---with Ada.Numerics.Long_Real_Arrays; use Ada.Numerics.Long_Real_Arrays; @Ada_Is_2007_With_and_Use_Numerics@ procedure x16a is Modified: trunk/examples/ada/x17a.adb.cmake =================================================================== --- trunk/examples/ada/x17a.adb.cmake 2009-01-22 22:34:06 UTC (rev 9377) +++ trunk/examples/ada/x17a.adb.cmake 2009-01-23 09:13:27 UTC (rev 9378) @@ -35,9 +35,6 @@ PLplot_Auxiliary, PLplot_Traditional; --- COMMENT THIS LINE IF YOUR COMPILER DOES NOT INCLUDE THESE --- DEFINITIONS, FOR EXAMPLE, IF IT IS NOT ADA 2005 WITH ANNEX G.3 COMPLIANCE. ---with Ada.Numerics.Long_Real_Arrays; use Ada.Numerics.Long_Real_Arrays; @Ada_Is_2007_With_and_Use_Numerics@ procedure x17a is Modified: trunk/examples/ada/x18a.adb.cmake =================================================================== --- trunk/examples/ada/x18a.adb.cmake 2009-01-22 22:34:06 UTC (rev 9377) +++ trunk/examples/ada/x18a.adb.cmake 2009-01-23 09:13:27 UTC (rev 9378) @@ -36,9 +36,6 @@ PLplot_Auxiliary, PLplot_Traditional; --- COMMENT THIS LINE IF YOUR COMPILER DOES NOT INCLUDE THESE --- DEFINITIONS, FOR EXAMPLE, IF IT IS NOT ADA 2005 WITH ANNEX G.3 COMPLIANCE. ---with Ada.Numerics.Long_Real_Arrays; use Ada.Numerics.Long_Real_Arrays; @Ada_Is_2007_With_and_Use_Numerics@ procedure x18a is Modified: trunk/examples/ada/x19a.adb.cmake =================================================================== --- trunk/examples/ada/x19a.adb.cmake 2009-01-22 22:34:06 UTC (rev 9377) +++ trunk/examples/ada/x19a.adb.cmake 2009-01-23 09:13:27 UTC (rev 9378) @@ -32,9 +32,6 @@ PLplot_Auxiliary, PLplot_Traditional; --- COMMENT THIS LINE IF YOUR COMPILER DOES NOT INCLUDE THESE --- DEFINITIONS, FOR EXAMPLE, IF IT IS NOT ADA 2005 WITH ANNEX G.3 COMPLIANCE. ---with Ada.Numerics.Long_Real_Arrays; use Ada.Numerics.Long_Real_Arrays; @Ada_Is_2007_With_and_Use_Numerics@ -- Shows two views of the world map. Modified: trunk/examples/ada/x20a.adb.cmake =================================================================== --- trunk/examples/ada/x20a.adb.cmake 2009-01-22 22:34:06 UTC (rev 9377) +++ trunk/examples/ada/x20a.adb.cmake 2009-01-23 09:13:27 UTC (rev 9378) @@ -38,9 +38,6 @@ PLplot_Traditional, PLplot_Auxiliary; --- COMMENT THIS LINE IF YOUR COMPILER DOES NOT INCLUDE THESE --- DEFINITIONS, FOR EXAMPLE, IF IT IS NOT ADA 2005 WITH ANNEX G.3 COMPLIANCE. ---with Ada.Numerics.Long_Real_Arrays; use Ada.Numerics.Long_Real_Arrays; @Ada_Is_2007_With_and_Use_Numerics@ procedure x20a is Modified: trunk/examples/ada/x21a.adb.cmake =================================================================== --- trunk/examples/ada/x21a.adb.cmake 2009-01-22 22:34:06 UTC (rev 9377) +++ trunk/examples/ada/x21a.adb.cmake 2009-01-23 09:13:27 UTC (rev 9378) @@ -45,9 +45,6 @@ PLplot_Traditional, PLplot_Auxiliary; --- COMMENT THIS LINE IF YOUR COMPILER DOES NOT INCLUDE THESE --- DEFINITIONS, FOR EXAMPLE, IF IT IS NOT ADA 2005 WITH ANNEX G.3 COMPLIANCE. ---with Ada.Numerics.Long_Real_Arrays; use Ada.Numerics.Long_Real_Arrays; @Ada_Is_2007_With_and_Use_Numerics@ procedure x21a is Modified: trunk/examples/ada/x22a.adb.cmake =================================================================== --- trunk/examples/ada/x22a.adb.cmake 2009-01-22 22:34:06 UTC (rev 9377) +++ trunk/examples/ada/x22a.adb.cmake 2009-01-23 09:13:27 UTC (rev 9378) @@ -33,9 +33,6 @@ PLplot_Traditional, PLplot_Auxiliary; --- COMMENT THIS LINE IF YOUR COMPILER DOES NOT INCLUDE THESE --- DEFINITIONS, FOR EXAMPLE, IF IT IS NOT ADA 2005 WITH ANNEX G.3 COMPLIANCE. ---with Ada.Numerics.Long_Real_Arrays; use Ada.Numerics.Long_Real_Arrays; @Ada_Is_2007_With_and_Use_Numerics@ procedure x22a is Modified: trunk/examples/ada/x23a.adb.cmake =================================================================== --- trunk/examples/ada/x23a.adb.cmake 2009-01-22 22:34:06 UTC (rev 9377) +++ trunk/examples/ada/x23a.adb.cmake 2009-01-23 09:13:27 UTC (rev 9378) @@ -42,9 +42,6 @@ PLplot_Auxiliary, PLplot_Traditional; --- COMMENT THIS LINE IF YOUR COMPILER DOES NOT INCLUDE THESE --- DEFINITIONS, FOR EXAMPLE, IF IT IS NOT ADA 2005 WITH ANNEX G.3 COMPLIANCE. ---with Ada.Numerics.Long_Real_Arrays; use Ada.Numerics.Long_Real_Arrays; @Ada_Is_2007_With_and_Use_Numerics@ procedure x23a is Modified: trunk/examples/ada/x24a.adb.cmake =================================================================== --- trunk/examples/ada/x24a.adb.cmake 2009-01-22 22:34:06 UTC (rev 9377) +++ trunk/examples/ada/x24a.adb.cmake 2009-01-23 09:13:27 UTC (rev 9378) @@ -27,9 +27,6 @@ PLplot_Auxiliary, PLplot_Traditional; --- COMMENT THIS LINE IF YOUR COMPILER DOES NOT INCLUDE THESE --- DEFINITIONS, FOR EXAMPLE, IF IT IS NOT ADA 2005 WITH ANNEX G.3 COMPLIANCE. ---with Ada.Numerics.Long_Real_Arrays; use Ada.Numerics.Long_Real_Arrays; @Ada_Is_2007_With_and_Use_Numerics@ procedure x24a is Modified: trunk/examples/ada/x25a.adb.cmake =================================================================== --- trunk/examples/ada/x25a.adb.cmake 2009-01-22 22:34:06 UTC (rev 9377) +++ trunk/examples/ada/x25a.adb.cmake 2009-01-23 09:13:27 UTC (rev 9378) @@ -27,9 +27,6 @@ PLplot_Auxiliary, PLplot_Traditional; --- COMMENT THIS LINE IF YOUR COMPILER DOES NOT INCLUDE THESE --- DEFINITIONS, FOR EXAMPLE, IF IT IS NOT ADA 2005 WITH ANNEX G.3 COMPLIANCE. ---with Ada.Numerics.Long_Real_Arrays; use Ada.Numerics.Long_Real_Arrays; @Ada_Is_2007_With_and_Use_Numerics@ -- Test program for filling polygons and proper clipping Modified: trunk/examples/ada/x26a.adb.cmake =================================================================== --- trunk/examples/ada/x26a.adb.cmake 2009-01-22 22:34:06 UTC (rev 9377) +++ trunk/examples/ada/x26a.adb.cmake 2009-01-23 09:13:27 UTC (rev 9378) @@ -65,9 +65,6 @@ PLplot_Auxiliary, PLplot_Traditional; --- COMMENT THIS LINE IF YOUR COMPILER DOES NOT INCLUDE THESE --- DEFINITIONS, FOR EXAMPLE, IF IT IS NOT ADA 2005 WITH ANNEX G.3 COMPLIANCE. ---with Ada.Numerics.Long_Real_Arrays; use Ada.Numerics.Long_Real_Arrays; @Ada_Is_2007_With_and_Use_Numerics@ procedure x26a is Modified: trunk/examples/ada/x27a.adb.cmake =================================================================== --- trunk/examples/ada/x27a.adb.cmake 2009-01-22 22:34:06 UTC (rev 9377) +++ trunk/examples/ada/x27a.adb.cmake 2009-01-23 09:13:27 UTC (rev 9378) @@ -29,9 +29,6 @@ PLplot_Auxiliary, PLplot_Traditional; --- COMMENT THIS LINE IF YOUR COMPILER DOES NOT INCLUDE THESE --- DEFINITIONS, FOR EXAMPLE, IF IT IS NOT ADA 2005 WITH ANNEX G.3 COMPLIANCE. ---with Ada.Numerics.Long_Real_Arrays; use Ada.Numerics.Long_Real_Arrays; @Ada_Is_2007_With_and_Use_Numerics@ ------------------------------------------------------------------------------ Modified: trunk/examples/ada/x28a.adb.cmake =================================================================== --- trunk/examples/ada/x28a.adb.cmake 2009-01-22 22:34:06 UTC (rev 9377) +++ trunk/examples/ada/x28a.adb.cmake 2009-01-23 09:13:27 UTC (rev 9378) @@ -31,9 +31,6 @@ PLplot_Auxiliary, PLplot_Traditional; --- COMMENT THIS LINE IF YOUR COMPILER DOES NOT INCLUDE THESE --- DEFINITIONS, FOR EXAMPLE, IF IT IS NOT ADA 2005 WITH ANNEX G.3 COMPLIANCE. ---with Ada.Numerics.Long_Real_Arrays; use Ada.Numerics.Long_Real_Arrays; @Ada_Is_2007_With_and_Use_Numerics@ -- Demonstrates plotting text in 3D. Modified: trunk/examples/ada/x29a.adb.cmake =================================================================== --- trunk/examples/ada/x29a.adb.cmake 2009-01-22 22:34:06 UTC (rev 9377) +++ trunk/examples/ada/x29a.adb.cmake 2009-01-23 09:13:27 UTC (rev 9378) @@ -33,9 +33,6 @@ PLplot_Auxiliary, PLplot_Traditional; --- COMMENT THIS LINE IF YOUR COMPILER DOES NOT INCLUDE THESE --- DEFINITIONS, FOR EXAMPLE, IF IT IS NOT ADA 2005 WITH ANNEX G.3 COMPLIANCE. ---with Ada.Numerics.Long_Real_Arrays; use Ada.Numerics.Long_Real_Arrays; @Ada_Is_2007_With_and_Use_Numerics@ -------------------------------------------------------------------------------- Modified: trunk/examples/ada/x30a.adb.cmake =================================================================== --- trunk/examples/ada/x30a.adb.cmake 2009-01-22 22:34:06 UTC (rev 9377) +++ trunk/examples/ada/x30a.adb.cmake 2009-01-23 09:13:27 UTC (rev 9378) @@ -33,9 +33,6 @@ PLplot_Auxiliary, PLplot_Traditional; --- COMMENT THIS LINE IF YOUR COMPILER DOES NOT INCLUDE THESE --- DEFINITIONS, FOR EXAMPLE, IF IT IS NOT ADA 2005 WITH ANNEX G.3 COMPLIANCE. ---with Ada.Numerics.Long_Real_Arrays; use Ada.Numerics.Long_Real_Arrays; @Ada_Is_2007_With_and_Use_Numerics@ procedure x30a is Modified: trunk/examples/ada/x31a.adb.cmake =================================================================== --- trunk/examples/ada/x31a.adb.cmake 2009-01-22 22:34:06 UTC (rev 9377) +++ trunk/examples/ada/x31a.adb.cmake 2009-01-23 09:13:27 UTC (rev 9378) @@ -41,9 +41,6 @@ PLplot_Auxiliary, PLplot_Traditional; --- COMMENT THIS LINE IF YOUR COMPILER DOES NOT INCLUDE THESE --- DEFINITIONS, FOR EXAMPLE, IF IT IS NOT ADA 2005 WITH ANNEX G.3 COMPLIANCE. ---with Ada.Numerics.Long_Real_Arrays; use Ada.Numerics.Long_Real_Arrays; @Ada_Is_2007_With_and_Use_Numerics@ -- This example mostly outputs text. As part of the PLplot testing regime, we Modified: trunk/examples/ada/xthick01a.adb.cmake =================================================================== --- trunk/examples/ada/xthick01a.adb.cmake 2009-01-22 22:34:06 UTC (rev 9377) +++ trunk/examples/ada/xthick01a.adb.cmake 2009-01-23 09:13:27 UTC (rev 9378) @@ -33,9 +33,6 @@ PLplot_Auxiliary, PLplot; --- COMMENT THIS LINE IF YOUR COMPILER DOES NOT INCLUDE THESE --- DEFINITIONS, FOR EXAMPLE, IF IT IS NOT ADA 2005 WITH ANNEX G.3 COMPLIANCE. ---with Ada.Numerics.Long_Real_Arrays; use Ada.Numerics.Long_Real_Arrays; @Ada_Is_2007_With_and_Use_Numerics@ procedure xthick01a is Modified: trunk/examples/ada/xthick02a.adb.cmake =================================================================== --- trunk/examples/ada/xthick02a.adb.cmake 2009-01-22 22:34:06 UTC (rev 9377) +++ trunk/examples/ada/xthick02a.adb.cmake 2009-01-23 09:13:27 UTC (rev 9378) @@ -36,9 +36,6 @@ PLplot_Auxiliary, PLplot; --- COMMENT THIS LINE IF YOUR COMPILER DOES NOT INCLUDE THESE --- DEFINITIONS, FOR EXAMPLE, IF IT IS NOT ADA 2005 WITH ANNEX G.3 COMPLIANCE. ---with Ada.Numerics.Long_Real_Arrays; use Ada.Numerics.Long_Real_Arrays; @Ada_Is_2007_With_and_Use_Numerics@ ------------------------------------------------------------------------------ Modified: trunk/examples/ada/xthick03a.adb.cmake =================================================================== --- trunk/examples/ada/xthick03a.adb.cmake 2009-01-22 22:34:06 UTC (rev 9377) +++ trunk/examples/ada/xthick03a.adb.cmake 2009-01-23 09:13:27 UTC (rev 9378) @@ -36,9 +36,6 @@ PLplot_Auxiliary, PLplot; --- COMMENT THIS LINE IF YOUR COMPILER DOES NOT INCLUDE THESE --- DEFINITIONS, FOR EXAMPLE, IF IT IS NOT ADA 2005 WITH ANNEX G.3 COMPLIANCE. ---with Ada.Numerics.Long_Real_Arrays; use Ada.Numerics.Long_Real_Arrays; @Ada_Is_2007_With_and_Use_Numerics@ procedure xthick03a is Modified: trunk/examples/ada/xthick04a.adb.cmake =================================================================== --- trunk/examples/ada/xthick04a.adb.cmake 2009-01-22 22:34:06 UTC (rev 9377) +++ trunk/examples/ada/xthick04a.adb.cmake 2009-01-23 09:13:27 UTC (rev 9378) @@ -31,9 +31,6 @@ PLplot_Auxiliary, PLplot; --- COMMENT THIS LINE IF YOUR COMPILER DOES NOT INCLUDE THESE --- DEFINITIONS, FOR EXAMPLE, IF IT IS NOT ADA 2005 WITH ANNEX G.3 COMPLIANCE. ---with Ada.Numerics.Long_Real_Arrays; use Ada.Numerics.Long_Real_Arrays; @Ada_Is_2007_With_and_Use_Numerics@ procedure xthick04a is Modified: trunk/examples/ada/xthick05a.adb.cmake =================================================================== --- trunk/examples/ada/xthick05a.adb.cmake 2009-01-22 22:34:06 UTC (rev 9377) +++ trunk/examples/ada/xthick05a.adb.cmake 2009-01-23 09:13:27 UTC (rev 9378) @@ -32,9 +32,6 @@ PLplot_Auxiliary, PLplot; --- COMMENT THIS LINE IF YOUR COMPILER DOES NOT INCLUDE THESE --- DEFINITIONS, FOR EXAMPLE, IF IT IS NOT ADA 2005 WITH ANNEX G.3 COMPLIANCE. ---with Ada.Numerics.Long_Real_Arrays; use Ada.Numerics.Long_Real_Arrays; @Ada_Is_2007_With_and_Use_Numerics@ procedure xthick05a is Modified: trunk/examples/ada/xthick06a.adb.cmake =================================================================== --- trunk/examples/ada/xthick06a.adb.cmake 2009-01-22 22:34:06 UTC (rev 9377) +++ trunk/examples/ada/xthick06a.adb.cmake 2009-01-23 09:13:27 UTC (rev 9378) @@ -35,9 +35,6 @@ PLplot_Auxiliary, PLplot; --- COMMENT THIS LINE IF YOUR COMPILER DOES NOT INCLUDE THESE --- DEFINITIONS, FOR EXAMPLE, IF IT IS NOT ADA 2005 WITH ANNEX G.3 COMPLIANCE. ---with Ada.Numerics.Long_Real_Arrays; use Ada.Numerics.Long_Real_Arrays; @Ada_Is_2007_With_and_Use_Numerics@ procedure xthick06a is Modified: trunk/examples/ada/xthick07a.adb.cmake =================================================================== --- trunk/examples/ada/xthick07a.adb.cmake 2009-01-22 22:34:06 UTC (rev 9377) +++ trunk/examples/ada/xthick07a.adb.cmake 2009-01-23 09:13:27 UTC (rev 9378) @@ -35,9 +35,6 @@ PLplot_Auxiliary, PLplot; --- COMMENT THIS LINE IF YOUR COMPILER DOES NOT INCLUDE THESE --- DEFINITIONS, FOR EXAMPLE, IF IT IS NOT ADA 2005 WITH ANNEX G.3 COMPLIANCE. ---with Ada.Numerics.Long_Real_Arrays; use Ada.Numerics.Long_Real_Arrays; @Ada_Is_2007_With_and_Use_Numerics@ procedure xthick07a is Modified: trunk/examples/ada/xthick08a.adb.cmake =================================================================== --- trunk/examples/ada/xthick08a.adb.cmake 2009-01-22 22:34:06 UTC (rev 9377) +++ trunk/examples/ada/xthick08a.adb.cmake 2009-01-23 09:13:27 UTC (rev 9378) @@ -31,9 +31,6 @@ PLplot, PLplot_Auxiliary; --- COMMENT THIS LINE IF YOUR COMPILER DOES NOT INCLUDE THESE --- DEFINITIONS, FOR EXAMPLE, IF IT IS NOT ADA 2005 WITH ANNEX G.3 COMPLIANCE. ---with Ada.Numerics.Long_Real_Arrays; use Ada.Numerics.Long_Real_Arrays; @Ada_Is_2007_With_and_Use_Numerics@ procedure xthick08a is Modified: trunk/examples/ada/xthick09a.adb.cmake =================================================================== --- trunk/examples/ada/xthick09a.adb.cmake 2009-01-22 22:34:06 UTC (rev 9377) +++ trunk/examples/ada/xthick09a.adb.cmake 2009-01-23 09:13:27 UTC (rev 9378) @@ -33,9 +33,6 @@ PLplot, PLplot_Auxiliary; --- COMMENT THIS LINE IF YOUR COMPILER DOES NOT INCLUDE THESE --- DEFINITIONS, FOR EXAMPLE, IF IT IS NOT ADA 2005 WITH ANNEX G.3 COMPLIANCE. ---with Ada.Numerics.Long_Real_Arrays; use Ada.Numerics.Long_Real_Arrays; @Ada_Is_2007_With_and_Use_Numerics@ -------------------------------------------------------------------------- Modified: trunk/examples/ada/xthick10a.adb.cmake =================================================================== --- trunk/examples/ada/xthick10a.adb.cmake 2009-01-22 22:34:06 UTC (rev 9377) +++ trunk/examples/ada/xthick10a.adb.cmake 2009-01-23 09:13:27 UTC (rev 9378) @@ -31,9 +31,6 @@ PLplot_Auxiliary, PLplot; --- COMMENT THIS LINE IF YOUR COMPILER DOES NOT INCLUDE THESE --- DEFINITIONS, FOR EXAMPLE, IF IT IS NOT ADA 2005 WITH ANNEX G.3 COMPLIANCE. ---with Ada.Numerics.Long_Real_Arrays; use Ada.Numerics.Long_Real_Arrays; @Ada_Is_2007_With_and_Use_Numerics@ procedure xthick10a is Modified: trunk/examples/ada/xthick11a.adb.cmake =================================================================== --- trunk/examples/ada/xthick11a.adb.cmake 2009-01-22 22:34:06 UTC (rev 9377) +++ trunk/examples/ada/xthick11a.adb.cmake 2009-01-23 09:13:27 UTC (rev 9378) @@ -31,9 +31,6 @@ PLplot, PLplot_Auxiliary; --- COMMENT THIS LINE IF YOUR COMPILER DOES NOT INCLUDE THESE --- DEFINITIONS, FOR EXAMPLE, IF IT IS NOT ADA 2005 WITH ANNEX G.3 COMPLIANCE. ---with Ada.Numerics.Long_Real_Arrays; use Ada.Numerics.Long_Real_Arrays; @Ada_Is_2007_With_and_Use_Numerics@ procedure xthick11a is Modified: trunk/examples/ada/xthick12a.adb.cmake =================================================================== --- trunk/examples/ada/xthick12a.adb.cmake 2009-01-22 22:34:06 UTC (rev 9377) +++ trunk/examples/ada/xthick12a.adb.cmake 2009-01-23 09:13:27 UTC (rev 9378) @@ -35,9 +35,6 @@ PLplot_Auxiliary, PLplot; --- COMMENT THIS LINE IF YOUR COMPILER DOES NOT INCLUDE THESE --- DEFINITIONS, FOR EXAMPLE, IF IT IS NOT ADA 2005 WITH ANNEX G.3 COMPLIANCE. ---with Ada.Numerics.Long_Real_Arrays; use Ada.Numerics.Long_Real_Arrays; @Ada_Is_2007_With_and_Use_Numerics@ ------------------------------------------------------------------------------ Modified: trunk/examples/ada/xthick13a.adb.cmake =================================================================== --- trunk/examples/ada/xthick13a.adb.cmake 2009-01-22 22:34:06 UTC (rev 9377) +++ trunk/examples/ada/xthick13a.adb.cmake 2009-01-23 09:13:27 UTC (rev 9378) @@ -31,9 +31,6 @@ PLplot_Auxiliary, PLplot; --- COMMENT THIS LINE IF YOUR COMPILER DOES NOT INCLUDE THESE --- DEFINITIONS, FOR EXAMPLE, IF IT IS NOT ADA 2005 WITH ANNEX G.3 COMPLIANCE. ---with Ada.Numerics.Long_Real_Arrays; use Ada.Numerics.Long_Real_Arrays; @Ada_Is_2007_With_and_Use_Numerics@ ------------------------------------------------------------------------------ Modified: trunk/examples/ada/xthick14a.adb.cmake =================================================================== --- trunk/examples/ada/xthick14a.adb.cmake 2009-01-22 22:34:06 UTC (rev 9377) +++ trunk/examples/ada/xthick14a.adb.cmake 2009-01-23 09:13:27 UTC (rev 9378) @@ -43,9 +43,6 @@ PLplot_Auxiliary, PLplot; --- COMMENT THIS LINE IF YOUR COMPILER DOES NOT INCLUDE THESE --- DEFINITIONS, FOR EXAMPLE, IF IT IS NOT ADA 2005 WITH ANNEX G.3 COMPLIANCE. ---with Ada.Numerics.Long_Real_Arrays; use Ada.Numerics.Long_Real_Arrays; @Ada_Is_2007_With_and_Use_Numerics@ ------------------------------------------------------------------------------ Modified: trunk/examples/ada/xthick15a.adb.cmake =================================================================== --- trunk/examples/ada/xthick15a.adb.cmake 2009-01-22 22:34:06 UTC (rev 9377) +++ trunk/examples/ada/xthick15a.adb.cmake 2009-01-23 09:13:27 UTC (rev 9378) @@ -36,9 +36,6 @@ PLplot, PLplot_Auxiliary; --- COMMENT THIS LINE IF YOUR COMPILER DOES NOT INCLUDE THESE --- DEFINITIONS, FOR EXAMPLE, IF IT IS NOT ADA 2005 WITH ANNEX G.3 COMPLIANCE. ---with Ada.Numerics.Long_Real_Arrays; use Ada.Numerics.Long_Real_Arrays; @Ada_Is_2007_With_and_Use_Numerics@ procedure xthick15a is Modified: trunk/examples/ada/xthick16a.adb.cmake =================================================================== --- trunk/examples/ada/xthick16a.adb.cmake 2009-01-22 22:34:06 UTC (rev 9377) +++ trunk/examples/ada/xthick16a.adb.cmake 2009-01-23 09:13:27 UTC (rev 9378) @@ -36,9 +36,6 @@ PLplot, PLplot_Auxiliary; --- COMMENT THIS LINE IF YOUR COMPILER DOES NOT INCLUDE THESE --- DEFINITIONS, FOR EXAMPLE, IF IT IS NOT ADA 2005 WITH ANNEX G.3 COMPLIANCE. ---with Ada.Numerics.Long_Real_Arrays; use Ada.Numerics.Long_Real_Arrays; @Ada_Is_2007_With_and_Use_Numerics@ procedure xthick16a is Modified: trunk/examples/ada/xthick17a.adb.cmake =================================================================== --- trunk/examples/ada/xthick17a.adb.cmake 2009-01-22 22:34:06 UTC (rev 9377) +++ trunk/examples/ada/xthick17a.adb.cmake 2009-01-23 09:13:27 UTC (rev 9378) @@ -35,9 +35,6 @@ PLplot_Auxiliary, PLplot; --- COMMENT THIS LINE IF YOUR COMPILER DOES NOT INCLUDE THESE --- DEFINITIONS, FOR EXAMPLE, IF IT IS NOT ADA 2005 WITH ANNEX G.3 COMPLIANCE. ---with Ada.Numerics.Long_Real_Arrays; use Ada.Numerics.Long_Real_Arrays; @Ada_Is_2007_With_and_Use_Numerics@ procedure xthick17a is Modified: trunk/examples/ada/xthick18a.adb.cmake =================================================================== --- trunk/examples/ada/xthick18a.adb.cmake 2009-01-22 22:34:06 UTC (rev 9377) +++ trunk/examples/ada/xthick18a.adb.cmake 2009-01-23 09:13:27 UTC (rev 9378) @@ -36,9 +36,6 @@ PLplot_Auxiliary, PLplot; --- COMMENT THIS LINE IF YOUR COMPILER DOES NOT INCLUDE THESE --- DEFINITIONS, FOR EXAMPLE, IF IT IS NOT ADA 2005 WITH ANNEX G.3 COMPLIANCE. ---with Ada.Numerics.Long_Real_Arrays; use Ada.Numerics.Long_Real_Arrays; @Ada_Is_2007_With_and_Use_Numerics@ procedure xthick18a is Modified: trunk/examples/ada/xthick19a.adb.cmake =================================================================== --- trunk/examples/ada/xthick19a.adb.cmake 2009-01-22 22:34:06 UTC (rev 9377) +++ trunk/examples/ada/xthick19a.adb.cmake 2009-01-23 09:13:27 UTC (rev 9378) @@ -32,9 +32,6 @@ PLplot_Auxiliary, PLplot; --- COMMENT THIS LINE IF YOUR COMPILER DOES NOT INCLUDE THESE --- DEFINITIONS, FOR EXAMPLE, IF IT IS NOT ADA 2005 WITH ANNEX G.3 COMPLIANCE. ---with Ada.Numerics.Long_Real_Arrays; use Ada.Numerics.Long_Real_Arrays; @Ada_Is_2007_With_and_Use_Numerics@ -- Shows two views of the world map. Modified: trunk/examples/ada/xthick20a.adb.cmake =================================================================== --- trunk/examples/ada/xthick20a.adb.cmake 2009-01-22 22:34:06 UTC (rev 9377) +++ trunk/examples/ada/xthick20a.adb.cmake 2009-01-23 09:13:27 UTC (rev 9378) @@ -38,9 +38,6 @@ PLplot, PLplot_Auxiliary; --- COMMENT THIS LINE IF YOUR COMPILER DOES NOT INCLUDE THESE --- DEFINITIONS, FOR EXAMPLE, IF IT IS NOT ADA 2005 WITH ANNEX G.3 COMPLIANCE. ---with Ada.Numerics.Long_Real_Arrays; use Ada.Numerics.Long_Real_Arrays; @Ada_Is_2007_With_and_Use_Numerics@ procedure xthick20a is Modified: trunk/examples/ada/xthick21a.adb.cmake =================================================================== --- trunk/examples/ada/xthick21a.adb.cmake 2009-01-22 22:34:06 UTC (rev 9377) +++ trunk/examples/ada/xthick21a.adb.cmake 2009-01-23 09:13:27 UTC (rev 9378) @@ -45,9 +45,6 @@ PLplot, PLplot_Auxiliary; --- COMMENT THIS LINE IF YOUR COMPILER DOES NOT INCLUDE THESE --- DEFINITIONS, FOR EXAMPLE, IF IT IS NOT ADA 2005 WITH ANNEX G.3 COMPLIANCE. ---with Ada.Numerics.Long_Real_Arrays; use Ada.Numerics.Long_Real_Arrays; @Ada_Is_2007_With_and_Use_Numerics@ procedure xthick21a is Modified: trunk/examples/ada/xthick22a.adb.cmake =================================================================== --- trunk/examples/ada/xthick22a.adb.cmake 2009-01-22 22:34:06 UTC (rev 9377) +++ trunk/examples/ada/xthick22a.adb.cmake 2009-01-23 09:13:27 UTC (rev 9378) @@ -33,9 +33,6 @@ PLplot, PLplot_Auxiliary; --- COMMENT THIS LINE IF YOUR COMPILER DOES NOT INCLUDE THESE --- DEFINITIONS, FOR EXAMPLE, IF IT IS NOT ADA 2005 WITH ANNEX G.3 COMPLIANCE. ---with Ada.Numerics.Long_Real_Arrays; use Ada.Numerics.Long_Real_Arrays; @Ada_Is_2007_With_and_Use_Numerics@ procedure xthick22a is Modified: trunk/examples/ada/xthick23a.adb.cmake =================================================================== --- trunk/examples/ada/xthick23a.adb.cmake 2009-01-22 22:34:06 UTC (rev 9377) +++ trunk/examples/ada/xthick23a.adb.cmake 2009-01-23 09:13:27 UTC (rev 9378) @@ -42,9 +42,6 @@ PLplot_Auxiliary, PLplot; --- COMMENT THIS LINE IF YOUR COMPILER DOES NOT INCLUDE THESE --- DEFINITIONS, FOR EXAMPLE, IF IT IS NOT ADA 2005 WITH ANNEX G.3 COMPLIANCE. ---with Ada.Numerics.Long_Real_Arrays; use Ada.Numerics.Long_Real_Arrays; @Ada_Is_2007_With_and_Use_Numerics@ procedure xthick23a is Modified: trunk/examples/ada/xthick24a.adb.cmake =================================================================== --- trunk/examples/ada/xthick24a.adb.cmake 2009-01-22 22:34:06 UTC (rev 9377) +++ trunk/examples/ada/xthick24a.adb.cmake 2009-01-23 09:13:27 UTC (rev 9378) @@ -27,9 +27,6 @@ PLplot_Auxiliary, PLplot; --- COMMENT THIS LINE IF YOUR COMPILER DOES NOT INCLUDE THESE --- DEFINITIONS, FOR EXAMPLE, IF IT IS NOT ADA 2005 WITH ANNEX G.3 COMPLIANCE. ---with Ada.Numerics.Long_Real_Arrays; use Ada.Numerics.Long_Real_Arrays; @Ada_Is_2007_With_and_Use_Numerics@ procedure xthick24a is Modified: trunk/examples/ada/xthick25a.adb.cmake =================================================================== --- trunk/examples/ada/xthick25a.adb.cmake 2009-01-22 22:34:06 UTC (rev 9377) +++ trunk/examples/ada/xthick25a.adb.cmake 2009-01-23 09:13:27 UTC (rev 9378) @@ -27,9 +27,6 @@ PLplot_Auxiliary, PLplot; --- COMMENT THIS LINE IF YOUR COMPILER DOES NOT INCLUDE THESE --- DEFINITIONS, FOR EXAMPLE, IF IT IS NOT ADA 2005 WITH ANNEX G.3 COMPLIANCE. ---with Ada.Numerics.Long_Real_Arrays; use Ada.Numerics.Long_Real_Arrays; @Ada_Is_2007_With_and_Use_Numerics@ -- Test program for filling polygons and proper clipping Modified: trunk/examples/ada/xthick26a.adb.cmake =================================================================== --- trunk/examples/ada/xthick26a.adb.cmake 2009-01-22 22:34:06 UTC (rev 9377) +++ trunk/examples/ada/xthick26a.adb.cmake 2009-01-23 09:13:27 UTC (rev 9378) @@ -65,9 +65,6 @@ PLplot_Auxiliary, PLplot; --- COMMENT THIS LINE IF YOUR COMPILER DOES NOT INCLUDE THESE --- DEFINITIONS, FOR EXAMPLE, IF IT IS NOT ADA 2005 WITH ANNEX G.3 COMPLIANCE. ---with Ada.Numerics.Long_Real_Arrays; use Ada.Numerics.Long_Real_Arrays; @Ada_Is_2007_With_and_Use_Numerics@ procedure xthick26a is Modified: trunk/examples/ada/xthick27a.adb.cmake =================================================================== --- trunk/examples/ada/xthick27a.adb.cmake 2009-01-22 22:34:06 UTC (rev 9377) +++ trunk/examples/ada/xthick27a.adb.cmake 2009-01-23 09:13:27 UTC (rev 9378) @@ -29,9 +29,6 @@ PLplot_Auxiliary, PLplot; --- COMMENT THIS LINE IF YOUR COMPILER DOES NOT INCLUDE THESE --- DEFINITIONS, FOR EXAMPLE, IF IT IS NOT ADA 2005 WITH ANNEX G.3 COMPLIANCE. ---with Ada.Numerics.Long_Real_Arrays; use Ada.Numerics.Long_Real_Arrays; @Ada_Is_2007_With_and_Use_Numerics@ ------------------------------------------------------------------------------ Modified: trunk/examples/ada/xthick28a.adb.cmake =================================================================== --- trunk/examples/ada/xthick28a.adb.cmake 2009-01-22 22:34:06 UTC (rev 9377) +++ trunk/examples/ada/xthick28a.adb.cmake 2009-01-23 09:13:27 UTC (rev 9378) @@ -31,9 +31,6 @@ PLplot_Auxiliary, PLplot; --- COMMENT THIS LINE IF YOUR COMPILER DOES NOT INCLUDE THESE --- DEFINITIONS, FOR EXAMPLE, IF IT IS NOT ADA 2005 WITH ANNEX G.3 COMPLIANCE. ---with Ada.Numerics.Long_Real_Arrays; use Ada.Numerics.Long_Real_Arrays; @Ada_Is_2007_With_and_Use_Numerics@ -- Demonstrates plotting text in 3D. Modified: trunk/examples/ada/xthick29a.adb.cmake =================================================================== --- trunk/examples/ada/xthick29a.adb.cmake 2009-01-22 22:34:06 UTC (rev 9377) +++ trunk/examples/ada/xthick29a.adb.cmake 2009-01-23 09:13:27 UTC (rev 9378) @@ -33,9 +33,6 @@ PLplot_Auxiliary, PLplot; --- COMMENT THIS LINE IF YOUR COMPILER DOES NOT INCLUDE THESE --- DEFINITIONS, FOR EXAMPLE, IF IT IS NOT ADA 2005 WITH ANNEX G.3 COMPLIANCE. ---with Ada.Numerics.Long_Real_Arrays; use Ada.Numerics.Long_Real_Arrays; @Ada_Is_2007_With_and_Use_Numerics@ -------------------------------------------------------------------------------- Modified: trunk/examples/ada/xthick30a.adb.cmake =================================================================== --- trunk/examples/ada/xthick30a.adb.cmake 2009-01-22 22:34:06 UTC (rev 9377) +++ trunk/examples/ada/xthick30a.adb.cmake 2009-01-23 09:13:27 UTC (rev 9378) @@ -33,9 +33,6 @@ PLplot_Auxiliary, PLplot; --- COMMENT THIS LINE IF YOUR COMPILER DOES NOT INCLUDE THESE --- DEFINITIONS, FOR EXAMPLE, IF IT IS NOT ADA 2005 WITH ANNEX G.3 COMPLIANCE. ---with Ada.Numerics.Long_Real_Arrays; use Ada.Numerics.Long_Real_Arrays; @Ada_Is_2007_With_and_Use_Numerics@ procedure xthick30a is Modified: trunk/examples/ada/xthick31a.adb.cmake =================================================================== --- trunk/examples/ada/xthick31a.adb.cmake 2009-01-22 22:34:06 UTC (rev 9377) +++ trunk/examples/ada/xthick31a.adb.cmake 2009-01-23 09:13:27 UTC (rev 9378) @@ -41,9 +41,6 @@ PLplot_Auxiliary, PLplot; --- COMMENT THIS LINE IF YOUR COMPILER DOES NOT INCLUDE THESE --- DEFINITIONS, FOR EXAMPLE, IF IT IS NOT ADA 2005 WITH ANNEX G.3 COMPLIANCE. ---with Ada.Numerics.Long_Real_Arrays; use Ada.Numerics.Long_Real_Arrays; @Ada_Is_2007_With_and_Use_Numerics@ -- This example mostly outputs text. As part of the PLplot testing regime, we This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |