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=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI autolearn=unavailable autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,92af3752b38a0131 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-07-10 13:03:23 PST Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!t-online.de!grolier!freenix!enst!enst.fr!not-for-mail From: "M. A. Alves" Newsgroups: comp.lang.ada Subject: Re: Unix Executables Date: Tue, 10 Jul 2001 21:02:23 +0000 (GMT) Organization: ENST, France Sender: comp.lang.ada-admin@ada.eu.org Message-ID: Reply-To: comp.lang.ada@ada.eu.org NNTP-Posting-Host: marvin.enst.fr Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Trace: avanie.enst.fr 994795402 14864 137.194.161.2 (10 Jul 2001 20:03:22 GMT) X-Complaints-To: usenet@enst.fr NNTP-Posting-Date: Tue, 10 Jul 2001 20:03:22 +0000 (UTC) To: Return-Path: X-X-Sender: In-Reply-To: Errors-To: comp.lang.ada-admin@ada.eu.org X-BeenThere: comp.lang.ada@ada.eu.org X-Mailman-Version: 2.0.4 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: comp.lang.ada mail<->news gateway List-Unsubscribe: , List-Archive: Errors-To: comp.lang.ada-admin@ada.eu.org X-BeenThere: comp.lang.ada@ada.eu.org Xref: archiver1.google.com comp.lang.ada:9729 Date: 2001-07-10T21:02:23+00:00 On 10 Jul 2001, Matt Raikes wrote: > Is there a way to call a Unix executable(such as gzip) from within my code. Many ways. Function Posix.System, for example. ----- package Posix is function System(Command: String) return Integer; end Posix; ----- with Interfaces.C; use Interfaces.C; with Interfaces.C.Strings; use Interfaces.C.Strings; package body Posix is function C_System(Command: chars_ptr) return int; pragma Import(C, C_System, "system"); function System(Command: String) return Integer is C_Command : aliased char_array := To_C(Command); begin return(Integer(C_System(To_Chars_Ptr(C_Command'Unrestricted_Access)))); end System; end Posix; -- , M A R I O data miner, LIACC, room 221 tel 351+226078830, ext 121 A M A D O Rua Campo Alegre, 823 fax 351+226003654 A L V E S P-4150 PORTO, Portugal mob 351+939354002