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
fa8b85aa
Commit
fa8b85aa
authored
Jan 09, 2003
by
Eric Pouech
Committed by
Alexandre Julliard
Jan 09, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Set the edition mode as a specific attribute, not an extension of the
console mode.
parent
9957754b
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
44 additions
and
6 deletions
+44
-6
console.c
dlls/kernel/console.c
+19
-1
console_private.h
dlls/kernel/console_private.h
+2
-1
editline.c
dlls/kernel/editline.c
+6
-1
wincon.h
include/wincon.h
+0
-2
server_protocol.h
include/wine/server_protocol.h
+4
-1
console.c
server/console.c
+7
-0
console.h
server/console.h
+1
-0
protocol.def
server/protocol.def
+3
-0
trace.c
server/trace.c
+2
-0
No files found.
dlls/kernel/console.c
View file @
fa8b85aa
...
...
@@ -1053,7 +1053,7 @@ BOOL WINAPI ReadConsoleW(HANDLE hConsoleInput, LPVOID lpBuffer,
if
(
!
S_EditString
||
S_EditString
[
S_EditStrPos
]
==
0
)
{
if
(
S_EditString
)
HeapFree
(
GetProcessHeap
(),
0
,
S_EditString
);
if
(
!
(
S_EditString
=
CONSOLE_Readline
(
hConsoleInput
,
mode
&
WINE_ENABLE_LINE_INPUT_EMACS
)))
if
(
!
(
S_EditString
=
CONSOLE_Readline
(
hConsoleInput
)))
return
FALSE
;
S_EditStrPos
=
0
;
}
...
...
@@ -2242,3 +2242,21 @@ unsigned CONSOLE_GetNumHistoryEntries(void)
SERVER_END_REQ
;
return
ret
;
}
/******************************************************************
* CONSOLE_GetEditionMode
*
*
*/
BOOL
CONSOLE_GetEditionMode
(
HANDLE
hConIn
,
int
*
mode
)
{
unsigned
ret
=
FALSE
;
SERVER_START_REQ
(
get_console_input_info
)
{
req
->
handle
=
hConIn
;
if
((
ret
=
!
wine_server_call_err
(
req
)))
*
mode
=
reply
->
edition_mode
;
}
SERVER_END_REQ
;
return
ret
;
}
dlls/kernel/console_private.h
View file @
fa8b85aa
...
...
@@ -28,8 +28,9 @@ extern int CONSOLE_GetHistory(int idx, WCHAR* buf, int buf_len);
extern
BOOL
CONSOLE_AppendHistory
(
const
WCHAR
*
p
);
extern
unsigned
CONSOLE_GetNumHistoryEntries
(
void
);
extern
void
CONSOLE_FillLineUniform
(
HANDLE
hConsoleOutput
,
int
i
,
int
j
,
int
len
,
LPCHAR_INFO
lpFill
);
extern
BOOL
CONSOLE_GetEditionMode
(
HANDLE
,
int
*
);
/* editline.c */
extern
WCHAR
*
CONSOLE_Readline
(
HANDLE
,
int
);
extern
WCHAR
*
CONSOLE_Readline
(
HANDLE
);
#endif
/* __WINE_CONSOLE_PRIVATE_H */
dlls/kernel/editline.c
View file @
fa8b85aa
...
...
@@ -785,7 +785,7 @@ KeyMap Win32KeyMap[] =
*
* ====================================================================*/
WCHAR
*
CONSOLE_Readline
(
HANDLE
hConsoleIn
,
int
use_emacs
)
WCHAR
*
CONSOLE_Readline
(
HANDLE
hConsoleIn
)
{
WCEL_Context
ctx
;
INPUT_RECORD
ir
;
...
...
@@ -794,10 +794,15 @@ WCHAR* CONSOLE_Readline(HANDLE hConsoleIn, int use_emacs)
unsigned
ofs
;
void
(
*
func
)(
struct
WCEL_Context
*
ctx
);
DWORD
ks
;
int
use_emacs
;
memset
(
&
ctx
,
0
,
sizeof
(
ctx
));
ctx
.
hConIn
=
hConsoleIn
;
WCEL_HistoryInit
(
&
ctx
);
if
(
!
CONSOLE_GetEditionMode
(
hConsoleIn
,
&
use_emacs
))
use_emacs
=
0
;
if
((
ctx
.
hConOut
=
CreateFileA
(
"CONOUT$"
,
GENERIC_READ
|
GENERIC_WRITE
,
0
,
NULL
,
OPEN_EXISTING
,
0
,
0
))
==
INVALID_HANDLE_VALUE
||
!
GetConsoleScreenBufferInfo
(
ctx
.
hConOut
,
&
ctx
.
csbi
))
...
...
include/wincon.h
View file @
fa8b85aa
...
...
@@ -35,8 +35,6 @@ extern "C" {
#define ENABLE_ECHO_INPUT 0x04
#define ENABLE_WINDOW_INPUT 0x08
#define ENABLE_MOUSE_INPUT 0x10
/* Wine only code (extension) */
#define WINE_ENABLE_LINE_INPUT_EMACS 0x80
#define ENABLE_PROCESSED_OUTPUT 0x01
#define ENABLE_WRAP_AT_EOL_OUTPUT 0x02
...
...
include/wine/server_protocol.h
View file @
fa8b85aa
...
...
@@ -1164,6 +1164,7 @@ struct set_console_input_info_request
obj_handle_t
active_sb
;
int
history_mode
;
int
history_size
;
int
edition_mode
;
/* VARARG(title,unicode_str); */
};
struct
set_console_input_info_reply
...
...
@@ -1174,6 +1175,7 @@ struct set_console_input_info_reply
#define SET_CONSOLE_INPUT_INFO_TITLE 0x02
#define SET_CONSOLE_INPUT_INFO_HISTORY_MODE 0x04
#define SET_CONSOLE_INPUT_INFO_HISTORY_SIZE 0x08
#define SET_CONSOLE_INPUT_INFO_EDITION_MODE 0x10
...
...
@@ -1188,6 +1190,7 @@ struct get_console_input_info_reply
int
history_mode
;
int
history_size
;
int
history_index
;
int
edition_mode
;
/* VARARG(title,unicode_str); */
};
...
...
@@ -3532,6 +3535,6 @@ union generic_reply
struct
get_next_hook_reply
get_next_hook_reply
;
};
#define SERVER_PROTOCOL_VERSION 9
5
#define SERVER_PROTOCOL_VERSION 9
6
#endif
/* __WINE_WINE_SERVER_PROTOCOL_H */
server/console.c
View file @
fa8b85aa
...
...
@@ -241,6 +241,7 @@ static struct object *create_console_input( struct thread* renderer )
console_input
->
history
=
calloc
(
console_input
->
history_size
,
sizeof
(
WCHAR
*
)
);
console_input
->
history_index
=
0
;
console_input
->
history_mode
=
0
;
console_input
->
edition_mode
=
0
;
if
(
!
console_input
->
history
||
!
console_input
->
evt
)
{
...
...
@@ -666,6 +667,10 @@ static int set_console_input_info( const struct set_console_input_info_request *
console
->
history
=
mem
;
console
->
history_size
=
req
->
history_size
;
}
if
(
req
->
mask
&
SET_CONSOLE_INPUT_INFO_EDITION_MODE
)
{
console
->
edition_mode
=
req
->
edition_mode
;
}
release_object
(
console
);
return
1
;
error:
...
...
@@ -1363,6 +1368,8 @@ DECL_HANDLER(get_console_input_info)
reply
->
history_mode
=
console
->
history_mode
;
reply
->
history_size
=
console
->
history_size
;
reply
->
history_index
=
console
->
history_index
;
reply
->
edition_mode
=
console
->
edition_mode
;
release_object
(
console
);
}
...
...
server/console.h
View file @
fa8b85aa
...
...
@@ -41,6 +41,7 @@ struct console_input
int
history_size
;
/* number of entries in history array */
int
history_index
;
/* number of used entries in history array */
int
history_mode
;
/* mode of history (non zero means remove doubled strings */
int
edition_mode
;
/* index to edition mode flavors */
};
/* console functions */
...
...
server/protocol.def
View file @
fa8b85aa
...
...
@@ -864,12 +864,14 @@ struct console_renderer_event
obj_handle_t active_sb; /* active screen buffer */
int history_mode; /* whether we duplicate lines in history */
int history_size; /* number of lines in history */
int edition_mode; /* index to the edition mode flavors */
VARARG(title,unicode_str); /* console title */
@END
#define SET_CONSOLE_INPUT_INFO_ACTIVE_SB 0x01
#define SET_CONSOLE_INPUT_INFO_TITLE 0x02
#define SET_CONSOLE_INPUT_INFO_HISTORY_MODE 0x04
#define SET_CONSOLE_INPUT_INFO_HISTORY_SIZE 0x08
#define SET_CONSOLE_INPUT_INFO_EDITION_MODE 0x10
/* Get info about a console (input only) */
...
...
@@ -879,6 +881,7 @@ struct console_renderer_event
int history_mode; /* whether we duplicate lines in history */
int history_size; /* number of lines in history */
int history_index; /* number of used lines in history */
int edition_mode; /* index to the edition mode flavors */
VARARG(title,unicode_str); /* console title */
@END
...
...
server/trace.c
View file @
fa8b85aa
...
...
@@ -1027,6 +1027,7 @@ static void dump_set_console_input_info_request( const struct set_console_input_
fprintf
(
stderr
,
" active_sb=%p,"
,
req
->
active_sb
);
fprintf
(
stderr
,
" history_mode=%d,"
,
req
->
history_mode
);
fprintf
(
stderr
,
" history_size=%d,"
,
req
->
history_size
);
fprintf
(
stderr
,
" edition_mode=%d,"
,
req
->
edition_mode
);
fprintf
(
stderr
,
" title="
);
dump_varargs_unicode_str
(
cur_size
);
}
...
...
@@ -1041,6 +1042,7 @@ static void dump_get_console_input_info_reply( const struct get_console_input_in
fprintf
(
stderr
,
" history_mode=%d,"
,
req
->
history_mode
);
fprintf
(
stderr
,
" history_size=%d,"
,
req
->
history_size
);
fprintf
(
stderr
,
" history_index=%d,"
,
req
->
history_index
);
fprintf
(
stderr
,
" edition_mode=%d,"
,
req
->
edition_mode
);
fprintf
(
stderr
,
" title="
);
dump_varargs_unicode_str
(
cur_size
);
}
...
...
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