Mail Archives: djgpp/1998/10/27/11:45:43
> Put simply, I've written (part of a) program to parse command line
> arguments, and it's running into trouble when I try to read the arguments
> "/?", "/??", "/???" and so on. For some reason, the argument is sometimes
> being converted into what seems like a directory name(!), so the program
> itself isn't reading the argument as "/?".
Yup. DJGPP uses a unix-based compiler, and applies unix-style
wildcard expansion to command-line arguments. You can stop this by
reading the libc reference guide[1] and providing your own "glob
function" that does no expansion. You can use glob() to later expand
wildcards that you need expanded.
Note that the "unix standard" for options uses dashes, not slashes,
and the one for help is "-h" instead of "/?".
[1] http://www.delorie.com/djgpp/doc/libc-2.01/libc_106.html
- Raw text -