Mail Archives: djgpp-workers/2001/10/15/13:06:30
> 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.
- Raw text -