get_uformat(3alleg4)
π get_uformat β bestie edition π
okay so this is from the Allegro manual, and it's giving "tiny function, big vibes". lowkey one of those little guys that just tells you a thing. no cap.
β¨ NAME β¨
get_uformat β finds out what text encoding format is currently selected. Also: it's part of the Allegro game programming library. π
πΈ SYNOPSIS πΈ
#include <allegro.h>
int get_uformat(void);
π¦ DESCRIPTION π¦
so basically: it finds out what text encoding format is currently selected. that's it. that's the whole job. and honestly? it ate. π
ngl though, this one is probably useful only if you're writing an Allegro addon that deals with text strings, and you want to take a different codepath for each possible format. like, you're out here handling multiple encodings and you need to know which one you're in. iykyk. π
example, bestie β literally copy this vibe:
switch(get_uformat()) {
case U_ASCII:
do_something();
break;
case U_UTF8:
do_something_else();
break;
...
}
not me writing aswitchstatement with a...in it, iconic behaviour fr fr. but that's literally what the manpage shows so that's what you get. π
β RETURN VALUE β
it returns the currently selected text encoding format. that's the whole tea. β
if you want the actual list of encoding formats, go read the documentation of set_uformat() β that's where the formats are listed, not here. this function is just the messenger, not the encyclopedia. π§
π₯ SEE ALSO π₯
set_uformat(3alleg4)β the sibling. the other half. go read it for the format list. π
Allegro, version 4.4.3. that's the source and the version, bestie β consider this your cute lil sign-off. stay encoded, stay slay. ππβ¨
π¦ where this page comes from
- debian bookworm: allegro4-doc 2:4.4.3.1-3 Β· Allegro-gift-ware
- debian trixie: allegro4-doc 2:4.4.3.1-5 Β· Allegro-gift-ware
- ubuntu jammy: allegro4-doc 2:4.4.3.1-2 Β· Allegro-gift-ware
- ubuntu noble: allegro4-doc 2:4.4.3.1-4.1build3 Β· Allegro-gift-ware
- ubuntu questing: allegro4-doc 2:4.4.3.1-6
- ubuntu resolute: allegro4-doc 2:4.4.3.1-7 Β· Allegro-gift-ware
- ubuntu stonking: allegro4-doc 2:4.4.3.1-9 Β· Allegro-gift-ware
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms