al_fread16be(3)

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

πŸ’… 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 β€” -1 is also a totally valid return value πŸ™ˆ so you literally cannot tell from the return alone. Use al_feof(3) to check if the end of the file was reached prematurely, or al_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