aboutsummaryrefslogtreecommitdiff
path: root/libbb/messages.c
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2023-03-05 12:31:30 +0000
committerRon Yorston <rmy@pobox.com>2023-03-05 12:31:30 +0000
commitf52c2004b818ac739ec886d5ff0a87734b55d293 (patch)
treee68d21ec6e1673e458d1e5b3827c08af146cd14a /libbb/messages.c
parent76d3eafb4c28bc6579baff917ffe7726acf6817a (diff)
downloadbusybox-w32-f52c2004b818ac739ec886d5ff0a87734b55d293.tar.gz
busybox-w32-f52c2004b818ac739ec886d5ff0a87734b55d293.tar.bz2
busybox-w32-f52c2004b818ac739ec886d5ff0a87734b55d293.zip
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.
Diffstat (limited to 'libbb/messages.c')
-rw-r--r--libbb/messages.c4
1 files changed, 4 insertions, 0 deletions
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;
36 * BB_GLOBBING and BB_UMASK are excluded because users shouln't be 36 * BB_GLOBBING and BB_UMASK are excluded because users shouln't be
37 * messing with them; BB_ALT_BUFFER and BB_FIX_BACKSLASH are excluded 37 * messing with them; BB_ALT_BUFFER and BB_FIX_BACKSLASH are excluded
38 * because they only affect particular applets, not the shell itself. 38 * because they only affect particular applets, not the shell itself.
39 *
40 * If you change any of these you should also update the definitions in
41 * include/libbb.h.
39 */ 42 */
40const char bbvar[] ALIGN1 = 43const char bbvar[] ALIGN1 =
41 "BB_OVERRIDE_APPLETS\0" \ 44 "BB_OVERRIDE_APPLETS\0" \
42 "BB_SKIP_ANSI_EMULATION\0" \ 45 "BB_SKIP_ANSI_EMULATION\0" \
46 "BB_TERMINAL_MODE\0" \
43 "BB_SYSTEMROOT\0"; 47 "BB_SYSTEMROOT\0";
44#endif 48#endif
45const char bb_default_login_shell[] ALIGN1 = LIBBB_DEFAULT_LOGIN_SHELL; 49const char bb_default_login_shell[] ALIGN1 = LIBBB_DEFAULT_LOGIN_SHELL;