summaryrefslogtreecommitdiff
path: root/src/util.h
diff options
context:
space:
mode:
authorRyo Nakamura <upa@haeena.net>2022-10-16 22:12:03 +0900
committerRyo Nakamura <upa@haeena.net>2022-10-16 22:12:03 +0900
commitdef9cfeba74357ca98fc25469d4285139ecd42ce (patch)
tree077c5de04728a1342392d37d95c3c0a7fbe455a3 /src/util.h
parent579629dea21dbbb26cc9c42c4f1f1022c7270144 (diff)
implement fill_file
Diffstat (limited to 'src/util.h')
-rw-r--r--src/util.h11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/util.h b/src/util.h
index 848827d..34bd0d5 100644
--- a/src/util.h
+++ b/src/util.h
@@ -8,6 +8,8 @@
#define likely(x) __builtin_expect(!!(x), 1)
#define unlikely(x) __builtin_expect(!!(x), 0)
+extern int verbose;
+
#define pr_v(level, fmt, ...) do { \
if (verbose >= level) { \
fprintf(stdout, "\x1b[1m\x1b[34m" \
@@ -32,14 +34,9 @@
"ERR:%s(): " fmt "\x1b[0m", \
__func__, ##__VA_ARGS__)
-#define pr_debug(fmt, ...) \
- do { \
- if (unlikely(debug)) { \
- fprintf(stderr, "\x1b[1m\x1b[33m" \
+#define pr_debug(fmt, ...) fprintf(stderr, "\x1b[1m\x1b[33m" \
"DEBUG:%s(): " fmt "\x1b[0m", \
- __func__, ##__VA_ARGS__); \
- } \
- } while (0)
+ __func__, ##__VA_ARGS__);
#define strerrno() strerror(errno)