Use colored/styled text output for diagnostics and usage info (#1775)

This commit is contained in:
Rangi
2025-08-04 17:02:24 -04:00
committed by GitHub
parent d992b21141
commit 23ce888d65
27 changed files with 656 additions and 197 deletions

View File

@@ -1,3 +1,5 @@
// SPDX-License-Identifier: MIT
#include "verbosity.hpp"
#include <array>
@@ -8,16 +10,18 @@
static Verbosity verbosity = VERB_NONE;
bool checkVerbosity(Verbosity level) {
return verbosity >= level;
}
// LCOV_EXCL_START
void incrementVerbosity() {
if (verbosity < VERB_VVVVVV) {
verbosity = static_cast<Verbosity>(verbosity + 1);
}
}
bool checkVerbosity(Verbosity level) {
return verbosity >= level;
}
void printVVVVVVerbosity() {
if (!checkVerbosity(VERB_VVVVVV)) {
return;
@@ -67,3 +71,5 @@ void printVVVVVVerbosity() {
}
putc('\n', stderr);
}
// LCOV_EXCL_STOP