Skip to main content

ly_out_reset

Function ly_out_reset 

Source
pub unsafe extern "C" fn ly_out_reset(out: *mut ly_out) -> Type
Expand description

@brief Reset the output medium to write from its beginning, so the following printer function will rewrite the current data instead of appending.

Note that in case the underlying output is not seekable (stream referring a pipe/FIFO/socket or the callback output type), nothing actually happens despite the function succeeds. Also note that the medium is not returned to the state it was when the handler was created. For example, file is seeked into the offset zero and truncated, the content from the time it was opened with ::ly_out_new_file() is not restored.

@param[in] out Printer handler. @return LY_SUCCESS in case of success @return LY_ESYS in case of failure