Created
December 7, 2017 14:47
-
-
Save cjsmeele/438a97f5ed87248f2709e732395b3290 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define die(...) \ | |
do { \ | |
fprintf(stderr, "[error] %s:%d: ", __FILE__, __LINE__); \ | |
fprintf(stderr, __VA_ARGS__); \ | |
fprintf(stderr, "\n"); \ | |
exit(1); \ | |
} while (0) | |
#define printd(...) \ | |
do { \ | |
fprintf(stderr, "[debug] %s:%d: ", __FILE__, __LINE__); \ | |
fprintf(stderr, __VA_ARGS__); \ | |
fprintf(stderr, "\n"); \ | |
} while (0) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment