buffer_putsa(3)
π buffer_putsa β write stralloc to buffer π
okay bestie, welcome to the Library Functions Manual, this is the page for buffer_putsa(3) and honestly? she's a tiny little legend π«Ά
β¨ NAME β¨
buffer_putsa β write stralloc to buffer
like. the whole job. that's it. no cap π
πΈ SYNTAX πΈ
#include <libowfat/stralloc.h>
#include <libowfat/buffer.h>
int buffer_putsa(buffer* b,const stralloc* x);
two headers, one function, zero drama. include both or the compiler will simply not know her π
π¦ DESCRIPTION π¦
so here's the tea: buffer_putsa is equivalent to buffer_put(b,x.s,x.len).
that's it. that's the whole function. she takes your stralloc and she shoves it into the buffer, using x.s as the pointer and x.len as the length. no hidden magic, no extra steps, just a little wrapper doing her thing β¨
if you were about to write buffer_put(b,x.s,x.len) yourself β don't, queen, just call buffer_putsa and move on with your day π
π RETURN VALUE π
0β everything is fine, we ate, no crumbs π-1β error, and it setserrnoso you can go find out what went wrong π₯
not me ignoring the return value... bestie. check it.-1means something broke anderrnois holding the receipts π
π SEE ALSO π
that's the whole page!! she's short, she's sweet, she's from the Library Functions Manual, and she's filed under buffer_putsa(3) β go forth and write your strallocs to your buffers, bestie, you've got this π§π
π¦ where this page comes from
- alpine 3.24: libowfat-doc 0.34-r0 Β· GPL-2.0-only
- debian bookworm: libowfat-dev 0.32-4 Β· GPL-2.0-only
- debian trixie: libowfat-dev 0.32-5 Β· GPL-2.0-only
- nixos 26.05: libowfat 0.34
- nixpkgs unstable: libowfat 0.34
- opensuse-leap 16.0: libowfat-devel 0.33-bp160.1.11 Β· GPL-2.0-only
- opensuse-leap 16.0: libowfat-devel 0.33-bp160.1.11 Β· GPL-2.0-only
- opensuse-leap 16.0: libowfat-devel 0.33-bp160.1.11 Β· GPL-2.0-only
- opensuse-leap 16.0: libowfat-devel 0.33-bp160.1.11 Β· GPL-2.0-only
- ubuntu noble: libowfat-dev 0.32-4.1build1 Β· GPL-2.0-only
- ubuntu questing: libowfat-dev 0.32-5
- ubuntu resolute: libowfat-dev 0.34-2 Β· GPL-2.0-only
- ubuntu stonking: libowfat-dev 0.34-2 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms