Mail Archives: djgpp/1997/10/13/07:46:48
Chris Frolik (frolikcc AT indy DOT net) wrote:
: Then I tried typing the following command line:
: test *.c
: And I didn't get the output I expected -- It printed out all of the
: files in the directory with the extension ".C". I can see how this can
: be useful -- but what if I want to pass "*.c" literally as the first
: argument? (which I want to be able to do in a program I wrote). It
: seems to me this is impossible to do. Is this because of DJGPP, or the
: way DOS passes the command line?
It's because djgpp globs the command line like Unix shells do, expanding
wildcards automatically. If you want to use the parameter `*.c', you must
enclose it in quotes. Alternatively, you can #include <crt0.h> and define
your own globbing function which does nothing. For full details, please
see the FAQ or crt0.h itself.
--
George Foot <mert0407 AT sable DOT ox DOT ac DOT uk>
Merton College, Oxford
- Raw text -