LIBXO(3)
β¨ LIBXO(3) β¨ β Library Functions Manual π
okay bestie, this is the libxo page, specifically the one about xo_set_flags and xo_clear_flags β the little switches that tell a libxo handle how to act. yes it's a library page, yes it's in section 3, and yes we're gonna get through every single flag together. π
π NAME
xo_set_flags, xo_clear_flags β set operational flags for a libxo handle
π LIBRARY
library βlibxoβ π«Ά
βοΈ SYNOPSIS
#include <libxo/xo.h>
void
xo_set_flags(xo_handle_t *handle, unsigned flags);
void
xo_clear_flags(xo_handle_t *handle, xo_xof_flags_t flags);
π DESCRIPTION
Use the xo_set_flags() function to set the flags for a libxo handle. And if you wanna use the default handle? just pass a NULL handle. easy. no notes. β¨
The set of valid flags include:
XOF_CLOSE_FPβ Close file pointer onxo_destroy(3). This flag will trigger the call of theclose_func()(provided viaxo_set_writer(3)) when the handle is destroyed. π bye bye file pointerXOF_COLORβ Enable color and effects in output regardless of output device. π πXOF_COLOR_ALLOWEDβ Allow color and effects if the output device is a terminal. (more polite, lowkey)XOF_INFOβ Display info data attributes (HTML)XOF_KEYSβ Emit thekeyattribute (XML) πXOF_LOG_GETTEXTβ Log (viastderr) eachgettext(3)string lookup πXOF_LOG_SYSLOGβ Log (viastderr) each syslog message (viaxo_syslog(3)) πXOF_NO_ENVβ Do not use theLIBXO_OPTIONSenvironment variable. π«XOF_PRETTYβ Make 'pretty printed' output, with the addition of indentation and newlines to enhance the readability of XML, JSON, and HTML output. Text output is not affected. π β¨XOF_UNDERSCORESβ Replaces hyphens with underscoresXOF_UNITSβ Display units (XML and HMTL)XOF_WARNβ Generate warnings for broken calls, triggering diagnostic output (on standard error) when the library notices errors during operations, or with arguments to functions. Without warnings enabled, such conditions are ignored. Warnings allow developers to debug their interaction with libxo. The functionxo_failure()can be used as a breakpoint for a debugger, regardless of whether warnings are enabled. π¨ lowkey the most useful one fr frXOF_WARN_XMLβ Generate warnings in XML onstdoutXOF_XPATHβ Emit XPath expressions (HTML)XOF_COLUMNSβ Forcexo_emit(3)to return columns usedXOF_FLUSHβ Flush output after eachxo_emit(3)call π½β¨
πΈ if the style is XO_STYLE_HTMLβ¦
the following additional flags can be used:
XOF_XPATHβ Emit"data-xpath"attributesXOF_INFOβ Emit additional informational fields for HTML output. Seexo_set_info(3)for details.
The XOF_XPATH flag enables the emission of XPath expressions detailing the hierarchy of XML elements used to encode the data field, if the XPATH style of output were requested.
π¦ if the style is XO_STYLE_XMLβ¦
the following additional flags can be used:
XOF_KEYSβ Add'key'attribute to the XML encoding for field definitions that use the'k'modifier. The key attribute has the value"key".
And the xo_clear_flags() function turns off the given flags in a specific handle. off they go, iconic behavior π
π SEE ALSO
π°οΈ HISTORY
The libxo library first appeared in FreeBSD 11.0.
π AUTHORS
libxo was written by Phil Shafer <phil@freebsd.org>. π«Ά
π ADDITIONAL DOCUMENTATION
FreeBSD uses libxo version 1.7.5. 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
The latest release of libxo is available at:
https://github.com/Juniper/libxo/releases
π°οΈ HISTORY (yes, again, bestie)
The libxo library was added in FreeBSD 11.0.
βοΈ AUTHOR
Phil Shafer
π that's the whole page, no cap. this one shipped from Debian, dated December 4, 2014, and it's the LIBXO(3) page you just read. go set some flags, you absolute main character. πβ¨π¦
π¦ 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