Subject: Re: Problems with mingw32 GCC 2.8.0 !!!
From: [email-masked] (Benjamin Riefenstahl)

29 Jan 1998 06:27:27 -0800
Message-ID: <[email-masked]>
References: <Pine.SOL.3.95.980128150708.11882A-100000@gort>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
To: Fabio Vignoli <[email-masked]>
Cc: Jan-Jaap van der Heijden <[email-masked]>,
        GNU-Win32 list <[email-masked]>,
        Colin Peters <[email-masked]>

Fabio Vignoli wrote:
> Just to joke:
> try in a MSDOS shell on windows NT : cd Program Files (it works)
>                                      cd "Program Files" (it works)
>                                      dir Program Files (DOES NOT WORK!!!)
>                                      dir "Program Files" (it works)
> Does anybody can tell me why?

;-)

If I had to guess I'd say it's just programmer's laziness and probably
backwards compatibility afterwards. You have to remember that in
DOS/Windows the command line is not parsed by the shell but by the
programs themselfs. That makes for a lot of inconsistencies between
applications and commands and seemingly even between command.com
built-ins.

The story probably was: The cd command has no options (or at least it
didn't use to), so the programmer of command.com did not bother to parse
the command line, he just took it and used it as a whole. In later
versions he added code to strip the quotes for compatibility with other
commands but he didn't use the full command-line parser, because that
might not have been backwards compatible with the use of the cd command
in older batch scripts. The dir command OTOH has a lot of options, so
the command line *has* to be parsed and after parsing Program Files
becomes two arguments.

All just guesswork, of course ;-)
======================================
Benjamin Riefenstahl ([email-masked])
Crocodial Communications EntwicklungsGmbH
Ophagen 16a, D-20257 Hamburg, Germany
-
For help on using this list (especially unsubscribing), send a message to
"[email-masked]" with one line of text: "help".