summaryrefslogtreecommitdiff
path: root/src/add_window.c
diff options
context:
space:
mode:
authorThomas E. Dickey <dickey@invisible-island.net>2019-07-16 17:06:02 -0400
committerThomas E. Dickey <dickey@invisible-island.net>2019-07-16 17:06:02 -0400
commit5e1798773d837eabaa70d0fff5762397f540ee00 (patch)
treef49b196a92086ac2893b9642d6798441847666db /src/add_window.c
parentb09c794f975d4b11685ac31884b8a6fd73b1ff15 (diff)
caddr_t used to be used in X code before XPointer was established; it's obsolete and less portable
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
Diffstat (limited to 'src/add_window.c')
-rw-r--r--src/add_window.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/src/add_window.c b/src/add_window.c
index cb5be4e..acd685f 100644
--- a/src/add_window.c
+++ b/src/add_window.c
@@ -915,27 +915,27 @@ AddWindow(Window w, int iconm, IconMgr *iconp)
(void) AddIconManager(tmp_win);
- XSaveContext(dpy, tmp_win->w, TwmContext, (caddr_t) tmp_win);
- XSaveContext(dpy, tmp_win->w, ScreenContext, (caddr_t) Scr);
- XSaveContext(dpy, tmp_win->frame, TwmContext, (caddr_t) tmp_win);
- XSaveContext(dpy, tmp_win->frame, ScreenContext, (caddr_t) Scr);
+ XSaveContext(dpy, tmp_win->w, TwmContext, (XPointer) tmp_win);
+ XSaveContext(dpy, tmp_win->w, ScreenContext, (XPointer) Scr);
+ XSaveContext(dpy, tmp_win->frame, TwmContext, (XPointer) tmp_win);
+ XSaveContext(dpy, tmp_win->frame, ScreenContext, (XPointer) Scr);
if (tmp_win->title_height)
{
int i;
int nb = Scr->TBInfo.nleft + Scr->TBInfo.nright;
- XSaveContext(dpy, tmp_win->title_w, TwmContext, (caddr_t) tmp_win);
- XSaveContext(dpy, tmp_win->title_w, ScreenContext, (caddr_t) Scr);
+ XSaveContext(dpy, tmp_win->title_w, TwmContext, (XPointer) tmp_win);
+ XSaveContext(dpy, tmp_win->title_w, ScreenContext, (XPointer) Scr);
for (i = 0; i < nb; i++) {
XSaveContext(dpy, tmp_win->titlebuttons[i].window, TwmContext,
- (caddr_t) tmp_win);
+ (XPointer) tmp_win);
XSaveContext(dpy, tmp_win->titlebuttons[i].window, ScreenContext,
- (caddr_t) Scr);
+ (XPointer) Scr);
}
if (tmp_win->hilite_w)
{
- XSaveContext(dpy, tmp_win->hilite_w, TwmContext, (caddr_t)tmp_win);
- XSaveContext(dpy, tmp_win->hilite_w, ScreenContext, (caddr_t)Scr);
+ XSaveContext(dpy, tmp_win->hilite_w, TwmContext, (XPointer)tmp_win);
+ XSaveContext(dpy, tmp_win->hilite_w, ScreenContext, (XPointer)Scr);
}
}
@@ -1373,7 +1373,7 @@ CreateTwmColormap(Colormap c)
TwmColormap *cmap;
cmap = malloc(sizeof(TwmColormap));
if (!cmap ||
- XSaveContext(dpy, c, ColormapContext, (caddr_t) cmap)) {
+ XSaveContext(dpy, c, ColormapContext, (XPointer) cmap)) {
if (cmap) free(cmap);
return (NULL);
}
@@ -1395,13 +1395,13 @@ CreateColormapWindow(Window w, Bool creating_parent, Bool property_window)
cwin = malloc(sizeof(ColormapWindow));
if (cwin) {
if (!XGetWindowAttributes(dpy, w, &attributes) ||
- XSaveContext(dpy, w, ColormapContext, (caddr_t) cwin)) {
+ XSaveContext(dpy, w, ColormapContext, (XPointer) cwin)) {
free(cwin);
return (NULL);
}
if (XFindContext(dpy, attributes.colormap, ColormapContext,
- (caddr_t *)&cwin->colormap) == XCNOENT) {
+ (XPointer *)&cwin->colormap) == XCNOENT) {
cwin->colormap = cmap = CreateTwmColormap(attributes.colormap);
if (!cmap) {
XDeleteContext(dpy, w, ColormapContext);
@@ -1511,7 +1511,7 @@ FetchWmColormapWindows (TwmWindow *tmp)
*/
if (j == tmp->cmaps.number_cwins) {
if (XFindContext(dpy, cmap_windows[i], ColormapContext,
- (caddr_t *)&cwins[i]) == XCNOENT) {
+ (XPointer *)&cwins[i]) == XCNOENT) {
if ((cwins[i] = CreateColormapWindow(cmap_windows[i],
(Bool) tmp->cmaps.number_cwins == 0,
True)) == NULL) {
@@ -1535,7 +1535,7 @@ FetchWmColormapWindows (TwmWindow *tmp)
number_cmap_windows = 1;
cwins = malloc(sizeof(ColormapWindow *));
- if (XFindContext(dpy, tmp->w, ColormapContext, (caddr_t *)&cwins[0]) ==
+ if (XFindContext(dpy, tmp->w, ColormapContext, (XPointer *)&cwins[0]) ==
XCNOENT) {
cwins[0] = CreateColormapWindow(tmp->w,
(Bool) tmp->cmaps.number_cwins == 0, False);