Re: [AD] [TODO] About findfirst |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
> I thought you had agreed to the emulation.
I don't have any archive here, but I think I pointed out the fact that there
is already a wrapper around the Win32 _findfirst() and I would rather not
add another one. And of course the wrapper is used by for_each_file(),
file_size() and file_time().
> 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.
> Anyway, I don't really care either way, but someone will have to
> update the docs. ("If your platform doesn't have the find* set
> of functions, Allegro will emulate them.")
I may sound a little extremist, but I think we should get rid of the three
functions as non portable DOS-isms.
---
Eric Botcazou
ebotcazou@xxxxxxxxxx