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-Thread: 103376,502b8ae4630fba59 X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!postnews.google.com!e23g2000prf.googlegroups.com!not-for-mail From: Adam Beneschan Newsgroups: comp.lang.ada Subject: Re: DOS Options Date: Wed, 19 Dec 2007 15:36:33 -0800 (PST) Organization: http://groups.google.com Message-ID: <4c374a25-562c-4b8e-9770-07868bd88f15@e23g2000prf.googlegroups.com> References: <1i8m324.g6pon43ql1ogN%csampson@inetworld.net> <1i9d4ab.twgszk4zp5evN%csampson@inetworld.net> <476973a3$1_5@news.bluewin.ch> NNTP-Posting-Host: 66.126.103.122 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: posting.google.com 1198107393 15651 127.0.0.1 (19 Dec 2007 23:36:33 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Wed, 19 Dec 2007 23:36:33 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: e23g2000prf.googlegroups.com; posting-host=66.126.103.122; posting-account=duW0ogkAAABjRdnxgLGXDfna0Gc6XqmQ User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.7.12) Gecko/20050922 Fedora/1.7.12-1.3.1,gzip(gfe),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:19012 Date: 2007-12-19T15:36:33-08:00 List-Id: On Dec 19, 2:59 pm, "Randy Brukardt" wrote: > "Gautier" wrote in message > > news:476973a3$1_5@news.bluewin.ch... > ... > > > Your 3.15p is certainly the Windows version, and what you are seeing is a > Win32 > > console output. Indeed, you need to congratulate Microsoft which decided > to > > parse and separate the arguments in Win32 in a fashion consistent with > DOS - > > adding the parsing of filenames containing spaces, enclosed by "". > > Ada.Command_Line.Argument(i) just gives the "ith" argument from the > system, as > > the system wants to give it, that's it. > > I have no idea what you are talking about. Both MS-DOS and Win32 only > provide a single string as the result of the command line -- the system > provides no parsing whatsoever. For Win32, the function is GetCommandLine. > In DOS, you had to grab the string from the memory of your executable > process -- there isn't even a function to get it. Windows does appear to have a CommandLineToArgvW function that parses the command line (or whatever string you give it). I don't know whether GNAT uses it. I'm pretty sure that not all C compilers use it---the MINGW32 version, I believe, does its own parsing, in whatever startup routine is linked into the program before main() is called. -- Adam