aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThijs Schreijer <thijs@thijsschreijer.nl>2024-07-31 14:49:07 +0200
committerGitHub <noreply@github.com>2024-07-31 14:49:07 +0200
commit227743a147967bf1418525770082a5943b3f9f41 (patch)
tree56b190f0350eb897f1bb4e39b4019641f7d19480 /src
parent45499248cea9e23b7e4d8478759414e01c645809 (diff)
downloadluasystem-227743a147967bf1418525770082a5943b3f9f41.tar.gz
luasystem-227743a147967bf1418525770082a5943b3f9f41.tar.bz2
luasystem-227743a147967bf1418525770082a5943b3f9f41.zip
chore(term): add descriptive error on Windows for lack of VT (#32)
Diffstat (limited to 'src')
-rw-r--r--src/term.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/term.c b/src/term.c
index 1bb6c75..e58e190 100644
--- a/src/term.c
+++ b/src/term.c
@@ -107,6 +107,11 @@ typedef struct ls_RegConst {
107// This is needed because some flags are not defined on all platforms. So we 107// This is needed because some flags are not defined on all platforms. So we
108// still export the constants, but they will be all 0, and hence not do anything. 108// still export the constants, but they will be all 0, and hence not do anything.
109#ifdef _WIN32 109#ifdef _WIN32
110// check compatibility: Windows virtual terminal processing was added in 2015,
111// some older compiler suites don't have the proper headers.
112#ifndef ENABLE_VIRTUAL_TERMINAL_INPUT
113#error Virtual terminal macros are undefined (eg. ENABLE_VIRTUAL_TERMINAL_INPUT). Update the toolchain or revert to Luasystem < 0.4
114#endif
110#define CHECK_WIN_FLAG_OR_ZERO(flag) flag 115#define CHECK_WIN_FLAG_OR_ZERO(flag) flag
111#define CHECK_NIX_FLAG_OR_ZERO(flag) 0 116#define CHECK_NIX_FLAG_OR_ZERO(flag) 0
112#else 117#else