al_fputs(3alleg5)
β¨ al_fputs β the Allegro 5 glow-up where you yeet a whole string into a file β¨
okay bestie, welcome to the al_fputs page of the Allegro 5 API manual π (yes we're in section 3alleg5, come thru). This is the one where you don't write one lil byte at a time β you write a whole string. Iconic behavior, honestly. π
πΈ SYNOPSIS πΈ
#include <allegro5/allegro.h>
int al_fputs(ALLEGRO_FILE *f, char const *p)
look at her. two args, one int, zero drama. π¦
π DESCRIPTION π
So basically: this function writes a string to a file. That's the whole vibe.
And ngl, apart from the return value, it is literally equivalent to doing this yourself:
al_fwrite(f, p, strlen(p));
same energy, fr fr. β¨
π§ Parameters π§
fβ the file handle you're writing to π«Άpβ the string you're writing π
β Return value β
On success you get a non-negative integer back. On error? You get EOF. π It's giving "we tried our best."
π¨ note bestie, this one matters: depending on the stream type and the mode you passed toal_fopen(3alleg5), the newline characters inside your string may or may not get automatically translated into native end-of-line sequences β likeCR/LFinstead ofLF. So don't come crying to me when your line endings do a lil surprise makeover. π It's not a bug, it's the mode. Periodt.
π SEE ALSO π
and that's the whole page, bestie π go forth and write strings, you're gonna slay π₯
Allegro reference manual β section 3alleg5, al_fputs(3alleg5). mwah, bye ππβ
π¦ where this page comes from
- debian trixie: allegro5-doc 2:5.2.10.1+dfsg-1 Β· Zlib
- ubuntu questing: allegro5-doc 2:5.2.10.1+dfsg-1build1
- ubuntu resolute: allegro5-doc 2:5.2.11.3+dfsg-1 Β· Zlib
- ubuntu stonking: allegro5-doc 2:5.2.11.3+dfsg-1 Β· Zlib
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms