aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/randr
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2015-06-22 09:36:08 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2015-12-28 12:54:40 +0100
commit68dd0b52e13c844d662192654fb10cb993257a59 (patch)
treea97ab98a06147cd5fb194063a9984dc3973fba55 /nx-X11/programs/Xserver/randr
parente9f44221b2520a1d894b3c125269b5d10438453b (diff)
downloadnx-libs-68dd0b52e13c844d662192654fb10cb993257a59.tar.gz
nx-libs-68dd0b52e13c844d662192654fb10cb993257a59.tar.bz2
nx-libs-68dd0b52e13c844d662192654fb10cb993257a59.zip
Replace 'pointer' type with 'void *'
This lets us stop using the 'pointer' typedef in Xdefs.h as 'pointer' is used throughout the X server for other things, and having duplicate names generates compiler warnings. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Eric Anholt <eric@anholt.net> Rebased against NX: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
Diffstat (limited to 'nx-X11/programs/Xserver/randr')
-rw-r--r--nx-X11/programs/Xserver/randr/randr.c18
-rw-r--r--nx-X11/programs/Xserver/randr/randrstr.h6
-rw-r--r--nx-X11/programs/Xserver/randr/rrcrtc.c4
-rw-r--r--nx-X11/programs/Xserver/randr/rrdispatch.c4
-rw-r--r--nx-X11/programs/Xserver/randr/rrmode.c4
-rw-r--r--nx-X11/programs/Xserver/randr/rroutput.c4
-rw-r--r--nx-X11/programs/Xserver/randr/rrproperty.c12
7 files changed, 26 insertions, 26 deletions
diff --git a/nx-X11/programs/Xserver/randr/randr.c b/nx-X11/programs/Xserver/randr/randr.c
index f565617e6..eb50aeb3d 100644
--- a/nx-X11/programs/Xserver/randr/randr.c
+++ b/nx-X11/programs/Xserver/randr/randr.c
@@ -84,8 +84,8 @@ int rrPrivIndex = -1;
static void
RRClientCallback (CallbackListPtr *list,
- pointer closure,
- pointer data)
+ void * closure,
+ void * data)
{
NewClientInfoRec *clientinfo = (NewClientInfoRec *) data;
ClientPtr pClient = clientinfo->client;
@@ -304,7 +304,7 @@ Bool RRScreenInit(ScreenPtr pScreen)
/*ARGSUSED*/
static int
-RRFreeClient (pointer data, XID id)
+RRFreeClient (void * data, XID id)
{
RREventPtr pRREvent;
WindowPtr pWin;
@@ -325,13 +325,13 @@ RRFreeClient (pointer data, XID id)
*pHead = pRREvent->next;
}
}
- xfree ((pointer) pRREvent);
+ xfree ((void *) pRREvent);
return 1;
}
/*ARGSUSED*/
static int
-RRFreeEvents (pointer data, XID id)
+RRFreeEvents (void * data, XID id)
{
RREventPtr *pHead, pCur, pNext;
@@ -339,9 +339,9 @@ RRFreeEvents (pointer data, XID id)
for (pCur = *pHead; pCur; pCur = pNext) {
pNext = pCur->next;
FreeResource (pCur->clientResource, RRClientType);
- xfree ((pointer) pCur);
+ xfree ((void *) pCur);
}
- xfree ((pointer) pHead);
+ xfree ((void *) pHead);
return 1;
}
@@ -390,7 +390,7 @@ RRExtensionInit (void)
}
static int
-TellChanged (WindowPtr pWin, pointer value)
+TellChanged (WindowPtr pWin, void * value)
{
RREventPtr *pHead, pRREvent;
ClientPtr client;
@@ -452,7 +452,7 @@ RRTellChanged (ScreenPtr pScreen)
pScrPriv->configChanged = FALSE;
}
pScrPriv->changed = FALSE;
- WalkTree (pScreen, TellChanged, (pointer) pScreen);
+ WalkTree (pScreen, TellChanged, (void *) pScreen);
for (i = 0; i < pScrPriv->numOutputs; i++)
pScrPriv->outputs[i]->changed = FALSE;
for (i = 0; i < pScrPriv->numCrtcs; i++)
diff --git a/nx-X11/programs/Xserver/randr/randrstr.h b/nx-X11/programs/Xserver/randr/randrstr.h
index 52067b51e..3c3db2c13 100644
--- a/nx-X11/programs/Xserver/randr/randrstr.h
+++ b/nx-X11/programs/Xserver/randr/randrstr.h
@@ -91,7 +91,7 @@ struct _rrPropertyValue {
Atom type; /* ignored by server */
short format; /* format of data for swapping - 8,16,32 */
long size; /* size of data in (format/8) bytes */
- pointer data; /* private to client */
+ void *data; /* private to client */
};
struct _rrProperty {
@@ -283,7 +283,7 @@ extern int rrPrivIndex;
#define rrGetScrPriv(pScr) ((rrScrPrivPtr) (pScr)->devPrivates[rrPrivIndex].ptr)
#define rrScrPriv(pScr) rrScrPrivPtr pScrPriv = rrGetScrPriv(pScr)
-#define SetRRScreen(s,p) ((s)->devPrivates[rrPrivIndex].ptr = (pointer) (p))
+#define SetRRScreen(s,p) ((s)->devPrivates[rrPrivIndex].ptr = (void *) (p))
#endif
@@ -785,7 +785,7 @@ RRPostPendingProperties (RROutputPtr output);
int
RRChangeOutputProperty (RROutputPtr output, Atom property, Atom type,
int format, int mode, unsigned long len,
- pointer value, Bool sendevent, Bool pending);
+ void * value, Bool sendevent, Bool pending);
int
RRConfigureOutputProperty (RROutputPtr output, Atom property,
diff --git a/nx-X11/programs/Xserver/randr/rrcrtc.c b/nx-X11/programs/Xserver/randr/rrcrtc.c
index bc1040c9f..fdf063901 100644
--- a/nx-X11/programs/Xserver/randr/rrcrtc.c
+++ b/nx-X11/programs/Xserver/randr/rrcrtc.c
@@ -107,7 +107,7 @@ RRCrtcCreate (ScreenPtr pScreen, void *devPrivate)
crtc->changed = FALSE;
crtc->devPrivate = devPrivate;
- if (!AddResource (crtc->id, RRCrtcType, (pointer) crtc))
+ if (!AddResource (crtc->id, RRCrtcType, (void *) crtc))
return NULL;
/* attach the screen and crtc together */
@@ -385,7 +385,7 @@ RRCrtcDestroy (RRCrtcPtr crtc)
}
static int
-RRCrtcDestroyResource (pointer value, XID pid)
+RRCrtcDestroyResource (void * value, XID pid)
{
RRCrtcPtr crtc = (RRCrtcPtr) value;
ScreenPtr pScreen = crtc->pScreen;
diff --git a/nx-X11/programs/Xserver/randr/rrdispatch.c b/nx-X11/programs/Xserver/randr/rrdispatch.c
index 3d52b3879..4c6a5ff48 100644
--- a/nx-X11/programs/Xserver/randr/rrdispatch.c
+++ b/nx-X11/programs/Xserver/randr/rrdispatch.c
@@ -120,7 +120,7 @@ ProcRRSelectInput (ClientPtr client)
*/
clientResource = FakeClientID (client->index);
pRREvent->clientResource = clientResource;
- if (!AddResource (clientResource, RRClientType, (pointer)pRREvent))
+ if (!AddResource (clientResource, RRClientType, (void *)pRREvent))
return BadAlloc;
/*
* create a resource to contain a pointer to the list
@@ -132,7 +132,7 @@ ProcRRSelectInput (ClientPtr client)
{
pHead = (RREventPtr *) xalloc (sizeof (RREventPtr));
if (!pHead ||
- !AddResource (pWin->drawable.id, RREventType, (pointer)pHead))
+ !AddResource (pWin->drawable.id, RREventType, (void *)pHead))
{
FreeResource (clientResource, RT_NONE);
return BadAlloc;
diff --git a/nx-X11/programs/Xserver/randr/rrmode.c b/nx-X11/programs/Xserver/randr/rrmode.c
index de51bec81..cb45bf74a 100644
--- a/nx-X11/programs/Xserver/randr/rrmode.c
+++ b/nx-X11/programs/Xserver/randr/rrmode.c
@@ -98,7 +98,7 @@ RRModeCreate (xRRModeInfo *modeInfo,
}
mode->mode.id = FakeClientID(0);
- if (!AddResource(mode->mode.id, RRModeType, (pointer) mode)) {
+ if (!AddResource(mode->mode.id, RRModeType, (void *) mode)) {
xfree(newModes);
return NULL;
}
@@ -274,7 +274,7 @@ RRModeDestroy (RRModePtr mode)
}
static int
-RRModeDestroyResource (pointer value, XID pid)
+RRModeDestroyResource (void * value, XID pid)
{
RRModeDestroy ((RRModePtr) value);
return 1;
diff --git a/nx-X11/programs/Xserver/randr/rroutput.c b/nx-X11/programs/Xserver/randr/rroutput.c
index 693f5a5d3..06f8024e4 100644
--- a/nx-X11/programs/Xserver/randr/rroutput.c
+++ b/nx-X11/programs/Xserver/randr/rroutput.c
@@ -100,7 +100,7 @@ RROutputCreate (ScreenPtr pScreen,
output->changed = FALSE;
output->devPrivate = devPrivate;
- if (!AddResource (output->id, RROutputType, (pointer) output))
+ if (!AddResource (output->id, RROutputType, (void *) output))
return NULL;
pScrPriv->outputs[pScrPriv->numOutputs++] = output;
@@ -369,7 +369,7 @@ RROutputDestroy (RROutputPtr output)
}
static int
-RROutputDestroyResource (pointer value, XID pid)
+RROutputDestroyResource (void * value, XID pid)
{
RROutputPtr output = (RROutputPtr) value;
ScreenPtr pScreen = output->pScreen;
diff --git a/nx-X11/programs/Xserver/randr/rrproperty.c b/nx-X11/programs/Xserver/randr/rrproperty.c
index 429246c68..4b73336e8 100644
--- a/nx-X11/programs/Xserver/randr/rrproperty.c
+++ b/nx-X11/programs/Xserver/randr/rrproperty.c
@@ -121,7 +121,7 @@ RRDeleteOutputProperty (RROutputPtr output, Atom property)
int
RRChangeOutputProperty (RROutputPtr output, Atom property, Atom type,
int format, int mode, unsigned long len,
- pointer value, Bool sendevent, Bool pending)
+ void * value, Bool sendevent, Bool pending)
{
RRPropertyPtr prop;
xRROutputPropertyNotifyEvent event;
@@ -167,10 +167,10 @@ RRChangeOutputProperty (RROutputPtr output, Atom property, Atom type,
if (mode == PropModeReplace || len > 0)
{
- pointer new_data = NULL, old_data = NULL;
+ void *new_data = NULL, *old_data = NULL;
total_size = total_len * size_in_bytes;
- new_value.data = (pointer)xalloc (total_size);
+ new_value.data = (void *)xalloc (total_size);
if (!new_value.data && total_size)
{
if (add)
@@ -187,13 +187,13 @@ RRChangeOutputProperty (RROutputPtr output, Atom property, Atom type,
old_data = NULL;
break;
case PropModeAppend:
- new_data = (pointer) (((char *) new_value.data) +
+ new_data = (void *) (((char *) new_value.data) +
(prop_value->size * size_in_bytes));
old_data = new_value.data;
break;
case PropModePrepend:
new_data = new_value.data;
- old_data = (pointer) (((char *) new_value.data) +
+ old_data = (void *) (((char *) new_value.data) +
(prop_value->size * size_in_bytes));
break;
}
@@ -534,7 +534,7 @@ ProcRRChangeOutputProperty (ClientPtr client)
err = RRChangeOutputProperty(output, stuff->property,
stuff->type, (int)format,
- (int)mode, len, (pointer)&stuff[1], TRUE, TRUE);
+ (int)mode, len, (void *)&stuff[1], TRUE, TRUE);
if (err != Success)
return err;
else