Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
f54c7205
Commit
f54c7205
authored
Aug 14, 2020
by
Jacek Caban
Committed by
Alexandre Julliard
Aug 14, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32: Use IOCTL_CONDRV_GET_INPUT_INFO in CONSOLE_GetNumHistoryEntries.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
36fc962f
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
8 additions
and
11 deletions
+8
-11
console.c
dlls/kernel32/console.c
+4
-9
console_private.h
dlls/kernel32/console_private.h
+1
-1
editline.c
dlls/kernel32/editline.c
+1
-1
condrv.h
include/wine/condrv.h
+1
-0
console.c
server/console.c
+1
-0
No files found.
dlls/kernel32/console.c
View file @
f54c7205
...
...
@@ -1009,16 +1009,11 @@ BOOL CONSOLE_AppendHistory(const WCHAR* ptr)
*
*
*/
unsigned
CONSOLE_GetNumHistoryEntries
(
void
)
unsigned
CONSOLE_GetNumHistoryEntries
(
HANDLE
console
)
{
unsigned
ret
=
-
1
;
SERVER_START_REQ
(
get_console_input_info
)
{
req
->
handle
=
0
;
if
(
!
wine_server_call_err
(
req
))
ret
=
reply
->
history_index
;
}
SERVER_END_REQ
;
return
ret
;
struct
condrv_input_info
info
;
BOOL
ret
=
DeviceIoControl
(
console
,
IOCTL_CONDRV_GET_INPUT_INFO
,
NULL
,
0
,
&
info
,
sizeof
(
info
),
NULL
,
NULL
);
return
ret
?
info
.
history_index
:
~
0
;
}
/******************************************************************
...
...
dlls/kernel32/console_private.h
View file @
f54c7205
...
...
@@ -24,7 +24,7 @@
/* console.c */
extern
int
CONSOLE_GetHistory
(
int
idx
,
WCHAR
*
buf
,
int
buf_len
)
DECLSPEC_HIDDEN
;
extern
BOOL
CONSOLE_AppendHistory
(
const
WCHAR
*
p
)
DECLSPEC_HIDDEN
;
extern
unsigned
CONSOLE_GetNumHistoryEntries
(
void
)
DECLSPEC_HIDDEN
;
extern
unsigned
CONSOLE_GetNumHistoryEntries
(
HANDLE
)
DECLSPEC_HIDDEN
;
extern
void
CONSOLE_FillLineUniform
(
HANDLE
hConsoleOutput
,
int
i
,
int
j
,
int
len
,
LPCHAR_INFO
lpFill
)
DECLSPEC_HIDDEN
;
extern
BOOL
CONSOLE_GetEditionMode
(
HANDLE
,
int
*
)
DECLSPEC_HIDDEN
;
...
...
dlls/kernel32/editline.c
View file @
f54c7205
...
...
@@ -408,7 +408,7 @@ static WCHAR* WCEL_GetHistory(WCEL_Context* ctx, int idx)
static
void
WCEL_HistoryInit
(
WCEL_Context
*
ctx
)
{
ctx
->
histPos
=
CONSOLE_GetNumHistoryEntries
();
ctx
->
histPos
=
CONSOLE_GetNumHistoryEntries
(
ctx
->
hConIn
);
ctx
->
histSize
=
ctx
->
histPos
+
1
;
ctx
->
histCurr
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
WCHAR
));
}
...
...
include/wine/condrv.h
View file @
f54c7205
...
...
@@ -74,6 +74,7 @@ struct condrv_input_info
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
history_index
;
/* number of used 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 */
...
...
server/console.c
View file @
f54c7205
...
...
@@ -1595,6 +1595,7 @@ static int console_input_ioctl( struct fd *fd, ioctl_code_t code, struct async *
info
.
output_cp
=
console
->
output_cp
;
info
.
history_mode
=
console
->
history_mode
;
info
.
history_size
=
console
->
history_size
;
info
.
history_index
=
console
->
history_index
;
info
.
edition_mode
=
console
->
edition_mode
;
info
.
input_count
=
console
->
recnum
;
info
.
win
=
console
->
win
;
...
...
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