| 327 | } |
| 328 | |
| 329 | void _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. |
no test coverage detected