al_feof(3)

πŸ“¦
version 5.2.11.3 Β· 3 versions
, in arch rolling

πŸ¦‹ 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