|
Al_findfirst documentation |
Richard Phipps
Member #1,632
November 2001
|
In the current Allegro documentation I see this: Quote:
if (al_findfirst("*.pcx", &info, 0) != 0) { But this is not correct. The attributes flag (the 0) needs to be set to one of the flag fields or 0xFF to pass all attributes. Otherwise the above code will find no files. (At least for me anyway!) Would it be possible to correct this in the docs? |
Fiddler
Member #5,385
January 2005
|
It would be really nice if you could provide a patch with the proposed change. Find the ._tx file in the documentation folder, make the change, and use the online patcher to make a patch file against the current docs. Then post it either in the AD list or here. This way you can ease some of the burden off Allegro developers. And you'll get mentioned in the docs, too! The Open Toolkit: a game development library for .Net/Mono. |
Matthew Leverton
Supreme Loser
January 1999
|
Quote: Otherwise the above code will find no files. But that is what it claims it is doing! So it really is correct, although in a very evil way. |
Evert
Member #794
November 2000
|
Quote: The attributes flag (the 0) needs to be set to one of the flag fields or 0xFF to pass all attributes. Otherwise the above code will find no files. (At least for me anyway!)
It will if you pass FA_ARCH as a flag; your PCX files probably have this flag set. Maybe we should have an FA_ANY that comes down to 0xFF to specify we want to match all files? Quote: Would it be possible to correct this in the docs? Sure. Proposed patch attacehd. |
Peter Wang
Member #23
April 2000
|
FA_ANY can be written ~0, but it seems like a good addition.
|
|