summaryrefslogtreecommitdiffstats
path: root/src/build.h
diff options
context:
space:
mode:
authorNico Weber <nicolasweber@gmx.de>2016-11-07 18:34:46 (GMT)
committerNico Weber <nicolasweber@gmx.de>2016-11-07 18:34:46 (GMT)
commit717b7b4a31db6027207588c0fb89c3ead384747b (patch)
treef95fbdb0340abd28dba6ad67aa19d6e12083450a /src/build.h
parentb49b0fc01bb052b6ac856b1e72be9391e962398e (diff)
parentb0cce09f563d0942fcf1c1256db679cebcbd6bea (diff)
downloadNinja-717b7b4a31db6027207588c0fb89c3ead384747b.zip
Ninja-717b7b4a31db6027207588c0fb89c3ead384747b.tar.gz
Ninja-717b7b4a31db6027207588c0fb89c3ead384747b.tar.bz2
v1.7.2v1.7.2
Diffstat (limited to 'src/build.h')
-rw-r--r--src/build.h20
1 files changed, 15 insertions, 5 deletions
diff --git a/src/build.h b/src/build.h
index 51589ef..66ce607 100644
--- a/src/build.h
+++ b/src/build.h
@@ -200,16 +200,24 @@ struct BuildStatus {
void BuildEdgeStarted(Edge* edge);
void BuildEdgeFinished(Edge* edge, bool success, const string& output,
int* start_time, int* end_time);
+ void BuildStarted();
void BuildFinished();
+ enum EdgeStatus {
+ kEdgeStarted,
+ kEdgeFinished,
+ };
+
/// Format the progress status string by replacing the placeholders.
/// See the user manual for more information about the available
/// placeholders.
/// @param progress_status_format The format of the progress status.
- string FormatProgressStatus(const char* progress_status_format) const;
+ /// @param status The status of the edge.
+ string FormatProgressStatus(const char* progress_status_format,
+ EdgeStatus status) const;
private:
- void PrintStatus(Edge* edge);
+ void PrintStatus(Edge* edge, EdgeStatus status);
const BuildConfig& config_;
@@ -229,9 +237,11 @@ struct BuildStatus {
const char* progress_status_format_;
template<size_t S>
- void snprinfRate(double rate, char(&buf)[S], const char* format) const {
- if (rate == -1) snprintf(buf, S, "?");
- else snprintf(buf, S, format, rate);
+ void SnprintfRate(double rate, char(&buf)[S], const char* format) const {
+ if (rate == -1)
+ snprintf(buf, S, "?");
+ else
+ snprintf(buf, S, format, rate);
}
struct RateInfo {