From d09eb6c95b85fcb22d6b36353c82c3b4293e6fb7 Mon Sep 17 00:00:00 2001 From: Tharre Date: Wed, 13 Aug 2014 17:30:02 +0200 Subject: Implement (incomplete) dependency checking. Targets still do not depend on .do-files, and a lot of the edge cases are still not handled correctly. Furthermore some error-checking code is still missing, which could possibly crash the program (partially marked with comments), as well as some free() calls. An utitlity python script (print_dep.py) was also added to aid in debugging matters. --- src/redo.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/redo.c') diff --git a/src/redo.c b/src/redo.c index 0209a4f..76d8a86 100644 --- a/src/redo.c +++ b/src/redo.c @@ -12,6 +12,7 @@ #include "util.h" #include "dbg.h" + static inline int digits(unsigned n) { return (int) log10(n) + 1; } @@ -38,7 +39,7 @@ int main(int argc, char *argv[]) { char magic_str[digits(UINT_MAX) + 1]; sprintf(magic_str, "%u", magic); - printf("MAGIC: %s\n", magic_str); + debug("magic number: %s\n", magic_str); if (setenv("REDO_MAGIC", magic_str, 0)) fatal("setenv()"); -- cgit v1.2.3-70-g09d2