Mail Archives: djgpp-workers/2001/10/11/23:02:18
> The library functions which need to decide whether to downcase a file
> name they've got from the OS all run code similar to this:
>
> if (!strcmp(_lfn_gen_short_fname(long_name, short_name), long_name))
> /* downcase the file name */
>
> The function _lfn_gen_short_fname puts into its second argument the
> short variant of the file name in its first argument. The short
> variant is the 8+3 alias, but without the numeric tail, i.e. as if
> NameNumericTail was set to zero. If these two strings are identical
> (including the case!), then we decide that this is a DOS file name,
> and downcase it. (If FNCASE is set to y, this code is bypassed, and
> all file names are returned exactly as they are recorded in the
> directory.)
Ok, this is the problem. Modified fixpath as an example:
W95:
short: TEST long: test
short: _.CVS long: _.CVS
Fixpath: c:/test/_.cvs
W2K:
short: TEST. long: test
short: _67C0CVS. long: _.CVS
Fixpath: c:/test/_.CVS
> _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. 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
So, since this function is hopeless on W2K/XP, ideas? It would be much
faster to avoid all those useless interrupts ...
- Raw text -