pack_ungetc(3alleg4)

πŸ’– pack_ungetc β€” the manual page, but make it cute πŸ’–

okay bestie, welcome to the Allegro manual (section 3alleg4, iykyk) 🌸 this one's about a tiny little function with main character energy: pack_ungetc from the Allegro game programming library. she's small. she's powerful. she puts a character BACK. periodt. πŸ’…


✨ NAME ✨

pack_ungetc</purpose> β€” moves one single character back to the input buffer. this is your Allegro game programming library girlie πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <allegro.h>

int pack_ungetc(int c, PACKFILE *f);

like. that's it. that's the whole vibe. no cap. ✨


🌸 DESCRIPTION 🌸

so here's the tea, bestie πŸ“ β€” this function puts a character back into the file's input buffer. it's giving "jk, never mind, put it back" energy and honestly? iconic.

but listen β€” just like ungetc from libc, only a single push back is guaranteed. one. uno. a single. don't get greedy, she said what she said πŸ’€

⚠️ note, and this one MATTERS: pack_fgets <highkey>internally uses</highkey> pack_ungetc, so never use pack_ungetc directly after using pack_fgets on a PACKFILE. like, just don't. that's the rule. respect it or things get weird 😭

πŸ‘‘ RETURN VALUE πŸ‘‘

  • returns c on success 🫢 slay
  • or EOF on error πŸ’€ rip

🌈 SEE ALSO 🌈

her sisters. her besties. go read them next, fr fr πŸ¦‹


okay that's the whole page, bestie! this little love letter came to you courtesy of Allegro, version 4.4.3 πŸŽ€ β€” the same legends behind pack_ungetc(3alleg4) itself. mwah. go write some code. you got this. πŸ’–βœ¨