summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2015-07-11 08:50:06 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2015-07-11 08:50:06 -0700
commit21d0d2dc4e48459b7e6aa4b8eb8711e8ec453d67 (patch)
tree4cf81aedd2e451a5f361cce17f91e59b6708c189
parentdb892350447a6ffd83d22bedfe056ab1a90da547 (diff)
Removed debug.h.
-rw-r--r--src/debug.h36
1 files changed, 0 insertions, 36 deletions
diff --git a/src/debug.h b/src/debug.h
deleted file mode 100644
index fd2ef62..0000000
--- a/src/debug.h
+++ /dev/null
@@ -1,36 +0,0 @@
-#ifndef CMARK_DEBUG_H
-#define CMARK_DEBUG_H
-#include <stdio.h>
-#include <errno.h>
-#include <string.h>
-
-#ifdef NDEBUG
-#define debug(M, ...)
-#else
-#define debug(M, ...) \
- fprintf(stderr, "DEBUG %s:%d: " M "\n", __FILE__, __LINE__, ##__VA_ARGS__)
-#endif
-
-#define clean_errno() (errno == 0 ? "None" : strerror(errno))
-
-#define log_err(M, ...) \
- fprintf(stderr, "[ERROR] (%s:%d: errno: %s) " M "\n", __FILE__, __LINE__, \
- clean_errno(), ##__VA_ARGS__)
-
-#define log_warn(M, ...) \
- fprintf(stderr, "[WARN] (%s:%d: errno: %s) " M "\n", __FILE__, __LINE__, \
- clean_errno(), ##__VA_ARGS__)
-
-#define log_info(M, ...) fprintf(stderr, "[INFO] (%s:%d) " M "\n", __FILE__, \
- __LINE__, ##__VA_ARGS__)
-
-#define check(A, M, ...) \
- if(!(A)) { log_err(M, ##__VA_ARGS__); errno=0; goto error; }
-
-#define sentinel(M, ...) \
- { log_err(M, ##__VA_ARGS__); errno=0; goto error; }
-
-#define check_debug(A, M, ...) \
- if(!(A)) { debug(M, ##__VA_ARGS__); errno=0; goto error; }
-
-#endif