summaryrefslogtreecommitdiff
path: root/randr
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2013-12-15 01:05:51 -0800
committerKeith Packard <keithp@keithp.com>2014-01-12 10:24:11 -0800
commit60014a4a98ff924ae7f6840781f768c1cc93bbab (patch)
treea956a03a6a7c87cac4d48fb95b66fec313d87fde /randr
parent93fa64e17d7bd600ebf18ecab85f5b2d17fe30ce (diff)
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>
Diffstat (limited to 'randr')
-rw-r--r--randr/randr.c20
-rw-r--r--randr/randrstr.h14
-rw-r--r--randr/rrcrtc.c6
-rw-r--r--randr/rrdispatch.c6
-rw-r--r--randr/rrmode.c4
-rw-r--r--randr/rroutput.c4
-rw-r--r--randr/rrproperty.c14
-rw-r--r--randr/rrprovider.c4
-rw-r--r--randr/rrproviderproperty.c14
9 files changed, 43 insertions, 43 deletions
diff --git a/randr/randr.c b/randr/randr.c
index 3c5142771..3c97714d8 100644
--- a/randr/randr.c
+++ b/randr/randr.c
@@ -60,7 +60,7 @@ DevPrivateKeyRec RRClientPrivateKeyRec;
DevPrivateKeyRec rrPrivKeyRec;
static void
-RRClientCallback(CallbackListPtr *list, pointer closure, pointer data)
+RRClientCallback(CallbackListPtr *list, void *closure, void *data)
{
NewClientInfoRec *clientinfo = (NewClientInfoRec *) data;
ClientPtr pClient = clientinfo->client;
@@ -338,7 +338,7 @@ RRScreenInit(ScreenPtr pScreen)
}
/*ARGSUSED*/ static int
-RRFreeClient(pointer data, XID id)
+RRFreeClient(void *data, XID id)
{
RREventPtr pRREvent;
WindowPtr pWin;
@@ -346,7 +346,7 @@ RRFreeClient(pointer data, XID id)
pRREvent = (RREventPtr) data;
pWin = pRREvent->window;
- dixLookupResourceByType((pointer *) &pHead, pWin->drawable.id,
+ dixLookupResourceByType((void **) &pHead, pWin->drawable.id,
RREventType, serverClient, DixDestroyAccess);
if (pHead) {
pPrev = 0;
@@ -359,12 +359,12 @@ RRFreeClient(pointer data, XID id)
*pHead = pRREvent->next;
}
}
- free((pointer) pRREvent);
+ free((void *) pRREvent);
return 1;
}
/*ARGSUSED*/ static int
-RRFreeEvents(pointer data, XID id)
+RRFreeEvents(void *data, XID id)
{
RREventPtr *pHead, pCur, pNext;
@@ -372,9 +372,9 @@ RRFreeEvents(pointer data, XID id)
for (pCur = *pHead; pCur; pCur = pNext) {
pNext = pCur->next;
FreeResource(pCur->clientResource, RRClientType);
- free((pointer) pCur);
+ free((void *) pCur);
}
- free((pointer) pHead);
+ free((void *) pHead);
return 1;
}
@@ -447,7 +447,7 @@ RRDeliverResourceEvent(ClientPtr client, WindowPtr pWin)
}
static int
-TellChanged(WindowPtr pWin, pointer value)
+TellChanged(WindowPtr pWin, void *value)
{
RREventPtr *pHead, pRREvent;
ClientPtr client;
@@ -458,7 +458,7 @@ TellChanged(WindowPtr pWin, pointer value)
rrScrPriv(pScreen);
int i;
- dixLookupResourceByType((pointer *) &pHead, pWin->drawable.id,
+ dixLookupResourceByType((void **) &pHead, pWin->drawable.id,
RREventType, serverClient, DixReadAccess);
if (!pHead)
return WT_WALKCHILDREN;
@@ -589,7 +589,7 @@ RRTellChanged(ScreenPtr pScreen)
pScrPriv->changed = FALSE;
mastersp->changed = FALSE;
- WalkTree(master, TellChanged, (pointer) master);
+ WalkTree(master, TellChanged, (void *) master);
mastersp->resourcesChanged = FALSE;
diff --git a/randr/randrstr.h b/randr/randrstr.h
index 15299fd6d..e14223201 100644
--- a/randr/randrstr.h
+++ b/randr/randrstr.h
@@ -92,7 +92,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 {
@@ -385,7 +385,7 @@ extern _X_EXPORT RESTYPE RRCrtcType, RRModeType, RROutputType, RRProviderType;
#define VERIFY_RR_OUTPUT(id, ptr, a)\
{\
- int rc = dixLookupResourceByType((pointer *)&(ptr), id,\
+ int rc = dixLookupResourceByType((void **)&(ptr), id,\
RROutputType, client, a);\
if (rc != Success) {\
client->errorValue = id;\
@@ -395,7 +395,7 @@ extern _X_EXPORT RESTYPE RRCrtcType, RRModeType, RROutputType, RRProviderType;
#define VERIFY_RR_CRTC(id, ptr, a)\
{\
- int rc = dixLookupResourceByType((pointer *)&(ptr), id,\
+ int rc = dixLookupResourceByType((void **)&(ptr), id,\
RRCrtcType, client, a);\
if (rc != Success) {\
client->errorValue = id;\
@@ -405,7 +405,7 @@ extern _X_EXPORT RESTYPE RRCrtcType, RRModeType, RROutputType, RRProviderType;
#define VERIFY_RR_MODE(id, ptr, a)\
{\
- int rc = dixLookupResourceByType((pointer *)&(ptr), id,\
+ int rc = dixLookupResourceByType((void **)&(ptr), id,\
RRModeType, client, a);\
if (rc != Success) {\
client->errorValue = id;\
@@ -415,7 +415,7 @@ extern _X_EXPORT RESTYPE RRCrtcType, RRModeType, RROutputType, RRProviderType;
#define VERIFY_RR_PROVIDER(id, ptr, a)\
{\
- int rc = dixLookupResourceByType((pointer *)&(ptr), id,\
+ int rc = dixLookupResourceByType((void **)&(ptr), id,\
RRProviderType, client, a);\
if (rc != Success) {\
client->errorValue = id;\
@@ -871,7 +871,7 @@ extern _X_EXPORT 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);
extern _X_EXPORT int
@@ -948,7 +948,7 @@ extern _X_EXPORT void
extern _X_EXPORT int
RRChangeProviderProperty(RRProviderPtr provider, Atom property, Atom type,
int format, int mode, unsigned long len,
- pointer value, Bool sendevent, Bool pending);
+ void *value, Bool sendevent, Bool pending);
extern _X_EXPORT int
RRConfigureProviderProperty(RRProviderPtr provider, Atom property,
diff --git a/randr/rrcrtc.c b/randr/rrcrtc.c
index 99b3dca08..df1e3f13e 100644
--- a/randr/rrcrtc.c
+++ b/randr/rrcrtc.c
@@ -95,7 +95,7 @@ RRCrtcCreate(ScreenPtr pScreen, void *devPrivate)
pixman_f_transform_init_identity(&crtc->f_transform);
pixman_f_transform_init_identity(&crtc->f_inverse);
- if (!AddResource(crtc->id, RRCrtcType, (pointer) crtc))
+ if (!AddResource(crtc->id, RRCrtcType, (void *) crtc))
return NULL;
/* attach the screen and crtc together */
@@ -654,7 +654,7 @@ RRCrtcDestroy(RRCrtcPtr crtc)
}
static int
-RRCrtcDestroyResource(pointer value, XID pid)
+RRCrtcDestroyResource(void *value, XID pid)
{
RRCrtcPtr crtc = (RRCrtcPtr) value;
ScreenPtr pScreen = crtc->pScreen;
@@ -1026,7 +1026,7 @@ ProcRRSetCrtcConfig(ClientPtr client)
outputIds = (RROutput *) (stuff + 1);
for (i = 0; i < numOutputs; i++) {
- ret = dixLookupResourceByType((pointer *) (outputs + i), outputIds[i],
+ ret = dixLookupResourceByType((void **) (outputs + i), outputIds[i],
RROutputType, client, DixSetAttrAccess);
if (ret != Success) {
free(outputs);
diff --git a/randr/rrdispatch.c b/randr/rrdispatch.c
index 7fbc9f01c..b9346d3f9 100644
--- a/randr/rrdispatch.c
+++ b/randr/rrdispatch.c
@@ -83,7 +83,7 @@ ProcRRSelectInput(ClientPtr client)
rc = dixLookupWindow(&pWin, stuff->window, client, DixReceiveAccess);
if (rc != Success)
return rc;
- rc = dixLookupResourceByType((pointer *) &pHead, pWin->drawable.id,
+ rc = dixLookupResourceByType((void **) &pHead, pWin->drawable.id,
RREventType, client, DixWriteAccess);
if (rc != Success && rc != BadValue)
return rc;
@@ -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 *) malloc(sizeof(RREventPtr));
if (!pHead ||
!AddResource(pWin->drawable.id, RREventType,
- (pointer) pHead)) {
+ (void *) pHead)) {
FreeResource(clientResource, RT_NONE);
return BadAlloc;
}
diff --git a/randr/rrmode.c b/randr/rrmode.c
index f5d3f9e54..befac4741 100644
--- a/randr/rrmode.c
+++ b/randr/rrmode.c
@@ -89,7 +89,7 @@ RRModeCreate(xRRModeInfo * modeInfo, const char *name, ScreenPtr userScreen)
}
mode->mode.id = FakeClientID(0);
- if (!AddResource(mode->mode.id, RRModeType, (pointer) mode)) {
+ if (!AddResource(mode->mode.id, RRModeType, (void *) mode)) {
free(newModes);
return NULL;
}
@@ -250,7 +250,7 @@ RRModeDestroy(RRModePtr mode)
}
static int
-RRModeDestroyResource(pointer value, XID pid)
+RRModeDestroyResource(void *value, XID pid)
{
RRModeDestroy((RRModePtr) value);
return 1;
diff --git a/randr/rroutput.c b/randr/rroutput.c
index 2b0b82f4c..f824f50ed 100644
--- a/randr/rroutput.c
+++ b/randr/rroutput.c
@@ -97,7 +97,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;
@@ -337,7 +337,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/randr/rrproperty.c b/randr/rrproperty.c
index 67b546728..e385e15ab 100644
--- a/randr/rrproperty.c
+++ b/randr/rrproperty.c
@@ -30,7 +30,7 @@ DeliverPropertyEvent(WindowPtr pWin, void *value)
xRROutputPropertyNotifyEvent *event = value;
RREventPtr *pHead, pRREvent;
- dixLookupResourceByType((pointer *) &pHead, pWin->drawable.id,
+ dixLookupResourceByType((void **) &pHead, pWin->drawable.id,
RREventType, serverClient, DixReadAccess);
if (!pHead)
return WT_WALKCHILDREN;
@@ -135,7 +135,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;
rrScrPrivPtr pScrPriv = rrGetScrPriv(output->pScreen);
@@ -178,10 +178,10 @@ RRChangeOutputProperty(RROutputPtr output, Atom property, Atom type,
total_len = prop_value->size + len;
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) malloc(total_size);
+ new_value.data = (void *) malloc(total_size);
if (!new_value.data && total_size) {
if (add)
RRDestroyOutputProperty(prop);
@@ -197,13 +197,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;
}
@@ -538,7 +538,7 @@ ProcRRChangeOutputProperty(ClientPtr client)
err = RRChangeOutputProperty(output, stuff->property,
stuff->type, (int) format,
- (int) mode, len, (pointer) &stuff[1], TRUE,
+ (int) mode, len, (void *) &stuff[1], TRUE,
TRUE);
if (err != Success)
return err;
diff --git a/randr/rrprovider.c b/randr/rrprovider.c
index 2334ad277..3ce7d75b0 100644
--- a/randr/rrprovider.c
+++ b/randr/rrprovider.c
@@ -365,7 +365,7 @@ RRProviderCreate(ScreenPtr pScreen, const char *name,
provider->name[nameLength] = '\0';
provider->changed = FALSE;
- if (!AddResource (provider->id, RRProviderType, (pointer) provider))
+ if (!AddResource (provider->id, RRProviderType, (void *) provider))
return NULL;
pScrPriv->provider = provider;
return provider;
@@ -387,7 +387,7 @@ RRProviderSetCapabilities(RRProviderPtr provider, uint32_t capabilities)
}
static int
-RRProviderDestroyResource (pointer value, XID pid)
+RRProviderDestroyResource (void *value, XID pid)
{
RRProviderPtr provider = (RRProviderPtr)value;
ScreenPtr pScreen = provider->pScreen;
diff --git a/randr/rrproviderproperty.c b/randr/rrproviderproperty.c
index ab601da9a..ff2c614d0 100644
--- a/randr/rrproviderproperty.c
+++ b/randr/rrproviderproperty.c
@@ -30,7 +30,7 @@ DeliverPropertyEvent(WindowPtr pWin, void *value)
xRRProviderPropertyNotifyEvent *event = value;
RREventPtr *pHead, pRREvent;
- dixLookupResourceByType((pointer *) &pHead, pWin->drawable.id,
+ dixLookupResourceByType((void **) &pHead, pWin->drawable.id,
RREventType, serverClient, DixReadAccess);
if (!pHead)
return WT_WALKCHILDREN;
@@ -135,7 +135,7 @@ RRDeleteProviderProperty(RRProviderPtr provider, Atom property)
int
RRChangeProviderProperty(RRProviderPtr provider, 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;
rrScrPrivPtr pScrPriv = rrGetScrPriv(provider->pScreen);
@@ -178,10 +178,10 @@ RRChangeProviderProperty(RRProviderPtr provider, Atom property, Atom type,
total_len = prop_value->size + len;
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) malloc(total_size);
+ new_value.data = (void *) malloc(total_size);
if (!new_value.data && total_size) {
if (add)
RRDestroyProviderProperty(prop);
@@ -197,13 +197,13 @@ RRChangeProviderProperty(RRProviderPtr provider, 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 @@ ProcRRChangeProviderProperty(ClientPtr client)
err = RRChangeProviderProperty(provider, stuff->property,
stuff->type, (int) format,
- (int) mode, len, (pointer) &stuff[1], TRUE,
+ (int) mode, len, (void *) &stuff[1], TRUE,
TRUE);
if (err != Success)
return err;