/* * outv_nl -- print new line without indentation */ void outv_nl(int vlevel) { if (outv_check(vlevel)) { _out_prefix(); fprintf(out_fh, "\n"); } }
/* * outv_nl -- print new line without indentation */ void outv_nl(int vlevel) { if (!outv_check(vlevel)) return; _out_prefix(); fprintf(out_fh, "\n"); }
/* * outv -- print message taking into account verbosity level */ void outv(int vlevel, const char *fmt, ...) { va_list ap; if (outv_check(vlevel)) { _out_prefix(); _out_indent(); va_start(ap, fmt); vfprintf(out_fh, fmt, ap); va_end(ap); } }
void outv_title(int vlevel, const char *fmt, ...) { va_list ap; if (!outv_check(vlevel)) return; fprintf(out_fh, "\n"); _out_prefix(); _out_indent(); va_start(ap, fmt); vfprintf(out_fh, fmt, ap); va_end(ap); fprintf(out_fh, ":\n"); }
/* * outv_field -- print field name and value in specified format * * Field name will have fixed width which can be changed by * out_set_column_width() function. * vlevel - verbosity level * field - field name * fmt - format form value */ void outv_field(int vlevel, const char *field, const char *fmt, ...) { va_list ap; if (outv_check(vlevel)) { _out_prefix(); _out_indent(); va_start(ap, fmt); fprintf(out_fh, "%-*s : ", out_column_width, field); vfprintf(out_fh, fmt, ap); fprintf(out_fh, "\n"); va_end(ap); } }