delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/06/11/02:46:53

Date: Wed, 11 Jun 1997 14:41:18 +0800 (GMT)
From: Orlando Andico <orly AT gibson DOT eee DOT upd DOT edu DOT ph>
To: Kappas Ioannis <giannisk AT delta DOT edu DOT gr>
cc: djgpp AT delorie DOT com
Subject: Re: BUG: DJGPP, argc and *
In-Reply-To: <199706110609.JAA19858@andromeda.delta.edu.gr>
Message-ID: <Pine.SGI.3.93.970611144044.1509A-100000@gibson.eee.upd.edu.ph>
MIME-Version: 1.0

On Wed, 11 Jun 1997, 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??
> 

The asterisk is expanded (globbed) automatically. This is because under
UNIX a * argument means all files (just like *.* means the same thing
under DOS).

-----------------------------------------------------------------------
Orlando Alcantara Andico
WWW:   http://www2.mozcom.com/~orly/           Email:   orly AT mozcom DOT com
ICBM:  14 deg. 30' N, 120 deg. 59' E           POTS:    (+632) 932-2385

- Raw text -


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