LIBXO(3)
β¨ LIBXO β the libxo(3) page, bestie edition β¨
okay so this is the manual for libxo, a whole Library Functions Manual situation, and we're talking about the little squad of functions that go π
xo_emit_err, xo_emit_errc, xo_emit_errx xo_emit_warn, xo_emit_warnx, xo_emit_warn_c, xo_emit_warn_hc β they emit errors and warnings in multiple output styles π«Ά
π LIBRARY
the library is literally called βlibxoβ. that's it. that's the vibe. π
β¨ SYNOPSIS β¨
#include <libxo/xo.h>
void
xo_emit_warn(const char *fmt, ...);
void
xo_emit_warnx(const char *fmt, ...);
void
xo_emit_warn_c(int code, const char *fmt, ...);
void
xo_emit_warn_hc(xo_handle_t *xop, int code, const char *fmt, ...);
void
xo_emit_err(int eval, const char *fmt, ...);
void
xo_emit_errc(int eval, int code, const char *fmt, ...);
void
xo_emit_errx(int eval, const char *fmt, ...);
π DESCRIPTION π
so. many programs out here are using the standard library girlies err(3) and warn(3) to spit out errors and warnings for the user, right? and libxo is like "bestie i want that info delivered through the current output style" so it hands you these compatible functions to make that happen. iconic behavior, no notes. π
the fmt argument is one that's compatible with xo_emit(3), which is the whole reason these functions can make structured data. and if what you want is unstructured data instead? go use the xo_err(3) functions. different lane, same energy. π¦
here's what these functions actually put on the screen: the program name, then a colon, then a formatted message based on the arguments, and then optionally another colon plus an error message that's associated with either errno or the code parameter. periodt. π
EXAMPLE: c if (open(filename, O_RDONLY) < 0) xo_err(1, "cannot open file '%s'", filename);
πΈ SEE ALSO πΈ
π°οΈ HISTORY π°οΈ
the libxo library first appeared in FreeBSD 11.0. a legend was born, fr fr. β
π AUTHORS π
libxo was written by Phil Shafer <phil@freebsd.org>. ty for your service king π«‘π
π ADDITIONAL DOCUMENTATION π
FreeBSD uses libxo version 1.7.5. and the complete documentation can be found on github:
https://juniper.github.io/libxo/1.7.5/html/index.html
libxo lives on github as:
https://github.com/Juniper/libxo
and the latest release of libxo is available at:
https://github.com/Juniper/libxo/releases
like, all the lore is right there bestie, go read it π§β¨
π°οΈ HISTORY (yes, again, she said it twice) π°οΈ
the libxo library was added in FreeBSD 11.0. same fact, second outfit. π
βοΈ AUTHOR βοΈ
Phil Shafer
aaaaaand that's the whole page!! π this version came to you from Debian, dated December 4, 2014. stay slaying, stay structured, and don't forget your colons πππ
π¦ where this page comes from
- epel 9: libxo-devel 1.7.5-1.el9 Β· LicenseRef-Callaway-BSD
- fedora 43: libxo-devel 1.7.5-2.fc43 Β· LicenseRef-Callaway-BSD
- fedora 43: libxo-devel 1.7.5-2.fc43 Β· LicenseRef-Callaway-BSD
- fedora 44: libxo-devel 1.7.5-3.fc44 Β· LicenseRef-Callaway-BSD
- fedora 44: libxo-devel 1.7.5-3.fc44 Β· LicenseRef-Callaway-BSD
- nixpkgs unstable: libxo 1.7.5
- Copyright (c) 2014, Juniper Networks, Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms