aboutsummaryrefslogtreecommitdiffstats
path: root/src/redo.c
diff options
context:
space:
mode:
authorTharre <tharre3@gmail.com>2014-08-13 17:30:02 +0200
committerTharre <tharre3@gmail.com>2014-08-13 17:34:08 +0200
commitd09eb6c95b85fcb22d6b36353c82c3b4293e6fb7 (patch)
tree4574d2a1fbc04671c889caf49da64a73d4d74904 /src/redo.c
parent325c8e3992bf7b73714d10a5d2202c89ddbac189 (diff)
downloadredo-d09eb6c95b85fcb22d6b36353c82c3b4293e6fb7.tar.gz
redo-d09eb6c95b85fcb22d6b36353c82c3b4293e6fb7.tar.xz
redo-d09eb6c95b85fcb22d6b36353c82c3b4293e6fb7.zip
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.
Diffstat (limited to 'src/redo.c')
-rw-r--r--src/redo.c3
1 files changed, 2 insertions, 1 deletions
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()");