MCPcopy Create free account
hub / github.com/CppCXY/EmmyLuaCodeStyle / _mi_fputs

Function _mi_fputs

3rd/mimalloc-2.0.9/src/options.c:329–341  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

327}
328
329void _mi_fputs(mi_output_fun* out, void* arg, const char* prefix, const char* message) {
330 if (out==NULL || (FILE*)out==stdout || (FILE*)out==stderr) { // TODO: use mi_out_stderr for stderr?
331 if (!mi_recurse_enter()) return;
332 out = mi_out_get_default(&arg);
333 if (prefix != NULL) out(prefix, arg);
334 out(message, arg);
335 mi_recurse_exit();
336 }
337 else {
338 if (prefix != NULL) out(prefix, arg);
339 out(message, arg);
340 }
341}
342
343// Define our own limited `fprintf` that avoids memory allocation.
344// We do this using `snprintf` with a limited buffer.

Callers 3

mi_vfprintfFunction · 0.85
mi_process_loadFunction · 0.85
mi_buffered_flushFunction · 0.85

Calls 3

mi_recurse_enterFunction · 0.85
mi_out_get_defaultFunction · 0.85
mi_recurse_exitFunction · 0.85

Tested by

no test coverage detected