comp.lang.ada
 help / color / mirror / Atom feed
From: courtel@cenatls.cena.dgac.fr (Nicolas Courtel)
Subject: Re: Interfacing Ada to Unix/execl var. arg. list function?
Date: Thu, 13 Oct 1994 13:31:38 GMT
Date: 1994-10-13T13:31:38+00:00	[thread overview]
Message-ID: <1994Oct13.133144.17088@cenatls.cena.dgac.fr> (raw)
In-Reply-To: Dale Stanbrough's message of 13 Oct 1994 07:44:37 GMT

>>>>> On 13 Oct 1994 07:44:37 GMT, Dale Stanbrough <dale@goanna.cs.rmit.edu.au> said:

|> I am currently trying to develop a simple Ada/Unix binding (not Posix!)
|> that will allow students to use the packages with a minimum of fuss.
|> (i.e. reading the Unix man page/Unix programming text would give them
|> a fair idea of how to use the Ada version).

I have written such a binding some time ago : it's called Paradise, is free
software, and you can get it from ftp.cenatls.cena.dgac.fr, in pub/export.
It has not been ported for Gnat yet, but I plan to do so when I have some time.

|> I've got stuck on how to implement Ada calls to the corresponding
|> variable parameter list C functions, specifically execl.

Here's the specification of Paradise's execv call (as execl requires a variable
number of parameters, I have found no clean binding to it):

   type PARAMETER is access STRING;
   type PARAMETER_ARRAY is array (NATURAL range <>) of PARAMETER;

   procedure EXECV (PATH: in STRING; ARGV: in PARAMETER_ARRAY);

An ASCII.nul suffix is added to all the strings in the body, and the C execv is
very happy with them.

For those who are interested, here's the README of Paradise:

--
Paradise is a set of Ada packages intended to provide an interface to the Unix
operating system, and more specifically to the communication routines, that
are accessed via file descriptors. It lets the Ada programmer use files, pipes,
and sockets, as well as signals, error codes, environment variables, etc...,
using an interface that looks as much as possible like the C interface.

Paradise supports multi-tasking: any input or output is blocking for the
calling task only, and not for the entire process.

Paradise is intended to be system-independant and compiler-independant; so far,
it works on four environments:
- SunOS 4.1 (Sparc) and SunAda (Verdix 6.1) compiler
- SunOS 4.1 (Sparc) and TeleSoft 4.1.1 compiler
- HP-UX (HP9000/700) and HP-Ada (Alsys) compiler
- HP-UX (HP9000/700) and Verdix 6.3d compiler

It is known not to work well on SunOS/Alsys, because of problems on signal
handlers;

For people who would like to port it to other environments, informations on
portability are displayed inside the code. A programmer's guide should appear
in future versions.

Send all comments, bug reports, patches to "paradise@cenatls.cena.dgac.fr"

Nicolas Courtel - December 1993

-- 
Nicolas Courtel - courtel@dgac.fr

>>>                    Inside every large program                     <<<
>>>             is a small program struggling to get out              <<<



  parent reply	other threads:[~1994-10-13 13:31 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1994-10-13  7:44 Interfacing Ada to Unix/execl var. arg. list function? Dale Stanbrough
1994-10-13  9:21 ` David Emery
1994-10-13 12:22 ` Robert Dewar
1994-10-13 17:37   ` Mark A Biggar
1994-10-13 18:46     ` Robert Dewar
1994-10-14 13:55   ` Norman H. Cohen
1994-10-13 13:31 ` Nicolas Courtel [this message]
1994-10-13 19:28 ` Tucker Taft
1994-10-14 13:55 ` Interfacing Ada to Unix/execl var ncohen
1994-10-17 18:18 ` Interfacing Ada to Unix/execl var. arg. li Bob Gilbert
1994-10-19  3:30   ` Interfacing Ada to Unix/execl var. arg. list function? Dale Stanbrough
1994-10-20 12:42     ` Interfacing Ada to Unix/execl var. arg Bob Gilbert
1994-10-20  4:18   ` Interfacing Ada to Unix/execl var. arg. li S M Ryan
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox