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
042bbf9a
Commit
042bbf9a
authored
May 30, 2009
by
Eric Pouech
Committed by
Alexandre Julliard
Jun 01, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winhlp32: Force the handling of a current help window while processing a macro.
parent
ae20d470
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
25 additions
and
10 deletions
+25
-10
macro.c
programs/winhlp32/macro.c
+3
-2
macro.h
programs/winhlp32/macro.h
+4
-2
macro.lex.l
programs/winhlp32/macro.lex.l
+14
-2
winhelp.c
programs/winhlp32/winhelp.c
+4
-4
No files found.
programs/winhlp32/macro.c
View file @
042bbf9a
...
...
@@ -473,12 +473,13 @@ void CALLBACK MACRO_History(void)
static
void
CALLBACK
MACRO_IfThen
(
BOOL
b
,
LPCSTR
t
)
{
if
(
b
)
MACRO_ExecuteMacro
(
t
);
if
(
b
)
MACRO_ExecuteMacro
(
MACRO_CurrentWindow
(),
t
);
}
static
void
CALLBACK
MACRO_IfThenElse
(
BOOL
b
,
LPCSTR
t
,
LPCSTR
f
)
{
if
(
b
)
MACRO_ExecuteMacro
(
t
);
else
MACRO_ExecuteMacro
(
f
);
if
(
b
)
MACRO_ExecuteMacro
(
MACRO_CurrentWindow
(),
t
);
else
MACRO_ExecuteMacro
(
MACRO_CurrentWindow
(),
f
);
}
static
BOOL
CALLBACK
MACRO_InitMPrint
(
void
)
...
...
programs/winhlp32/macro.h
View file @
042bbf9a
...
...
@@ -33,9 +33,11 @@ struct lexret {
};
extern
struct
lexret
yylval
;
struct
tagWinHelp
;
BOOL
MACRO_ExecuteMacro
(
LPCSTR
);
int
MACRO_Lookup
(
const
char
*
name
,
struct
lexret
*
lr
);
BOOL
MACRO_ExecuteMacro
(
struct
tagWinHelp
*
,
LPCSTR
);
int
MACRO_Lookup
(
const
char
*
name
,
struct
lexret
*
lr
);
struct
tagWinHelp
*
MACRO_CurrentWindow
(
void
);
enum
token_types
{
EMPTY
,
VOID_FUNCTION
,
BOOL_FUNCTION
,
INTEGER
,
STRING
,
IDENTIFIER
};
void
CALLBACK
MACRO_About
(
void
);
...
...
programs/winhlp32/macro.lex.l
View file @
042bbf9a
...
...
@@ -25,12 +25,17 @@
%{
#include "config.h"
#include <assert.h>
#include <stdarg.h>
#ifndef HAVE_UNISTD_H
#define YY_NO_UNISTD_H
#endif
#include "macro.h"
#include "windef.h"
#include "winbase.h"
#include "wingdi.h"
#include "winuser.h"
#include "winhelp.h"
#include "wine/debug.h"
...
...
@@ -43,6 +48,7 @@ struct lex_data {
unsigned quote_stk_idx;
LPSTR cache_string[32];
int cache_used;
WINHELP_WINDOW* window;
};
static struct lex_data* lex_data = NULL;
...
...
@@ -266,7 +272,7 @@ static int MACRO_CallVoidFunc(FARPROC fn, const char* args)
return 1;
}
BOOL MACRO_ExecuteMacro(LPCSTR macro)
BOOL MACRO_ExecuteMacro(
WINHELP_WINDOW* window,
LPCSTR macro)
{
struct lex_data curr_lex_data, *prev_lex_data;
BOOL ret = TRUE;
...
...
@@ -279,6 +285,7 @@ BOOL MACRO_ExecuteMacro(LPCSTR macro)
memset(lex_data, 0, sizeof(*lex_data));
lex_data->macroptr = macro;
lex_data->window = window;
while ((t = yylex()) != EMPTY)
{
...
...
@@ -313,6 +320,11 @@ done:
return ret;
}
WINHELP_WINDOW* MACRO_CurrentWindow(void)
{
return lex_data ? lex_data->window : Globals.active_win;
}
#ifndef yywrap
int yywrap(void) { return 1; }
#endif
programs/winhlp32/winhelp.c
View file @
042bbf9a
...
...
@@ -772,10 +772,10 @@ BOOL WINHELP_CreateHelpWindow(WINHELP_WNDPAGE* wpage, int nCmdShow, BOOL remembe
{
HLPFILE_MACRO
*
macro
;
for
(
macro
=
wpage
->
page
->
file
->
first_macro
;
macro
;
macro
=
macro
->
next
)
MACRO_ExecuteMacro
(
macro
->
lpszMacro
);
MACRO_ExecuteMacro
(
win
,
macro
->
lpszMacro
);
for
(
macro
=
wpage
->
page
->
first_macro
;
macro
;
macro
=
macro
->
next
)
MACRO_ExecuteMacro
(
macro
->
lpszMacro
);
MACRO_ExecuteMacro
(
win
,
macro
->
lpszMacro
);
}
if
(
bPopup
)
...
...
@@ -870,7 +870,7 @@ static BOOL WINHELP_HandleTextMouse(WINHELP_WINDOW* win, UINT msg, LPARAM lParam
SW_NORMAL
);
break
;
case
hlp_link_macro
:
MACRO_ExecuteMacro
(
link
->
string
);
MACRO_ExecuteMacro
(
win
,
link
->
string
);
break
;
default:
WINE_FIXME
(
"Unknown link cookie %d
\n
"
,
link
->
cookie
);
...
...
@@ -1368,7 +1368,7 @@ static LRESULT CALLBACK WINHELP_MainWndProc(HWND hWnd, UINT msg, WPARAM wParam,
for
(
button
=
win
->
first_button
;
button
;
button
=
button
->
next
)
if
(
wParam
==
button
->
wParam
)
break
;
if
(
button
)
MACRO_ExecuteMacro
(
button
->
lpszMacro
);
MACRO_ExecuteMacro
(
win
,
button
->
lpszMacro
);
else
if
(
!
HIWORD
(
wParam
))
MessageBox
(
0
,
MAKEINTRESOURCE
(
STID_NOT_IMPLEMENTED
),
MAKEINTRESOURCE
(
STID_WHERROR
),
MB_OK
);
...
...
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