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!news4.google.com!feeder1-2.proxad.net!proxad.net!feeder1-1.proxad.net!club-internet.fr!feedme-small.clubint.net!nuzba.szn.dk!news.jacob-sparre.dk!pnx.dk!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: DOS Options Date: Thu, 20 Dec 2007 16:15:42 -0600 Organization: Jacob's private Usenet server Message-ID: References: <1i8m324.g6pon43ql1ogN%csampson@inetworld.net> <1i9d4ab.twgszk4zp5evN%csampson@inetworld.net> <476973a3$1_5@news.bluewin.ch> <4c374a25-562c-4b8e-9770-07868bd88f15@e23g2000prf.googlegroups.com> NNTP-Posting-Host: static-69-95-181-76.mad.choiceone.net X-Trace: jacob-sparre.dk 1198188726 19050 69.95.181.76 (20 Dec 2007 22:12:06 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Thu, 20 Dec 2007 22:12:06 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1914 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1914 Xref: g2news1.google.com comp.lang.ada:19016 Date: 2007-12-20T16:15:42-06:00 List-Id: "Adam Beneschan" wrote in message news:4c374a25-562c-4b8e-9770-07868bd88f15@e23g2000prf.googlegroups.com... > 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. Fascinating; never noticed that one. I doubt anything much uses it, though, because it isn't supported on Windows 95/98/ME, so any compiler runtime that used it would have to be almost brand-new. (It would have been nasty to make programs that don't run on older Windows systems just to use a function that is easy to write yourself. Not as big of an issue today, but I doubt compiler vendors are rewriting their runtime to purposely break something that previously worked!) Randy.