unibi_get_num(3)
π unibi_get_num β access the capabilities of a terminal object π
okay bestie, sit down, hydrate, and let me tell you about unibilium section 3, because this little family of functions is literally the β¨keyβ¨ to the whole terminal-capability kingdom. no cap. π
πΈ NAME πΈ
unibi_get_bool, unibi_set_bool, unibi_get_num, unibi_set_num, unibi_get_str, unibi_set_str β access the capabilities of a terminal object π«Ά
π SYNOPSIS π
#include <unibilium.h>
int unibi_get_bool(const unibi_term *ut, enum unibi_boolean b);
void unibi_set_bool(unibi_term *ut, enum unibi_boolean b, int x);
int unibi_get_num(const unibi_term *ut, enum unibi_numeric n);
void unibi_set_num(unibi_term *ut, enum unibi_numeric n, int x);
const char *unibi_get_str(const unibi_term *ut, enum unibi_string s);
void unibi_set_str(unibi_term *ut, enum unibi_string s, const char *x);
like, look at that. six little functions. a whole glow-up for your terminal object. π
π¦ DESCRIPTION π¦
so the vibe is: get and set your boolean, numeric, and string capabilities. that's the whole assignment. β¨
here's the tea though, and this part matters:
- absent numeric capabilities are represented as
-1π - absent string capabilities are represented as
"NULL"π
so if you go grabbing a number and it hands you a -1, that's not a value, that's an absence, and you should act accordingly. same energy with the string that says "NULL".
π¨ HEADS UP, THIS IS THE IMPORTANT ONE: unibi_set_str simply stores the pointer it is given; it will not free x or make a copy of the string.
read that again fr fr. it does NOT copy. it does NOT free. it just keeps your pointer. so if you hand it something that goes away later, that's a you problem and it's gonna be a whole situation. π«
π SEE ALSO π
unibilium.h(3)π
that's the page, bestie!! go forth and slay your terminal capabilities β¨π¦πΈ
this iconic little number comes to you from unibilium-2.1.4, dated 2026-09-07. mwah π
π¦ where this page comes from
- fedora 44: unibilium-devel 2.1.4-1.fc44 Β· LGPL-3.0-or-later
- fedora 44: unibilium-devel 2.1.4-1.fc44 Β· LGPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms