Making macros include-safe
This commit is contained in:
parent
2d17b39772
commit
beaa6bfd25
|
@ -5,14 +5,19 @@
|
|||
#include <stdio.h>
|
||||
|
||||
// If we use NCurses, we need to use the appropriate printing function
|
||||
#ifdef NCURSES
|
||||
#include <ncurses.h>
|
||||
#define LOG printw
|
||||
#else
|
||||
#define LOG printf
|
||||
#ifndef LOG
|
||||
#ifdef NCURSES
|
||||
#include <ncurses.h>
|
||||
#define LOG printw
|
||||
#else
|
||||
#define LOG printf
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef EXIT_WITH_ERROR
|
||||
#define EXIT_WITH_ERROR(...) exitWithError(__FILE__, __LINE__, __VA_ARGS__)
|
||||
#endif
|
||||
|
||||
#define EXIT_WITH_ERROR(...) exitWithError(__FILE__, __LINE__, __VA_ARGS__)
|
||||
inline void exitWithError [[noreturn]] (const char *fileName, const int lineNumber, const char *format, ...)
|
||||
{
|
||||
char *outstr = 0;
|
||||
|
|
Loading…
Reference in New Issue