Date: Mon, 15 Oct 2001 19:03:26 +0200 From: "Eli Zaretskii" Sender: halo1 AT zahav DOT net DOT il To: sandmann AT clio DOT rice DOT edu Message-Id: <2427-Mon15Oct2001190325+0200-eliz@is.elta.co.il> X-Mailer: Emacs 20.6 (via feedmail 8.3.emacs20_6 I) and Blat ver 1.8.9 CC: djgpp-workers AT delorie DOT com In-reply-to: <10110151436.AA14048@clio.rice.edu> (sandmann@clio.rice.edu) Subject: Re: W2K/XP fncase References: <10110151436 DOT AA14048 AT clio DOT rice DOT edu> Reply-To: djgpp-workers AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp-workers AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk > From: sandmann AT clio DOT rice DOT edu (Charles Sandmann) > Date: Mon, 15 Oct 2001 09:36:46 -0500 (CDT) > > The technical reference I have says that space is invalid - but also > says this is due to file name syntax reasons (the same reason that + > was illegal in DOS). In reality, you can create file names with > spaces and open them without problems. Boot a DOS 5.0 diskette and > use DJGPP with a filename with a space. It creates it without problems. Well, what do you know! you learn something new every day. Anyway, spaces are very dangerous in DOS names because the FCB format in which they are stored in the directory uses the blank as a signal that the basename ended and the extension begins. There probably are programs out there which rely on that. > > I suggest to have this return an int instead [of char]. > > Since it's a boolean (0/1) I chose the smallest native type to > represent it, but int would be fine too. (char just saves a few > bytes loading some constants, so smaller code). The code is smaller, but slightly slower. It also might bite some careless programmer. > > > else if (c == '+' || c == ',' || c == ';' || > > > c == '=' || c == '[' || c == ']') > > > > I think this should include a blank. > > Whatever you decide after knowing ' ' is a valid character in names when > lfn = n ! My vote is to have a blank in this list. > > > I don't see any way to fix [_lfn_gen_short_fname for W2K/XP] other than: > > > 1) Document it's trash and advise no one to use it, or > > > 2) Insert emulation code if os=2K/XP inside it. > > > > We should at least document this. I think we should also file a bug > > report with Microsoft; it's a disgrace for their QA to let such bugs > > into the open. > > Yes, but the question remains - do we leave the current code in the library, > or update it with DH=1 (which works for some file names), or just document > it's bad, or insert emulation code? I'd suggest to document for now and leave it as is. We can return to this later; this is not a grave problem if it doesn't affect the rest of the library.