Mail Archives: djgpp/1998/01/29/02:19:01
On Wed, 28 Jan 1998 20:41:40 -0800 in comp.os.msdos.djgpp Ian Perez
<fish AT discover DOT net> wrote:
: If argv[1] has wildcards like ? and *, argv[1] will be the first
: filename matching that criteria. How can I get it so argv[1] will
: actually BE what the second argument is??
DJGPP performs command-line globbing automatically, like Unix shells
do. This means that if you give a wildcard on the command line it
will be expanded into the list of files matching the wildcard -- so in
your case argv[1] would be the first, argv[2] the second, etc.
You can disable this in one of two ways:
a) Quote the parameter, for example: foo "*.exe"
This is something the user must do, though, not the programmer.
b) Override the standard globbing routines djgpp provides with ones
that don't do anything.
For more information on the second of these please see the include
file `crt0.h' in your `include' directory, and the FAQ section 16.2.
Sections 16.1 and 16.3 are also relevant here.
--
george DOT foot AT merton DOT oxford DOT ac DOT uk
- Raw text -