unibi_add_ext_str(3)
π unibi_add_ext_str(3) β the unibilium glow-up page π
okay bestie, come CLOSER β this is the unibilium manual, section 3, and today we're talking about three lil functions that all do the same cute thing but for different types: unibi_add_ext_bool, unibi_add_ext_num, and unibi_add_ext_str. They add extended capabilities to a terminal object. Yes queen, we're customizing terminals. It's giving main character energy fr fr. π
β¨ NAME β¨
unibi_add_ext_bool, unibi_add_ext_num, unibi_add_ext_str β add extended capabilities to a terminal object π¦
πΈ SYNOPSIS πΈ
#include <unibilium.h>
size_t unibi_add_ext_bool(unibi_term *ut, const char *t, int b);
size_t unibi_add_ext_num(unibi_term *ut, const char *t, int v);
size_t unibi_add_ext_str(unibi_term *ut, const char *t, const char *s);
Likeβ¦ look at them. Three sisters. Same silhouette. Different vibes. π
π DESCRIPTION π
So what these do is: add an extended boolean, numeric, or string capability with the specified name and value. That's it, that's the whole plot. You hand it a name and a value, it slots it in. Iconic behavior honestly.
π¨ IMPORTANT, NO CAP: these functions simply store any pointers they are given. They will not freetors, and they will not copy any strings.
Read that again bestie, because it MATTERS. π The pointer you pass in is the pointer that lives there now. If it's a string, that string is yours to keep alive. If you free it or it goes out of scope, that's a you problem and the terminal object is just sitting there holding a dangling pointer like π§. So keep your strings alive, okay? Please. For me. π«Ά
β RETURN VALUE β
The return value is the index of the new capability, which you can then use in unibi_get_ext_bool(3), unibi_set_ext_bool(3), etc. So it hands you back a lil ticket number for the thing you just added. ποΈ
If an error occurs, SIZE_MAX is returned. That's the "it's not giving" signal. Check for it, bestie. π
π SEE ALSO π
unibilium.h(3)unibi_del_ext_bool(3)unibi_del_ext_num(3)unibi_del_ext_str(3)
That's the whole page, you ate it, go add some extended capabilities and be free. π
Sign-off szn: this lil beauty comes from unibilium-2.1.4, dated 2026-09-07. Mwah. π periodt. π
π¦ 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