www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1994/10/05/04:49:52

To: "Young U. Ryu" <ryoung AT utdallas DOT edu>
Cc: djgpp AT sun DOT soe DOT clarkson DOT edu
Subject: Re: DJGPP Bug?
Date: Wed, 05 Oct 94 07:36:24 +0200
From: eliz AT is DOT elta DOT co DOT il

>  C:\TEST> dummy \*
>  \ai                         <- This One !!!
>  C:\TEST> dummy \*a
>  \*a
>
> I tried other C compilers (including EMX/GCC). They returned:
>
>  C:\TEXT> dummy \*
>  \*

Can't help you with explaining the EMX output (I don't know how
it works) but everything else makes good sense.  I presume there
is a file or directory called c:/ai, right?  Under DJGPP, command
line globbing doesn't treat backslash `\\' as escape (quote)
character, because somebody might use it as directory separator,
e.g., ``fgrep some-string c:\test\myfile''.  Therefore, the `*' gets
expanded.  You don't have in c:/ files which end with `a', so
``\*a'' fails to expand and is delivered to your program verbatim.
To quote backslash under DJGPP, use "", like this:

      C:\TEST> dummy "\*"

which should print `\*', or dummy "*" which should print `*', as
does \* under Unix.

Alternatively, you could suppress globbing by adding ``noglob'' to your
GO32 environment variable, but that would be too much of a lossage.

	Eli Zaretskii

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019