aboutsummaryrefslogtreecommitdiff
path: root/src/hyper/initx.c
diff options
context:
space:
mode:
authorGabriel Dos Reis <gdr@axiomatics.org>2016-01-24 15:27:30 -0800
committerGabriel Dos Reis <gdr@axiomatics.org>2016-01-24 15:27:30 -0800
commitffe9a032601ffb59a10141bce13b4322a1584e87 (patch)
tree275657b9910b7165aac7c08665cd38062bd77e9e /src/hyper/initx.c
parentc8d6a86fcc61c4bee855fc2cfa2ae7338f2084f8 (diff)
downloadopen-axiom-ffe9a032601ffb59a10141bce13b4322a1584e87.tar.gz
Misc. fixes
With the siwtch to a C++ compiler, the AC_PATH_XTRA has become less effective as it internally relies on the C compiler invokation. Fixed CXXFLAGS, CPPFLAGS, and LDFLAGS when detecting <X11/xpm.h> usability. Various bitmasks in src/hyper and src/graph were bogusly using 'char' (instead of 'unsigned char') when they specify values larger than 127. Caught by the C++ compiler, thanks to no-narrowing conversion. Fixed. Eventually the X11-based HD interface and graphics should be replaced by a more modern GUI interface.
Diffstat (limited to 'src/hyper/initx.c')
-rw-r--r--src/hyper/initx.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/hyper/initx.c b/src/hyper/initx.c
index 521bc8cb..5b8dee53 100644
--- a/src/hyper/initx.c
+++ b/src/hyper/initx.c
@@ -1,7 +1,7 @@
/*
Copyright (C) 1991-2002, The Numerical Algorithms Group Ltd.
All rights reserved.
- Copyright (C) 2007-2012, Gabriel Dos Reis.
+ Copyright (C) 2007-2016, Gabriel Dos Reis.
All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -86,6 +86,7 @@ static void open_window(Window w);
static void set_name_and_icon(void);
static void set_size_hints(Window w);
+
static GContext server_font;
unsigned long *spadColors;
int scrn; /* used in spad_colors */
@@ -176,11 +177,11 @@ initializeWindowSystem(void)
/* fprintf(stderr,"initx:initializeWindowSystem:XCreateBitmapFromData 1\n");*/
mousebits = XCreateBitmapFromData(gXDisplay,
RootWindow(gXDisplay, gXScreenNumber),
- mouseBitmap_bits, mouseBitmap_width,mouseBitmap_height);
+ as_chars(mouseBitmap_bits), mouseBitmap_width,mouseBitmap_height);
/* fprintf(stderr,"initx:initializeWindowSystem:XCreateBitmapFromData 2\n");*/
mousemask = XCreateBitmapFromData(gXDisplay,
RootWindow(gXDisplay, gXScreenNumber),
- mouseMask_bits, mouseMask_width,mouseMask_height);
+ as_chars(mouseMask_bits), mouseMask_width,mouseMask_height);
/* fprintf(stderr,"initx:initializeWindowSystem:XCreateBitmapFromData 2\n");*/
gActiveCursor = XCreatePixmapCursor(gXDisplay,
mousebits, mousemask, &fg, &bg,
@@ -396,7 +397,8 @@ set_name_and_icon(void)
XStoreName(gXDisplay, gWindow->fMainWindow, "HyperDoc");
/* define and assign the pixmap for the icon */
- icon_pixmap = XCreateBitmapFromData(gXDisplay, gWindow->fMainWindow, ht_icon_bits,
+ icon_pixmap = XCreateBitmapFromData(gXDisplay, gWindow->fMainWindow,
+ as_chars(ht_icon_bits),
ht_icon_width, ht_icon_height);
wmhints.icon_pixmap = icon_pixmap;
wmhints.flags = IconPixmapHint;
@@ -592,7 +594,7 @@ set_size_hints(Window w)
#define stipple_width 4
#define stipple_height 4
-static char stipple_bits[] = {
+static unsigned char stipple_bits[] = {
0xff, 0xff, 0xff, 0xff};
Pixmap stipple;
@@ -615,7 +617,7 @@ get_GCs(HDWindow *window)
stipple = XCreateBitmapFromData(gXDisplay,
RootWindow(gXDisplay, gXScreenNumber),
- stipple_bits, stipple_width, stipple_height);
+ as_chars(stipple_bits), stipple_width, stipple_height);
values.background = gInputBackgroundColor;
values.foreground = gInputForegroundColor;