delorie.com/djgpp/bugs/show.cgi   search  
Bug 000306

When Created: 12/04/1999 23:00:29
Against DJGPP version: 2.02
By whom: mparry@unf.edu
Abstract: Argv and "..."
Try this:

int main(int argc,char *argv[])
{
int i;
for (i = 0; i < argc; i++)
   printf("\n%s", argv[i]);
return 0;
}

Simple enough.  Well, compile it and execute it with
the single string "..." (no quotes) on the command line.  You should see:

<whatever you named your executable>
.

In other words, where are the other two dots?  I tried the same bit of code with
Mingw32 (GCC 2.95.2) to determine if it was DOS 7 or DJGPP that was doing this.
It wasn't DOS, since the Mingw32 version worked OK...  (Pun intended)  At the time,
I was running under a Win95 (Windows 95. [Version 4.00.950]) DOS shell on a P166.
I first encountered this bug using GCC 2.8.1, and it's still there with 2.95.1.
Anyhow, thanks for making DJGPP; even with small bugs, it is great!

Note added: 12/16/1999 12:00:33
By whom: broeker@physik.rwth-aachen.de
That's not a bug, but a feature. To see what it does, execute
the dest from your c:\ directory, i.e.:

	c:
	cd \
	d:\some\dir\yourtest ...

You'll get a list of all the directories and subdirectories of c:\ .
This is a feature of the support for filename globbing DJGPP offers. 
Sort of a poor man's 'find':

	grep size_t c:/djgpp/include/.../*.h

to search for 'size_t' in all of DJGPP include files

Workaround added: 12/16/1999 12:00:00
By whom: broeker@physik.rwth-aachen.de
Enclose the ... into quotes "...", and they won't be interpreted as a filename.

Closed on 12/16/1999 12:00:06: Non-bug: unrecognized feature.
By whom: broeker@physik.rwth-aachen.de



  webmaster     delorie software   privacy  
  Copyright © 2010   by DJ Delorie     Updated Jul 2010