]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/libxo/libxo/xo_set_writer.3
Update mandoc to 1.13.2
[FreeBSD/FreeBSD.git] / contrib / libxo / libxo / xo_set_writer.3
1 .\" #
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
7 .\" # LICENSE.
8 .\" # Phil Shafer, July 2014
9 .\" 
10 .Dd July, 2014
11 .Dt LIBXO 3
12 .Os
13 .Sh NAME
14 .Nm xo_emit
15 .Nd emit formatted output based on format string and arguments
16 .Sh LIBRARY
17 .Lb libxo
18 .Sh SYNOPSIS
19 .In libxo/xo.h
20 .Ft void
21 .Sy typedef int (*xo_write_func_t)(void *, const char *);
22 .Pp
23 .Sy typedef void (*xo_close_func_t)(void *);
24 .Fn xo_set_writer "xo_handle_t *handle" "void *opaque"
25                         "xo_write_func_t write_func"
26                         "xo_close_func_t close_func"
27 .Sh DESCRIPTION
28 The
29 .Fn xo_set_writer
30 function allows custom
31 .Dq write
32 functions
33 which can tailor how
34 .Em libxo
35 writes data.  An
36 .Fa opaque
37 argument is
38 recorded and passed back to the
39 .Fa write_func
40 function, allowing the function
41 to acquire context information. The
42 .Fa close_func
43 function can
44 release this opaque data and any other resources as needed.
45 .Sh ADDITIONAL DOCUMENTATION
46 .Pp
47 Complete documentation can be found on github:
48 .Bd -literal -offset indent
49 http://juniper.github.io/libxo/libxo-manual.html
50 .Ed
51 .Pp
52 libxo lives on github as:
53 .Bd -literal -offset indent
54 https://github.com/Juniper/libxo
55 .Ed
56 .Pp
57 The latest release of libxo is available at:
58 .Bd -literal -offset indent
59 https://github.com/Juniper/libxo/releases
60 .Ed
61 .Sh SEE ALSO
62 .Xr xo_emit 3
63 .Sh HISTORY
64 The
65 .Fa libxo
66 library was added in FreeBSD 11.0.
67 .Sh AUTHOR
68 Phil Shafer