From c62090daec3ffb14de3ca2356342406e8139ddfd Mon Sep 17 00:00:00 2001 From: Eric Mullins Date: Sat, 11 Jul 2009 22:36:59 -0600 Subject: [PATCH 1/1] Allow compiling with MSVC6.0 and 4.1 Move prototypes into help.h, after making sure that DWORD_PTR is defined. Include help.h from winboard.c and help.c so both files benefit from the definition. --- winboard/help.c | 1 + winboard/help.h | 11 +++++++++++ winboard/winboard.c | 8 +------- 3 files changed, 13 insertions(+), 7 deletions(-) create mode 100644 winboard/help.h diff --git a/winboard/help.c b/winboard/help.c index 94d0fd9..d10f9ab 100644 --- a/winboard/help.c +++ b/winboard/help.c @@ -24,6 +24,7 @@ #include #include +#include "help.h" FILE *debugFP; diff --git a/winboard/help.h b/winboard/help.h new file mode 100644 index 0000000..7216018 --- /dev/null +++ b/winboard/help.h @@ -0,0 +1,11 @@ +#ifdef VISTA +#include "htmlhelp.h" +#else + #ifdef _MSC_VER + #if _MSC_VER <= 1200 + #define DWORD_PTR DWORD + #endif + #endif +HWND WINAPI HtmlHelp( HWND hwnd, LPCSTR helpFile, UINT action, DWORD_PTR data ); +#endif +int MyHelp(HWND hwnd, LPSTR helpFile, UINT action, DWORD_PTR data); diff --git a/winboard/winboard.c b/winboard/winboard.c index 9cb29aa..cbbb178 100644 --- a/winboard/winboard.c +++ b/winboard/winboard.c @@ -88,7 +88,7 @@ #include "woptions.h" #include "wsockerr.h" #include "defaults.h" - +#include "help.h" #include "wsnap.h" //void InitEngineUCI( const char * iniDir, ChessProgramState * cps ); @@ -106,12 +106,6 @@ int FinishMove P((ChessMove moveType, int fromX, int fromY, int toX, int toY, void AnimateAtomicCapture(int fromX, int fromY, int toX, int toY, int nFrames); void DisplayMove P((int moveNumber)); Boolean ParseFEN P((Board board, int *blackPlaysFirst, char *fen)); -#ifdef VISTA -#include "htmlhelp.h" -#else -HWND WINAPI HtmlHelp( HWND hwnd, LPCSTR helpFile, UINT action, DWORD_PTR data ); -#endif - typedef struct { ChessSquare piece; POINT pos; /* window coordinates of current pos */ -- 1.7.0.4