delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2003/06/28/01:57:30

Date: Sat, 28 Jun 2003 08:51:14 +0300
From: "Eli Zaretskii" <eliz AT elta DOT co DOT il>
Sender: halo1 AT zahav DOT net DOT il
To: bdeck AT lycos DOT co DOT uk
Message-Id: <1659-Sat28Jun2003085113+0300-eliz@elta.co.il>
X-Mailer: emacs 21.3.50 (via feedmail 8 I) and Blat ver 1.8.9
CC: djgpp AT delorie DOT com
In-reply-to: <3efcc25c$0$28978$9b622d9e@news.freenet.de> (bdeck@lycos.co.uk)
Subject: Re: dirent->d_name returns lowercase?
References: <3ef8c2c7$0$150$9b622d9e AT news DOT freenet DOT de> <2593-Wed25Jun2003075056+0300-eliz AT elta DOT co DOT il> <3ef9ebcd$0$149$9b622d9e AT news DOT freenet DOT de> <bdeepo$jik$1 AT nets3 DOT rz DOT RWTH-Aachen DOT DE> <3efc1417$0$29013$9b622d9e AT news DOT freenet DOT de> <2950-Fri27Jun2003205236+0300-eliz AT elta DOT co DOT il> <3efcc25c$0$28978$9b622d9e AT news DOT freenet DOT de>
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

> From: "deckerben" <bdeck AT lycos DOT co DOT uk>
> Newsgroups: comp.os.msdos.djgpp
> Date: Sat, 28 Jun 2003 00:23:11 +0200
> 
> > Try a floppy written under DOS.  If NT returns lower-case letters
> > there, it simply lies to you, as all DOS directory entries are in
> > upper case.
> 
> This isn't a relevant argument. Who is going to run PythonD from a floppy??

I thought we were talking about DJGPP's defaults, not about PythonD in
particular.  I tried to explain why the default is set to downcase 8+3
file names.

> But just for the record:
> 
> A:\>touch HeLLo.txT

No, that's irrelevant.  I said floppies written on plain DOS systems,
i.e. where long file names are unavailable.  You need to say
"touch HeLLo.txT" on plain DOS, then put the floppy in a drive of an
NT machine and do the "dir" part.

> > That's not the point.  The point is that Windows has a
> > case-insensitive filesystem, so making it case-sensitive (by setting
> > FNCASE=y) is not recommended, since the side effects will generally
> > surprise Windows users.
> 
> Not if it an NT user that's used to seeing filenames returned correctly.

Most Windows users are used to see the letter-case change under their
feet.  For example, Explorer by default capitalizes the first letter
and downcases the rest, etc.

> But what DJGPP does *will*suprise them, believe me (I've seen it
> happen).

I believe you; but please believe me as well.  Strict case sensitivity
on Windows brings many surprises to users.

> I think you are being *very* general here.

And that's bad?

> > That's because your DIR command goes to the shell which is a Windows
> > program, as opposed to DJGPP programs which are DOS programs.  You
> > really should keep that in mind when you argue about these subtleties.
> 
> 'ls.exe' is a DOS program, right? Note the output (without FNCASE set):
> 
> D:\>set FNCASE=n
> D:\>ls -al
> total 1617
> drwxr-xr-x   17 bdeck    root          608 Jun 17 01:13 .
> drwxr-xr-x   17 bdeck    root          608 Jun 17 01:13 ..
> -rw-r--r--    1 bdeck    root       708836 Jun 16 01:10 Citizenship docs1.zip

This isn't NT, it probably is Windows 2000 or XP.  Windows NT doesn't
support long file names at all, so the only way you could see the
above is if you have NTLFN installed on that system.

> since my DJGPP programs anyway return filecase correctly under Windows2000,
> I don't understand the need of even having the aforementioned conversion at
> all.
> 
> I'm sorry, I guess I just don't see the point here.

Right, you don't.  You only look at a very special situation: the
equivalent of a DIR command which simply displays file names to the
user.  But the real problems pop up in much more subtle situations,
like the one below:

  Suppose you run Make, and the Makefile has a rule to produce foo.o
  from foo.c.  GNU Make uses `readdir' to find *.c files in the
  directory, but it only find FOO.C, not foo.c.  The result is that
  Make fails.  In a large directory with many source files this could
  be a disaster.

In other words, `readdir' is a general-purpose function used by many
programs, and the experience of DJGPP users shows that the current
default works better than what you suggest.

> > You could put one patch in the python binaries to set that variable,
> > instead of forcing your python users to cripple *all* their djgpp
> > programs.
> 
> Maybe this is the best idea.

Making just PythonD case-sensitive is certainly better than affecting
all DJGPP programs.

- Raw text -


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