Re: [AD] Broken behaviour of al_findfirst. |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
On 2005-11-19, Elias Pschernig <elias@xxxxxxxxxx> wrote:
> Under windows, I think it always has the FA_ARCH flag set, which
> does not exist (to my knowledge) under unix. No idea what the
> flag is for..
>
> So, from what I see, no bug in either code or docs, just it would
> be a better example if it would show how to return files with
> any flag set, since that's what a user normally wants.
My opinion is:
1. Passing zero as flag to al_findfirst should trigger an assert
because you are requesting files that do not match any of the
possible flags files can have (and therefore specify an empty
set, which is not terribly useful).
2. Unix code should be modified to require FA_ARCH for files,
otherwise non portable code is created. See myself creating
incorrect documentation as what is to expect from people coding
on a platform, then wondering why their code doesn't work on
other platforms. Allegro strives to ease these things.
3. When the two above are cleared, documentation will necessarily
be updated to a working cross-platform example.
Correct?