Skip to content

Instantly share code, notes, and snippets.

@cjsmeele
Created December 7, 2017 14:47
Show Gist options
  • Save cjsmeele/438a97f5ed87248f2709e732395b3290 to your computer and use it in GitHub Desktop.
Save cjsmeele/438a97f5ed87248f2709e732395b3290 to your computer and use it in GitHub Desktop.
#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