From ace1743f7f78bb13f99553d6e97ad1beecf1ba99 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 13 Apr 2015 15:50:17 +0200 Subject: Add separate type to represent directory paths --- build/diagnostics | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'build/diagnostics') diff --git a/build/diagnostics b/build/diagnostics index 3ec80a3..09adaca 100644 --- a/build/diagnostics +++ b/build/diagnostics @@ -14,7 +14,8 @@ #include #include -#include // included at the end. +#include +#include namespace build { @@ -24,12 +25,17 @@ namespace build class failed: public std::exception {}; // In addition to calling relative(), this function also uses shorter - // notations such as '~/'. If the path is the same as base, it returns - // '.'. + // notations such as '~/'. // std::string diag_relative (const path&); + // As above but also adds trailing '/'. If the path is the same as + // base, returns "./" if current is true and empty string otherwise. + // + std::string + diag_relative (const dir_path&, bool current = true); + // Action phrases, e.g., "configure update exe{foo}", "updating exe{foo}", // and "updating exe{foo} already configured". // @@ -357,6 +363,4 @@ namespace build extern const fail_mark fail; } -#include - #endif // BUILD_DIAGNOSTICS -- cgit v1.1