From: Eric Mullins Date: Sun, 12 Jul 2009 04:36:59 +0000 (-0600) Subject: Allow compiling with MSVC6.0 and 4.1 X-Git-Tag: v4.4.0.beta1~28 X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=c62090daec3ffb14de3ca2356342406e8139ddfd;hp=587505808d0d9fcbd0826e980d6456f353a6b240;p=xboard.git 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. --- 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 */