/* Like printf(), but writes output to the given HANDLE. */ int hprintf (int handle, const char *format, ...) { va_list args; int retval; va_start (args, format); retval = vhprintf (handle, format, args); va_end (args); return retval; }
void assprint(const char *expr, const char *file, int line, const char *fmt, ...) { va_list ap; /* I like compiler like output */ hprintf("%s:%d: ASSERT(%s)\n", file, line, expr); va_start(ap, fmt); vhprintf(fmt, ap); va_end(ap); hputs("\n"); breakpoint(); }
/* The standard vprintf() function, which is like printf() but uses a va_list. */ int vprintf (const char *format, va_list args) { return vhprintf (STDOUT_FILENO, format, args); }