]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/libxo/libxo/xo_set_allocator.3
Merge llvm 3.5.0 release from ^/vendor/llvm/dist, resolve conflicts, and
[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 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 .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 libxo to be used in environments
29 where the standard
30 .Xr realloc 3
31 and
32 .Xr free 3
33 functions are not available.
34 .Pp
35 .Fa realloc_func
36 should expect the same arguments as
37 .Xr realloc 3
38 and return
39 a pointer to memory following the same convention.
40 .Fa free_func
41 will receive the same argument as
42 .Xr free 3
43 and should release it, asappropriate for the environment.
44 .Pp
45 By default, the standard
46 .Xr realloc 3
47 and
48 .Xr free 3
49 functions are used.
50 .Sh ADDITIONAL DOCUMENTATION
51 .Pp
52 Complete documentation can be found on github:
53 .Bd -literal -offset indent
54 http://juniper.github.io/libxo/libxo-manual.html
55 .Ed
56 .Pp
57 libxo lives on github as:
58 .Bd -literal -offset indent
59 https://github.com/Juniper/libxo
60 .Ed
61 .Pp
62 The latest release of libxo is available at:
63 .Bd -literal -offset indent
64 https://github.com/Juniper/libxo/releases
65 .Ed
66 .Sh SEE ALSO
67 .Xr xo_emit 3
68 .Sh HISTORY
69 The
70 .Fa libxo
71 library was added in FreeBSD 11.0.
72 .Sh AUTHOR
73 Phil Shafer