al_findnext(3alleg4)
β¨ al_findnext β the Allegro manual, but make it cute β¨
okay bestie, welcome to the Allegro manual page for al_findnext, from the Allegro game programming library π
πΈ NAME πΈ
al_findnext β finds the next file in a search that was started by al_findfirst(). It's part of the Allegro game programming library, periodt. π
π SYNOPSIS π
#include <allegro.h>
int al_findnext(struct al_ffblk *info);
π DESCRIPTION π
so basically, this one grabs the next file in a search that al_findfirst() already kicked off. you can't start the party here β al_findfirst() has to go first, no cap. π¦
here's the vibe, in code:
if (al_findfirst("*.pcx", &info, 0) != 0)
return;
do {
/* Do something useful here with info.name. */
} while (al_findnext(&info) == 0);
al_findclose(&info);
like, look at that loop. the way it just keeps calling al_findnext(&info) until it stops returning 0? iconic behaviour honestly. π₯
β RETURN VALUE β
- returns zero if a match is found π₯³
- returns non-zero if none is found, or if an error occurred
- and in that error case specifically, it sets
errnoaccordingly β so go check it, bestie π
π SEE ALSO π
mwah, that's the whole page π«Ά Allegro, version 4.4.3 β catch you on the next one, bestie, stay slaying those file searches πβ¨π
π¦ where this page comes from
- debian bookworm: allegro4-doc 2:4.4.3.1-3 Β· Allegro-gift-ware
- debian trixie: allegro4-doc 2:4.4.3.1-5 Β· Allegro-gift-ware
- ubuntu jammy: allegro4-doc 2:4.4.3.1-2 Β· Allegro-gift-ware
- ubuntu noble: allegro4-doc 2:4.4.3.1-4.1build3 Β· Allegro-gift-ware
- ubuntu questing: allegro4-doc 2:4.4.3.1-6
- ubuntu resolute: allegro4-doc 2:4.4.3.1-7 Β· Allegro-gift-ware
- ubuntu stonking: allegro4-doc 2:4.4.3.1-9 Β· Allegro-gift-ware
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms