Re: [AD] About findfirst (2)

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


> Looks good.

Thanks.

> However, since the funcions have been prefixed with al_ to differentiate
> them as portable, maybe the FA_* flags should be changed to AL_* flags
> or something like that too.

I don't know. If we changed the name of the flags to AL_*, someone could
later modify their values without making the needed modifications to the
code. Now the FA_ values directly come from DOS, namely int 21h function
4eh, and are used as is by the libc of the two supported DOS compilers
(Watcom and DJGPP) and even by the libc of Windows. Therefore the al_find*()
functions don't perform any translation and would get broken if the values
were modified.

> My point is that the docs state that some FA_* flags are guaranteed to be
> portable, if we rename them, people will see the difference compared to
> existing non-portable flags and will be able to scratch them immediately.

The only truly portable flags are FA_RDONLY and FA_DIREC. FA_HIDDEN is
emulated on POSIX platforms (I don't know for MacOS). The three others are
DOS/Windows specific and do nothing on POSIX platforms. But they are all
portable in the sense that the same sources compile on all platforms.

> Also, does the 512 char limit for the name in the struct satisfy any
> possible name? I see the previous size was 1024.

The field 'name' contains the stripped name of the file (without the path).
I think 512 chars should be enough, even with UTF-8 strings.

> PD: So what's the latest decission on keyboard mapping names? :)

Maybe a little vote ? ;-)

--
Eric Botcazou
ebotcazou@xxxxxxxxxx



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/