error: Add debug() function

Signed-off-by: Daniel Wagner <daniel.wagner@bmw-carit.de>
This commit is contained in:
Daniel Wagner 2014-11-05 10:09:40 +01:00 committed by Clark Williams
parent 62a796727a
commit bf246ba473
2 changed files with 11 additions and 0 deletions

View File

@ -10,6 +10,7 @@ void err_exit(int err, char *fmt, ...);
void err_msg(char *fmt, ...);
void err_msg_n(int err, char *fmt, ...);
void err_quit(char *fmt, ...);
void debug(char *fmt, ...);
void info(char *fmt, ...);
void warn(char *fmt, ...);
void fatal(char *fmt, ...);

View File

@ -46,6 +46,16 @@ void err_quit(char *fmt, ...)
exit(1);
}
void debug(char *fmt, ...)
{
va_list ap;
va_start(ap, fmt);
fputs("DEBUG: ", stderr);
err_doit(0, fmt, ap);
va_end(ap);
}
void info(char *fmt, ...)
{
va_list ap;