Date: Tue, 27 Oct 1998 11:44:06 -0500 (EST) Message-Id: <199810271644.LAA05516@indy.delorie.com> From: DJ Delorie To: djgpp AT delorie DOT com In-reply-to: <3635f355.0@scooby.nildram.co.uk> (gfenwick@BYESPAMprimex.co.uk) Subject: Re: /? command line args being altered by DJGPP Reply-To: djgpp AT delorie DOT com > 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