From: James Newsgroups: comp.os.msdos.djgpp Subject: Re: BUG: DJGPP, argc and * Date: Sat, 21 Jun 1997 13:50:20 +0800 Organization: Kewl Lines: 23 Message-ID: <33AB6B9C.30353127@bitsmart.com> References: <199706110609 DOT JAA19858 AT andromeda DOT delta DOT edu DOT gr> NNTP-Posting-Host: grunge169.nv.iinet.net.au Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk Kappas Ioannis wrote: > I think I've found a bug in DJGPP. When an argument in the command > line is > the character * the argc is 108 instead of 2. > consider this program: > main(int argc, char *argv[]) > { > printf("%d\n", argc); > return 0; > } > > when we call the program with the asterisk, e.g. "a *" the argc is > returning > 109 instead of 2. Is this normal or is this a bug?? Ok DJGPP treats command line arguments like unix/linux when u specify * it gets all the files in the current directory and puts them as args instead. When argc reported 109 or whatever this means that there was 108 files in the working directory.... get it??? D.