static void to(const char *s, ...) { tino_va_list list; tino_va_start(list, s); vex(211, &list, "timeout", 0); /* never reached */ }
static void ex(const char *s, ...) { tino_va_list list; tino_va_start(list, s); vex(210, &list, "error", errno); /* never reached */ }
static void fin(int ret, const char *s, ...) { tino_va_list list; tino_va_start(list, s); vex(ret, &list, "info", 0); /* never reached */ }
static void info(const char *s, ...) { tino_va_list list; if (!verbose) return; fprintf(stderr, "[%ld] %s info: ", (long)mypid, arg0); tino_va_start(list, s); tino_vfprintf(stderr, &list); tino_va_end(list); fprintf(stderr, "\n"); }
static void verbose(const char *s, ...) { tino_va_list list; if (!m_verbose) return; tino_va_start(list, s); vprintf(s, tino_va_get(list)); tino_va_end(list); printf("\n"); }
/* This is wrong (on hexdump continuation lines), but I cannot help it now */ static void add_prefix(const char *what, ...) { tino_va_list list; if (!tino_buf_get_lenO(&prefix)) { const char *p= in_line ? line_cont_prefix : line_prefix; if (p && *p) tino_buf_add_sO(&prefix, p); } tino_va_start(list, what); tino_buf_add_vsprintfO(&prefix, &list); tino_va_end(list); }