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
99bc6404
Commit
99bc6404
authored
Jun 13, 2003
by
Eric Pouech
Committed by
Alexandre Julliard
Jun 13, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
If (n)curses wasn't available at compile time:
- print sensible information - fall back to user backend
parent
6936db11
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
31 additions
and
14 deletions
+31
-14
curses.c
programs/wineconsole/curses.c
+5
-5
user.c
programs/wineconsole/user.c
+4
-4
winecon_private.h
programs/wineconsole/winecon_private.h
+5
-2
wineconsole.c
programs/wineconsole/wineconsole.c
+17
-3
No files found.
programs/wineconsole/curses.c
View file @
99bc6404
...
...
@@ -717,10 +717,10 @@ static int WCCURSES_MainLoop(struct inner_data* data)
* Initialisation part II: creation of window.
*
*/
BOOL
WCCURSES_InitBackend
(
struct
inner_data
*
data
)
enum
init_return
WCCURSES_InitBackend
(
struct
inner_data
*
data
)
{
data
->
private
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
struct
inner_data_curse
));
if
(
!
data
->
private
)
return
FALSE
;
if
(
!
data
->
private
)
return
init_failed
;
data
->
fnMainLoop
=
WCCURSES_MainLoop
;
data
->
fnPosCursor
=
WCCURSES_PosCursor
;
...
...
@@ -737,7 +737,7 @@ BOOL WCCURSES_InitBackend(struct inner_data* data)
(
obj_handle_t
*
)
&
PRIVATE
(
data
)
->
hInput
))
{
WINE_FIXME
(
"Cannot open 0
\n
"
);
return
0
;
return
init_failed
;
}
/* FIXME: should find a good way to enable buffer scrolling
...
...
@@ -782,12 +782,12 @@ BOOL WCCURSES_InitBackend(struct inner_data* data)
mousemask
(
0
,
&
PRIVATE
(
data
)
->
initial_mouse_mask
);
}
return
TRUE
;
return
init_success
;
}
#else
BOOL
WCCURSES_InitBackend
(
struct
inner_data
*
data
)
{
return
FALSE
;
return
init_not_supported
;
}
#endif
programs/wineconsole/user.c
View file @
99bc6404
...
...
@@ -1353,14 +1353,14 @@ static int WCUSER_MainLoop(struct inner_data* data)
* Initialisation part II: creation of window.
*
*/
BOOL
WCUSER_InitBackend
(
struct
inner_data
*
data
)
enum
init_return
WCUSER_InitBackend
(
struct
inner_data
*
data
)
{
static
WCHAR
wClassName
[]
=
{
'W'
,
'i'
,
'n'
,
'e'
,
'C'
,
'o'
,
'n'
,
's'
,
'o'
,
'l'
,
'e'
,
'C'
,
'l'
,
'a'
,
's'
,
's'
,
0
};
WNDCLASS
wndclass
;
data
->
private
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
struct
inner_data_user
));
if
(
!
data
->
private
)
return
FALSE
;
if
(
!
data
->
private
)
return
init_failed
;
data
->
fnMainLoop
=
WCUSER_MainLoop
;
data
->
fnPosCursor
=
WCUSER_PosCursor
;
...
...
@@ -1389,7 +1389,7 @@ BOOL WCUSER_InitBackend(struct inner_data* data)
CreateWindow
(
wndclass
.
lpszClassName
,
NULL
,
WS_OVERLAPPED
|
WS_CAPTION
|
WS_SYSMENU
|
WS_THICKFRAME
|
WS_MINIMIZEBOX
|
WS_HSCROLL
|
WS_VSCROLL
,
CW_USEDEFAULT
,
CW_USEDEFAULT
,
0
,
0
,
0
,
0
,
wndclass
.
hInstance
,
data
);
if
(
!
PRIVATE
(
data
)
->
hWnd
)
return
FALSE
;
if
(
!
PRIVATE
(
data
)
->
hWnd
)
return
init_failed
;
return
TRUE
;
return
init_success
;
}
programs/wineconsole/winecon_private.h
View file @
99bc6404
...
...
@@ -89,5 +89,8 @@ extern void WINECON_RegSave(const struct config_data* cfg);
extern
void
WINECON_DumpConfig
(
const
char
*
pfx
,
const
struct
config_data
*
cfg
);
/* backends... */
extern
BOOL
WCUSER_InitBackend
(
struct
inner_data
*
data
);
extern
BOOL
WCCURSES_InitBackend
(
struct
inner_data
*
data
);
enum
init_return
{
init_success
,
init_failed
,
init_not_supported
};
extern
enum
init_return
WCUSER_InitBackend
(
struct
inner_data
*
data
);
extern
enum
init_return
WCCURSES_InitBackend
(
struct
inner_data
*
data
);
programs/wineconsole/wineconsole.c
View file @
99bc6404
...
...
@@ -529,7 +529,7 @@ static void WINECON_Delete(struct inner_data* data)
* active screen buffer)
*/
static
struct
inner_data
*
WINECON_Init
(
HINSTANCE
hInst
,
DWORD
pid
,
LPCWSTR
appname
,
BOOL
(
*
backend
)(
struct
inner_data
*
))
enum
init_return
(
*
backend
)(
struct
inner_data
*
))
{
struct
inner_data
*
data
=
NULL
;
DWORD
ret
;
...
...
@@ -605,12 +605,26 @@ static struct inner_data* WINECON_Init(HINSTANCE hInst, DWORD pid, LPCWSTR appna
WINE_TRACE
(
"using hConOut %p
\n
"
,
data
->
hConOut
);
/* filling data->curcfg from cfg */
if
((
*
backend
)(
data
))
retry:
switch
((
*
backend
)(
data
))
{
case
init_success
:
WINECON_SetConfig
(
data
,
&
cfg
,
TRUE
);
data
->
curcfg
.
registry
=
cfg
.
registry
;
WINECON_DumpConfig
(
"fint"
,
&
data
->
curcfg
);
return
data
;
case
init_failed
:
break
;
case
init_not_supported
:
if
(
backend
==
WCCURSES_InitBackend
)
{
WINE_ERR
(
"(n)curses was not found at configuration time.
\n
"
"If you want (n)curses support, please install relevant packages.
\n
"
"Now forcing user backend instead of (n)curses.
\n
"
);
backend
=
WCUSER_InitBackend
;
goto
retry
;
}
break
;
}
error:
...
...
@@ -667,7 +681,7 @@ static BOOL WINECON_Spawn(struct inner_data* data, LPWSTR cmdLine)
struct
wc_init
{
LPCSTR
ptr
;
enum
{
from_event
,
from_process_name
}
mode
;
BOOL
(
*
backend
)(
struct
inner_data
*
);
enum
init_return
(
*
backend
)(
struct
inner_data
*
);
HANDLE
event
;
};
...
...
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