[hatari-devel] Improved host long filename support for Hatari GEMDOS Emulation, please TEST!

Eero Tamminen oak at helsinkinet.fi
Wed Jan 20 23:14:46 CET 2010


Hi,

Attached is the latest patch for the improved long name support.
It applies on top of the latest Hatari repository code.

I'm going to commit it in couple of days to Hatari repository unless
somebody has objections to it.  The main thing I would like to be tested
is whether it works on something else than Linux/Unix, e.g. Windows.

George, could you check Windows side?


Improvements it provides over current Hatari GEMDOS emulation's
cruder long host filename support are:

* Renaming something like HDDRIVER.PRG to HDDRIVER.PR works properly.
   (Current GEMDOS code tries always long match and if *.PRG is write
   protected, rename fails, my code tries first exact match)

* Supports also long directory names, not just long file names.

* Illegal GEMDOS characters are converted to '@' _and_ matched correctly
  when Atari programs try later to find the files with these names from
  the emulated drive.

* In general one should now be able to have any kind of long filenames in
  GEMDOS directories without them   breaking Atari fileselector, desktop
  etc.


Earlier version of the patch forced all callers of the host name search to
have FILENAME_MAX sized buffer (or it asserted).  As changing everything
that could get into that function would have made this patch much larger,
I changed it to handle shorter buffers.

It will also alert user with a Dialog if host filename won't fit to given
buffer so that user can either:
* Ask us to fix it, or
* Move GEMDOS emu dir higher in the directory hierarchy to shorten
  the host paths

Instead of GEMDOS file operations just mysteriously not working properly
if the host paths were too long for the provided buffers (like can happen
with current code).  Currently buffers for this are 256 chars long, so it's
unlikely that many would have bumbed into this issue, though.


	- Eero
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gemdos-long-filenames4.diff
Type: text/x-diff
Size: 21535 bytes
Desc: not available
URL: <https://lists.berlios.de/pipermail/hatari-devel/attachments/20100121/32d74b86/attachment.diff>


More information about the hatari-devel mailing list