From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,463c5796782db6d8 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-04-11 01:11:32 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!feed.news.nacamar.de!newsfeed.stueberl.de!news-FFM2.ecrc.net!news.iks-jena.de!not-for-mail From: Lutz Donnerhacke Newsgroups: comp.lang.ada Subject: Re: [Spark] Arrays of Strings Date: Fri, 11 Apr 2003 08:11:32 +0000 (UTC) Organization: IKS GmbH Jena Message-ID: References: <1ec946d1.0304090942.3106b4e4@posting.google.com> <1ec946d1.0304100609.52b0fac0@posting.google.com> NNTP-Posting-Host: taranis.iks-jena.de X-Trace: branwen.iks-jena.de 1050048692 5509 217.17.192.37 (11 Apr 2003 08:11:32 GMT) X-Complaints-To: usenet@iks-jena.de NNTP-Posting-Date: Fri, 11 Apr 2003 08:11:32 +0000 (UTC) User-Agent: slrn/0.9.7.4 (Linux) Xref: archiver1.google.com comp.lang.ada:36082 Date: 2003-04-11T08:11:32+00:00 List-Id: * Chad R. Meiners wrote: > "Lutz Donnerhacke" wrote in message >> Right, but I'm looking for the Spark frontend of this hide clause. ); > > Couldn't you just create an inlined procedure for each literal call to > execv? execv(cmd, arg0); execv(cmd, arg0, arg1); execv(cmd, arg0, arg1, arg2); ... Yep, this is possible, but looks insane. I'm working on a solution like: procedure t is argsstring : constant C_String_Collection := -- limited type "/usr/bin/sh" & ASCII.NUL & "-c" & ASCII.NUL & "xxx" & ASCII.NUL; args : C_String_Array; -- contains address of collection envstring : Enviroment_Collection(1 .. 400); env : Enviroment; begin Array_From_Collection(argsstring, args); Bind_Enviroment(envstring, env); Add_Enviroment("HOME", "/var/home/lutz"); Add_Enviroment("USER", "lutz"); execve(To_Fullpath("/usr/bin/sh"), args, env); end t;