aboutsummaryrefslogtreecommitdiff
path: root/libXaw/src/Pixmap.c
diff options
context:
space:
mode:
Diffstat (limited to 'libXaw/src/Pixmap.c')
-rw-r--r--libXaw/src/Pixmap.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/libXaw/src/Pixmap.c b/libXaw/src/Pixmap.c
index d2fa1ef02..0741b052f 100644
--- a/libXaw/src/Pixmap.c
+++ b/libXaw/src/Pixmap.c
@@ -47,7 +47,7 @@
* Types
*/
typedef struct _XawCache {
- long value;
+ intptr_t value;
XtPointer *elems;
unsigned int num_elems;
} XawCache;
@@ -415,7 +415,7 @@ qcmp_string(register _Xconst void *left, register _Xconst void *right)
static int
bcmp_long(register _Xconst void *value, register _Xconst void *cache)
{
- return ((long)value - (long)((*(XawCache **)cache)->value));
+ return ((intptr_t)value - (intptr_t)((*(XawCache **)cache)->value));
}
static int
@@ -492,7 +492,7 @@ _XawGetCache(XawCache *xaw, Screen *screen, Colormap colormap, int depth)
XtRealloc((char *)xaw->elems,
sizeof(XtPointer) * xaw->num_elems);
}
- pcache->value = (long)screen;
+ pcache->value = (intptr_t)screen;
pcache->elems = NULL;
pcache->num_elems = 0;
xaw->elems[xaw->num_elems - 1] = (XtPointer)pcache;
@@ -745,7 +745,11 @@ BitmapLoader(XawParams *params, Screen *screen, Colormap colormap, int depth,
if (params->name[0] != '/' && params->name[0] != '.')
{
if (!sub[0].substitution)
+ #ifdef _MSC_VER
+ sub[0].substitution = ".";
+ #else
sub[0].substitution = getenv("HOME");
+ #endif
sub[1].substitution = params->name;
if (pixmap_path == NULL)
GetResourcePixmapPath(DisplayOfScreen(screen));