xo_set_flags, libxo, xo_clear_flags(3) | set operational flags for a libxo handle |
xo_clear_flags, libxo, xo_set_flags(3) | set operational flags for a libxo handle |
LIBXO(3) | MidnightBSD Library Functions Manual | LIBXO(3) |
xo_set_flags
,
xo_clear_flags
— set
operational flags for a libxo handle
Text, XML, JSON, and HTML Output Emission Library (libxo, -lxo)
#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);
Use the
xo_set_flags
()
function to set the flags for a libxo
handle. To use
the default handle, pass a NULL
handle.
The set of valid flags include:
XOF_CLOSE_FP
close_func
()
(provided via
xo_set_writer(3))
when the handle is destroyed.XOF_COLOR
XOF_COLOR_ALLOWED
XOF_INFO
XOF_KEYS
XOF_LOG_GETTEXT
XOF_LOG_SYSLOG
XOF_NO_ENV
LIBXO_OPTIONS
environment
variable.XOF_PRETTY
XOF_UNDERSCORES
XOF_UNITS
XOF_WARN
libxo
. The function
xo_failure
()
can be used as a breakpoint for a debugger, regardless of whether warnings
are enabled.XOF_WARN_XML
XOF_XPATH
XOF_COLUMNS
XOF_FLUSH
If the style is XO_STYLE_HTML
, the
following additional flags can be used:
XOF_XPATH
XOF_INFO
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:
The
xo_clear_flags
()
function turns off the given flags in a specific handle.
The libxo
library first appeared in
FreeBSD 11.0.
libxo
was written by Phil
Shafer
<phil@freebsd.org>.
December 4, 2014 | midnightbsd-3.1 |