Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
dcd02876
Commit
dcd02876
authored
Jul 20, 2020
by
Jacek Caban
Committed by
Alexandre Julliard
Jul 20, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Introduce IOCTL_CONDRV_SET_INPUT_INFO ioctl.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
e5851ce9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
73 additions
and
0 deletions
+73
-0
condrv.h
include/wine/condrv.h
+11
-0
console.c
server/console.c
+62
-0
No files found.
include/wine/condrv.h
View file @
dcd02876
...
...
@@ -32,6 +32,7 @@
#define IOCTL_CONDRV_WRITE_INPUT CTL_CODE(FILE_DEVICE_CONSOLE, 11, METHOD_BUFFERED, FILE_WRITE_PROPERTIES)
#define IOCTL_CONDRV_PEEK CTL_CODE(FILE_DEVICE_CONSOLE, 12, METHOD_BUFFERED, FILE_READ_ACCESS)
#define IOCTL_CONDRV_GET_INPUT_INFO CTL_CODE(FILE_DEVICE_CONSOLE, 13, METHOD_BUFFERED, FILE_READ_PROPERTIES)
#define IOCTL_CONDRV_SET_INPUT_INFO CTL_CODE(FILE_DEVICE_CONSOLE, 14, METHOD_BUFFERED, FILE_WRITE_PROPERTIES)
#define IOCTL_CONDRV_GET_TITLE CTL_CODE(FILE_DEVICE_CONSOLE, 15, METHOD_BUFFERED, FILE_READ_PROPERTIES)
/* console output ioctls */
...
...
@@ -64,10 +65,20 @@ typedef struct
/* IOCTL_CONDRV_GET_INPUT_INFO result */
struct
condrv_input_info
{
unsigned
int
input_cp
;
/* console input codepage */
unsigned
int
output_cp
;
/* console output codepage */
unsigned
int
history_mode
;
/* whether we duplicate lines in history */
unsigned
int
history_size
;
/* number of lines in history */
unsigned
int
edition_mode
;
/* index to the edition mode flavors */
unsigned
int
input_count
;
/* number of available input records */
condrv_handle_t
win
;
/* renderer window handle */
};
/* IOCTL_CONDRV_SET_INPUT_INFO params */
struct
condrv_input_info_params
{
unsigned
int
mask
;
/* setting mask */
struct
condrv_input_info
info
;
/* input_info */
};
/* IOCTL_CONDRV_GET_OUTPUT_INFO result */
...
...
server/console.c
View file @
dcd02876
...
...
@@ -1577,13 +1577,75 @@ static int console_input_ioctl( struct fd *fd, ioctl_code_t code, struct async *
set_error
(
STATUS_INVALID_PARAMETER
);
return
0
;
}
info
.
input_cp
=
console
->
input_cp
;
info
.
output_cp
=
console
->
output_cp
;
info
.
history_mode
=
console
->
history_mode
;
info
.
history_size
=
console
->
history_size
;
info
.
edition_mode
=
console
->
edition_mode
;
info
.
input_count
=
console
->
recnum
;
info
.
win
=
console
->
win
;
return
set_reply_data
(
&
info
,
sizeof
(
info
)
)
!=
NULL
;
}
case
IOCTL_CONDRV_SET_INPUT_INFO
:
{
const
struct
condrv_input_info_params
*
params
=
get_req_data
();
if
(
get_req_data_size
()
!=
sizeof
(
*
params
))
{
set_error
(
STATUS_INVALID_PARAMETER
);
return
0
;
}
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
=
mem_alloc
(
params
->
info
.
history_size
*
sizeof
(
*
mem
)
)))
return
0
;
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
=
params
->
info
.
win
;
}
return
1
;
}
case
IOCTL_CONDRV_GET_TITLE
:
if
(
!
console
->
title_len
)
return
1
;
return
set_reply_data
(
console
->
title
,
min
(
console
->
title_len
,
get_reply_max_size
()
))
!=
NULL
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment