12 // print a warning (when return value is ignored)
13 #define WARN(format, args...) fprintf(stderr, "[%s:%d %s()] " format "\n", \
14 __FILE__, __LINE__, __func__, ## args)
16 // print a warning with return value of FAILURE
17 #define ERROR(format, args...) (WARN(format, ## args), FAILURE)
19 // NOTE: ASSERT is used only when you want to issue a warning in a case
20 // that should not happen and when there is no way to recover.
21 // If there is any way to recover, use ERROR() and handle the problem.
22 //#define ASSERT(x, args...) if (! x) WARN("ASSERT FAILED (" #x ") " args)
30 // c-file-style: "linux"