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,cf907209f066462e X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-10-16 07:02:11 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!opentransit.net!news.tele.dk!small.news.tele.dk!129.240.148.23!uio.no!ntnu.no!not-for-mail From: Preben Randhol Newsgroups: comp.lang.ada Subject: Re: How to port exit(s) from C to Ada Date: Wed, 16 Oct 2002 14:02:11 +0000 (UTC) Organization: Norwegian university of science and technology Message-ID: References: <3DA69C5B.A3B8F264@lml.ls.fi.upm.es> NNTP-Posting-Host: kiuk0152.chembio.ntnu.no X-Trace: tyfon.itea.ntnu.no 1034776931 10240 129.241.83.78 (16 Oct 2002 14:02:11 GMT) X-Complaints-To: usenet@itea.ntnu.no NNTP-Posting-Date: Wed, 16 Oct 2002 14:02:11 +0000 (UTC) User-Agent: slrn/0.9.7.4 (Linux) Xref: archiver1.google.com comp.lang.ada:29845 Date: 2002-10-16T14:02:11+00:00 List-Id: Manuel Collado wrote: > We are porting some legacy code from Modula2 + C to Ada. A basic library > module contains a procedure 'Terminate(status)' that forces termination > of the main program and returns a 'status' to the calling process. It is > implemented via the 'exit(status)' C system call. > > I vould like to implement it in pure Ada. So far I'm aware of > > Ada.Command_Line.Set_Exit_Status (Code : in Exit_Status); I think GNAT has something like this. You may want to check the source code of it. Preben -- Ada95 is good for you. http://libre.act-europe.fr/Software_Matters/02-C_pitfalls.pdf