server: Remove no longer used read_console_output 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-28 17:11:09 +02:00 committed by Alexandre Julliard
parent f8fa6fd686
commit f6fb372a04
5 changed files with 1 additions and 140 deletions

View File

@ -1995,25 +1995,6 @@ struct create_console_output_reply
struct read_console_output_request
{
struct request_header __header;
obj_handle_t handle;
int x;
int y;
int mode;
int wrap;
};
struct read_console_output_reply
{
struct reply_header __header;
int width;
int height;
/* VARARG(data,bytes); */
};
struct move_console_output_request
{
struct request_header __header;
@ -5618,7 +5599,6 @@ enum request
REQ_append_console_input_history,
REQ_get_console_input_history,
REQ_create_console_output,
REQ_read_console_output,
REQ_move_console_output,
REQ_send_console_signal,
REQ_read_directory_changes,
@ -5911,7 +5891,6 @@ union generic_request
struct append_console_input_history_request append_console_input_history_request;
struct get_console_input_history_request get_console_input_history_request;
struct create_console_output_request create_console_output_request;
struct read_console_output_request read_console_output_request;
struct move_console_output_request move_console_output_request;
struct send_console_signal_request send_console_signal_request;
struct read_directory_changes_request read_directory_changes_request;
@ -6202,7 +6181,6 @@ union generic_reply
struct append_console_input_history_reply append_console_input_history_reply;
struct get_console_input_history_reply get_console_input_history_reply;
struct create_console_output_reply create_console_output_reply;
struct read_console_output_reply read_console_output_reply;
struct move_console_output_reply move_console_output_reply;
struct send_console_signal_reply send_console_signal_reply;
struct read_directory_changes_reply read_directory_changes_reply;
@ -6420,7 +6398,7 @@ union generic_reply
/* ### protocol_version begin ### */
#define SERVER_PROTOCOL_VERSION 630
#define SERVER_PROTOCOL_VERSION 631
/* ### protocol_version end ### */

View File

@ -1444,58 +1444,6 @@ static int fill_console_output( struct screen_buffer *screen_buffer, char_info_t
return i;
}
/* read data from a screen buffer */
static void read_console_output_req( struct screen_buffer *screen_buffer, int x, int y,
enum char_info_mode mode, int wrap )
{
int i;
char_info_t *end, *src = screen_buffer->data + y * screen_buffer->width + x;
if (y >= screen_buffer->height) return;
if (wrap)
end = screen_buffer->data + screen_buffer->height * screen_buffer->width;
else
end = screen_buffer->data + (y+1) * screen_buffer->width;
switch(mode)
{
case CHAR_INFO_MODE_TEXT:
{
WCHAR *data;
int count = min( end - src, get_reply_max_size() / sizeof(*data) );
if ((data = set_reply_data_size( count * sizeof(*data) )))
{
for (i = 0; i < count; i++) data[i] = src[i].ch;
}
}
break;
case CHAR_INFO_MODE_ATTR:
{
unsigned short *data;
int count = min( end - src, get_reply_max_size() / sizeof(*data) );
if ((data = set_reply_data_size( count * sizeof(*data) )))
{
for (i = 0; i < count; i++) data[i] = src[i].attr;
}
}
break;
case CHAR_INFO_MODE_TEXTATTR:
{
char_info_t *data;
int count = min( end - src, get_reply_max_size() / sizeof(*data) );
if ((data = set_reply_data_size( count * sizeof(*data) )))
{
for (i = 0; i < count; i++) data[i] = src[i];
}
}
break;
default:
set_error( STATUS_INVALID_PARAMETER );
break;
}
}
/* scroll parts of a screen buffer */
static void scroll_console_output( struct screen_buffer *screen_buffer, int xsrc, int ysrc, int xdst, int ydst,
int w, int h )
@ -2220,27 +2168,6 @@ DECL_HANDLER(create_console_output)
release_object( console );
}
/* read data (chars & attrs) from a screen buffer */
DECL_HANDLER(read_console_output)
{
struct screen_buffer *screen_buffer;
if ((screen_buffer = (struct screen_buffer*)get_handle_obj( current->process, req->handle,
FILE_READ_DATA, &screen_buffer_ops )))
{
if (console_input_is_bare( screen_buffer->input ))
{
set_error( STATUS_OBJECT_TYPE_MISMATCH );
release_object( screen_buffer );
return;
}
read_console_output_req( screen_buffer, req->x, req->y, req->mode, req->wrap );
reply->width = screen_buffer->width;
reply->height = screen_buffer->height;
release_object( screen_buffer );
}
}
/* move a rect of data in a screen buffer */
DECL_HANDLER(move_console_output)
{

View File

@ -1567,20 +1567,6 @@ enum server_fd_type
@END
/* read data (chars and/or attributes) from a screen buffer */
@REQ(read_console_output)
obj_handle_t handle; /* handle to the console output */
int x; /* position (x,y) where to start reading */
int y;
int mode; /* char info mode */
int wrap; /* wrap around at end of line? */
@REPLY
int width; /* width of screen buffer */
int height; /* height of screen buffer */
VARARG(data,bytes);
@END
/* move a rect (of data) in screen buffer content */
@REQ(move_console_output)
obj_handle_t handle; /* handle to the console output */

View File

@ -191,7 +191,6 @@ DECL_HANDLER(get_console_input_info);
DECL_HANDLER(append_console_input_history);
DECL_HANDLER(get_console_input_history);
DECL_HANDLER(create_console_output);
DECL_HANDLER(read_console_output);
DECL_HANDLER(move_console_output);
DECL_HANDLER(send_console_signal);
DECL_HANDLER(read_directory_changes);
@ -483,7 +482,6 @@ static const req_handler req_handlers[REQ_NB_REQUESTS] =
(req_handler)req_append_console_input_history,
(req_handler)req_get_console_input_history,
(req_handler)req_create_console_output,
(req_handler)req_read_console_output,
(req_handler)req_move_console_output,
(req_handler)req_send_console_signal,
(req_handler)req_read_directory_changes,
@ -1168,15 +1166,6 @@ C_ASSERT( FIELD_OFFSET(struct create_console_output_request, fd) == 28 );
C_ASSERT( sizeof(struct create_console_output_request) == 32 );
C_ASSERT( FIELD_OFFSET(struct create_console_output_reply, handle_out) == 8 );
C_ASSERT( sizeof(struct create_console_output_reply) == 16 );
C_ASSERT( FIELD_OFFSET(struct read_console_output_request, handle) == 12 );
C_ASSERT( FIELD_OFFSET(struct read_console_output_request, x) == 16 );
C_ASSERT( FIELD_OFFSET(struct read_console_output_request, y) == 20 );
C_ASSERT( FIELD_OFFSET(struct read_console_output_request, mode) == 24 );
C_ASSERT( FIELD_OFFSET(struct read_console_output_request, wrap) == 28 );
C_ASSERT( sizeof(struct read_console_output_request) == 32 );
C_ASSERT( FIELD_OFFSET(struct read_console_output_reply, width) == 8 );
C_ASSERT( FIELD_OFFSET(struct read_console_output_reply, height) == 12 );
C_ASSERT( sizeof(struct read_console_output_reply) == 16 );
C_ASSERT( FIELD_OFFSET(struct move_console_output_request, handle) == 12 );
C_ASSERT( FIELD_OFFSET(struct move_console_output_request, x_src) == 16 );
C_ASSERT( FIELD_OFFSET(struct move_console_output_request, y_src) == 18 );

View File

@ -2139,22 +2139,6 @@ static void dump_create_console_output_reply( const struct create_console_output
fprintf( stderr, " handle_out=%04x", req->handle_out );
}
static void dump_read_console_output_request( const struct read_console_output_request *req )
{
fprintf( stderr, " handle=%04x", req->handle );
fprintf( stderr, ", x=%d", req->x );
fprintf( stderr, ", y=%d", req->y );
fprintf( stderr, ", mode=%d", req->mode );
fprintf( stderr, ", wrap=%d", req->wrap );
}
static void dump_read_console_output_reply( const struct read_console_output_reply *req )
{
fprintf( stderr, " width=%d", req->width );
fprintf( stderr, ", height=%d", req->height );
dump_varargs_bytes( ", data=", cur_size );
}
static void dump_move_console_output_request( const struct move_console_output_request *req )
{
fprintf( stderr, " handle=%04x", req->handle );
@ -4555,7 +4539,6 @@ static const dump_func req_dumpers[REQ_NB_REQUESTS] = {
(dump_func)dump_append_console_input_history_request,
(dump_func)dump_get_console_input_history_request,
(dump_func)dump_create_console_output_request,
(dump_func)dump_read_console_output_request,
(dump_func)dump_move_console_output_request,
(dump_func)dump_send_console_signal_request,
(dump_func)dump_read_directory_changes_request,
@ -4844,7 +4827,6 @@ static const dump_func reply_dumpers[REQ_NB_REQUESTS] = {
NULL,
(dump_func)dump_get_console_input_history_reply,
(dump_func)dump_create_console_output_reply,
(dump_func)dump_read_console_output_reply,
NULL,
NULL,
NULL,
@ -5133,7 +5115,6 @@ static const char * const req_names[REQ_NB_REQUESTS] = {
"append_console_input_history",
"get_console_input_history",
"create_console_output",
"read_console_output",
"move_console_output",
"send_console_signal",
"read_directory_changes",