2 .\" # Copyright (c) 2014, Juniper Networks, Inc.
3 .\" # All rights reserved.
4 .\" # This SOFTWARE is licensed under the LICENSE provided in the
5 .\" # ../Copyright file. By downloading, installing, copying, or
6 .\" # using the SOFTWARE, you agree to be bound by the terms of that
8 .\" # Phil Shafer, July 2014
14 .Nm xo_create , xo_create_to_file , xo_destroy
15 .Nd create and destroy libxo output handles
21 .Fn xo_create "unsigned style" "unsigned flags"
23 .Fn xo_create_to_file "FILE *fp" "unsigned style" "unsigned flags"
25 .Fn xo_destroy "xo_handle_t *handle"
29 handle can be allocated using the
32 .Bd -literal -offset indent
34 xo_handle_t *xop = xo_create(XO_STYLE_JSON, XOF_WARN);
36 xo_emit_h(xop, "testing\n");
41 writes output to standard output.
43 function is provided for situations when output should be written to a
48 flag to trigger a call to
52 pointer when the handle is destroyed.
56 function releases a handle and any resources it is
62 handle will release any
63 resources associated with the default handle.
66 .Xr xo_set_options 3 ,
71 library first appeared in
76 .An Phil Shafer Aq Mt phil@freebsd.org .