Mail Archives: djgpp/1999/09/15/22:03:33
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 |
+--------------------------------------------------------------------+
- Raw text -