al_fread16be(3)
π al_fread16be β Allegro 5 API
Ok so bestie, welcome to the Library Functions Manual β¨ this one's a tiny little function from Allegro 5 and honestly it's giving "small but mighty" π
πΈ NAME πΈ
al_fread16be β the Allegro 5 API girlie who reads 16 bits, big-endian style π
β¨ SYNOPSIS β¨
#include <allegro5/allegro.h>
int16_t al_fread16be(ALLEGRO_FILE *f)
π¦ DESCRIPTION π¦
So what she does is read a 16-bit word in big-endian format, aka MSB first π like, most-significant byte walks in first, no cap πΆββοΈβ¨
On success? She returns the 16-bit word, periodt π On failure? She returns EOF, which is -1 π
π¨ And here's the plot twist bestie β-1is also a totally valid return value π so you literally cannot tell from the return alone. Useal_feof(3)to check if the end of the file was reached prematurely, oral_ferror(3)to check if an error occurred. Do not skip this step, iykyk π
π SEE ALSO π
al_fread16le(3)β her little-endian sister, go show her some love too π«Ά
β¨ that's the whole page bestie, go read some big-endian words β¨
Later, icons β this was the Allegro reference manual ππ
π¦ 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