Jacek Caban : server: Remove no longer used move_console_output request.
Alexandre Julliard
julliard at winehq.org
Wed Jul 29 15:47:00 CDT 2020
Module: wine
Branch: master
Commit: b6b2667482a14e4cd76da48940ead142ce207b2e
URL: https://source.winehq.org/git/wine.git/?a=commit;h=b6b2667482a14e4cd76da48940ead142ce207b2e
Author: Jacek Caban <jacek at codeweavers.com>
Date: Wed Jul 29 12:36:33 2020 +0200
server: Remove no longer used move_console_output request.
Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
include/wine/server_protocol.h | 24 +-------------
server/console.c | 75 ------------------------------------------
server/protocol.def | 12 -------
server/request.h | 10 ------
server/trace.c | 14 --------
5 files changed, 1 insertion(+), 134 deletions(-)
diff --git a/include/wine/server_protocol.h b/include/wine/server_protocol.h
index 957f97eb36..d4bb5c9ab3 100644
--- a/include/wine/server_protocol.h
+++ b/include/wine/server_protocol.h
@@ -1995,25 +1995,6 @@ struct create_console_output_reply
-struct move_console_output_request
-{
- struct request_header __header;
- obj_handle_t handle;
- short int x_src;
- short int y_src;
- short int x_dst;
- short int y_dst;
- short int w;
- short int h;
- char __pad_28[4];
-};
-struct move_console_output_reply
-{
- struct reply_header __header;
-};
-
-
-
struct send_console_signal_request
{
struct request_header __header;
@@ -5599,7 +5580,6 @@ enum request
REQ_append_console_input_history,
REQ_get_console_input_history,
REQ_create_console_output,
- REQ_move_console_output,
REQ_send_console_signal,
REQ_read_directory_changes,
REQ_read_change,
@@ -5891,7 +5871,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 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;
struct read_change_request read_change_request;
@@ -6181,7 +6160,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 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;
struct read_change_reply read_change_reply;
@@ -6398,7 +6376,7 @@ union generic_reply
/* ### protocol_version begin ### */
-#define SERVER_PROTOCOL_VERSION 631
+#define SERVER_PROTOCOL_VERSION 632
/* ### protocol_version end ### */
diff --git a/server/console.c b/server/console.c
index f924ddc06b..2316b8eafb 100644
--- a/server/console.c
+++ b/server/console.c
@@ -1522,61 +1522,6 @@ static void scroll_console_output( struct screen_buffer *screen_buffer, int xsrc
console_input_events_append( screen_buffer->input, &evt );
}
-/* scroll parts of a screen buffer */
-static void scroll_console_output_req( struct screen_buffer *screen_buffer, int xsrc, int ysrc, int xdst, int ydst,
- int w, int h )
-{
- int j;
- char_info_t *psrc, *pdst;
- struct condrv_renderer_event evt;
-
- if (xsrc < 0 || ysrc < 0 || xdst < 0 || ydst < 0 ||
- xsrc + w > screen_buffer->width ||
- xdst + w > screen_buffer->width ||
- ysrc + h > screen_buffer->height ||
- ydst + h > screen_buffer->height ||
- w == 0 || h == 0)
- {
- set_error( STATUS_INVALID_PARAMETER );
- return;
- }
-
- if (ysrc < ydst)
- {
- psrc = &screen_buffer->data[(ysrc + h - 1) * screen_buffer->width + xsrc];
- pdst = &screen_buffer->data[(ydst + h - 1) * screen_buffer->width + xdst];
-
- for (j = h; j > 0; j--)
- {
- memcpy(pdst, psrc, w * sizeof(*pdst) );
- pdst -= screen_buffer->width;
- psrc -= screen_buffer->width;
- }
- }
- else
- {
- psrc = &screen_buffer->data[ysrc * screen_buffer->width + xsrc];
- pdst = &screen_buffer->data[ydst * screen_buffer->width + xdst];
-
- for (j = 0; j < h; j++)
- {
- /* we use memmove here because when psrc and pdst are the same,
- * copies are done on the same row, so the dst and src blocks
- * can overlap */
- memmove( pdst, psrc, w * sizeof(*pdst) );
- pdst += screen_buffer->width;
- psrc += screen_buffer->width;
- }
- }
-
- /* FIXME: this could be enhanced, by signalling scroll */
- evt.event = CONSOLE_RENDERER_UPDATE_EVENT;
- memset(&evt.u, 0, sizeof(evt.u));
- evt.u.update.top = min(ysrc, ydst);
- evt.u.update.bottom = max(ysrc, ydst) + h - 1;
- console_input_events_append( screen_buffer->input, &evt );
-}
-
static int console_input_ioctl( struct fd *fd, ioctl_code_t code, struct async *async )
{
struct console_input *console = get_fd_user( fd );
@@ -2280,26 +2225,6 @@ DECL_HANDLER(create_console_output)
release_object( console );
}
-/* move a rect of data in a screen buffer */
-DECL_HANDLER(move_console_output)
-{
- struct screen_buffer *screen_buffer;
-
- if ((screen_buffer = (struct screen_buffer*)get_handle_obj( current->process, req->handle,
- FILE_WRITE_DATA, &screen_buffer_ops)))
- {
- if (console_input_is_bare( screen_buffer->input ))
- {
- set_error( STATUS_OBJECT_TYPE_MISMATCH );
- release_object( screen_buffer );
- return;
- }
- scroll_console_output_req( screen_buffer, req->x_src, req->y_src, req->x_dst, req->y_dst,
- req->w, req->h );
- release_object( screen_buffer );
- }
-}
-
/* sends a signal to a console (process, group...) */
DECL_HANDLER(send_console_signal)
{
diff --git a/server/protocol.def b/server/protocol.def
index c8014d920d..b48cf70e48 100644
--- a/server/protocol.def
+++ b/server/protocol.def
@@ -1567,18 +1567,6 @@ enum server_fd_type
@END
-/* move a rect (of data) in screen buffer content */
- at REQ(move_console_output)
- obj_handle_t handle; /* handle to the console output */
- short int x_src; /* position (x, y) of rect to start moving from */
- short int y_src;
- short int x_dst; /* position (x, y) of rect to move to */
- short int y_dst;
- short int w; /* size of the rect (width, height) to move */
- short int h;
- at END
-
-
/* Sends a signal to a process group */
@REQ(send_console_signal)
int signal; /* the signal to send */
diff --git a/server/request.h b/server/request.h
index 87593d1373..fd5141d6cb 100644
--- a/server/request.h
+++ b/server/request.h
@@ -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(move_console_output);
DECL_HANDLER(send_console_signal);
DECL_HANDLER(read_directory_changes);
DECL_HANDLER(read_change);
@@ -482,7 +481,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_move_console_output,
(req_handler)req_send_console_signal,
(req_handler)req_read_directory_changes,
(req_handler)req_read_change,
@@ -1166,14 +1164,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 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 );
-C_ASSERT( FIELD_OFFSET(struct move_console_output_request, x_dst) == 20 );
-C_ASSERT( FIELD_OFFSET(struct move_console_output_request, y_dst) == 22 );
-C_ASSERT( FIELD_OFFSET(struct move_console_output_request, w) == 24 );
-C_ASSERT( FIELD_OFFSET(struct move_console_output_request, h) == 26 );
-C_ASSERT( sizeof(struct move_console_output_request) == 32 );
C_ASSERT( FIELD_OFFSET(struct send_console_signal_request, signal) == 12 );
C_ASSERT( FIELD_OFFSET(struct send_console_signal_request, group_id) == 16 );
C_ASSERT( sizeof(struct send_console_signal_request) == 24 );
diff --git a/server/trace.c b/server/trace.c
index 78bdf790dd..db5d0dd6ea 100644
--- a/server/trace.c
+++ b/server/trace.c
@@ -2139,17 +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_move_console_output_request( const struct move_console_output_request *req )
-{
- fprintf( stderr, " handle=%04x", req->handle );
- fprintf( stderr, ", x_src=%d", req->x_src );
- fprintf( stderr, ", y_src=%d", req->y_src );
- fprintf( stderr, ", x_dst=%d", req->x_dst );
- fprintf( stderr, ", y_dst=%d", req->y_dst );
- fprintf( stderr, ", w=%d", req->w );
- fprintf( stderr, ", h=%d", req->h );
-}
-
static void dump_send_console_signal_request( const struct send_console_signal_request *req )
{
fprintf( stderr, " signal=%d", req->signal );
@@ -4539,7 +4528,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_move_console_output_request,
(dump_func)dump_send_console_signal_request,
(dump_func)dump_read_directory_changes_request,
(dump_func)dump_read_change_request,
@@ -4829,7 +4817,6 @@ static const dump_func reply_dumpers[REQ_NB_REQUESTS] = {
(dump_func)dump_create_console_output_reply,
NULL,
NULL,
- NULL,
(dump_func)dump_read_change_reply,
(dump_func)dump_create_mapping_reply,
(dump_func)dump_open_mapping_reply,
@@ -5115,7 +5102,6 @@ static const char * const req_names[REQ_NB_REQUESTS] = {
"append_console_input_history",
"get_console_input_history",
"create_console_output",
- "move_console_output",
"send_console_signal",
"read_directory_changes",
"read_change",
More information about the wine-cvs
mailing list