LIBXO(3)
π LIBXO π
okay bestie, welcome to the Library Functions Manual for LIBXO(3) β yes it's giving very serious C library energy but I promise it's cute once you get it π«Ά
β¨ NAME β¨
xo_set_writer β set custom writer functions for a libxo handle
π LIBRARY π
library βlibxoβ
like, that's the whole vibe. it's in libxo, that's the house it lives in π
π SYNOPSIS π
#include <libxo/xo.h>
void typedef xo_ssize_t (*xo_write_func_t)(void *, const char *);
typedef void (*xo_close_func_t)(void *);
typedef int (*xo_flush_func_t)(void *);
xo_set_writer(xo_handle_t *handle, void *opaque);
"xo_write_func_t write_func"
"xo_close_func_t close_func"
"xo_flush_func_t flush_func"
not me putting the function-pointer typedefs right up top so you know exactly what shapes of functions we're dealing with π
πΈ DESCRIPTION πΈ
so the whole point of xo_set_writer() is that it lets you hand libxo your own custom βwriteβ functions, so you get to control how libxo actually writes its data. main character customization energy, fr fr.
an opaque argument gets recorded and then passed right back to the write_func function β that's so your function can grab whatever context info it needs. it's giving "here's your little bag of stuff back, do your thing" πβ¨
the close_func function is where you can release that opaque data, plus any other resources you were holding onto. no cap, clean up after yourself bestie.
and the flush_func function should flush out any pending data that's associated with the opaque pointer. get that data out of the buffer and onto wherever it's going π
π SEE ALSO π
go read those too, they're iconic, iykyk π
π¦ HISTORY π¦
the libxo library first appeared in FreeBSD 11.0.
π AUTHORS π
libxo was written by Phil Shafer <phil@freebsd.org>.
thank you phil, king behavior πβοΈ
π ADDITIONAL DOCUMENTATION π
FreeBSD uses libxo version 1.7.5. the complete documentation lives 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
π°οΈ HISTORY π°οΈ
(yeah there's two HISTORY sections, and honestly? slay, we're keeping both, no detail left behind π)
the libxo library was added in FreeBSD 11.0.
π AUTHOR π
Phil Shafer
this page is the Debian build of LIBXO(3), dated December 4, 2014 β and that's the whole thing bestie, you understood the assignment, periodt π
β¨ππ¦
π¦ 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