summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2014-02-10 11:35:13 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2014-02-10 11:35:13 (GMT)
commit6b8394f347165c180bf1baae9739a68642e09d0e (patch)
treed75f1f89ded91bd4482049920ea3eb5d872cb848
parentd015e4d8b48ad76acce178827f3ab114c330308c (diff)
downloadtk-6b8394f347165c180bf1baae9739a68642e09d0e.zip
tk-6b8394f347165c180bf1baae9739a68642e09d0e.tar.gz
tk-6b8394f347165c180bf1baae9739a68642e09d0e.tar.bz2
Eliminate all usage of WIN32 macro as well: _WIN32 is the portable macro.
-rw-r--r--generic/tkCanvPs.c12
-rw-r--r--generic/tkCmds.c4
-rw-r--r--generic/tkListbox.c8
-rw-r--r--generic/tkWindow.c4
-rw-r--r--generic/ttk/ttkClamTheme.c2
-rw-r--r--generic/ttk/ttkDefaultTheme.c2
-rw-r--r--generic/ttk/ttkElements.c2
7 files changed, 17 insertions, 17 deletions
diff --git a/generic/tkCanvPs.c b/generic/tkCanvPs.c
index 70fc457..c6470dd 100644
--- a/generic/tkCanvPs.c
+++ b/generic/tkCanvPs.c
@@ -1168,7 +1168,7 @@ GetPostscriptPoints(
*--------------------------------------------------------------
*/
-#ifdef WIN32
+#ifdef _WIN32
#include <windows.h>
/*
@@ -1178,15 +1178,15 @@ GetPostscriptPoints(
#define GetBValue(rgb) ((BYTE)((rgb)>>16))
*/
-#else /* !WIN32 */
+#else /* !_WIN32 */
#define GetRValue(rgb) ((rgb & cdata->red_mask) >> cdata->red_shift)
#define GetGValue(rgb) ((rgb & cdata->green_mask) >> cdata->green_shift)
#define GetBValue(rgb) ((rgb & cdata->blue_mask) >> cdata->blue_shift)
-#endif /* WIN32 */
+#endif /* _WIN32 */
-#if defined(WIN32) || defined(MAC_OSX_TK)
+#if defined(_WIN32) || defined(MAC_OSX_TK)
static void
TkImageGetColor(
TkColormapData *cdata, /* Colormap data */
@@ -1198,7 +1198,7 @@ TkImageGetColor(
*green = (double) GetGValue(pixel) / 255.0;
*blue = (double) GetBValue(pixel) / 255.0;
}
-#else /* ! (WIN32 || MAC_OSX_TK) */
+#else /* ! (_WIN32 || MAC_OSX_TK) */
static void
TkImageGetColor(
TkColormapData *cdata, /* Colormap data */
@@ -1220,7 +1220,7 @@ TkImageGetColor(
*blue = cdata->colors[pixel].blue / 65535.0;
}
}
-#endif /* WIN32 || MAC_OSX_TK */
+#endif /* _WIN32 || MAC_OSX_TK */
/*
*--------------------------------------------------------------
diff --git a/generic/tkCmds.c b/generic/tkCmds.c
index 23fad0f..a4f2ed9 100644
--- a/generic/tkCmds.c
+++ b/generic/tkCmds.c
@@ -14,7 +14,7 @@
#include "tkInt.h"
-#if defined(WIN32)
+#if defined(_WIN32)
#include "tkWinInt.h"
#elif defined(MAC_OSX_TK)
#include "tkMacOSXInt.h"
@@ -914,7 +914,7 @@ WindowingsystemCmd(
Tcl_WrongNumArgs(interp, 1, objv, NULL);
return TCL_ERROR;
}
-#if defined(WIN32)
+#if defined(_WIN32)
windowingsystem = "win32";
#elif defined(MAC_OSX_TK)
windowingsystem = "aqua";
diff --git a/generic/tkListbox.c b/generic/tkListbox.c
index d77fc8f..437973a 100644
--- a/generic/tkListbox.c
+++ b/generic/tkListbox.c
@@ -15,7 +15,7 @@
#include "default.h"
#include "tkInt.h"
-#ifdef WIN32
+#ifdef _WIN32
#include "tkWinInt.h"
#endif
@@ -2077,7 +2077,7 @@ DisplayListbox(
Tk_UnderlineChars(listPtr->display, pixmap, gc,
listPtr->tkfont, stringRep, x, y, 0, stringLen);
} else if (listPtr->activeStyle == ACTIVE_STYLE_DOTBOX) {
-#ifdef WIN32
+#ifdef _WIN32
/*
* This provides for exact default look and feel on Windows.
*/
@@ -2094,7 +2094,7 @@ DisplayListbox(
rect.bottom = rect.top + listPtr->lineHeight;
DrawFocusRect(dc, &rect);
TkWinReleaseDrawableDC(pixmap, dc, &state);
-#else /* !WIN32 */
+#else /* !_WIN32 */
/*
* Draw a dotted box around the text.
*/
@@ -2133,7 +2133,7 @@ DisplayListbox(
gcValues.line_style = LineSolid;
XChangeGC(listPtr->display, gc, GCLineStyle, &gcValues);
}
-#endif /* WIN32 */
+#endif /* _WIN32 */
}
}
diff --git a/generic/tkWindow.c b/generic/tkWindow.c
index 4a65db7..53b368c 100644
--- a/generic/tkWindow.c
+++ b/generic/tkWindow.c
@@ -1578,7 +1578,7 @@ Tk_DestroyWindow(
* display now and relinquish its data structures.
*/
-#if !defined(WIN32) && defined(NOT_YET)
+#if !defined(_WIN32) && defined(NOT_YET)
if (dispPtr->refCount <= 0) {
/*
* I have disabled this code because on Windows there are
@@ -1626,7 +1626,7 @@ Tk_DestroyWindow(
TkCloseDisplay(dispPtr);
}
-#endif /* !WIN32 && NOT_YET */
+#endif /* !_WIN32 && NOT_YET */
}
}
Tcl_EventuallyFree(winPtr, TCL_DYNAMIC);
diff --git a/generic/ttk/ttkClamTheme.c b/generic/ttk/ttkClamTheme.c
index 572f630..15ebcb7 100644
--- a/generic/ttk/ttkClamTheme.c
+++ b/generic/ttk/ttkClamTheme.c
@@ -12,7 +12,7 @@
* off-by-one error in the end point. This is especially apparent with this
* theme. Defining this macro as true handles this case.
*/
-#if defined(WIN32) && !defined(WIN32_XDRAWLINE_HACK)
+#if defined(_WIN32) && !defined(WIN32_XDRAWLINE_HACK)
# define WIN32_XDRAWLINE_HACK 1
#else
# define WIN32_XDRAWLINE_HACK 0
diff --git a/generic/ttk/ttkDefaultTheme.c b/generic/ttk/ttkDefaultTheme.c
index 0c55651..81f8126 100644
--- a/generic/ttk/ttkDefaultTheme.c
+++ b/generic/ttk/ttkDefaultTheme.c
@@ -12,7 +12,7 @@
#include <X11/Xutil.h>
#include "ttkTheme.h"
-#if defined(WIN32)
+#if defined(_WIN32)
static const int WIN32_XDRAWLINE_HACK = 1;
#else
static const int WIN32_XDRAWLINE_HACK = 0;
diff --git a/generic/ttk/ttkElements.c b/generic/ttk/ttkElements.c
index c348834..5c95dba 100644
--- a/generic/ttk/ttkElements.c
+++ b/generic/ttk/ttkElements.c
@@ -1145,7 +1145,7 @@ static void TabElementDraw(
Tk_3DBorderGC(tkwin, border, TK_3D_FLAT_GC),
pts, 6, Convex, CoordModeOrigin);
-#ifndef WIN32
+#ifndef _WIN32
/*
* Account for whether XDrawLines draws endpoints by platform
*/