delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1997/01/02/11:35:16

From: flitterio AT amulet DOT com (Fran Litterio)
Subject: RE: Observations and suggestions
2 Jan 1997 11:35:16 -0800 :
Sender: daemon AT cygnus DOT com
Approved: cygnus DOT gnu-win32 AT cygnus DOT com
Distribution: cygnus
Message-ID: <c=US%a=_%p=Amulet._Inc.%l=JAGUAR-970102164243Z-2200.cygnus.gnu-win32@jaguar.amulet.com>
Mime-Version: 1.0
Original-To: "'gnu-win32 AT cygnus DOT com'" <gnu-win32 AT cygnus DOT com>
X-Mailer: Microsoft Exchange Server Internet Mail Connector Version 4.0.994.63
Original-Sender: owner-gnu-win32 AT cygnus DOT com

Blake McBride (blake AT edge DOT net) writes:

>At 05:32 PM 1/1/97 -0500, Fran Litterio <flitterio AT amulet DOT com> wrote:
>>The [...] way to implement this is in the low-level file-name
>>manipulation routines (opendir(), readdir(), open(), creat(), etc.) in
>>cygwin.dll.  The default behavior could be for those functions to
>>downcase all filenames all the time.  The whole world will look like
>>only lowercase filenames are allowed (even "touch FOO" would create a
>>file named "foo"), and consistent behavior would ensue (for instance, you
>>would type "ls *.c" instead of "ls *.c *.C" to see all C source files).
>
>I definitely don't agree with this approach although it would be very
>simple to implement.  Not recognizing a difference between file name case
>when opening a file is bad enough but not as bad as not allowing any upper
>case
>at all!

Yes, an all-lowercase environment is to much to force on someone.  But
the simplicity of an all-lowercase environment would make life on an NT
filesystem so much easier, especially given the hassle this whole
filename-case issue causes.  So maybe the readdir(), open(), and creat()
wrappers in cygwin.dll could do something like this:

	if (getenv("CYGWIN_ALL_LOWERCASE"))
	{
		char * p;
		for (p = filename; *p; p++)
			if (isupper(*p)) *p = tolower(*p);
	}

>I still say we should:
>
>1.  Create and display files with the specified case

>2.  Integrating the case during display (ls) as apposed to displaying
>    uppercase names and then lower case names)

>3.  Wildcard match and open files without regard to case

#2 and #3 above imply altering the source to ls and bash (and the source
to every other shell ported to the cygwin32 environment).  Doesn't this
go against the project's philosophy of centralizing the porting work in
the cygwin.dll?

>I can't speak for your 'touch' but I can tell you two things about NT 4.0.
>
>1.  copy con foo^bar       doesn't create with the ^

>2.  Unless I'm doing something wrong, mixed case mode with 17.1 and NT 4.0
>    does not work.

Sorry.  I didn't mean to say that mixed-case mode works (I haven't tried
it).  I was just pointing out that "^" characters are legal in NT 4.0
filenames (both touch and Explorer can create them).
--
Francis Litterio
franl AT amulet DOT com
franl AT world DOT std DOT com
http://world.std.com/~franl/
>
-
For help on using this list, send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".

- Raw text -


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