buffer_putlong(3)
π buffer_putlong β the glow-up your signed longs deserve π
okay so bestie, we're in section 3 of the Library Functions Manual, and today's main character is buffer_putlong. it's giving "quietly essential" fr fr. let's get into it β¨
πΈ NAME πΈ
buffer_putlong β write a decimal ASCII representation of a signed long integer to buffer
like, you hand it a number, it hands back the digits as text, and it drops that text straight into a buffer. no drama, no fuss, just vibes π
β¨ SYNTAX β¨
#include <libowfat/buffer.h>
int buffer_putlong(buffer* b,signed long x);
yeah that's the whole thing. include the header, call the function, b is your buffer and x is your signed long. periodt π«Ά
π¦ DESCRIPTION π¦
so here's the tea: buffer_putlong is similar to passing the result of fmt_long to buffer_put.
that's literally it. that's the whole description. you fmt_long the number, you buffer_put the string, and this function is just that combo meal already assembled for you. iconic behaviour honestly π
π RETURN VALUE π
0β everything is fine, we ate, no crumbs, slay β¨-1β error, and it's settingerrnoso you know what went wrong π
bestie please actually check the return value. -1 is not a vibe, it's a cry for help.
π SEE ALSO π
like go read fmt_long(3) if you wanna see where the number-to-text magic actually happens, and buffer_flush(3) when you finally wanna push all that buffered goodness out into the world π§
and that's the whole page, bestie!! it lives in the Library Functions Manual as buffer_putlong(3), section 3, exactly where you found it π go forth, write your longs, stay decimal, stay hydrated ππΈπ
π¦ 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