buffer_putsalign(3)
π buffer_putsalign β bestie, we're writing an ASCIIZ string straight into a buffer π
okay so real talk, this is a page from the Library Functions Manual, and the star of the show is buffer_putsalign(3). she's a tiny little libowfat function with main character energy and honestly? she ate. π
β¨ NAME β¨
buffer_putsalign β write ASCIIZ string to buffer
πΈ SYNTAX πΈ
#include <libowfat/buffer.h>
int buffer_putsalign(buffer* b,const char* x);
π¦ DESCRIPTION π¦
so buffer_putsalign is literally just like buffer_putalign, except the len is figured out for you: it's the number of bytes before the first \0 in x. no cap. that's the whole vibe check. π«Ά
basically, if x is an ASCIIZ string (that's fancy talk for "a string that ends in a \0"), she counts how many bytes come before that \0 and uses that as the length. periodt. π
π RETURN VALUE π
0β everything is fine, we're slaying, nothing to worry about β¨-1β uh oh, error time π and yes,errnogets set, so go check on her
π SEE ALSO π
and that's the whole page, bestie!! this was buffer_putsalign(3) from the Library Functions Manual β no date on this one, she's timeless like that π stay hydrated, flush your buffers, and go read buffer_flush(3) next, iykyk π§β¨
π¦ 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