Date: Wed, 27 Nov 1996 13:13:33 +0200 (IST) From: Eli Zaretskii To: Jean-Gakl GRICOURT Cc: djgpp AT delorie DOT com Subject: Re: Readdir() function ? In-Reply-To: <329B32E8.793@snet.net> Message-Id: Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Tue, 26 Nov 1996, Jean-Gakl GRICOURT wrote: > - no argument -> memory fault. When you call a program with no arguments, argv[1] is a null pointer. While it is generally desirable that library functions be protected against such calamities, IMHO anybody who passes a null pointer to a library function is looking for trouble. For example, try something like ``strcpy (0, "You're gonna crash!")'' and watch the fun. > - arg="\" -> don't list the root of the disk. > - arg=".." -> don't list the root if ".." is really linked to the > root. These two work for me as you'd expect; they even simulate (the nonexistent) "." and ".." entries in the root directory. What version of DJGPP are you using? `readdir' has been changed in v2.01, so maybe you are using an old version?