Jacek Caban : conhost: Remove no longer needed SET_CONSOLE_INPUT_INFO flags.
Alexandre Julliard
julliard at winehq.org
Wed Oct 14 15:37:22 CDT 2020
Module: wine
Branch: master
Commit: bed3b61b498af5339f53ecc23937ff3b81b196d1
URL: https://source.winehq.org/git/wine.git/?a=commit;h=bed3b61b498af5339f53ecc23937ff3b81b196d1
Author: Jacek Caban <jacek at codeweavers.com>
Date: Wed Oct 14 19:58:10 2020 +0200
conhost: Remove no longer needed SET_CONSOLE_INPUT_INFO flags.
Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
include/wine/condrv.h | 8 ++------
programs/conhost/conhost.c | 45 ---------------------------------------------
2 files changed, 2 insertions(+), 51 deletions(-)
diff --git a/include/wine/condrv.h b/include/wine/condrv.h
index efcfc1a5b9..602b499114 100644
--- a/include/wine/condrv.h
+++ b/include/wine/condrv.h
@@ -97,12 +97,8 @@ struct condrv_input_info_params
struct condrv_input_info info; /* input_info */
};
-#define SET_CONSOLE_INPUT_INFO_EDITION_MODE 0x01
-#define SET_CONSOLE_INPUT_INFO_INPUT_CODEPAGE 0x02
-#define SET_CONSOLE_INPUT_INFO_OUTPUT_CODEPAGE 0x04
-#define SET_CONSOLE_INPUT_INFO_WIN 0x08
-#define SET_CONSOLE_INPUT_INFO_HISTORY_MODE 0x10
-#define SET_CONSOLE_INPUT_INFO_HISTORY_SIZE 0x20
+#define SET_CONSOLE_INPUT_INFO_INPUT_CODEPAGE 0x01
+#define SET_CONSOLE_INPUT_INFO_OUTPUT_CODEPAGE 0x02
/* IOCTL_CONDRV_WRITE_OUTPUT and IOCTL_CONDRV_READ_OUTPUT params */
struct condrv_output_params
diff --git a/programs/conhost/conhost.c b/programs/conhost/conhost.c
index dc508a2fd7..9c780d4951 100644
--- a/programs/conhost/conhost.c
+++ b/programs/conhost/conhost.c
@@ -2448,55 +2448,10 @@ static NTSTATUS console_input_ioctl( struct console *console, unsigned int code,
const struct condrv_input_info_params *params = in_data;
TRACE( "set info\n" );
if (in_size != sizeof(*params) || *out_size) return STATUS_INVALID_PARAMETER;
- if (params->mask & SET_CONSOLE_INPUT_INFO_HISTORY_MODE)
- {
- console->history_mode = params->info.history_mode;
- }
- if ((params->mask & SET_CONSOLE_INPUT_INFO_HISTORY_SIZE) &&
- console->history_size != params->info.history_size)
- {
- struct history_line **mem = NULL;
- int i, delta;
-
- if (params->info.history_size)
- {
- if (!(mem = malloc( params->info.history_size * sizeof(*mem) )))
- return STATUS_NO_MEMORY;
- memset( mem, 0, params->info.history_size * sizeof(*mem) );
- }
-
- delta = (console->history_index > params->info.history_size)
- ? (console->history_index - params->info.history_size) : 0;
-
- for (i = delta; i < console->history_index; i++)
- {
- mem[i - delta] = console->history[i];
- console->history[i] = NULL;
- }
- console->history_index -= delta;
-
- for (i = 0; i < console->history_size; i++)
- free( console->history[i] );
- free( console->history );
- console->history = mem;
- console->history_size = params->info.history_size;
- }
- if (params->mask & SET_CONSOLE_INPUT_INFO_EDITION_MODE)
- {
- console->edition_mode = params->info.edition_mode;
- }
if (params->mask & SET_CONSOLE_INPUT_INFO_INPUT_CODEPAGE)
- {
console->input_cp = params->info.input_cp;
- }
if (params->mask & SET_CONSOLE_INPUT_INFO_OUTPUT_CODEPAGE)
- {
console->output_cp = params->info.output_cp;
- }
- if (params->mask & SET_CONSOLE_INPUT_INFO_WIN)
- {
- console->win = wine_server_ptr_handle( params->info.win );
- }
return STATUS_SUCCESS;
}
More information about the wine-cvs
mailing list