aboutsummaryrefslogtreecommitdiff
path: root/include
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 /include
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 'include')
-rw-r--r--include/libbb.h3
-rw-r--r--include/mingw.h5
2 files changed, 6 insertions, 2 deletions
diff --git a/include/libbb.h b/include/libbb.h
index 94f0e40ec..4197a5e83 100644
--- a/include/libbb.h
+++ b/include/libbb.h
@@ -2375,7 +2375,8 @@ extern const char bbvar[] ALIGN1;
2375#define bbafter(p) (p + sizeof(#p)) 2375#define bbafter(p) (p + sizeof(#p))
2376#define BB_OVERRIDE_APPLETS bbvar 2376#define BB_OVERRIDE_APPLETS bbvar
2377#define BB_SKIP_ANSI_EMULATION bbafter(BB_OVERRIDE_APPLETS) 2377#define BB_SKIP_ANSI_EMULATION bbafter(BB_OVERRIDE_APPLETS)
2378#define BB_SYSTEMROOT bbafter(BB_SKIP_ANSI_EMULATION) 2378#define BB_TERMINAL_MODE bbafter(BB_SKIP_ANSI_EMULATION)
2379#define BB_SYSTEMROOT bbafter(BB_TERMINAL_MODE)
2379#endif 2380#endif
2380 2381
2381extern const int const_int_0; 2382extern const int const_int_0;
diff --git a/include/mingw.h b/include/mingw.h
index 6259bc2c6..b5b2fe169 100644
--- a/include/mingw.h
+++ b/include/mingw.h
@@ -545,6 +545,9 @@ char *is_prefixed_with_case(const char *string, const char *key) FAST_FUNC;
545char *is_suffixed_with_case(const char *string, const char *key) FAST_FUNC; 545char *is_suffixed_with_case(const char *string, const char *key) FAST_FUNC;
546void qsort_string_vector_case(char **sv, unsigned count) FAST_FUNC; 546void qsort_string_vector_case(char **sv, unsigned count) FAST_FUNC;
547 547
548#define VT_OUTPUT 1
549#define VT_INPUT 2
550
548/* 551/*
549 * helpers 552 * helpers
550 */ 553 */
@@ -581,7 +584,7 @@ char *xabsolute_path(char *path);
581char *get_drive_cwd(const char *path, char *buffer, int size); 584char *get_drive_cwd(const char *path, char *buffer, int size);
582void fix_path_case(char *path); 585void fix_path_case(char *path);
583void make_sparse(int fd, off_t start, off_t end); 586void make_sparse(int fd, off_t start, off_t end);
584int skip_ansi_emulation(int reset); 587int terminal_mode(int reset);
585int unix_path(const char *path); 588int unix_path(const char *path);
586int has_path(const char *file); 589int has_path(const char *file);
587int is_relative_path(const char *path); 590int is_relative_path(const char *path);