diff options
author | Evan Martin <martine@danga.com> | 2011-04-15 19:26:45 (GMT) |
---|---|---|
committer | Evan Martin <martine@danga.com> | 2011-04-15 19:26:45 (GMT) |
commit | e5891f73fea0879851312fbaec8f32490fa4638c (patch) | |
tree | 73345c0ee79d2d92c0c2f718557d7785e8c00905 /src/util.cc | |
parent | ece2d63323bde9fd89956193167e09708802d73c (diff) | |
parent | 9d5fd61c00b34511fd16bce1a3233743c7e4448f (diff) | |
download | Ninja-e5891f73fea0879851312fbaec8f32490fa4638c.zip Ninja-e5891f73fea0879851312fbaec8f32490fa4638c.tar.gz Ninja-e5891f73fea0879851312fbaec8f32490fa4638c.tar.bz2 |
Merge branch 'master' of github.com:martine/ninja
Conflicts:
src/util.cc
src/util.h
Diffstat (limited to 'src/util.cc')
-rw-r--r-- | src/util.cc | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/util.cc b/src/util.cc index d0236bc..b68227b 100644 --- a/src/util.cc +++ b/src/util.cc @@ -22,7 +22,7 @@ void Fatal(const char* msg, ...) { va_list ap; - fprintf(stderr, "FATAL: "); + fprintf(stderr, "ninja: FATAL: "); va_start(ap, msg); vfprintf(stderr, msg, ap); va_end(ap); @@ -30,6 +30,15 @@ void Fatal(const char* msg, ...) { exit(1); } +void Error(const char* msg, ...) { + va_list ap; + fprintf(stderr, "ninja: error: "); + va_start(ap, msg); + vfprintf(stderr, msg, ap); + va_end(ap); + fprintf(stderr, "\n"); +} + bool CanonicalizePath(std::string* path, std::string* err) { // Try to fast-path out the common case. if (path->find("/.") == std::string::npos && |