al_feof(3)
π¦ NAME π¦
Okay bestie, meet al_feof from the Library Functions Manual β itβs literally the Allegro 5 API page, and the title is al_feof(3), no cap.
al_feofβ Allegro 5 API
β¨ SYNOPSIS β¨
Hereβs the exact spell, bestie:
#include <allegro5/allegro.h>
bool al_feof(ALLEGRO_FILE *f)
π DESCRIPTION π
Returns true if the end-of-file indicator has been set on the file β i.e. we have attempted to read past the end of the file. Periodt. π
This does not return true if we simply are at the end of the file. The following code correctly reads two bytes, even when the file contains exactly two bytes:
int b1 = al_fgetc(f);
int b2 = al_fgetc(f);
if (al_feof(f)) {
/* At least one byte was unsuccessfully read. */
report_error();
}
π«Ά Tiny vibe check: βat the endβ and βattempted to read past the endβ are not the same thing, bestie β thatβs the whole plot twist, fr fr.
π SEE ALSO π
Go give these cuties a read too:
Signed off by the Allegro reference manual β thatβs the source/version bit, and the original footer doesnβt print a separate date, bestie π al_feof(3) out. π
π¦ where this page comes from
- arch rolling: allegro 5.2.11.3-2 Β· Zlib AND BSD-3-Clause AND OFL-1.1 AND LicenseRef-Custom
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms