From 940f40e371695d6b247f4b406e7eb580fb91e866 Mon Sep 17 00:00:00 2001 From: Ron Yorston Date: Fri, 27 Sep 2024 11:18:26 +0100 Subject: 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. --- libbb/messages.c | 6 +++--- win32/winansi.c | 7 ------- 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; /* Some special shell variables are placed in the environment immediately * when they're exported. * - * 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. + * BB_GLOBBING and BB_UMASK are excluded because users shouldn't be + * messing with them; BB_FIX_BACKSLASH is excluded because it only + * affects particular applets, not the shell itself. * * If you change any of these you should also update the definitions in * 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) static void use_alt_buffer(int flag) { static HANDLE console_orig = INVALID_HANDLE_VALUE; - const char *var; HANDLE console, h; - var = getenv("BB_ALT_BUFFER"); - if (var ? strcmp(var, "0") == 0 : is_wine()) { - reset_screen(); - return; - } - if (flag) { SECURITY_ATTRIBUTES sa; CONSOLE_SCREEN_BUFFER_INFO sbi; -- cgit v1.2.3-55-g6feb