]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/libxo/libxo/xo_set_allocator.3
Add ELF Tool Chain's brandelf(1) to contrib
[FreeBSD/FreeBSD.git] / contrib / libxo / libxo / xo_set_allocator.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 December 4, 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 .Sy typedef void *(*xo_realloc_func_t)(void *, size_t);
21 .Pp
22 .Sy typedef void (*xo_free_func_t)(void *);
23 .Ft void
24 .Fn xo_set_allocator "xo_realloc_func_t realloc_func" "xo_free_func_t free_func"
25 .Sh DESCRIPTION
26 The
27 .Fn xo_set_allocator
28 function allows
29 .Nm libxo
30 to be used in environments
31 where the standard
32 .Xr realloc 3
33 and
34 .Xr free 3
35 functions are not available.
36 .Pp
37 .Fa realloc_func
38 should expect the same arguments as
39 .Xr realloc 3
40 and return
41 a pointer to memory following the same convention.
42 .Fa free_func
43 will receive the same argument as
44 .Xr free 3
45 and should release it, as appropriate for the environment.
46 .Pp
47 By default, the standard
48 .Xr realloc 3
49 and
50 .Xr free 3
51 functions are used.
52 .Sh ADDITIONAL DOCUMENTATION
53 Complete documentation can be found on github:
54 .Bd -literal -offset indent
55 http://juniper.github.io/libxo/libxo-manual.html
56 .Ed
57 .Pp
58 .Nm libxo
59 lives on github as:
60 .Bd -literal -offset indent
61 https://github.com/Juniper/libxo
62 .Ed
63 .Pp
64 The latest release of
65 .Nm libxo
66 is available at:
67 .Bd -literal -offset indent
68 https://github.com/Juniper/libxo/releases
69 .Ed
70 .Sh SEE ALSO
71 .Xr xo_emit 3
72 .Sh HISTORY
73 The
74 .Nm libxo
75 library was added in
76 .Fx 11.0 .
77 .Sh AUTHOR
78 Phil Shafer