IXP_ERRBUF(3)
okay bestie, this is IXP_ERRBUF(3) from the Library Functions Manual β we're doing Plan 9-style errstr vibes and it's lowkey iconic π
πΈ NAME πΈ
ixp_errbuf, ixp_errstr, ixp_rerrstr, ixp_werrstr, ixp_vsnprint β the little errstr crew in libixp, and yes they ate π
β¨ SYNOPSIS β¨
#include <ixp.h>
char *ixp_errbuf(void);
void ixp_errstr(char *buf, int nbuf);
void ixp_rerrstr(char *buf, int nbuf);
void ixp_werrstr(const char *fmt, ...);
int (*ixp_vsnprint)(char *buf, int nbuf, const char *fmt, va_list);
π PARAMETERS π
bufβ the buffer you're reading and/or filling, bestie.nbufβ the size of that buffer.fmtβ a format string you use to write the errstr....β the arguments that go withfmt, obviously.
π DESCRIPTION π
Okay so these functions simulate Plan 9's errstr functionality β no cap. They replace errno in libixp. Note that these functions are not internationalized π.
ixp_errbuf(3) returns the errstr buffer for the current thread. Slay.
ixp_rerrstr(3) fills buf with the data from the current thread's error buffer. Copy that vibe over β¨.
ixp_errstr(3) exchanges buf's contents with those of the current thread's error buffer. It's giving swap energy π
.
ixp_werrstr(3) formats the given format string, fmt, via ixp_vsnprint(3) and writes it to the error buffer. Write it, bestie π«Ά.
ixp_vsnprint(3) may be set to a function which will format its arguments and write the result to the nbuf length buffer buf(3). The default value is vsnprintf(3). That function must format '%s' as a nul-terminated string and may not consume any arguments not indicated by a %-prefixed format specifier, but may otherwise behave in any manner chosen by the user. Periodt. π₯
π¦ SEE ALSO π¦
ixp_vsmprint(3)β go peek, bestie π
made with π by the libixp Manual crew β 2012 Dec β for IXP_ERRBUF(3), bye bestie! π«Ά
π¦ where this page comes from
- nixos 26.05: libixp 0-unstable-2022-04-04
- nixpkgs unstable: libixp 0-unstable-2022-04-04
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms