From def9cfeba74357ca98fc25469d4285139ecd42ce Mon Sep 17 00:00:00 2001 From: Ryo Nakamura Date: Sun, 16 Oct 2022 22:12:03 +0900 Subject: implement fill_file --- src/util.h | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'src/util.h') 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) -- cgit v1.2.3