From f52c2004b818ac739ec886d5ff0a87734b55d293 Mon Sep 17 00:00:00 2001 From: Ron Yorston Date: Sun, 5 Mar 2023 12:31:30 +0000 Subject: win32: changes to console mode handling Add the environment variable BB_TERMINAL_MODE as a more general way of controlling console/terminal mode setting. The default remains unchanged: use virtual terminal mode for output if possible but fall back to the console API with emulated ANSI escape sequences. Currently valid settings are: 0 Force use of console mode 1 Force use of virtual terminal mode for output 5 Prefer virtual terminal mode for output, fall back to console Other values won't do anything useful until code elsewhere has been updated. BB_SKIP_ANSI_EMULATION remains available for backwards compatibility. If both variables are set BB_TERMINAL_MODE takes precedence. --- libbb/messages.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'libbb/messages.c') diff --git a/libbb/messages.c b/libbb/messages.c index e35bf8c6b..3c9d8683a 100644 --- a/libbb/messages.c +++ b/libbb/messages.c @@ -36,10 +36,14 @@ const char bb_busybox_exec_path[] ALIGN1 = CONFIG_BUSYBOX_EXEC_PATH; * BB_GLOBBING and BB_UMASK are excluded because users shouln't be * messing with them; BB_ALT_BUFFER and BB_FIX_BACKSLASH are excluded * because they only affect particular applets, not the shell itself. + * + * If you change any of these you should also update the definitions in + * include/libbb.h. */ const char bbvar[] ALIGN1 = "BB_OVERRIDE_APPLETS\0" \ "BB_SKIP_ANSI_EMULATION\0" \ + "BB_TERMINAL_MODE\0" \ "BB_SYSTEMROOT\0"; #endif const char bb_default_login_shell[] ALIGN1 = LIBBB_DEFAULT_LOGIN_SHELL; -- cgit v1.2.3-55-g6feb