summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2021-03-01 17:35:51 (GMT)
committerBrad King <brad.king@kitware.com>2021-03-01 18:05:46 (GMT)
commita510f532f6ac0ec05703afade6e2bfdecbc6d00a (patch)
tree8c5fc18fc6b28628352dfaeb9b67da6adbf0140a /src
parent1a8015038d9a8c6bf0c04a42588fb2a26861be63 (diff)
downloadNinja-a510f532f6ac0ec05703afade6e2bfdecbc6d00a.zip
Ninja-a510f532f6ac0ec05703afade6e2bfdecbc6d00a.tar.gz
Ninja-a510f532f6ac0ec05703afade6e2bfdecbc6d00a.tar.bz2
wincodepage: minimize to indicate UTF-8 or not
The ANSI code page identifier is more information than generator programs actually need. The encoding of `build.ninja` is always either UTF-8 or the system-wide ANSI code page. Reduce the output to provide no more information than the generator programs need. The Console code page can be obtained in other ways, so drop it.
Diffstat (limited to 'src')
-rw-r--r--src/ninja.cc5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/ninja.cc b/src/ninja.cc
index 3172ee5..45fc8ea 100644
--- a/src/ninja.cc
+++ b/src/ninja.cc
@@ -648,8 +648,7 @@ int NinjaMain::ToolWinCodePage(const Options* options, int argc, char* argv[]) {
printf("usage: ninja -t wincodepage\n");
return 1;
}
- printf("ANSI code page: %u\n", GetACP());
- printf("Console code page: %u\n", GetConsoleOutputCP());
+ printf("Build file encoding: %s\n", GetACP() == CP_UTF8? "UTF-8" : "ANSI");
return 0;
}
#endif
@@ -1023,7 +1022,7 @@ const Tool* ChooseTool(const string& tool_name) {
{ "urtle", NULL,
Tool::RUN_AFTER_FLAGS, &NinjaMain::ToolUrtle },
#ifdef _WIN32
- { "wincodepage", "print the Windows ANSI code page identifier",
+ { "wincodepage", "print the Windows code page used by ninja",
Tool::RUN_AFTER_FLAGS, &NinjaMain::ToolWinCodePage },
#endif
{ NULL, NULL, Tool::RUN_AFTER_FLAGS, NULL }