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

Eero Tamminen eerot at users.berlios.de
Sat Jan 23 11:29:06 CET 2010


Hi,

On Friday 22 January 2010, George Nakos wrote:
> Thursday, January 21, 2010, 12:33:38 AM, you wrote:
> >> 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?
>
> I  just  managed  to  get  the patch working and compiled a version of
> hatari with that.

Thanks for testing!

Could somebody test it also on OSX too before I commit it?
(And maybe also EGCC & Wii & Windows Visual Studio)

My main worry is whether it compiles.  Opendir/readdir/closedir are common
Unix functions but not yet in POSIX.  Scandir() is similar function and for
some platforms there seems to be a scandir() implementation in
src/scandir.c[1].


	- Eero

[1] I could actually get completely rid of scandir if needed, it's use in
current code is nefficient because one cannot give any data (void*) that
scandir should pass to the filter function like on many similar functions
that accept callbacks.  I.e. filtering in gemdos emulation functions 
currently using scandir actually has to be done after scandir has scanned
& allocated data for all files in a dir.  Better replacement for scandir()
for GEMDOS emulation could be done using opendir/readdir/closedir.

In my new code the scanning can be slower than with scandir (because
it does more), but _only_ when the file is not found.  If there's an exact
(case insensitive) match for requested filename, it's much more efficient.



More information about the hatari-devel mailing list