From e3c514f1c279c9955cac6b1fa9d0ede6ecbc310d Mon Sep 17 00:00:00 2001 From: gramanas Date: Tue, 4 Jun 2024 15:50:06 +0300 Subject: vks work and clang-format --- src/b.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/b.h') diff --git a/src/b.h b/src/b.h index cdf6772..e89c1cb 100644 --- a/src/b.h +++ b/src/b.h @@ -49,6 +49,7 @@ typedef enum { B_INFO, + B_CHANGE, B_WARNING, B_ERROR, } B_Log_Level; @@ -485,6 +486,9 @@ void b_log(B_Log_Level level, const char *fmt, ...) case B_INFO: fprintf(stderr, "[INFO] "); break; + case B_CHANGE: + fprintf(stderr, "[CHANGE] "); + break; case B_WARNING: fprintf(stderr, "[WARNING] "); break; @@ -723,7 +727,10 @@ int b_needs_rebuild(const char *output_path, const char **input_paths, size_t in } int input_path_time = statbuf.st_mtime; // NOTE: if even a single input_path is fresher than output_path that's 100% rebuild - if (input_path_time > output_path_time) return 1; + if (input_path_time > output_path_time) { + b_log(B_CHANGE, "%s", input_path); + return 1; + } } return 0; -- cgit v1.2.3