aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2024-09-27 11:18:26 +0100
committerRon Yorston <rmy@pobox.com>2024-09-27 11:18:26 +0100
commit940f40e371695d6b247f4b406e7eb580fb91e866 (patch)
tree8d47683752ee39925ef0231372e17e27c14da35f
parent917b8bf5595023494456d8555a1f6b801b737bfc (diff)
downloadbusybox-w32-940f40e371695d6b247f4b406e7eb580fb91e866.tar.gz
busybox-w32-940f40e371695d6b247f4b406e7eb580fb91e866.tar.bz2
busybox-w32-940f40e371695d6b247f4b406e7eb580fb91e866.zip
win32: drop workaround for Wine console buffer
Commit 1ade2225d2 (winansi: allow alternative screen buffer to be disabled) added a workaround for the broken alternative screen buffer in the Wine console. The problem has been fixed in Wine for well over a year: https://bugs.winehq.org/show_bug.cgi?id=54287 Remove the workaround. Saves 80-96 bytes.
-rw-r--r--libbb/messages.c6
-rw-r--r--win32/winansi.c7
2 files changed, 3 insertions, 10 deletions
diff --git a/libbb/messages.c b/libbb/messages.c
index 27ba244d6..311eda004 100644
--- a/libbb/messages.c
+++ b/libbb/messages.c
@@ -36,9 +36,9 @@ const char bb_busybox_exec_path[] ALIGN1 = CONFIG_BUSYBOX_EXEC_PATH;
36/* Some special shell variables are placed in the environment immediately 36/* Some special shell variables are placed in the environment immediately
37 * when they're exported. 37 * when they're exported.
38 * 38 *
39 * BB_GLOBBING and BB_UMASK are excluded because users shouln't be 39 * BB_GLOBBING and BB_UMASK are excluded because users shouldn't be
40 * messing with them; BB_ALT_BUFFER and BB_FIX_BACKSLASH are excluded 40 * messing with them; BB_FIX_BACKSLASH is excluded because it only
41 * because they only affect particular applets, not the shell itself. 41 * affects particular applets, not the shell itself.
42 * 42 *
43 * If you change any of these you should also update the definitions in 43 * If you change any of these you should also update the definitions in
44 * include/libbb.h. 44 * include/libbb.h.
diff --git a/win32/winansi.c b/win32/winansi.c
index 12892e697..c7529c453 100644
--- a/win32/winansi.c
+++ b/win32/winansi.c
@@ -200,15 +200,8 @@ static HANDLE dup_handle(HANDLE h)
200static void use_alt_buffer(int flag) 200static void use_alt_buffer(int flag)
201{ 201{
202 static HANDLE console_orig = INVALID_HANDLE_VALUE; 202 static HANDLE console_orig = INVALID_HANDLE_VALUE;
203 const char *var;
204 HANDLE console, h; 203 HANDLE console, h;
205 204
206 var = getenv("BB_ALT_BUFFER");
207 if (var ? strcmp(var, "0") == 0 : is_wine()) {
208 reset_screen();
209 return;
210 }
211
212 if (flag) { 205 if (flag) {
213 SECURITY_ATTRIBUTES sa; 206 SECURITY_ATTRIBUTES sa;
214 CONSOLE_SCREEN_BUFFER_INFO sbi; 207 CONSOLE_SCREEN_BUFFER_INFO sbi;