comp.lang.ada
 help / color / mirror / Atom feed
From: Adam Beneschan <adam@irvine.com>
Subject: Re: DOS Options
Date: Wed, 19 Dec 2007 15:36:33 -0800 (PST)
Date: 2007-12-19T15:36:33-08:00	[thread overview]
Message-ID: <4c374a25-562c-4b8e-9770-07868bd88f15@e23g2000prf.googlegroups.com> (raw)
In-Reply-To: fkc7k9$2rf$1@jacob-sparre.dk

On Dec 19, 2:59 pm, "Randy Brukardt" <ra...@rrsoftware.com> wrote:
> "Gautier" <gaut...@fakeaddress.nil> 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



  reply	other threads:[~2007-12-19 23:36 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-05  3:34 DOS Options Charles H. Sampson
2007-12-05  5:15 ` Jeffrey Creem
2007-12-19 18:00   ` Charles H. Sampson
2007-12-19 19:40     ` Gautier
2007-12-19 22:59       ` Randy Brukardt
2007-12-19 23:36         ` Adam Beneschan [this message]
2007-12-20 22:15           ` Randy Brukardt
2007-12-19 22:47     ` Randy Brukardt
2007-12-21  0:39       ` Jeffrey R. Carter
2007-12-22  0:45         ` Randy Brukardt
2007-12-19 22:47     ` Randy Brukardt
2007-12-19 22:47     ` Randy Brukardt
2007-12-19 22:47     ` Randy Brukardt
2007-12-05 10:06 ` gautier_niouzes
2007-12-05 10:19 ` Stephen Leake
2007-12-05 14:51 ` Charles H. Sampson
2007-12-05 20:06 ` anon
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox