summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/window/win32.c
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2010-02-22 12:09:38 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2010-02-22 12:09:38 +0000
commitb287d7f6a13823ea17e0bd415981d3a5953ca703 (patch)
treea420b28a35f7761f064d50bb610dbb2b46c71486 /Build/source/texk/web2c/window/win32.c
parent5fd6fd3479fcbbda52ebca7b5e80a5aaa1add69f (diff)
build system: various small fixes for mingw32 cross compilation
still incomplete git-svn-id: svn://tug.org/texlive/trunk@17141 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c/window/win32.c')
-rw-r--r--Build/source/texk/web2c/window/win32.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/Build/source/texk/web2c/window/win32.c b/Build/source/texk/web2c/window/win32.c
index ddfb875a4be..844e4b2e935 100644
--- a/Build/source/texk/web2c/window/win32.c
+++ b/Build/source/texk/web2c/window/win32.c
@@ -11,6 +11,10 @@
#ifdef WIN32WIN
#include <windows.h>
+#ifdef __MINGW32__
+static void Win32Error(const char *caller);
+#endif
+
/*
The following constant enables some hack that should allow the
window to process its messages. Basically, the principle is to
@@ -23,14 +27,11 @@
#undef DEBUG
/* #define DEBUG 1 */
-static char szAppName[] = "MF";
static char szTitle[] = " MetaFont V2.718281 Online Display";
static HWND my_window;
static HDC my_dc;
static HDC drawing_dc;
static HBITMAP hbm;
-static RGBQUAD black = {0,0,0,0};
-static RGBQUAD white = {255,255,255,0};
static MSG msg;
static HANDLE hAccelTable;
static HANDLE hMutex;
@@ -50,6 +51,8 @@ void __cdecl InitGui(void*);
#endif
LRESULT CALLBACK WndProc(HWND hwnd, UINT iMsg, WPARAM wParam, LPARAM lParam);
+#include <mfdisplay.h>
+
int
mf_win32_initscreen(void)
{
@@ -209,8 +212,8 @@ mf_win32_paintrow (screenrow row,
ReleaseMutex(hMutex);
}
-#if 0
-void Win32Error(char *caller)
+#ifdef __MINGW32__
+static void Win32Error(const char *caller)
{
LPVOID lpMsgBuf;
@@ -233,7 +236,7 @@ void Win32Error(char *caller)
LRESULT APIENTRY WndProc(HWND hwnd, UINT iMsg, WPARAM wParam, LPARAM lParam)
{
PAINTSTRUCT ps;
- int retval;
+ int retval = 0;
#ifdef DEBUG
fprintf(stderr, "Message %x\n", iMsg);