conhost: Remove no longer needed SET_CONSOLE_INPUT_INFO flags.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Jacek Caban 2020-10-14 19:58:10 +02:00 committed by Alexandre Julliard
parent a7066c66a6
commit bed3b61b49
2 changed files with 2 additions and 51 deletions

View file

@ -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

View file

@ -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;
}