www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/10/28/12:35:19.1

From: foggy AT flashnet DOT KILLTHIS DOT it (Fogbank)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: /? command line args being altered by DJGPP
Date: Wed, 28 Oct 1998 17:39:14 GMT
Organization: Customer of Flashnet S.p.A. - http://www.flashnet.it
Lines: 17
Message-ID: <3637559b.9217131@news.flashnet.it>
References: <3635f355 DOT 0 AT scooby DOT nildram DOT co DOT uk>
NNTP-Posting-Host: ppp-2.bo.flashnet.it
X-Trace: news.flashnet.it 909596022 7060 194.247.164.82 (28 Oct 1998 17:33:42 GMT)
X-Complaints-To: abuse AT flashnet DOT it
NNTP-Posting-Date: 28 Oct 1998 17:33:42 GMT
X-Newsreader: Forte Free Agent 1.11/32.235
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

On Tue, 27 Oct 1998 16:23:07 -0000, "Graeme Fenwick"
<gfenwick AT BYESPAMprimex DOT co DOT uk> wrote:

>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 "/?".

"It's not a bug, it's an undocumented feature" :)

No, really, it's a feature and it's documented. DJGPP does Unix-style
wildcard expansion of the command line automatically. If you don't
want this behaviour, simply define a __crt0_glob_function() which does
nothing but return NULL in one of your source files. It also reduces
the executable size quite a bit. See help for _crt0_glob_function()
prototype.

- Raw text -


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