Re: [hatari-devel] GEMDOS filename handling |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/hatari-devel Archives
]
- To: "hatari-devel@xxxxxxxxxxxxxxxxxxx" <hatari-devel@xxxxxxxxxxxxxxxxxxx>
- Subject: Re: [hatari-devel] GEMDOS filename handling
- From: Max Böhm <mboehm3@xxxxxxxxx>
- Date: Fri, 15 Aug 2014 23:25:57 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=qeUJh45t/y8lk0IS+ro1+EdKkSxhyzvL/Z2CR7E5kRo=; b=Bie4HTSRwuH9KEYK03ZwbtxpGZ1+mJmvjkdpZ3vdlQcBmahyeBTU2YtoYZDs6VCI0j BUt/GU8HUOtdWQRtGdS8xqdoa7Nvy6zY9sfMzMoyqHZUDg0sMG7PIB7qfwkGYx3scRLr 2NTbIPOnCY7qu4/noyxcz6Wwdk6q7vrlKa876IOtwwEDieonFMygyBZG0WlLcVfeFxEQ RN1zBFPL73zi7PXse6IjmR0shY68tn4mJHEm/CocupN7Yd3OmyUcq1TEbmatnxyUzVaP nbX8q3peWzDZTZ4nXnEzCLvvcDqNHfnGPZkt6LkX/jI7fEgSe0JCgRN4cBpTM64O0tDG LbTw==
> Max, I've finally commited your changes to the repository:
> http://hg.tuxfamily.org/hatari/hatari/rev/5c2218f0e65f
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
"atari.log"
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