diff --git a/AUTHORS b/AUTHORS index 36df40b..1aa8266 100644 --- a/AUTHORS +++ b/AUTHORS @@ -14,6 +14,7 @@ Contributors: * Testing. Past Contributors: + -- KonoM (Tamir Atias) * Lazy ass. * Bug Squatter. diff --git a/src/log.h b/src/log.h index d0ebe44..8c9eeed 100644 --- a/src/log.h +++ b/src/log.h @@ -1,10 +1,16 @@ #pragma once #include +/* We'll use asserts in DEBUG if defined. */ +#ifndef DEBUG +# define NODEBUG +#endif /* DEBUG */ +#include + #define LOG(str, args...)(fprintf(stdout, str"\n", ## args)) -#define WARN(str, args...)(fprintf(stderr, "Warning: "str"\n", ## args)) +#define WARN(str, args...)(fprintf(stderr, "Warning: "str"\n", ## args), assert(0)) #define ERR(str, args...) (fprintf(stderr, "ERROR %s:%d: [%s] "str"\n", \ - __FILE__, __LINE__, __func__, ## args)) + __FILE__, __LINE__, __func__, ## args), assert(0)) #ifdef DEBUG # undef DEBUG