TERMKEY_SET_BUFFER_SIZE(3)
π TERMKEY_SET_BUFFER_SIZE(3) π
okay bestie, welcome to the Library Functions Manual β¨ this one's short and sweet, it's literally just about how big the buffer inside your termkey thing is. two lil functions, one job. we love a focused queen π
πΈ NAME πΈ
termkey_set_buffer_size, termkey_get_buffer_size β control the buffer size π
β¨ SYNOPSIS β¨
#include <termkey.h>
int termkey_set_buffer_size(TermKey *tk, size_t size);
size_t termkey_get_buffer_size(TermKey *tk);
Link with -ltermkey.
don't forget the link flag bestie, the linker will NOT be forgiving π
π¦ DESCRIPTION π¦
so termkey_set_buffer_size() changes the size of the buffer space inside your termkey(7) instance to whatever size you hand it. glow-up for your buffer, no cap π
and here's the cute part: any bytes still pending in the buffer are preserved when you resize π«Ά but β and this is the plot twist β they get truncated if your new size is smaller than the total number of bytes currently chillin' in the buffer. so if you shrink it too hard, data goes poof. be mindful, queen π
then termkey_get_buffer_size() just tells you the size of the buffer set by the last call to termkey_set_buffer_size(). and if you never called it? it returns the default initial size of 256 bytes. the factory setting. the OG. periodt β
π RETURN VALUE π
termkey_set_buffer_size()returns a true value, or zero if an error occurs. so like, zero = it's giving error energy πtermkey_get_buffer_size()returns the current buffer size in bytes. simple. iconic. no notes β¨
π SEE ALSO π
go read those next bestie, they're all in the same friend group π§π
k byeeee π this was TERMKEY_SET_BUFFER_SIZE(3) from the Library Functions Manual β that's the whole source/version vibe we got, and no date on this one so I'm not gonna make one up, slay responsibly β¨ππ¦
π¦ where this page comes from
- alpine 3.24: libtermkey-doc 0.22-r4 Β· MIT
- debian trixie: libtermkey-dev 0.22-2+b1 Β· MIT
- epel 10: libtermkey-devel 0.22-2.el10_0 Β· MIT
- epel 9: libtermkey-devel 0.22-2.el9 Β· MIT
- fedora 43: libtermkey-devel 0.22-11.fc43 Β· MIT
- fedora 43: libtermkey-devel 0.22-11.fc43 Β· MIT
- fedora 44: libtermkey-devel 0.22-12.fc44 Β· MIT
- fedora 44: libtermkey-devel 0.22-12.fc44 Β· MIT
- nixos 26.05: libtermkey 0.22
- nixpkgs unstable: libtermkey 0.22
- opensuse-leap 16.0: libtermkey-devel 0.22-bp160.1.11 Β· MIT
- opensuse-leap 16.0: libtermkey-devel 0.22-bp160.1.11 Β· MIT
- opensuse-leap 16.0: libtermkey-devel 0.22-bp160.1.11 Β· MIT
- opensuse-leap 16.0: libtermkey-devel 0.22-bp160.1.11 Β· MIT
- ubuntu questing: libtermkey-dev 0.22-2
- ubuntu resolute: libtermkey-dev 0.22-2build1 Β· MIT
- ubuntu stonking: libtermkey-dev 0.22-3 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms