buffer_puterror2(3)
π buffer_puterror2 β from the Library Functions Manual π
okay bestie, gather round, because this one is a tiny little icon and you're gonna love her. she lives in the Library Functions Manual, her whole name is buffer_puterror2(3), and she does exactly one job and does it flawlessly. no cap. π«Ά
β¨ NAME β¨
buffer_puterror2 β write error string to buffer and flush πΈ
β¨ SYNTAX β¨
first things first, you gotta let her in the door:
#include <libowfat/buffer.h>
int buffer_puterror2(buffer* b,int errnum);
so like, two args, one int coming back at you. simple. elegant. main character energy. π
β¨ DESCRIPTION β¨
okay so here's the vibe: buffer_puterror2 takes the error message that goes with the error number you dropped into errnum, and writes it into the buffer. that's it, that's the whole thing. π¦
like, for example, if you hand her ENOENT, she gives you back "No such file or directory". literally the error string, straight into your buffer. iconic behavior honestly. π
β¨ RETURN VALUE β¨
0β everything is fine and we're thriving π-1β something went wrong, and it setserrnoso you can go find out what. dramatic but fair. π
β¨ SEE ALSO β¨
her friendship circle, go say hi π:
and that's the whole page, bestie, we ate and left no crumbs π bye luv u β¨
sign-off cuteness: this one's straight out of the Library Functions Manual, and the footer at the bottom just says buffer_puterror2(3) β that's the whole thing, no date or version info hanging out down there, so that's all we've got to report. ππ
π¦ 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