Mail Archives: djgpp/1999/09/21/05:25:15
In article <7s6rjn$gq7$1 AT nnrp1 DOT deja DOT com>, hank_heng AT hotmail DOT com wrote:
>Hello,
>
> I'm using DJGPP, and I notice that if I do something like this :
>
> myprog *.*
>
> *.* actually copy all available file name that found in that
>directory and store it in argv[1], argv[2], argv[3] ... and so on...
>
> I don't want this to happen, so how do I pass '*.*' over the command
>line and receive '*.*' in argv[1] instead of bunches of file names.
>
> Thanks For Reading This And Please Help Me Out. :)
>
>
>
>-Hank
See the FAQ (sections 16.1 and 16.2).
Summary: The function that expands the commandline is called
__crt0_glob_function() and is automagically linked in your program. If you
don't like this, you can simply provide your own version of that function that
does nothing:
#include <crt0.h>
char **__crt0_glob_function(char *)
{
return 0;
}
rest of your program.
--
Manni
- Raw text -