delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2001/10/12/02:34:39

Date: Fri, 12 Oct 2001 08:31:39 +0200
From: "Eli Zaretskii" <eliz AT is DOT elta DOT co DOT il>
Sender: halo1 AT zahav DOT net DOT il
To: sandmann AT clio DOT rice DOT edu
Message-Id: <2561-Fri12Oct2001083139+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, tim DOT van DOT holder AT pandora DOT be, acottrel AT ihug DOT com DOT au
In-reply-to: <10110120257.AA19829@clio.rice.edu> (sandmann@clio.rice.edu)
Subject: Re: W2K/XP fncase [was Re: New perl package]
References: <10110120257 DOT AA19829 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

> From: sandmann AT clio DOT rice DOT edu (Charles Sandmann)
> Date: Thu, 11 Oct 2001 21:57:29 -0500 (CDT)
> 
> W2K:
> short: TEST. long: test
> short: _67C0CVS. long: _.CVS
> Fixpath: c:/test/_.CVS

Good God!

> > _lfn_gen_short_fname calls function 71A8h of Int 21h.  So either XP
> > botches that function, or it returns some unexpected result that
> > confuses the logic inside _lfn_gen_short_fname.  Please step with a
> > debugger into that function and see what's going on there.
> 
> As you can see above, it botches 71A8h - it adds a period to the short
> name; but more interesting is the short value for _.CVS - I can't even
> explain that one.

A bug, I think.  Perhaps you could try playing with 71A8h a bit.  It
accepts several flags in the DX register, but my testing indicated
that some of the flags didn't work as documented.  Maybe on XP, one of
these flags will produce a correct short name.

> Another good one:
> 
> C:\BOOT>d:\fixpath config.sys
> Get dir[4]: \BOOT
> short: BOOT. long: BOOT
> short: CONFIGSY.S long: config.sys
> Fixpath: c:/BOOT/config.sys

Ah, that one rings a bell: it's possible that it's our bug.  Due to
the bugs in the implementation of the flags in DX, my only way was to
tell 71A8h to return a file name in the FCB format, and then convert
it to a real file name by inserting the missing dot and removing the
padding blanks.  For example, with config.sys, I expect to get the
string "CONFIG  SYS", and then I convert it to "CONFIG.SYS".

It's possible that on XP, the ``FCB format'' is different, so the code
in _lfn_gen_short_fname which converts FCB to 8.3 doesn't work.

> So, since this function is hopeless on W2K/XP, ideas?  It would be much
> faster to avoid all those useless interrupts ...

If we cannot find a way to fix this, I agree that we should simply
bypass those calls on XP and behave as if FNCASE were set to y.

- Raw text -


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