Add warn() and info() debug macros

This commit is contained in:
Rodrigo Arias 2023-02-21 15:35:18 +01:00 committed by Rodrigo Arias Mallo
parent 2eac823014
commit 02dbf0b993
2 changed files with 2 additions and 1 deletions

View File

@ -47,7 +47,6 @@ verr(const char *func, const char *errstr, ...)
va_end(ap);
}
void
vdie(const char *func, const char *errstr, ...)
{

View File

@ -18,6 +18,8 @@ void vdie(const char *func, const char *errstr, ...);
#define rerr(...) fprintf(stderr, __VA_ARGS__)
#define err(...) verr(__func__, __VA_ARGS__)
#define die(...) vdie(__func__, __VA_ARGS__)
#define info(...) verr("INFO", __VA_ARGS__)
#define warn(...) verr("WARN", __VA_ARGS__)
#ifdef ENABLE_DEBUG
# define dbg(...) verr(__func__, __VA_ARGS__)