]>
granicus.if.org Git - gc/commit
Code refactoring of GC_X_printf to improve extensibility
* misc.c (GC_DEFAULT_STDOUT_FD, GC_DEFAULT_STDERR_FD): New macro.
* misc.c (GC_stdout, GC_stderr, GC_log): Use GC_DEFAULT_STDOUT_FD and
GC_DEFAULT_STDERR_FD (only if not OS2, MACOS, Win32).
* misc.c (GC_PRINTF_IMPL): Replace with GC_PRINTF_FILLBUF (move out
"buf" array definition, move out WRITE call, remove "f" and "f_name"
arguments, add "buf" argument, use sizeof(buf)-1 instead of BUFSZ.
* misc.c (GC_printf, GC_err_printf, GC_log_printf): Declare and use
"buf" array; replace GC_PRINTF_IMPL with GC_PRINTF_FILLBUF.
* misc.c (GC_printf, GC_log_printf): Call WRITE to output "buf"
content.
* misc.c (GC_err_printf): Call GC_err_puts to output "buf" content.
* misc.c (GC_default_warn_proc): Add TODO item.