1LIBXO(3)                 BSD Library Functions Manual                 LIBXO(3)
2

NAME

4     xo_set_flags, xo_clear_flags — set operational flags for a libxo handle
5

LIBRARY

7     library “libxo”
8

SYNOPSIS

10     #include <libxo/xo.h>
11
12     void
13     xo_set_flags(xo_handle_t *handle, unsigned flags);
14
15     void
16     xo_clear_flags(xo_handle_t *handle, xo_xof_flags_t flags);
17

DESCRIPTION

19     Use the xo_set_flags() function to set the flags for a libxo handle.  To
20     use the default handle, pass a NULL handle.
21
22     The set of valid flags include:
23
24     Flag            Description
25
26     XOF_CLOSE_FP     Close file pointer on xo_destroy(3).  This flag will
27                      trigger the call of the close_func() (provided via
28                      xo_set_writer(3)) when the handle is destroyed.
29
30     XOF_COLOR        Enable color and effects in output regardless of output
31                      device.
32
33     XOF_COLOR_ALLOWED
34                      Allow color and effects if the output device is a termi‐
35                      nal.
36
37     XOF_INFO         Display info data attributes (HTML)
38
39     XOF_KEYS         Emit the key attribute (XML)
40
41     XOF_LOG_GETTEXT  Log (via stderr) each gettext(3) string lookup
42
43     XOF_LOG_SYSLOG   Log (via stderr) each syslog message (via xo_syslog(3))
44
45     XOF_NO_ENV       Do not use the LIBXO_OPTIONS environment variable.
46
47     XOF_PRETTY       Make 'pretty printed' output, with the addition of in‐
48                      dentation and newlines to enhance the readability of
49                      XML, JSON, and HTML output.  Text output is not af‐
50                      fected.
51
52     XOF_UNDERSCORES  Replaces hyphens with underscores
53
54     XOF_UNITS        Display units (XML and HMTL)
55
56     XOF_WARN         Generate warnings for broken calls, triggering diagnos‐
57                      tic output (on standard error) when the library notices
58                      errors during operations, or with arguments to func‐
59                      tions.  Without warnings enabled, such conditions are
60                      ignored.  Warnings allow developers to debug their in‐
61                      teraction with libxo.  The function xo_failure() can be
62                      used as a breakpoint for a debugger, regardless of
63                      whether warnings are enabled.
64
65     XOF_WARN_XML     Generate warnings in XML on stdout
66
67     XOF_XPATH        Emit XPath expressions (HTML)
68
69     XOF_COLUMNS      Force xo_emit(3) to return columns used
70
71     XOF_FLUSH        Flush output after each xo_emit(3) call
72
73     If the style is XO_STYLE_HTML, the following additional flags can be
74     used:
75
76     Flag            Description
77
78     XOF_XPATH        Emit "data-xpath" attributes
79
80     XOF_INFO         Emit additional informational fields for HTML output.
81                      See xo_set_info(3) for details.
82
83     The XOF_XPATH flag enables the emission of XPath expressions detailing
84     the hierarchy of XML elements used to encode the data field, if the XPATH
85     style of output were requested.
86
87     If the style is XO_STYLE_XML, the following additional flags can be used:
88
89     Flag            Description
90
91     XOF_KEYS         Add 'key' attribute to the XML encoding for field defi‐
92                      nitions that use the 'k' modifier.  The key attribute
93                      has the value "key".
94
95     The xo_clear_flags() function turns off the given flags in a specific
96     handle.
97

SEE ALSO

99     xo_emit(3), libxo(3)
100

HISTORY

102     The libxo library first appeared in FreeBSD 11.0.
103

AUTHORS

105     libxo was written by Phil Shafer <phil@freebsd.org>.
106
107

ADDITIONAL DOCUMENTATION

109     FreeBSD uses libxo version 1.6.0.  Complete documentation can be found on
110     github:
111
112           https://juniper.github.io/libxo/1.6.0/html/index.html
113
114     libxo lives on github as:
115
116           https://github.com/Juniper/libxo
117
118     The latest release of libxo is available at:
119
120           https://github.com/Juniper/libxo/releases
121

HISTORY

123     The libxo library was added in FreeBSD 11.0.
124

AUTHOR

126     Phil Shafer
127
128BSD                            December 4, 2014                            BSD
Impressum