Re: [hatari-devel] GEMDOS filename handling

[ Thread Index | Date Index | More Archives ]

> Max, I've finally commited your changes to the repository:

Thank you.

> I'm going to look into having correct TOS error codes /
> mapping for invalid characters and doing conversions in
> fewer places (higher in call hierarchy).

ok. Some comments for consideration:

1. The OSX UTF-8 normalization calls (Str_DecomposedToPrecomposedUtf8)
    may be wrapped by #ifdefs __MACOSX__.

2. The setlocale() call which is invoked on Windows may need attention as
   it changes the behaviour of toupper/tolower. When toupper/tolower is applied
   to TOS paths this may not result in the desired outcome for characters
   above 0x80.

3. When a file is accessed, the match_host_dir_entry() function in gemdos.c
   does an opendir()/readdir() for each path component to accomplish case
   insensitive filename matching. As a performance improvement one could
   test for existance of the filename in lowercase or uppercase first.

4. The semantics of path clipping and matching filenames using wildcards?
   I think it may not be expected that the emulator overwrites hostfiles files
   in some situations. For example if "atari.log-save" exists on the
host it will
   silently be overwritten when the emulated system creates a new file
   which does not yet exist. (I know it is because the system uses wildcards
   and tries to match the name against atari.log* in such cases).

> Could you look into adding host path mapping also to the SDL GUI?
> There are many places where host file names/paths can be shown
> in the GUI, but with some thought, I think conversion can be done
> in single place.
> Mapping is needed only for showing of those paths, it's better
> if they keep internally in the host format.
> It's probably easiest to make sure the that SDL GUI font has
> same character table as Atari so that the same mapping can
> be used as what you used for GEMDOS HD emulation.

I currently don't have the time to work on this topic.

- Max

Mail converted by MHonArc 2.6.19+