Mail Archives: djgpp-workers/1999/09/29/14:58:08
Eli Zaretskii wrote:
> On Tue, 28 Sep 1999, Laurynas Biveinis wrote:
> > 3) If LFN is converted to SFN, which version (short or long) goes to argv[0]?
>
> What is passed to DOS is the SFN, since 214B requires it. What the
> invoked program gets in its argv[0] (via !proxy), if it is a DJGPP
> program, is the original LFN file name with its full path prepended.
> A non-DJGPP program gets the SFN, since it has no other means of
> getting at the command line except as passed by DOS.
If this above is true, then could you explain me what I'm doing wrong here:
file VeryLongName.c :
-----------
#include <stdio.h>
int main(int argc, char *argv[])
{
printf("%s\n", argv[0]);
return 0;
}
----------
file test.c:
----------
#include <stdlib.h>
int main(void)
{
system("VeryLongName.exe");
return 0;
}
----------
When I call test, I see:
c:/djgpp/programs/djgpp/verylong.exe
and not
c:/djgpp/programs/djgpp/VeryLongName.exe
What I'm doing wrong here?
Laurynas Biveinis
- Raw text -