Re: [Plplot-devel] Vastly improved configuration of Ada interface and examples for PLplot. Please test!

2007-03-01 Thread Alan W. Irwin
On 2007-02-28 19:34-0700 Jerry wrote:

 So--I recommend just renaming all the example files to x??a.adb and
 letting them run as standalones, and eliminating the x??.adb and
 x??.ads naming level completely. That was my intention originally but
 I see that I forgot to adopt that naming convention. I can take care
 of this.

Hi Jerry:

I have just tried this, but it does not work for me.  gnatmake compiles
x01.adb without problems, but it did not bind or link it. (I tried this
experiment for the original source code you sent me before the
reorganization that occurred in the CVS version just to be sure the problem
was not an artifact of that reorganization)

[EMAIL PROTECTED] gnatmake x01.adb
gcc-3.3 -c x01.adb
gcc-3.3 -c plplot.adb
gcc-3.3 -c plplotthin.adb

If I attempt to force it with the
-b option, gnatmake generates the following error message:

[EMAIL PROTECTED] gnatmake -b x01.adb
gnatbind -x x01.ali
error: x01.ali does not contain a unit that can be a main program
gnatmake: *** bind failed.

You should be able to easily verify this problem for yourself.
If there is some simple change that can be made to x01.adb so that it is
suitable for a main program please send it to me. I too would prefer to
eliminate the separate driver programme for each example if that is
possible. Two files per example is preferred to three files per example.

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); PLplot scientific plotting software
package (plplot.org); the Yorick front-end to PLplot (yplot.sf.net); the
Loads of Linux Links project (loll.sf.net); and the Linux Brochure Project
(lbproject.sf.net).
__

Linux-powered Science
__

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel


Re: [Plplot-devel] Vastly improved configuration of Ada interface and examples for PLplot. Please test!

2007-03-01 Thread Alan W. Irwin
On 2007-03-01 09:40-0800 Alan W. Irwin wrote:

 On 2007-02-28 19:34-0700 Jerry wrote:

 So--I recommend just renaming all the example files to x??a.adb and
 letting them run as standalones, and eliminating the x??.adb and
 x??.ads naming level completely. That was my intention originally but
 I see that I forgot to adopt that naming convention. I can take care
 of this.

 Hi Jerry:

 I have just tried this, but it does not work for me.  gnatmake compiles
 x01.adb without problems, but it did not bind or link it.
 [...]Two files per example is preferred to three files per example.

Hi Jerry:

Never mind, I figured it out.  (I had to remove the package body statements
from the standalone versions). A side benefit is a spec file is not needed.
Thus, we are now reduced to one standalone source file (x??a.adb) per
example.  I just committed all my changes to CVS.

ctest --tests-regex ada

works without run-time errors and creates postscript results (x01a.ps and
x10a.ps) in the test subdirectory. x01a.ps is identical to x01c.ps (the
equivalent C result) and similarly for x10a.ps and x10c.ps.
However, that was because I replaced
-plbox(bc, 0.0, 0, bc, 0.0, 0);
+Box_Around_Viewport(TUB(bc), 0.0, 0, TUB(bc), 0.0, 0);

If I use plbox rather than Box_Around_Viewport, then the result has
extraneous tick marks. I don't understand the cause of this problem.  The
same example has a call to plptex with another character array, and that
works without problems.  I have also carefully compared how plptex and plbox
are set up in plplotthin.ads, and I cannot spot anything. I also tried the
TUB(bc) in the argument list for plbox, but the compiler complained about
something being inconsistent before erroring out so I dropped it.

This marks the end of the initial intense phase of my getting Ada supported
under CMake for PLplot.  We have made a good start, and the way forward is
clear.

* All developers should check the Ada aspects of the CMake build system on
their platform of choice.  Simply install the gnat extension to gcc (the
gnat-4.0 package does this on Ubuntu Dapper), use the -DENABLE_ada and
-DBUILD_TEST=ON cmake options, and run ctest --tests-regex ada after the
make command.

* Jerry needs to sort out the existing issues (plparseopts and plbox) with
the thin API before we move forward with filling in the rest of the standard
examples in the thin API (which may well turn up other API issues).

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); PLplot scientific plotting software
package (plplot.org); the Yorick front-end to PLplot (yplot.sf.net); the
Loads of Linux Links project (loll.sf.net); and the Linux Brochure Project
(lbproject.sf.net).
__

Linux-powered Science
__

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel


Re: [Plplot-devel] Vastly improved configuration of Ada interface and examples for PLplot. Please test!

2007-03-01 Thread Jerry

On Mar 1, 2007, at 1:18 PM, Alan W. Irwin wrote:

 On 2007-03-01 09:40-0800 Alan W. Irwin wrote:

 On 2007-02-28 19:34-0700 Jerry wrote:

 So--I recommend just renaming all the example files to x??a.adb and
 letting them run as standalones, and eliminating the x??.adb and
 x??.ads naming level completely. That was my intention originally  
 but
 I see that I forgot to adopt that naming convention. I can take care
 of this.

 Hi Jerry:

 I have just tried this, but it does not work for me.  gnatmake  
 compiles
 x01.adb without problems, but it did not bind or link it.
 [...]Two files per example is preferred to three files per example.

 Hi Jerry:

 Never mind, I figured it out.  (I had to remove the package body  
 statements
 from the standalone versions). A side benefit is a spec file is not  
 needed.
 Thus, we are now reduced to one standalone source file (x??a.adb) per
 example.  I just committed all my changes to CVS.

Yes--sorry for my slow response. You are now an expert Ada programmer  
8^).


 * Jerry needs to sort out the existing issues (plparseopts and  
 plbox) with
 the thin API before we move forward with filling in the rest of the  
 standard
 examples in the thin API (which may well turn up other API issues).

OK.

Jerry


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel