unibi_get_bool(3)

πŸ’– unibi_get_bool β€” access the capabilities of a terminal object πŸ’–

okay bestie, welcome to the unibi_get_bool(3) page β€” it lives in the unibilium manual, and it's literally the little keychain that lets you peek at and poke the capabilities of a terminal object. πŸŽ€


✨ 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);

πŸ’… DESCRIPTION πŸ’…

so the whole vibe here is get and set β€” booleans, numerics, and strings, that's the capability trio, and you're grabbing them off a terminal object. πŸ‘‘

the way it works: absent numeric capabilities are represented as -1, and absent string capabilities as "NULL". so if a numeric gives you -1, that's not a number, bestie, that's a lack of a number. and a "NULL" string means nobody's home. πŸ™ˆ

🚨 okay this next part is IMPORTANT, no cap: unibi_set_str simply stores the pointer it is given β€” it will not free x and it will not make a copy of the string. like. it just holds onto your pointer. so don't go freeing that string out from under it unless you want chaos. πŸ’€

🌸 SEE ALSO 🌸


signed, sealed, delivered by unibilium-2.1.4, dated 2026-09-07 ⭐ mwah, go forth and read your terminal capabilities πŸ’œπŸ¦‹

πŸ“¦ where this page comes from