diff options
| author | Tharre <tharre3@gmail.com> | 2014-07-29 15:08:23 +0200 | 
|---|---|---|
| committer | Tharre <tharre3@gmail.com> | 2014-07-29 15:08:23 +0200 | 
| commit | 058398673a656dd3d58fccb90a94a16fcfc27e71 (patch) | |
| tree | e39bd4c9a6b074075905d37194d9a580ff818cf3 /src | |
| parent | 3d37a4c54f9bfdcd6144eb85483650be9fc466cc (diff) | |
| download | redo-058398673a656dd3d58fccb90a94a16fcfc27e71.tar.gz redo-058398673a656dd3d58fccb90a94a16fcfc27e71.tar.xz redo-058398673a656dd3d58fccb90a94a16fcfc27e71.zip  | |
Print redo  <target> later to not print source files and small cleanup
Diffstat (limited to 'src')
| -rw-r--r-- | src/build.c | 7 | ||||
| -rw-r--r-- | src/build.h | 1 | 
2 files changed, 3 insertions, 5 deletions
diff --git a/src/build.c b/src/build.c index 4f5d142..24d0a4b 100644 --- a/src/build.c +++ b/src/build.c @@ -26,7 +26,6 @@ int build_target(const char *target) {      assert(target);      int retval = 0; -    printf("redo  %s\n", target);      /* get the do-file which we are going to execute */      char *do_file = get_do_file(target); @@ -43,7 +42,8 @@ int build_target(const char *target) {          goto exit;      } -    debug("Using do-file %s\n", do_file); +    printf("redo  %s\n", target); +    /*debug("Using do-file %s\n", do_file);*/      char *temp_output = concat(2, target, temp_ext); @@ -124,8 +124,7 @@ char **parse_shebang(char *target, char *dofile, char *temp_output) {      if (!fp)          fatal(ERRM_FOPEN, dofile) -    const size_t bufsize = 1024; -    char buf[bufsize]; +    char buf[1024];      buf[ fread(buf, 1, sizeof(buf)-1, fp) ] = '\0';      if (ferror(fp)) diff --git a/src/build.h b/src/build.h index 70bc8fd..3f05d5a 100644 --- a/src/build.h +++ b/src/build.h @@ -3,7 +3,6 @@  #include <stdbool.h>  #include <stddef.h> -#include <sys/types.h>  extern char *get_do_file(const char *target);  extern int build_target(const char *target);  | 
