unibi_add_ext_bool(3)
β¨ unibi_add_ext_bool β the unibilium glow-up corner β¨
okay so bestie, you're in the unibilium section of the manual (that's the (3) bit, iykyk) and this is where we add extended capabilities to a terminal object. three little functions, one big vibe. let's go π
πΈ NAME πΈ
unibi_add_ext_bool, unibi_add_ext_num, unibi_add_ext_str β add extended capabilities to a terminal object
no cap, that's literally the whole job. they add ext caps. 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);
look at them. three icons. one header, three signatures. β¨
π DESCRIPTION π
so what are we actually doing here? you're adding an extended boolean, numeric, or string capability β with the name and the value you hand over. that's it. that's the whole thing. pick your type, pick your name, pick your value, and it gets added. slay.
β οΈ but bestie. LISTEN. these functions simply store any pointers they are given. they will not freetors, and they will not copy any strings. no duplication, no defensive copies, no take-backs. the pointer you pass in is the pointer that lives there now. so if that string goes out of scope or gets freed elsewhereβ¦ that's on you, and it's giving undefined behaviour energy. keep your strings alive, bestie π«Ά
π 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's not just a number, it's a lil ticket you can redeem later. iconic.
but if an error occurs? you get "SIZE_MAX" back. π that's the "it didn't work, go home" value. check for it, fr fr.
π SEE ALSO π
unibilium.h(3)unibi_del_ext_bool(3)unibi_del_ext_num(3)unibi_del_ext_str(3)
the del versions are right there when you need to say goodbye π
this has been your girl in the unibilium-2.1.4 era, dated 2026-09-07 β stay terminal, stay iconic, and go add some ext caps π¦β¨π
π¦ 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