| Re: [AD] [TODO] About findfirst |
[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]
In reply to Eric Botcazou <ebotcazou@xxxxxxxxxx>:
>> As bad as `findfirst' is, `for_each_file' is not as good. You
>> cannot stop short of reading the entire list, for one.
>
>If that's the only drawback of for_each_file(), we can easily (at the
>expense of a very very little API breakage) change the prototype of the
>callback function to int (*callback)(const char *filename, int attrib, int
>param) so that it can acknowledge and stop the enumeration.
No, because that would break all existing code in a potentially serious
way (ie. the compiler is calling a function it expects to return an int,
but the function doesn't return anything, so the stack gets corrupted).
Bye for now,
--
Laurence Withers, lwithers@xxxxxxxxxx
http://www.lwithers.demon.co.uk/
Attachment:
signature.asc
Description: PGP signature
| Mail converted by MHonArc 2.6.19+ | http://listengine.tuxfamily.org/ |