comp.lang.ada
 help / color / mirror / Atom feed
From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: DOS Options
Date: Thu, 20 Dec 2007 16:15:42 -0600
Date: 2007-12-20T16:15:42-06:00	[thread overview]
Message-ID: <fkepbm$ija$1@jacob-sparre.dk> (raw)
In-Reply-To: 4c374a25-562c-4b8e-9770-07868bd88f15@e23g2000prf.googlegroups.com

"Adam Beneschan" <adam@irvine.com> wrote in message
news:4c374a25-562c-4b8e-9770-07868bd88f15@e23g2000prf.googlegroups.com...
> 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.

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.





  reply	other threads:[~2007-12-20 22:15 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
2007-12-20 22:15           ` Randy Brukardt [this message]
2007-12-19 22:47     ` 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-21  0:39       ` Jeffrey R. Carter
2007-12-22  0:45         ` 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