From: Bruce Baumann Newsgroups: comp.os.msdos.djgpp Subject: Re: Command line parameters Date: Wed, 15 Sep 1999 13:16:56 -0700 Organization: AG Communication Systems Lines: 43 Message-ID: <37DFFEB8.D89EE9D@agcs.com> References: <37DFDE6C DOT CF7B3B8B AT netvigator DOT com> NNTP-Posting-Host: baumannb-nt4.agcs.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 4.5 [en] (WinNT; U) X-Accept-Language: en,es To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com I believe DJGPP will automatically assume that any command line arguement that does not begin with a dash ('-') is interpreted as a filespec, and DJGPP will automatically expand it into a list of file names, modifying argc and argv accordingly. I don't know if this can be modified without modifying and recompiling the DJGPP source code. "NG Chi Fai, John" wrote: > Hello all, > > I have a program that take command line parameters. > > int main(int argc, char * argv) { } > > When I put ".\somedir\*.*" as the parameter, argc is not 2, but can be > anything, say, 3 if I have 3 files in the "somedir", and the parameters > will be: > > .\somedir\file1.sth > .\somedir\file2.sth > .\somedir\file3.sth > > I think it is a little bit weird. > > I'm using DJGPP with EGCS. > > Please advise how anything I can do such that I only receive 1 > paramenter ".\somedir\*.*" > > Thanks in advance. > > NG Chi Fai -- +--------------------------------------------------------------------+ | Bruce J. Baumann AG Communication Systems | | Phone: 623-582-7012 A Subsidiary of Lucent Technologies | | Fax: 623-581-4574 P.O. Box 52179 | | E-mail: baumannb AT agcs DOT com 2500 W. Utopia Rd. | | Web: http://www.agcs.com Phoenix, AZ 85072-2179 | +--------------------------------------------------------------------+