unibi_dump(3)
π unibi_dump(3) β the unibilium girlies' guide to dumping terminfo π
okay so bestie, welcome to unibi_dump from the unibilium manual, section 3. this is the glow-up-your-terminal-object-into-compiled-terminfo function and honestly? she ate. π
β¨ NAME β¨
unibi_dump β convert a terminal object to compiled terminfo data π¦
πΈ SYNOPSIS πΈ
#include <unibilium.h>
size_t unibi_dump(const unibi_term *ut, char *p, size_t n);
like, that's it. three args. slay. π
π DESCRIPTION π
so what this queen does: she takes your terminal object ut and creates a compiled terminfo entry out of it. β¨
where does it go? into p, bestie. and p must have room for at least n bytes β no squeezing, no negotiating, n bytes minimum or it's not happening. π
now here's the lowkey iconic part β the format depends on your numbers:
- if all numeric properties in
uthave values that fit in 15 bits, she uses the traditional ncurses terminfo format, which starts with the bytes"1A 01"π§ - otherwise? she switches to the newer "wide integer" format, which starts with the bytes
"1E 02"π₯
two vibes, one function. iykyk. π
β RETURN VALUE β
"unibi_dump" returns the number of bytes required to store the terminfo data. π
but listen:
if that number exceedsn, literally nothing is written top. like,pstays untouched. no partial spills, no half-finished mess. periodt.
and if the terminal object can't be represented in terminfo format at all β for example because the string table would be too large β the return value is "SIZE_MAX". π dramatic, but fair.
π ERRORS π
"EINVAL"βutcan't be converted to terminfo format. not me crying over an unconvertible terminal object π"EFAULT"β the resulting terminfo entry would be longer thannbytes. buffer said no. π
π«Ά SEE ALSO π«Ά
go read those too, bestie, they're all part of the same friend group π
and that's the whole page, no cap π this was unibilium-2.1.4, dated 2026-09-07 β catch you in the next manpage, 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