LIBXO(3)
β¨ NAME β¨
okay bestie, welcome to the libxo(3) Library Functions Manual page β this one is all about xo_set_flags and xo_clear_flags, which set the operational flags for a libxo handle. No cap, that's the whole NAME section. π
π LIBRARY π
The library is libxo β literally the whole library line, periodt.
π§ SYNOPSIS π§
Here's the exact spell, bestie:
#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 xo_set_flags() to set the flags for a libxo handle. To use the default handle, pass a NULL handle. That's the move. π«Ά
The set of valid flags include:
XOF_CLOSE_FPβ Close file pointer onxo_destroy(3). This flag will trigger the call ofclose_func()(provided viaxo_set_writer(3)) when the handle is destroyed. π§ΉXOF_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. π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 underscores. βXOF_UNITSβ Display units (XMLandHMTL). π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. π¨XOF_WARN_XMLβ Generate warnings in XML onstdout. π’XOF_XPATHβ Emit XPath expressions (HTML). π§XOF_COLUMNSβ Forcexo_emit(3)to return columns used. πXOF_FLUSHβ Flush output after eachxo_emit(3)call. π¨
πΈ If the style is XO_STYLE_HTML πΈ
If the style is XO_STYLE_HTML, the following additional flags can be used:
XOF_XPATHβ Emit"data-xpath"attributes.XOF_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 π«
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".
The xo_clear_flags() function turns off the given flags in a specific handle. Bye-bye flags. π
π SEE ALSO π
π°οΈ HISTORY π°οΈ
The libxo library first appeared in FreeBSD 11.0. β
π AUTHORS π
libxo was written by Phil Shafer <phil@freebsd.org>. π
okay that's the whole page, bestie! This Debian source is dated December 4, 2014, and it's the LIBXO(3) manual β mwah πβ¨
π¦ where this page comes from
- freebsd 14.5: base 14.5
- freebsd 15.1: base 15.1
- Copyright (c) 2014, Juniper Networks, Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms