summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2018-10-23 13:38:48 +0200
committerDaniel Stenberg <daniel@haxx.se>2018-10-23 13:38:48 +0200
commit687b9718e183b1c2d710630b744fbab9069a7761 (patch)
treec3a766f55cf3312b830bdd3b890985fe9a010f7f
parent6535b9303df83eb3f1e95fded0d778e51d9aa50c (diff)
downloadcurl-bagder/TerminalSettings-static.tar.gz
tool_main: make TerminalSettings staticbagder/TerminalSettings-static
Reported-by: Gisle Vanem Bug: https://github.com/curl/curl/commit/becfe1233ff2b6b0c3e1b6a10048b55b68c2539f#commitcomment-31008819
-rw-r--r--src/tool_main.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/tool_main.c b/src/tool_main.c
index 3a9f0cdff..612bfcb6a 100644
--- a/src/tool_main.c
+++ b/src/tool_main.c
@@ -238,16 +238,14 @@ static void main_free(struct GlobalConfig *config)
#ifdef _WIN32
/* TerminalSettings for Windows */
-struct TerminalSettings {
+static struct TerminalSettings {
HANDLE hStdOut;
DWORD dwOutputMode;
UINT nCodepage;
-}TerminalSettings;
-#endif
+} TerminalSettings;
static void configure_terminal(void)
{
-#ifdef _WIN32
/*
* If we're running Windows, enable VT output & set codepage to UTF-8.
* Note: VT mode flag can be set on any version of Windows, but VT
@@ -273,8 +271,10 @@ static void configure_terminal(void)
TerminalSettings.dwOutputMode
| ENABLE_VIRTUAL_TERMINAL_PROCESSING);
}
-#endif
}
+#else
+#define configure_terminal()
+#endif
static void restore_terminal(void)
{