Mail Archives: djgpp/1998/01/11/10:45:47
Richard Sim wrote:
>
> Hi everyone, I dunno if this is a bug, a 'feature' or my botchyness...
> When you have a program that takes command line args, and since DJGPP
> automatically expands wildcards, if your running in Win95, and have
> some files with long filenames that match the wildcards, DJGPP always
> gives you the long file name, not the short one, even when LFN's are
> disabled, so if you call something like fopen with the command line
> argument, the file can't be found.
this indeed seems like a bug. with lfn disabled in djgpp.env (+lfn=n),
the following program:
#include <stdio.h>
int main(int argc, char *argv[])
{
int i;
for(i=0; i<argc; i++)
puts(argv[i]);
return;
}
produced:
D:\djgpp\C\TEST> testlfn *.c
d:/djgpp/c/test/testlfn.exe
bernoulli.c
simpldtst.c
simplw.c
testlfn.c
tt.c
then i did (with lfn still disabled in djgpp.env)
D:\djgpp\C\TEST> set lfn=n
D:\djgpp\C\TEST> testlfn *.c
d:/djgpp/c/test/testlfn.exe
bernou~1.c
simpld~1.c
simplw.c
testlfn.c
tt.c
incidentally, with set lfn=n, +lfn=y, you still get the short names.
it seems like a bug in the startup code.
(by the way, if i run the following code with +lfn=n set in djgpp.env
but not in the environment, i do get lfn=n output:
#include <stdio.h>
int main(int argc, char *argv[], char* envp[])
{
int i;
for(i=0; envp[i] != NULL; i++)
puts(envp[i]);
for(i=0; i<argc; i++)
puts(argv[i]);
return;
}
)
--
----------------------------------------------------------------------
A. Sinan Unur
Department of Policy Analysis and Management, College of Human Ecology,
Cornell University, Ithaca, NY 14853, USA
mailto:sinan DOT unur AT cornell DOT edu
http://www.people.cornell.edu/pages/asu1/
- Raw text -