Hello Alan!
This is the updated patch that should take care of the problems with
the examples in ada as well (I only had to correct four of the
examples). After applying the patch, I built plplot with ada binding
turned on, with DBUILD_TEST=ON and did a "make VERBOSE=1 test_ada_psc"
just as you asked. The package, along with all the examples now builds
fine. The examples that needed correcting are:
x01a.adb
x02a.adb
xthick01a.adb
xthick02a.adb
Please let me know if this is okay.
--
Atri
-----Original Message-----
From: Alan W. Irwin <ir...@beluga.phys.uvic.ca>
To: Atri <badshah...@aim.com>
Cc: Jerry <lancebo...@qwest.net>; hezekiahcarty
<hezekiahca...@users.sourceforge.net>; PLplot development list
<plplot-devel@lists.sourceforge.net>; Andrew Ross
<andrewr...@users.sourceforge.net>; hwang.dev <hwang....@gmail.com>
Sent: Mon, Mar 18, 2013 10:59 pm
Subject: Re: [Plplot-devel] Should line width thinner than 1.0 be
supported?
On 2013-03-18 15:49-0400 Atri wrote:
Hi!
To get the ada binding build successfully with the latest svn trunk
(12298)
(at least on openSUSE 12.2 and higher), I used the attached patch.
Please
have a look and let me know what you think.
Hi Atri:
I think that your patch does the job in the Ada bindings, but it
appears you
need to make similar changes in some/all of the Ada examples.
The error message I get here is
x01a.adb:101:17: expected type "Standard.Long_Float"
x01a.adb:101:17: found type universal integer
x01a.adb:103:17: expected type "Standard.Long_Float"
x01a.adb:103:17: found type universal integer
To verify this for yourself, try the following:
Configure with the CMake option -DBUILD_TEST=ON
Then after cmake is run, run the following target in
the build tree:
make VERBOSE=1 test_ada_psc >& test_ada_psc.out
Thanks for your patch, and I look forward to seeing the complete
version that gets rid of all errors in the test_ada_psc target. :-)
Alan
__________________________
Alan W. Irwin
Astronomical research affiliation with Department of Physics and
Astronomy,
University of Victoria (astrowww.phys.uvic.ca).
Programming affiliations with the FreeEOS equation-of-state
implementation for stellar interiors (freeeos.sf.net); the Time
Ephemerides project (timeephem.sf.net); PLplot scientific plotting
software package (plplot.sf.net); the libLASi project
(unifont.org/lasi); the Loads of Linux Links project (loll.sf.net);
and the Linux Brochure Project (lbproject.sf.net).
__________________________
Linux-powered Science
__________________________
Index: plplot/bindings/ada/plplot.adb
===================================================================
--- plplot.orig/bindings/ada/plplot.adb
+++ plplot/bindings/ada/plplot.adb
@@ -71,7 +71,7 @@ package body PLplot is
-- Set default pen width. Docs don't say, so I'll make it 1.
-- I could make this depend on the type of outut device used.
- Default_Pen_Width : constant Integer := 1;
+ Default_Pen_Width : constant Long_Float := 1.0;
procedure Set_Default_Pen_Width is
begin
Set_Pen_Width(Default_Pen_Width);
@@ -3312,7 +3312,7 @@ package body PLplot is
-- Set pen width.
-- plwidth
- procedure Set_Pen_Width(Pen_Width : Integer) is
+ procedure Set_Pen_Width(Pen_Width : Long_Float) is
begin
plwidth(Pen_Width);
end Set_Pen_Width;
Index: plplot/bindings/ada/plplot.ads
===================================================================
--- plplot.orig/bindings/ada/plplot.ads
+++ plplot/bindings/ada/plplot.ads
@@ -2104,7 +2104,7 @@ package PLplot is
-- Set pen width.
-- plwidth
- procedure Set_Pen_Width(Pen_Width : Integer);
+ procedure Set_Pen_Width(Pen_Width : Long_Float);
-- Set up world coordinates of the viewport boundaries (2d plots).
Index: plplot/bindings/ada/plplot_traditional.adb
===================================================================
--- plplot.orig/bindings/ada/plplot_traditional.adb
+++ plplot/bindings/ada/plplot_traditional.adb
@@ -70,7 +70,7 @@ package body PLplot_Traditional is
-- Set default pen width. Docs don't say, so I'll make it 1.
-- I could make this depend on the type of outut device used.
- Default_Pen_Width : constant Integer := 1;
+ Default_Pen_Width : constant Long_Float := 1.0;
procedure Set_Default_Pen_Width is
begin
plwidth(Default_Pen_Width);
@@ -3147,7 +3147,7 @@ package body PLplot_Traditional is
-- Set pen width.
- procedure plwidth(Pen_Width : Integer) is
+ procedure plwidth(Pen_Width : Long_Float) is
begin
PLplot_Thin.plwidth(Pen_Width);
end plwidth;
Index: plplot/bindings/ada/plplot_traditional.ads
===================================================================
--- plplot.orig/bindings/ada/plplot_traditional.ads
+++ plplot/bindings/ada/plplot_traditional.ads
@@ -1932,7 +1932,7 @@ package PLplot_Traditional is
-- Set pen width.
- procedure plwidth(Pen_Width : Integer);
+ procedure plwidth(Pen_Width : Long_Float);
-- Set up world coordinates of the viewport boundaries (2d plots).
Index: plplot/examples/ada/x01a.adb
===================================================================
--- plplot.orig/examples/ada/x01a.adb
+++ plplot/examples/ada/x01a.adb
@@ -98,9 +98,9 @@ procedure x01a is
-- Draw the line
plcol0(3);
- plwidth(2);
+ plwidth(2.0);
plline(x, y);
- plwidth(1);
+ plwidth(1.0);
end plot2;
Index: plplot/examples/ada/x02a.adb
===================================================================
--- plplot.orig/examples/ada/x02a.adb
+++ plplot/examples/ada/x02a.adb
@@ -62,14 +62,14 @@ procedure x02a is
vmin := 0.1;
vmax := 0.9;
for j in 0..2 loop
- plwidth(j + 1);
+ plwidth(Long_Float(j + 1));
plvpor(vmin, vmax, vmin, vmax);
plwind(0.0, 1.0, 0.0, 1.0);
plbox("bc", 0.0, 0, "bc", 0.0, 0);
vmin := vmin + 0.1;
vmax := vmax - 0.1;
end loop;
- plwidth(1);
+ plwidth(1.0);
plptex(0.5, 0.5, 1.0, 0.0, 0.5, Trim(Integer'image(i), Left));
end loop;
end draw_windows;
Index: plplot/examples/ada/xthick01a.adb
===================================================================
--- plplot.orig/examples/ada/xthick01a.adb
+++ plplot/examples/ada/xthick01a.adb
@@ -98,9 +98,9 @@ procedure xthick01a is
-- Draw the line
Set_Pen_Color(Green);
- Set_Pen_Width(2);
+ Set_Pen_Width(2.0);
Draw_Curve(x, y);
- Set_Pen_Width(1);
+ Set_Pen_Width(1.0);
end plot2;
Index: plplot/examples/ada/xthick02a.adb
===================================================================
--- plplot.orig/examples/ada/xthick02a.adb
+++ plplot/examples/ada/xthick02a.adb
@@ -62,14 +62,14 @@ procedure xthick02a is
vmin := 0.1;
vmax := 0.9;
for j in 0..2 loop
- Set_Pen_Width(j + 1);
+ Set_Pen_Width(Long_Float(j + 1));
Set_Viewport_Normalized(vmin, vmax, vmin, vmax);
Set_Viewport_World(0.0, 1.0, 0.0, 1.0);
Box_Around_Viewport("bc", 0.0, 0, "bc", 0.0, 0);
vmin := vmin + 0.1;
vmax := vmax - 0.1;
end loop;
- Set_Pen_Width(1);
+ Set_Pen_Width(1.0);
Write_Text_World(0.5, 0.5, 1.0, 0.0, 0.5, Trim(Integer'image(i), Left));
end loop;
end draw_windows;
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel