al_fread(3)
πΈ NAME πΈ
al_fread β Allegro 5 API. This page is from the Library Functions Manual, and itβs here to explain this one tiny but iconic read function, bestie π
β¨ SYNOPSIS β¨
#include <allegro5/allegro.h>
size_t al_fread(ALLEGRO_FILE *f, void *ptr, size_t size)
π DESCRIPTION π
Okay so picture this: youβve got a file, right? al_fread() reads size bytes into the buffer pointed to by ptr, from the given file. Thatβs the whole vibe β¨
It returns the number of bytes actually read. If an error occurs, or the end-of-file is reached, the return value is a short byte count (or zero). No cap.
β οΈal_fread()does not distinguish between EOF and other errors. Useal_feof(3)andal_ferror(3)to determine which occurred β fr fr, donβt just guess π«Ά
π₯ SEE ALSO π₯
with love from the Allegro reference manual π β source/version footer noted, and the original didnβt show a date line, so no fake date, bestie π«Ά
π¦ 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