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

Function xo_set_file_h

tools/libxo/libxo/libxo.c:1916–1932  ·  view source on GitHub ↗

* Set the default handler to output to a file. * * @param xop libxo handle * @param fp FILE pointer to use * @return 0 on success, non-zero on failure */

Source from the content-addressed store, hash-verified

1914 * @return 0 on success, non-zero on failure
1915 */
1916int
1917xo_set_file_h (xo_handle_t *xop, FILE *fp)
1918{
1919 xop = xo_default(xop);
1920
1921 if (fp == NULL) {
1922 xo_failure(xop, "xo_set_file: NULL fp");
1923 return -1;
1924 }
1925
1926 xop->xo_opaque = fp;
1927 xop->xo_write = xo_write_to_file;
1928 xop->xo_close = xo_close_file;
1929 xop->xo_flush = xo_flush_file;
1930
1931 return 0;
1932}
1933
1934/**
1935 * Set the default handler to output to a file.

Callers 1

xo_set_fileFunction · 0.85

Calls 2

xo_defaultFunction · 0.85
xo_failureFunction · 0.85

Tested by

no test coverage detected