aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/utility.hxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2022-12-08 10:49:57 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2022-12-08 10:49:57 +0200
commitf7600f07eecbdac0a4400ca2bc39e3e9f5a53b1b (patch)
tree3bc35a46a68b41dab1148fdbac1d64b818b53960 /libbuild2/utility.hxx
parente55ab94a6fa652c71cdb119dc1b269c836672930 (diff)
Add --[no]diag-color options (infrastructure only)
Diffstat (limited to 'libbuild2/utility.hxx')
-rw-r--r--libbuild2/utility.hxx13
1 files changed, 12 insertions, 1 deletions
diff --git a/libbuild2/utility.hxx b/libbuild2/utility.hxx
index c12fae7..e27eec2 100644
--- a/libbuild2/utility.hxx
+++ b/libbuild2/utility.hxx
@@ -129,6 +129,7 @@ namespace build2
init_diag (uint16_t verbosity,
bool silent = false,
optional<bool> progress = nullopt,
+ optional<bool> diag_color = nullopt,
bool no_lines = false,
bool no_columns = false,
bool stderr_term = false);
@@ -138,13 +139,23 @@ namespace build2
LIBBUILD2_SYMEXPORT extern bool silent;
// --[no-]progress
+ // --[no-]diag-color
//
LIBBUILD2_SYMEXPORT extern optional<bool> diag_progress_option;
+ LIBBUILD2_SYMEXPORT extern optional<bool> diag_color_option;
LIBBUILD2_SYMEXPORT extern bool diag_no_line; // --no-line
LIBBUILD2_SYMEXPORT extern bool diag_no_column; // --no-column
- LIBBUILD2_SYMEXPORT extern bool stderr_term; // True if stderr is a terminal.
+ // If stderr is not a terminal, then the value is absent (so can be used as
+ // bool). Otherwise, it is the value of the TERM environment variable (which
+ // can be NULL).
+ //
+ LIBBUILD2_SYMEXPORT extern optional<const char*> stderr_term;
+
+ // True if the color can be used on the stderr terminal.
+ //
+ LIBBUILD2_SYMEXPORT extern bool stderr_term_color;
// Global state (verbosity, home/work directories, etc).