summaryrefslogtreecommitdiffstats
path: root/win/tkWinPixmap.c
diff options
context:
space:
mode:
Diffstat (limited to 'win/tkWinPixmap.c')
-rw-r--r--win/tkWinPixmap.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/win/tkWinPixmap.c b/win/tkWinPixmap.c
index 5d1f54d..05d1ba1 100644
--- a/win/tkWinPixmap.c
+++ b/win/tkWinPixmap.c
@@ -9,7 +9,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkWinPixmap.c,v 1.7.4.2 2010/03/12 13:02:36 nijtmans Exp $
+ * RCS: @(#) $Id: tkWinPixmap.c,v 1.13 2010/11/29 09:07:13 nijtmans Exp $
*/
#include "tkWinInt.h"
@@ -44,7 +44,7 @@ Tk_GetPixmap(
display->request++;
- newTwdPtr = (TkWinDrawable*) ckalloc(sizeof(TkWinDrawable));
+ newTwdPtr = ckalloc(sizeof(TkWinDrawable));
newTwdPtr->type = TWD_BITMAP;
newTwdPtr->bitmap.depth = depth;
twdPtr = (TkWinDrawable *) d;
@@ -61,7 +61,7 @@ Tk_GetPixmap(
screen = &display->screens[0];
planes = 1;
if (depth == screen->root_depth) {
- planes = (int) screen->ext_data;
+ planes = PTR2INT(screen->ext_data);
depth /= planes;
}
newTwdPtr->bitmap.handle =
@@ -102,12 +102,12 @@ Tk_GetPixmap(
LPVOID lpMsgBuf;
repeatError = 1;
- if (FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER |
+ if (FormatMessageA(FORMAT_MESSAGE_ALLOCATE_BUFFER |
FORMAT_MESSAGE_FROM_SYSTEM|FORMAT_MESSAGE_IGNORE_INSERTS,
NULL, GetLastError(),
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
- (LPTSTR) &lpMsgBuf, 0, NULL)) {
- MessageBox(NULL, (LPCTSTR) lpMsgBuf,
+ (LPSTR) &lpMsgBuf, 0, NULL)) {
+ MessageBoxA(NULL, (LPCSTR) lpMsgBuf,
"Tk_GetPixmap: Error from CreateDIBSection",
MB_OK | MB_ICONINFORMATION);
LocalFree(lpMsgBuf);
@@ -116,7 +116,7 @@ Tk_GetPixmap(
}
if (newTwdPtr->bitmap.handle == NULL) {
- ckfree((char *) newTwdPtr);
+ ckfree(newTwdPtr);
return None;
}
@@ -149,7 +149,7 @@ Tk_FreePixmap(
display->request++;
if (twdPtr != NULL) {
DeleteObject(twdPtr->bitmap.handle);
- ckfree((char *) twdPtr);
+ ckfree(twdPtr);
}
}