MCPcopy Create free account
hub / github.com/F-Stack/f-stack / xo_create

Function xo_create

tools/libxo/libxo/libxo.c:1867–1882  ·  view source on GitHub ↗

* Create a handle for use by later libxo functions. * * Note: normal use of libxo does not require a distinct handle, since * the default handle (used when NULL is passed) generates text on stdout. * * @param style Style of output desired (XO_STYLE_* value) * @param flags Set of XOF_* flags in use with this handle * @return Newly allocated handle * @see xo_destroy */

Source from the content-addressed store, hash-verified

1865 * @see xo_destroy
1866 */
1867xo_handle_t *
1868xo_create (xo_style_t style, xo_xof_flags_t flags)
1869{
1870 xo_handle_t *xop = xo_realloc(NULL, sizeof(*xop));
1871
1872 if (xop) {
1873 bzero(xop, sizeof(*xop));
1874
1875 xop->xo_style = style;
1876 XOF_SET(xop, flags);
1877 xo_init_handle(xop);
1878 xop->xo_style = style; /* Reset style (see LIBXO_OPTIONS) */
1879 }
1880
1881 return xop;
1882}
1883
1884/**
1885 * Create a handle that will write to the given file. Use

Callers 3

xo_vsyslogFunction · 0.85
xo_encoder_createFunction · 0.85
xo_create_to_fileFunction · 0.85

Calls 2

bzeroFunction · 0.85
xo_init_handleFunction · 0.85

Tested by

no test coverage detected