Commit 81b7b912 authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard

Rewrote macro engine for adding dynamic macro loading capability.

Wrote RegisterRoutine and IsBook macros.
parent bc710312
...@@ -4,5 +4,3 @@ lex.yy.c ...@@ -4,5 +4,3 @@ lex.yy.c
rsrc.res rsrc.res
winhelp.exe.dbg.c winhelp.exe.dbg.c
winhelp.exe.spec.c winhelp.exe.spec.c
y.tab.c
y.tab.h
...@@ -14,8 +14,9 @@ C_SRCS = \ ...@@ -14,8 +14,9 @@ C_SRCS = \
macro.c \ macro.c \
string.c string.c
EXTRA_SRCS = macro.yacc.y macro.lex.l EXTRA_SRCS = macro.lex.l
EXTRA_OBJS = y.tab.o @LEX_OUTPUT_ROOT@.o EXTRA_OBJS = @LEX_OUTPUT_ROOT@.o
WRCFLAGS = -DWINELIB
RC_SRCS = rsrc.rc RC_SRCS = rsrc.rc
...@@ -26,12 +27,7 @@ all: $(PROGRAMS) ...@@ -26,12 +27,7 @@ all: $(PROGRAMS)
hlp2sgml: hlp2sgml.o hlpfile.o hlp2sgml: hlp2sgml.o hlpfile.o
$(CC) -o hlp2sgml hlp2sgml.o hlpfile.o $(CC) -o hlp2sgml hlp2sgml.o hlpfile.o
y.tab.c y.tab.h: macro.yacc.y
$(YACC) -d -t $(SRCDIR)/macro.yacc.y
@LEX_OUTPUT_ROOT@.c: macro.lex.l @LEX_OUTPUT_ROOT@.c: macro.lex.l
$(LEX) -8 -i $(SRCDIR)/macro.lex.l $(LEX) -8 -i $(SRCDIR)/macro.lex.l
@LEX_OUTPUT_ROOT@.o: y.tab.h
### Dependencies: ### Dependencies:
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
* Help Viewer * Help Viewer
* *
* Copyright 1996 Ulrich Schmid * Copyright 1996 Ulrich Schmid
* Copyright 2002 Eric Pouech
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * modify it under the terms of the GNU Lesser General Public
...@@ -18,108 +19,115 @@ ...@@ -18,108 +19,115 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
#include "winnt.h"
#include "windef.h" #include "windef.h"
#include "winbase.h" #include "winbase.h"
#include "winuser.h"
#include "wingdi.h"
#include "shellapi.h"
VOID MACRO_ExecuteMacro(LPCSTR); struct lexret {
LPCSTR proto;
BOOL bool;
LONG integer;
LPCSTR string;
BOOL (*bool_function)();
void (*void_function)();
};
INT yyparse(VOID); extern struct lexret yylval;
INT yylex(VOID);
VOID yyerror(LPCSTR);
VOID MACRO_About(VOID); BOOL MACRO_ExecuteMacro(LPCSTR);
VOID MACRO_AddAccelerator(LONG, LONG, LPCSTR); int MACRO_Lookup(const char* name, struct lexret* lr);
VOID MACRO_ALink(LPCSTR, LONG, LPCSTR);
VOID MACRO_Annotate(VOID); enum token_types {EMPTY, VOID_FUNCTION, BOOL_FUNCTION, INTEGER, STRING, IDENTIFIER};
VOID MACRO_AppendItem(LPCSTR, LPCSTR, LPCSTR, LPCSTR); void MACRO_About(void);
VOID MACRO_Back(VOID); void MACRO_AddAccelerator(LONG, LONG, LPCSTR);
VOID MACRO_BackFlush(VOID); void MACRO_ALink(LPCSTR, LONG, LPCSTR);
VOID MACRO_BookmarkDefine(VOID); void MACRO_Annotate(void);
VOID MACRO_BookmarkMore(VOID); void MACRO_AppendItem(LPCSTR, LPCSTR, LPCSTR, LPCSTR);
VOID MACRO_BrowseButtons(VOID); void MACRO_Back(void);
VOID MACRO_ChangeButtonBinding(LPCSTR, LPCSTR); void MACRO_BackFlush(void);
VOID MACRO_ChangeEnable(LPCSTR, LPCSTR); void MACRO_BookmarkDefine(void);
VOID MACRO_ChangeItemBinding(LPCSTR, LPCSTR); void MACRO_BookmarkMore(void);
VOID MACRO_CheckItem(LPCSTR); void MACRO_BrowseButtons(void);
VOID MACRO_CloseSecondarys(VOID); void MACRO_ChangeButtonBinding(LPCSTR, LPCSTR);
VOID MACRO_CloseWindow(LPCSTR); void MACRO_ChangeEnable(LPCSTR, LPCSTR);
VOID MACRO_Compare(LPCSTR); void MACRO_ChangeItemBinding(LPCSTR, LPCSTR);
VOID MACRO_Contents(VOID); void MACRO_CheckItem(LPCSTR);
VOID MACRO_ControlPanel(LPCSTR, LPCSTR, LONG); void MACRO_CloseSecondarys(void);
VOID MACRO_CopyDialog(VOID); void MACRO_CloseWindow(LPCSTR);
VOID MACRO_CopyTopic(VOID); void MACRO_Compare(LPCSTR);
VOID MACRO_CreateButton(LPCSTR, LPCSTR, LPCSTR); void MACRO_Contents(void);
VOID MACRO_DeleteItem(LPCSTR); void MACRO_ControlPanel(LPCSTR, LPCSTR, LONG);
VOID MACRO_DeleteMark(LPCSTR); void MACRO_CopyDialog(void);
VOID MACRO_DestroyButton(LPCSTR); void MACRO_CopyTopic(void);
VOID MACRO_DisableButton(LPCSTR); void MACRO_CreateButton(LPCSTR, LPCSTR, LPCSTR);
VOID MACRO_DisableItem(LPCSTR); void MACRO_DeleteItem(LPCSTR);
VOID MACRO_EnableButton(LPCSTR); void MACRO_DeleteMark(LPCSTR);
VOID MACRO_EnableItem(LPCSTR); void MACRO_DestroyButton(LPCSTR);
VOID MACRO_EndMPrint(VOID); void MACRO_DisableButton(LPCSTR);
VOID MACRO_ExecFile(LPCSTR, LPCSTR, LONG, LPCSTR); void MACRO_DisableItem(LPCSTR);
VOID MACRO_ExecProgram(LPCSTR, LONG); void MACRO_EnableButton(LPCSTR);
VOID MACRO_Exit(VOID); void MACRO_EnableItem(LPCSTR);
VOID MACRO_ExtAbleItem(LPCSTR, LONG); void MACRO_EndMPrint(void);
VOID MACRO_ExtInsertItem(LPCSTR, LPCSTR, LPCSTR, LPCSTR, LONG, LONG); void MACRO_ExecFile(LPCSTR, LPCSTR, LONG, LPCSTR);
VOID MACRO_ExtInsertMenu(LPCSTR, LPCSTR, LPCSTR, LONG, LONG); void MACRO_ExecProgram(LPCSTR, LONG);
void MACRO_Exit(void);
void MACRO_ExtAbleItem(LPCSTR, LONG);
void MACRO_ExtInsertItem(LPCSTR, LPCSTR, LPCSTR, LPCSTR, LONG, LONG);
void MACRO_ExtInsertMenu(LPCSTR, LPCSTR, LPCSTR, LONG, LONG);
BOOL MACRO_FileExist(LPCSTR); BOOL MACRO_FileExist(LPCSTR);
VOID MACRO_FileOpen(VOID); void MACRO_FileOpen(void);
VOID MACRO_Find(VOID); void MACRO_Find(void);
VOID MACRO_Finder(VOID); void MACRO_Finder(void);
VOID MACRO_FloatingMenu(VOID); void MACRO_FloatingMenu(void);
VOID MACRO_Flush(VOID); void MACRO_Flush(void);
VOID MACRO_FocusWindow(LPCSTR); void MACRO_FocusWindow(LPCSTR);
VOID MACRO_Generate(LPCSTR, WPARAM, LPARAM); void MACRO_Generate(LPCSTR, LONG, LONG);
VOID MACRO_GotoMark(LPCSTR); void MACRO_GotoMark(LPCSTR);
VOID MACRO_HelpOn(VOID); void MACRO_HelpOn(void);
VOID MACRO_HelpOnTop(VOID); void MACRO_HelpOnTop(void);
VOID MACRO_History(VOID); void MACRO_History(void);
BOOL MACRO_InitMPrint(VOID); void MACRO_IfThen(BOOL, LPCSTR);
VOID MACRO_InsertItem(LPCSTR, LPCSTR, LPCSTR, LPCSTR, LONG); void MACRO_IfThenElse(BOOL, LPCSTR, LPCSTR);
VOID MACRO_InsertMenu(LPCSTR, LPCSTR, LONG); BOOL MACRO_InitMPrint(void);
BOOL MACRO_IsBook(VOID); void MACRO_InsertItem(LPCSTR, LPCSTR, LPCSTR, LPCSTR, LONG);
void MACRO_InsertMenu(LPCSTR, LPCSTR, LONG);
BOOL MACRO_IsBook(void);
BOOL MACRO_IsMark(LPCSTR); BOOL MACRO_IsMark(LPCSTR);
BOOL MACRO_IsNotMark(LPCSTR); BOOL MACRO_IsNotMark(LPCSTR);
VOID MACRO_JumpContents(LPCSTR, LPCSTR); void MACRO_JumpContents(LPCSTR, LPCSTR);
VOID MACRO_JumpContext(LPCSTR, LPCSTR, LONG); void MACRO_JumpContext(LPCSTR, LPCSTR, LONG);
VOID MACRO_JumpHash(LPCSTR, LPCSTR, LONG); void MACRO_JumpHash(LPCSTR, LPCSTR, LONG);
VOID MACRO_JumpHelpOn(VOID); void MACRO_JumpHelpOn(void);
VOID MACRO_JumpID(LPCSTR, LPCSTR, LPCSTR); void MACRO_JumpID(LPCSTR, LPCSTR, LPCSTR);
VOID MACRO_JumpKeyword(LPCSTR, LPCSTR, LPCSTR); void MACRO_JumpKeyword(LPCSTR, LPCSTR, LPCSTR);
VOID MACRO_KLink(LPCSTR, LONG, LPCSTR, LPCSTR); void MACRO_KLink(LPCSTR, LONG, LPCSTR, LPCSTR);
VOID MACRO_Menu(VOID); void MACRO_Menu(void);
VOID MACRO_MPrintHash(LONG); void MACRO_MPrintHash(LONG);
VOID MACRO_MPrintID(LPCSTR); void MACRO_MPrintID(LPCSTR);
VOID MACRO_Next(VOID); void MACRO_Next(void);
VOID MACRO_NoShow(VOID); void MACRO_NoShow(void);
VOID MACRO_PopupContext(LPCSTR, LONG); void MACRO_PopupContext(LPCSTR, LONG);
VOID MACRO_PopupHash(LPCSTR, LONG); void MACRO_PopupHash(LPCSTR, LONG);
VOID MACRO_PopupId(LPCSTR, LPCSTR); void MACRO_PopupId(LPCSTR, LPCSTR);
VOID MACRO_PositionWindow(LONG, LONG, LONG, LONG, LONG, LPCSTR); void MACRO_PositionWindow(LONG, LONG, LONG, LONG, LONG, LPCSTR);
VOID MACRO_Prev(VOID); void MACRO_Prev(void);
VOID MACRO_Print(VOID); void MACRO_Print(void);
VOID MACRO_PrinterSetup(VOID); void MACRO_PrinterSetup(void);
VOID MACRO_RegisterRoutine(LPCSTR, LPCSTR, LPCSTR); void MACRO_RegisterRoutine(LPCSTR, LPCSTR, LPCSTR);
VOID MACRO_RemoveAccelerator(LONG, LONG); void MACRO_RemoveAccelerator(LONG, LONG);
VOID MACRO_ResetMenu(VOID); void MACRO_ResetMenu(void);
VOID MACRO_SaveMark(LPCSTR); void MACRO_SaveMark(LPCSTR);
VOID MACRO_Search(VOID); void MACRO_Search(void);
VOID MACRO_SetContents(LPCSTR, LONG); void MACRO_SetContents(LPCSTR, LONG);
VOID MACRO_SetHelpOnFile(LPCSTR); void MACRO_SetHelpOnFile(LPCSTR);
VOID MACRO_SetPopupColor(LONG, LONG, LONG); void MACRO_SetPopupColor(LONG, LONG, LONG);
VOID MACRO_ShellExecute(LPCSTR, LPCSTR, LONG, LONG, LPCSTR, LPCSTR); void MACRO_ShellExecute(LPCSTR, LPCSTR, LONG, LONG, LPCSTR, LPCSTR);
VOID MACRO_ShortCut(LPCSTR, LPCSTR, WPARAM, LPARAM, LPCSTR); void MACRO_ShortCut(LPCSTR, LPCSTR, LONG, LONG, LPCSTR);
VOID MACRO_TCard(LONG); void MACRO_TCard(LONG);
VOID MACRO_Test(LONG); void MACRO_Test(LONG);
BOOL MACRO_TestALink(LPCSTR); BOOL MACRO_TestALink(LPCSTR);
BOOL MACRO_TestKLink(LPCSTR); BOOL MACRO_TestKLink(LPCSTR);
VOID MACRO_UncheckItem(LPCSTR); void MACRO_UncheckItem(LPCSTR);
VOID MACRO_UpdateWindow(LPCSTR, LPCSTR); void MACRO_UpdateWindow(LPCSTR, LPCSTR);
/* Local Variables: */ /* Local Variables: */
/* c-file-style: "GNU" */ /* c-file-style: "GNU" */
......
%{
/*
* Help Viewer
*
* Copyright 1996 Ulrich Schmid
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <stdlib.h>
#include "macro.h"
static int skip = 0;
static LPSTR filename;
static LPSTR windowname;
%}
%union
{
BOOL bool;
LONG integer;
LPSTR string;
BOOL (*bool_function_void)(VOID);
BOOL (*bool_function_string)(LPCSTR);
VOID (*void_function_void)(VOID);
VOID (*void_function_uint)(LONG);
VOID (*void_function_string)(LPCSTR);
VOID (*void_function_2int_3uint_string)(LONG,LONG,LONG,LONG,LONG,LPCSTR);
VOID (*void_function_2string)(LPCSTR,LPCSTR);
VOID (*void_function_2string_2uint_2string)(LPCSTR,LPCSTR,LONG,LONG,LPCSTR,LPCSTR);
VOID (*void_function_2string_uint)(LPCSTR,LPCSTR,LONG);
VOID (*void_function_2string_uint_string)(LPCSTR,LPCSTR,LONG,LPCSTR);
VOID (*void_function_2string_wparam_lparam_string)(LPCSTR,LPCSTR,WPARAM,LPARAM,LPCSTR);
VOID (*void_function_2uint)(LONG,LONG);
VOID (*void_function_2uint_string)(LONG,LONG,LPCSTR);
VOID (*void_function_3string)(LPCSTR,LPCSTR,LPCSTR);
VOID (*void_function_3string_2uint)(LPCSTR,LPCSTR,LPCSTR,LONG,LONG);
VOID (*void_function_3uint)(LONG,LONG,LONG);
VOID (*void_function_4string)(LPCSTR,LPCSTR,LPCSTR,LPCSTR);
VOID (*void_function_4string_2uint)(LPCSTR,LPCSTR,LPCSTR,LPCSTR,LONG,LONG);
VOID (*void_function_4string_uint)(LPCSTR,LPCSTR,LPCSTR,LPCSTR,LONG);
VOID (*void_function_string_uint)(LPCSTR,LONG);
VOID (*void_function_string_uint_2string)(LPCSTR,LONG,LPCSTR,LPCSTR);
VOID (*void_function_string_uint_string)(LPCSTR,LONG,LPCSTR);
VOID (*void_function_string_wparam_lparam)(LPCSTR,WPARAM,LPARAM);
}
%token NOT
%token IF_THEN
%token IF_THEN_ELSE
%token <string> tSTRING
%token <integer> INTEGER
%token <bool_function_string> BOOL_FUNCTION_STRING
%token <bool_function_void> BOOL_FUNCTION_VOID
%token <void_function_2int_3uint_string> VOID_FUNCTION_2INT_3UINT_STRING
%token <void_function_2string> VOID_FUNCTION_2STRING
%token <void_function_2string_2uint_2string> VOID_FUNCTION_2STRING_2UINT_2STRING
%token <void_function_2string_uint> VOID_FUNCTION_2STRING_UINT
%token <void_function_2string_uint_string> VOID_FUNCTION_2STRING_UINT_STRING
%token <void_function_2string_wparam_lparam_string> VOID_FUNCTION_2STRING_WPARAM_LPARAM_STRING
%token <void_function_2uint> VOID_FUNCTION_2UINT
%token <void_function_2uint_string> VOID_FUNCTION_2UINT_STRING
%token <void_function_3string> VOID_FUNCTION_3STRING
%token <void_function_3string_2uint> VOID_FUNCTION_3STRING_2UINT
%token <void_function_3uint> VOID_FUNCTION_3UINT
%token <void_function_4string> VOID_FUNCTION_4STRING
%token <void_function_4string_2uint> VOID_FUNCTION_4STRING_2UINT
%token <void_function_4string_uint> VOID_FUNCTION_4STRING_UINT
%token <void_function_string> VOID_FUNCTION_STRING
%token <void_function_string_uint> VOID_FUNCTION_STRING_UINT
%token <void_function_string_uint_2string> VOID_FUNCTION_STRING_UINT_2STRING
%token <void_function_string_uint_string> VOID_FUNCTION_STRING_UINT_STRING
%token <void_function_string_wparam_lparam> VOID_FUNCTION_STRING_WPARAM_LPARAM
%token <void_function_uint> VOID_FUNCTION_UINT
%token <void_function_void> VOID_FUNCTION_VOID
%token <void_function_2string> VOID_FUNCTION_FILE_WIN
%token <void_function_3string> VOID_FUNCTION_FILE_WIN_STRING
%token <void_function_2string_uint> VOID_FUNCTION_FILE_WIN_UINT
%type <bool> bool_macro
%%
macrostring: macro |
macro macrosep macrostring ;
macrosep: ';' |
':' ;
macro: /* Empty */ |
IF_THEN '(' bool_macro ',' {if (!$3) skip++;}
macrostring ')' {if (!$3) skip--;} |
IF_THEN_ELSE '(' bool_macro ',' {if (!$3) skip++;}
macrostring ',' {if (!$3) skip--; else skip++;}
macrostring ')' {if ( $3) skip--;} |
VOID_FUNCTION_VOID
'(' ')'
{if (!skip) (*$1)();} |
VOID_FUNCTION_STRING
'(' tSTRING ')'
{if (!skip) (*$1)($3);} |
VOID_FUNCTION_2STRING
'(' tSTRING ',' tSTRING ')'
{if (!skip) (*$1)($3, $5);} |
VOID_FUNCTION_2STRING_UINT
'(' tSTRING ',' tSTRING ',' INTEGER ')'
{if (!skip) (*$1)($3, $5, $7);} |
VOID_FUNCTION_2STRING_UINT_STRING
'(' tSTRING ',' tSTRING ',' INTEGER ',' tSTRING ')'
{if (!skip) (*$1)($3, $5, $7, $9);} |
VOID_FUNCTION_2STRING_2UINT_2STRING
'(' tSTRING ',' tSTRING ',' INTEGER ',' INTEGER ',' tSTRING ',' tSTRING ')'
{if (!skip) (*$1)($3, $5, $7, $9, $11, $13);} |
VOID_FUNCTION_2STRING_WPARAM_LPARAM_STRING
'(' tSTRING ',' tSTRING ',' INTEGER ',' INTEGER ',' tSTRING ')'
{if (!skip) (*$1)($3, $5, $7, $9, $11);} |
VOID_FUNCTION_3STRING
'(' tSTRING ',' tSTRING ',' tSTRING ')'
{if (!skip) (*$1)($3, $5, $7);} |
VOID_FUNCTION_3STRING_2UINT
'(' tSTRING ',' tSTRING ',' tSTRING ',' INTEGER ',' INTEGER ')'
{if (!skip) (*$1)($3, $5, $7, $9, $11);} |
VOID_FUNCTION_4STRING
'(' tSTRING ',' tSTRING ',' tSTRING ',' tSTRING ')'
{if (!skip) (*$1)($3, $5, $7, $9);} |
VOID_FUNCTION_4STRING_UINT
'(' tSTRING ',' tSTRING ',' tSTRING ',' tSTRING ',' INTEGER')'
{if (!skip) (*$1)($3, $5, $7, $9, $11);} |
VOID_FUNCTION_4STRING_2UINT
'(' tSTRING ',' tSTRING ',' tSTRING ',' tSTRING ',' INTEGER ',' INTEGER')'
{if (!skip) (*$1)($3, $5, $7, $9, $11, $13);} |
VOID_FUNCTION_STRING_UINT
'(' tSTRING ',' INTEGER ')'
{if (!skip) (*$1)($3, $5);} |
VOID_FUNCTION_STRING_UINT_STRING
'(' tSTRING ',' INTEGER ',' tSTRING ')'
{if (!skip) (*$1)($3, $5, $7);} |
VOID_FUNCTION_STRING_UINT_2STRING
'(' tSTRING ',' INTEGER ',' tSTRING ',' tSTRING ')'
{if (!skip) (*$1)($3, $5, $7, $9);} |
VOID_FUNCTION_STRING_WPARAM_LPARAM
'(' tSTRING ',' INTEGER ',' INTEGER ')'
{if (!skip) (*$1)($3, $5, $7);} |
VOID_FUNCTION_UINT
'(' INTEGER ')'
{if (!skip) (*$1)($3);} |
VOID_FUNCTION_2UINT
'(' INTEGER ',' INTEGER ')'
{if (!skip) (*$1)($3, $5);} |
VOID_FUNCTION_2UINT_STRING
'(' INTEGER ',' INTEGER ',' tSTRING ')'
{if (!skip) (*$1)($3, $5, $7);} |
VOID_FUNCTION_3UINT
'(' INTEGER ',' INTEGER ',' INTEGER ')'
{if (!skip) (*$1)($3, $5, $7);} |
VOID_FUNCTION_2INT_3UINT_STRING
'(' INTEGER ',' INTEGER ',' INTEGER ',' INTEGER ',' INTEGER ',' tSTRING ')'
{if (!skip) (*$1)($3, $5, $7, $9, $11, $13);} |
VOID_FUNCTION_FILE_WIN
'(' file_win ')'
{if (!skip) (*$1)(filename, windowname);} |
VOID_FUNCTION_FILE_WIN_STRING
'(' file_win ',' tSTRING ')'
{if (!skip) (*$1)(filename, windowname, $5);} |
VOID_FUNCTION_FILE_WIN_UINT
'(' file_win ',' INTEGER ')'
{if (!skip) (*$1)(filename, windowname, $5);} ;
file_win: tSTRING
{
filename = windowname = $1;
while (*windowname && *windowname != '>') windowname++;
if (*windowname) *windowname++ = 0;
} ;
bool_macro: NOT '(' bool_macro ')' {$$ = ! $3;} |
tSTRING {$$ = MACRO_IsMark($1);} |
BOOL_FUNCTION_VOID '(' ')' {$$ = (*$1)();} |
BOOL_FUNCTION_STRING '(' tSTRING ')' {$$ = (*$1)($3);} ;
...@@ -45,7 +45,7 @@ static void WINHELP_DeleteWindow(WINHELP_WINDOW*); ...@@ -45,7 +45,7 @@ static void WINHELP_DeleteWindow(WINHELP_WINDOW*);
static void WINHELP_SetupText(HWND hWnd); static void WINHELP_SetupText(HWND hWnd);
static WINHELP_LINE_PART* WINHELP_IsOverLink(HWND hWnd, WPARAM wParam, LPARAM lParam); static WINHELP_LINE_PART* WINHELP_IsOverLink(HWND hWnd, WPARAM wParam, LPARAM lParam);
WINHELP_GLOBALS Globals = {3, 0, 0, 0, 0, 0}; WINHELP_GLOBALS Globals = {3, 0, 0, 0, 1, 0, 0};
static BOOL MacroTest = FALSE; static BOOL MacroTest = FALSE;
...@@ -91,6 +91,7 @@ int PASCAL WinMain(HINSTANCE hInstance, HINSTANCE prev, LPSTR cmdline, int show) ...@@ -91,6 +91,7 @@ int PASCAL WinMain(HINSTANCE hInstance, HINSTANCE prev, LPSTR cmdline, int show)
case 'x': case 'x':
show = SW_HIDE; show = SW_HIDE;
Globals.isBook = FALSE;
break; break;
default: default:
......
...@@ -111,6 +111,7 @@ typedef struct ...@@ -111,6 +111,7 @@ typedef struct
HANDLE hInstance; HANDLE hInstance;
HWND hPopupWnd; HWND hPopupWnd;
UINT wStringTableOffset; UINT wStringTableOffset;
BOOL isBook;
WINHELP_WINDOW* active_win; WINHELP_WINDOW* active_win;
WINHELP_WINDOW* win_list; WINHELP_WINDOW* win_list;
} WINHELP_GLOBALS; } WINHELP_GLOBALS;
...@@ -122,13 +123,13 @@ BOOL WINHELP_CreateHelpWindowByPage(HLPFILE_PAGE*, LPCSTR, BOOL, HWND, LPPOINT, ...@@ -122,13 +123,13 @@ BOOL WINHELP_CreateHelpWindowByPage(HLPFILE_PAGE*, LPCSTR, BOOL, HWND, LPPOINT,
INT WINHELP_MessageBoxIDS(UINT, UINT, WORD); INT WINHELP_MessageBoxIDS(UINT, UINT, WORD);
INT WINHELP_MessageBoxIDS_s(UINT, LPCSTR, UINT, WORD); INT WINHELP_MessageBoxIDS_s(UINT, LPCSTR, UINT, WORD);
extern CHAR MAIN_WIN_CLASS_NAME[]; extern char MAIN_WIN_CLASS_NAME[];
extern CHAR BUTTON_BOX_WIN_CLASS_NAME[]; extern char BUTTON_BOX_WIN_CLASS_NAME[];
extern CHAR TEXT_WIN_CLASS_NAME[]; extern char TEXT_WIN_CLASS_NAME[];
extern CHAR SHADOW_WIN_CLASS_NAME[]; extern char SHADOW_WIN_CLASS_NAME[];
extern CHAR STRING_BUTTON[]; extern char STRING_BUTTON[];
extern CHAR STRING_MENU_Xx[]; extern char STRING_MENU_Xx[];
extern CHAR STRING_DIALOG_TEST[]; extern char STRING_DIALOG_TEST[];
#endif #endif
/* Buttons */ /* Buttons */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment