server: Get rid of no longer needed read_console_input request.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Jacek Caban 2020-07-06 19:29:24 +02:00 committed by Alexandre Julliard
parent e3caa9c420
commit b116cf848a
5 changed files with 1 additions and 102 deletions

View File

@ -2163,23 +2163,6 @@ struct write_console_input_reply
struct read_console_input_request
{
struct request_header __header;
obj_handle_t handle;
int flush;
char __pad_20[4];
};
struct read_console_input_reply
{
struct reply_header __header;
int read;
/* VARARG(rec,input_records); */
char __pad_12[4];
};
struct write_console_output_request
{
struct request_header __header;
@ -5892,7 +5875,6 @@ enum request
REQ_set_console_output_info,
REQ_get_console_output_info,
REQ_write_console_input,
REQ_read_console_input,
REQ_write_console_output,
REQ_fill_console_output,
REQ_read_console_output,
@ -6196,7 +6178,6 @@ union generic_request
struct set_console_output_info_request set_console_output_info_request;
struct get_console_output_info_request get_console_output_info_request;
struct write_console_input_request write_console_input_request;
struct read_console_input_request read_console_input_request;
struct write_console_output_request write_console_output_request;
struct fill_console_output_request fill_console_output_request;
struct read_console_output_request read_console_output_request;
@ -6498,7 +6479,6 @@ union generic_reply
struct set_console_output_info_reply set_console_output_info_reply;
struct get_console_output_info_reply get_console_output_info_reply;
struct write_console_input_reply write_console_input_reply;
struct read_console_input_reply read_console_input_reply;
struct write_console_output_reply write_console_output_reply;
struct fill_console_output_reply fill_console_output_reply;
struct read_console_output_reply read_console_output_reply;
@ -6722,7 +6702,7 @@ union generic_reply
/* ### protocol_version begin ### */
#define SERVER_PROTOCOL_VERSION 613
#define SERVER_PROTOCOL_VERSION 614
/* ### protocol_version end ### */

View File

@ -798,48 +798,6 @@ static int write_console_input( struct console_input* console, int count,
return count;
}
/* retrieve a pointer to the console input records */
static int read_console_input_req( obj_handle_t handle, int count, int flush )
{
struct console_input *console;
if (!(console = (struct console_input *)get_handle_obj( current->process, handle,
FILE_READ_DATA, &console_input_ops )))
return -1;
if (!count)
{
/* special case: do not retrieve anything, but return
* the total number of records available */
count = console->recnum;
}
else
{
if (count > console->recnum) count = console->recnum;
set_reply_data( console->records, count * sizeof(INPUT_RECORD) );
}
if (flush)
{
int i;
for (i = count; i < console->recnum; i++)
console->records[i-count] = console->records[i];
if ((console->recnum -= count) > 0)
{
INPUT_RECORD *new_rec = realloc( console->records,
console->recnum * sizeof(INPUT_RECORD) );
if (new_rec) console->records = new_rec;
}
else
{
free( console->records );
console->records = NULL;
reset_event( console->event );
}
}
release_object( console );
return count;
}
/* set misc console input information */
static int set_console_input_info( const struct set_console_input_info_request *req,
const WCHAR *title, data_size_t len )
@ -1895,13 +1853,6 @@ DECL_HANDLER(write_console_input)
release_object( console );
}
/* fetch input records from a console input queue */
DECL_HANDLER(read_console_input)
{
int count = get_reply_max_size() / sizeof(INPUT_RECORD);
reply->read = read_console_input_req( req->handle, count, req->flush );
}
/* appends a string to console's history */
DECL_HANDLER(append_console_input_history)
{

View File

@ -1706,16 +1706,6 @@ struct console_renderer_event
@END
/* Fetch input records from a console input queue */
@REQ(read_console_input)
obj_handle_t handle; /* handle to the console input */
int flush; /* flush the retrieved records from the queue? */
@REPLY
int read; /* number of records read */
VARARG(rec,input_records); /* input records */
@END
/* write data (chars and/or attributes) in a screen buffer */
@REQ(write_console_output)
obj_handle_t handle; /* handle to the console output */

View File

@ -196,7 +196,6 @@ DECL_HANDLER(create_console_output);
DECL_HANDLER(set_console_output_info);
DECL_HANDLER(get_console_output_info);
DECL_HANDLER(write_console_input);
DECL_HANDLER(read_console_input);
DECL_HANDLER(write_console_output);
DECL_HANDLER(fill_console_output);
DECL_HANDLER(read_console_output);
@ -499,7 +498,6 @@ static const req_handler req_handlers[REQ_NB_REQUESTS] =
(req_handler)req_set_console_output_info,
(req_handler)req_get_console_output_info,
(req_handler)req_write_console_input,
(req_handler)req_read_console_input,
(req_handler)req_write_console_output,
(req_handler)req_fill_console_output,
(req_handler)req_read_console_output,
@ -1246,11 +1244,6 @@ C_ASSERT( FIELD_OFFSET(struct write_console_input_request, handle) == 12 );
C_ASSERT( sizeof(struct write_console_input_request) == 16 );
C_ASSERT( FIELD_OFFSET(struct write_console_input_reply, written) == 8 );
C_ASSERT( sizeof(struct write_console_input_reply) == 16 );
C_ASSERT( FIELD_OFFSET(struct read_console_input_request, handle) == 12 );
C_ASSERT( FIELD_OFFSET(struct read_console_input_request, flush) == 16 );
C_ASSERT( sizeof(struct read_console_input_request) == 24 );
C_ASSERT( FIELD_OFFSET(struct read_console_input_reply, read) == 8 );
C_ASSERT( sizeof(struct read_console_input_reply) == 16 );
C_ASSERT( FIELD_OFFSET(struct write_console_output_request, handle) == 12 );
C_ASSERT( FIELD_OFFSET(struct write_console_output_request, x) == 16 );
C_ASSERT( FIELD_OFFSET(struct write_console_output_request, y) == 20 );

View File

@ -2194,18 +2194,6 @@ static void dump_write_console_input_reply( const struct write_console_input_rep
fprintf( stderr, " written=%d", req->written );
}
static void dump_read_console_input_request( const struct read_console_input_request *req )
{
fprintf( stderr, " handle=%04x", req->handle );
fprintf( stderr, ", flush=%d", req->flush );
}
static void dump_read_console_input_reply( const struct read_console_input_reply *req )
{
fprintf( stderr, " read=%d", req->read );
dump_varargs_input_records( ", rec=", cur_size );
}
static void dump_write_console_output_request( const struct write_console_output_request *req )
{
fprintf( stderr, " handle=%04x", req->handle );
@ -4700,7 +4688,6 @@ static const dump_func req_dumpers[REQ_NB_REQUESTS] = {
(dump_func)dump_set_console_output_info_request,
(dump_func)dump_get_console_output_info_request,
(dump_func)dump_write_console_input_request,
(dump_func)dump_read_console_input_request,
(dump_func)dump_write_console_output_request,
(dump_func)dump_fill_console_output_request,
(dump_func)dump_read_console_output_request,
@ -5000,7 +4987,6 @@ static const dump_func reply_dumpers[REQ_NB_REQUESTS] = {
NULL,
(dump_func)dump_get_console_output_info_reply,
(dump_func)dump_write_console_input_reply,
(dump_func)dump_read_console_input_reply,
(dump_func)dump_write_console_output_reply,
(dump_func)dump_fill_console_output_reply,
(dump_func)dump_read_console_output_reply,
@ -5300,7 +5286,6 @@ static const char * const req_names[REQ_NB_REQUESTS] = {
"set_console_output_info",
"get_console_output_info",
"write_console_input",
"read_console_input",
"write_console_output",
"fill_console_output",
"read_console_output",