summaryrefslogtreecommitdiff
path: root/dix
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 /dix
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 'dix')
-rw-r--r--dix/colormap.c26
-rw-r--r--dix/cursor.c10
-rw-r--r--dix/devices.c34
-rw-r--r--dix/dispatch.c78
-rw-r--r--dix/dixfonts.c50
-rw-r--r--dix/dixutils.c40
-rw-r--r--dix/events.c18
-rw-r--r--dix/gc.c8
-rw-r--r--dix/glyphcurs.c2
-rw-r--r--dix/grabs.c6
-rw-r--r--dix/main.c2
-rw-r--r--dix/pixmap.c2
-rw-r--r--dix/privates.c6
-rw-r--r--dix/property.c4
-rw-r--r--dix/resource.c42
-rw-r--r--dix/touch.c2
-rw-r--r--dix/window.c28
17 files changed, 179 insertions, 179 deletions
diff --git a/dix/colormap.c b/dix/colormap.c
index 39fddc9b1..c1ff88e1a 100644
--- a/dix/colormap.c
+++ b/dix/colormap.c
@@ -367,7 +367,7 @@ CreateColormap(Colormap mid, ScreenPtr pScreen, VisualPtr pVisual,
}
pmap->flags |= BeingCreated;
- if (!AddResource(mid, RT_COLORMAP, (pointer) pmap))
+ if (!AddResource(mid, RT_COLORMAP, (void *) pmap))
return BadAlloc;
/*
@@ -397,7 +397,7 @@ CreateColormap(Colormap mid, ScreenPtr pScreen, VisualPtr pVisual,
* \param value must conform to DeleteType
*/
int
-FreeColormap(pointer value, XID mid)
+FreeColormap(void *value, XID mid)
{
int i;
EntryPtr pent;
@@ -405,7 +405,7 @@ FreeColormap(pointer value, XID mid)
if (CLIENT_ID(mid) != SERVER_ID) {
(*pmap->pScreen->UninstallColormap) (pmap);
- WalkTree(pmap->pScreen, (VisitWindowProcPtr) TellNoMap, (pointer) &mid);
+ WalkTree(pmap->pScreen, (VisitWindowProcPtr) TellNoMap, (void *) &mid);
}
/* This is the device's chance to undo anything it needs to, especially
@@ -474,7 +474,7 @@ TellNoMap(WindowPtr pwin, Colormap * pmid)
/* Tell window that pmid got uninstalled */
int
-TellLostMap(WindowPtr pwin, pointer value)
+TellLostMap(WindowPtr pwin, void *value)
{
Colormap *pmid = (Colormap *) value;
@@ -499,7 +499,7 @@ TellLostMap(WindowPtr pwin, pointer value)
/* Tell window that pmid got installed */
int
-TellGainedMap(WindowPtr pwin, pointer value)
+TellGainedMap(WindowPtr pwin, void *value)
{
Colormap *pmid = (Colormap *) value;
@@ -845,7 +845,7 @@ AllocColor(ColormapPtr pmap,
pmap->pVisual->vid == pmap->pScreen->rootVisual) {
ColormapPtr prootmap;
- dixLookupResourceByType((pointer *) &prootmap,
+ dixLookupResourceByType((void **) &prootmap,
pmap->pScreen->defColormap, RT_COLORMAP,
clients[client], DixReadAccess);
@@ -863,7 +863,7 @@ AllocColor(ColormapPtr pmap,
pmap->pVisual->vid == pmap->pScreen->rootVisual) {
ColormapPtr prootmap;
- dixLookupResourceByType((pointer *) &prootmap,
+ dixLookupResourceByType((void **) &prootmap,
pmap->pScreen->defColormap, RT_COLORMAP,
clients[client], DixReadAccess);
@@ -917,7 +917,7 @@ AllocColor(ColormapPtr pmap,
}
pcr->mid = pmap->mid;
pcr->client = client;
- if (!AddResource(FakeClientID(client), RT_CMAPENTRY, (pointer) pcr))
+ if (!AddResource(FakeClientID(client), RT_CMAPENTRY, (void *) pcr))
return BadAlloc;
}
return Success;
@@ -1463,9 +1463,9 @@ FreePixels(ColormapPtr pmap, int client)
* \unused fakeid
*/
int
-FreeClientPixels(pointer value, XID fakeid)
+FreeClientPixels(void *value, XID fakeid)
{
- pointer pmap;
+ void *pmap;
colorResource *pcr = value;
int rc;
@@ -1532,7 +1532,7 @@ AllocColorCells(int client, ColormapPtr pmap, int colors, int planes,
if ((ok == Success) && pcr) {
pcr->mid = pmap->mid;
pcr->client = client;
- if (!AddResource(FakeClientID(client), RT_CMAPENTRY, (pointer) pcr))
+ if (!AddResource(FakeClientID(client), RT_CMAPENTRY, (void *) pcr))
ok = BadAlloc;
}
else
@@ -1614,7 +1614,7 @@ AllocColorPlanes(int client, ColormapPtr pmap, int colors,
if ((ok == Success) && pcr) {
pcr->mid = pmap->mid;
pcr->client = client;
- if (!AddResource(FakeClientID(client), RT_CMAPENTRY, (pointer) pcr))
+ if (!AddResource(FakeClientID(client), RT_CMAPENTRY, (void *) pcr))
ok = BadAlloc;
}
else
@@ -2492,7 +2492,7 @@ struct colormap_lookup_data {
};
static void
-_colormap_find_resource(pointer value, XID id, pointer cdata)
+_colormap_find_resource(void *value, XID id, void *cdata)
{
struct colormap_lookup_data *cmap_data = cdata;
VisualPtr visuals = cmap_data->visuals;
diff --git a/dix/cursor.c b/dix/cursor.c
index 8cc54bd1f..56c560640 100644
--- a/dix/cursor.c
+++ b/dix/cursor.c
@@ -104,7 +104,7 @@ FreeCursorBits(CursorBitsPtr bits)
* \param value must conform to DeleteType
*/
int
-FreeCursor(pointer value, XID cid)
+FreeCursor(void *value, XID cid)
{
int nscr;
CursorPtr pCurs = (CursorPtr) value;
@@ -319,13 +319,13 @@ AllocGlyphCursor(Font source, unsigned sourceChar, Font mask, unsigned maskChar,
CursorPtr pCurs;
GlyphSharePtr pShare;
- rc = dixLookupResourceByType((pointer *) &sourcefont, source, RT_FONT,
+ rc = dixLookupResourceByType((void **) &sourcefont, source, RT_FONT,
client, DixUseAccess);
if (rc != Success) {
client->errorValue = source;
return rc;
}
- rc = dixLookupResourceByType((pointer *) &maskfont, mask, RT_FONT, client,
+ rc = dixLookupResourceByType((void **) &maskfont, mask, RT_FONT, client,
DixUseAccess);
if (rc != Success && mask != None) {
client->errorValue = mask;
@@ -486,7 +486,7 @@ CreateRootCursor(char *unused1, unsigned int unused2)
if (err != Success)
return NullCursor;
- err = dixLookupResourceByType((pointer *) &cursorfont, fontID, RT_FONT,
+ err = dixLookupResourceByType((void **) &cursorfont, fontID, RT_FONT,
serverClient, DixReadAccess);
if (err != Success)
return NullCursor;
@@ -494,7 +494,7 @@ CreateRootCursor(char *unused1, unsigned int unused2)
&curs, serverClient, (XID) 0) != Success)
return NullCursor;
- if (!AddResource(FakeClientID(0), RT_CURSOR, (pointer) curs))
+ if (!AddResource(FakeClientID(0), RT_CURSOR, (void *) curs))
return NullCursor;
return curs;
diff --git a/dix/devices.c b/dix/devices.c
index 3aecd1b23..45de713ce 100644
--- a/dix/devices.c
+++ b/dix/devices.c
@@ -386,7 +386,7 @@ EnableDevice(DeviceIntPtr dev, BOOL sendevent)
}
else {
if (dev->coreEvents)
- other = (IsPointerDevice(dev)) ? inputInfo.pointer :
+ other = (IsPointerDevice(dev)) ? inputInfo.pointer:
inputInfo.keyboard;
else
other = NULL; /* auto-float non-core devices */
@@ -586,7 +586,7 @@ ActivateDevice(DeviceIntPtr dev, BOOL sendevent)
* The actual task of ringing the bell is the job of the DDX.
*/
static void
-CoreKeyboardBell(int volume, DeviceIntPtr pDev, pointer arg, int something)
+CoreKeyboardBell(int volume, DeviceIntPtr pDev, void *arg, int something)
{
KeybdCtrl *ctrl = arg;
@@ -750,7 +750,7 @@ InitAndStartDevices(void)
* Free the given device class and reset the pointer to NULL.
*/
static void
-FreeDeviceClass(int type, pointer *class)
+FreeDeviceClass(int type, void **class)
{
if (!(*class))
return;
@@ -818,7 +818,7 @@ FreeDeviceClass(int type, pointer *class)
}
static void
-FreeFeedbackClass(int type, pointer *class)
+FreeFeedbackClass(int type, void **class)
{
if (!(*class))
return;
@@ -906,19 +906,19 @@ FreeAllDeviceClasses(ClassesPtr classes)
if (!classes)
return;
- FreeDeviceClass(KeyClass, (pointer) &classes->key);
- FreeDeviceClass(ValuatorClass, (pointer) &classes->valuator);
- FreeDeviceClass(XITouchClass, (pointer) &classes->touch);
- FreeDeviceClass(ButtonClass, (pointer) &classes->button);
- FreeDeviceClass(FocusClass, (pointer) &classes->focus);
- FreeDeviceClass(ProximityClass, (pointer) &classes->proximity);
-
- FreeFeedbackClass(KbdFeedbackClass, (pointer) &classes->kbdfeed);
- FreeFeedbackClass(PtrFeedbackClass, (pointer) &classes->ptrfeed);
- FreeFeedbackClass(IntegerFeedbackClass, (pointer) &classes->intfeed);
- FreeFeedbackClass(StringFeedbackClass, (pointer) &classes->stringfeed);
- FreeFeedbackClass(BellFeedbackClass, (pointer) &classes->bell);
- FreeFeedbackClass(LedFeedbackClass, (pointer) &classes->leds);
+ FreeDeviceClass(KeyClass, (void *) &classes->key);
+ FreeDeviceClass(ValuatorClass, (void *) &classes->valuator);
+ FreeDeviceClass(XITouchClass, (void *) &classes->touch);
+ FreeDeviceClass(ButtonClass, (void *) &classes->button);
+ FreeDeviceClass(FocusClass, (void *) &classes->focus);
+ FreeDeviceClass(ProximityClass, (void *) &classes->proximity);
+
+ FreeFeedbackClass(KbdFeedbackClass, (void *) &classes->kbdfeed);
+ FreeFeedbackClass(PtrFeedbackClass, (void *) &classes->ptrfeed);
+ FreeFeedbackClass(IntegerFeedbackClass, (void *) &classes->intfeed);
+ FreeFeedbackClass(StringFeedbackClass, (void *) &classes->stringfeed);
+ FreeFeedbackClass(BellFeedbackClass, (void *) &classes->bell);
+ FreeFeedbackClass(LedFeedbackClass, (void *) &classes->leds);
}
diff --git a/dix/dispatch.c b/dix/dispatch.c
index 64f8ef9ed..e28270c16 100644
--- a/dix/dispatch.c
+++ b/dix/dispatch.c
@@ -652,7 +652,7 @@ ProcCreateWindow(ClientPtr client)
Mask mask = pWin->eventMask;
pWin->eventMask = 0; /* subterfuge in case AddResource fails */
- if (!AddResource(stuff->wid, RT_WINDOW, (pointer) pWin))
+ if (!AddResource(stuff->wid, RT_WINDOW, (void *) pWin))
return BadAlloc;
pWin->eventMask = mask;
}
@@ -1069,7 +1069,7 @@ ProcGrabServer(ClientPtr client)
grabinfo.client = client;
grabinfo.grabstate = SERVER_GRABBED;
- CallCallbacks(&ServerGrabCallback, (pointer) &grabinfo);
+ CallCallbacks(&ServerGrabCallback, (void *) &grabinfo);
}
return Success;
@@ -1096,7 +1096,7 @@ UngrabServer(ClientPtr client)
grabinfo.client = client;
grabinfo.grabstate = SERVER_UNGRABBED;
- CallCallbacks(&ServerGrabCallback, (pointer) &grabinfo);
+ CallCallbacks(&ServerGrabCallback, (void *) &grabinfo);
}
}
@@ -1208,7 +1208,7 @@ ProcCloseFont(ClientPtr client)
REQUEST(xResourceReq);
REQUEST_SIZE_MATCH(xResourceReq);
- rc = dixLookupResourceByType((pointer *) &pFont, stuff->id, RT_FONT,
+ rc = dixLookupResourceByType((void **) &pFont, stuff->id, RT_FONT,
client, DixDestroyAccess);
if (rc == Success) {
FreeResource(stuff->id, RT_NONE);
@@ -1335,7 +1335,7 @@ ProcListFontsWithInfo(ClientPtr client)
* \param value must conform to DeleteType
*/
int
-dixDestroyPixmap(pointer value, XID pid)
+dixDestroyPixmap(void *value, XID pid)
{
PixmapPtr pPixmap = (PixmapPtr) value;
@@ -1402,7 +1402,7 @@ ProcCreatePixmap(ClientPtr client)
(*pDraw->pScreen->DestroyPixmap) (pMap);
return rc;
}
- if (AddResource(stuff->pid, RT_PIXMAP, (pointer) pMap))
+ if (AddResource(stuff->pid, RT_PIXMAP, (void *) pMap))
return Success;
}
return BadAlloc;
@@ -1417,7 +1417,7 @@ ProcFreePixmap(ClientPtr client)
REQUEST(xResourceReq);
REQUEST_SIZE_MATCH(xResourceReq);
- rc = dixLookupResourceByType((pointer *) &pMap, stuff->id, RT_PIXMAP,
+ rc = dixLookupResourceByType((void **) &pMap, stuff->id, RT_PIXMAP,
client, DixDestroyAccess);
if (rc == Success) {
FreeResource(stuff->id, RT_NONE);
@@ -1454,7 +1454,7 @@ ProcCreateGC(ClientPtr client)
stuff->gc, client);
if (error != Success)
return error;
- if (!AddResource(stuff->gc, RT_GC, (pointer) pGC))
+ if (!AddResource(stuff->gc, RT_GC, (void *) pGC))
return BadAlloc;
return Success;
}
@@ -2121,7 +2121,7 @@ DoGetImage(ClientPtr client, int format, Drawable drawable,
y + linesDone,
width,
nlines,
- format, planemask, (pointer) pBuf);
+ format, planemask, (void *) pBuf);
if (pVisibleRegion)
XaceCensorImage(client, pVisibleRegion, widthBytesLine,
pDraw, x, y + linesDone, width,
@@ -2148,7 +2148,7 @@ DoGetImage(ClientPtr client, int format, Drawable drawable,
y + linesDone,
width,
nlines,
- format, plane, (pointer) pBuf);
+ format, plane, (void *) pBuf);
if (pVisibleRegion)
XaceCensorImage(client, pVisibleRegion,
widthBytesLine,
@@ -2308,7 +2308,7 @@ ProcFreeColormap(ClientPtr client)
REQUEST(xResourceReq);
REQUEST_SIZE_MATCH(xResourceReq);
- rc = dixLookupResourceByType((pointer *) &pmap, stuff->id, RT_COLORMAP,
+ rc = dixLookupResourceByType((void **) &pmap, stuff->id, RT_COLORMAP,
client, DixDestroyAccess);
if (rc == Success) {
/* Freeing a default colormap is a no-op */
@@ -2334,7 +2334,7 @@ ProcCopyColormapAndFree(ClientPtr client)
REQUEST_SIZE_MATCH(xCopyColormapAndFreeReq);
mid = stuff->mid;
LEGAL_NEW_RESOURCE(mid, client);
- rc = dixLookupResourceByType((pointer *) &pSrcMap, stuff->srcCmap,
+ rc = dixLookupResourceByType((void **) &pSrcMap, stuff->srcCmap,
RT_COLORMAP, client,
DixReadAccess | DixRemoveAccess);
if (rc == Success)
@@ -2352,7 +2352,7 @@ ProcInstallColormap(ClientPtr client)
REQUEST(xResourceReq);
REQUEST_SIZE_MATCH(xResourceReq);
- rc = dixLookupResourceByType((pointer *) &pcmp, stuff->id, RT_COLORMAP,
+ rc = dixLookupResourceByType((void **) &pcmp, stuff->id, RT_COLORMAP,
client, DixInstallAccess);
if (rc != Success)
goto out;
@@ -2381,7 +2381,7 @@ ProcUninstallColormap(ClientPtr client)
REQUEST(xResourceReq);
REQUEST_SIZE_MATCH(xResourceReq);
- rc = dixLookupResourceByType((pointer *) &pcmp, stuff->id, RT_COLORMAP,
+ rc = dixLookupResourceByType((void **) &pcmp, stuff->id, RT_COLORMAP,
client, DixUninstallAccess);
if (rc != Success)
goto out;
@@ -2449,7 +2449,7 @@ ProcAllocColor(ClientPtr client)
REQUEST(xAllocColorReq);
REQUEST_SIZE_MATCH(xAllocColorReq);
- rc = dixLookupResourceByType((pointer *) &pmap, stuff->cmap, RT_COLORMAP,
+ rc = dixLookupResourceByType((void **) &pmap, stuff->cmap, RT_COLORMAP,
client, DixAddAccess);
if (rc == Success) {
xAllocColorReply acr = {
@@ -2486,7 +2486,7 @@ ProcAllocNamedColor(ClientPtr client)
REQUEST(xAllocNamedColorReq);
REQUEST_FIXED_SIZE(xAllocNamedColorReq, stuff->nbytes);
- rc = dixLookupResourceByType((pointer *) &pcmp, stuff->cmap, RT_COLORMAP,
+ rc = dixLookupResourceByType((void **) &pcmp, stuff->cmap, RT_COLORMAP,
client, DixAddAccess);
if (rc == Success) {
xAllocNamedColorReply ancr = {
@@ -2531,7 +2531,7 @@ ProcAllocColorCells(ClientPtr client)
REQUEST(xAllocColorCellsReq);
REQUEST_SIZE_MATCH(xAllocColorCellsReq);
- rc = dixLookupResourceByType((pointer *) &pcmp, stuff->cmap, RT_COLORMAP,
+ rc = dixLookupResourceByType((void **) &pcmp, stuff->cmap, RT_COLORMAP,
client, DixAddAccess);
if (rc == Success) {
int npixels, nmasks;
@@ -2592,7 +2592,7 @@ ProcAllocColorPlanes(ClientPtr client)
REQUEST(xAllocColorPlanesReq);
REQUEST_SIZE_MATCH(xAllocColorPlanesReq);
- rc = dixLookupResourceByType((pointer *) &pcmp, stuff->cmap, RT_COLORMAP,
+ rc = dixLookupResourceByType((void **) &pcmp, stuff->cmap, RT_COLORMAP,
client, DixAddAccess);
if (rc == Success) {
xAllocColorPlanesReply acpr;
@@ -2654,7 +2654,7 @@ ProcFreeColors(ClientPtr client)
REQUEST(xFreeColorsReq);
REQUEST_AT_LEAST_SIZE(xFreeColorsReq);
- rc = dixLookupResourceByType((pointer *) &pcmp, stuff->cmap, RT_COLORMAP,
+ rc = dixLookupResourceByType((void **) &pcmp, stuff->cmap, RT_COLORMAP,
client, DixRemoveAccess);
if (rc == Success) {
int count;
@@ -2680,7 +2680,7 @@ ProcStoreColors(ClientPtr client)
REQUEST(xStoreColorsReq);
REQUEST_AT_LEAST_SIZE(xStoreColorsReq);
- rc = dixLookupResourceByType((pointer *) &pcmp, stuff->cmap, RT_COLORMAP,
+ rc = dixLookupResourceByType((void **) &pcmp, stuff->cmap, RT_COLORMAP,
client, DixWriteAccess);
if (rc == Success) {
int count;
@@ -2706,7 +2706,7 @@ ProcStoreNamedColor(ClientPtr client)
REQUEST(xStoreNamedColorReq);
REQUEST_FIXED_SIZE(xStoreNamedColorReq, stuff->nbytes);
- rc = dixLookupResourceByType((pointer *) &pcmp, stuff->cmap, RT_COLORMAP,
+ rc = dixLookupResourceByType((void **) &pcmp, stuff->cmap, RT_COLORMAP,
client, DixWriteAccess);
if (rc == Success) {
xColorItem def;
@@ -2734,7 +2734,7 @@ ProcQueryColors(ClientPtr client)
REQUEST(xQueryColorsReq);
REQUEST_AT_LEAST_SIZE(xQueryColorsReq);
- rc = dixLookupResourceByType((pointer *) &pcmp, stuff->cmap, RT_COLORMAP,
+ rc = dixLookupResourceByType((void **) &pcmp, stuff->cmap, RT_COLORMAP,
client, DixReadAccess);
if (rc == Success) {
int count;
@@ -2781,7 +2781,7 @@ ProcLookupColor(ClientPtr client)
REQUEST(xLookupColorReq);
REQUEST_FIXED_SIZE(xLookupColorReq, stuff->nbytes);
- rc = dixLookupResourceByType((pointer *) &pcmp, stuff->cmap, RT_COLORMAP,
+ rc = dixLookupResourceByType((void **) &pcmp, stuff->cmap, RT_COLORMAP,
client, DixReadAccess);
if (rc == Success) {
CARD16 exactRed, exactGreen, exactBlue;
@@ -2832,7 +2832,7 @@ ProcCreateCursor(ClientPtr client)
REQUEST_SIZE_MATCH(xCreateCursorReq);
LEGAL_NEW_RESOURCE(stuff->cid, client);
- rc = dixLookupResourceByType((pointer *) &src, stuff->source, RT_PIXMAP,
+ rc = dixLookupResourceByType((void **) &src, stuff->source, RT_PIXMAP,
client, DixReadAccess);
if (rc != Success) {
client->errorValue = stuff->source;
@@ -2844,7 +2844,7 @@ ProcCreateCursor(ClientPtr client)
/* Find and validate cursor mask pixmap, if one is provided */
if (stuff->mask != None) {
- rc = dixLookupResourceByType((pointer *) &msk, stuff->mask, RT_PIXMAP,
+ rc = dixLookupResourceByType((void **) &msk, stuff->mask, RT_PIXMAP,
client, DixReadAccess);
if (rc != Success) {
client->errorValue = stuff->mask;
@@ -2876,7 +2876,7 @@ ProcCreateCursor(ClientPtr client)
}
(*src->drawable.pScreen->GetImage) ((DrawablePtr) src, 0, 0, width, height,
- XYPixmap, 1, (pointer) srcbits);
+ XYPixmap, 1, (void *) srcbits);
if (msk == (PixmapPtr) NULL) {
unsigned char *bits = mskbits;
@@ -2888,7 +2888,7 @@ ProcCreateCursor(ClientPtr client)
memset((char *) mskbits, 0, n);
(*msk->drawable.pScreen->GetImage) ((DrawablePtr) msk, 0, 0, width,
height, XYPixmap, 1,
- (pointer) mskbits);
+ (void *) mskbits);
}
cm.width = width;
cm.height = height;
@@ -2901,7 +2901,7 @@ ProcCreateCursor(ClientPtr client)
if (rc != Success)
goto bail;
- if (!AddResource(stuff->cid, RT_CURSOR, (pointer) pCursor)) {
+ if (!AddResource(stuff->cid, RT_CURSOR, (void *) pCursor)) {
rc = BadAlloc;
goto bail;
}
@@ -2931,7 +2931,7 @@ ProcCreateGlyphCursor(ClientPtr client)
&pCursor, client, stuff->cid);
if (res != Success)
return res;
- if (AddResource(stuff->cid, RT_CURSOR, (pointer) pCursor))
+ if (AddResource(stuff->cid, RT_CURSOR, (void *) pCursor))
return Success;
return BadAlloc;
}
@@ -2945,7 +2945,7 @@ ProcFreeCursor(ClientPtr client)
REQUEST(xResourceReq);
REQUEST_SIZE_MATCH(xResourceReq);
- rc = dixLookupResourceByType((pointer *) &pCursor, stuff->id, RT_CURSOR,
+ rc = dixLookupResourceByType((void **) &pCursor, stuff->id, RT_CURSOR,
client, DixDestroyAccess);
if (rc == Success) {
FreeResource(stuff->id, RT_NONE);
@@ -3094,10 +3094,10 @@ ProcChangeHosts(ClientPtr client)
if (stuff->mode == HostInsert)
return AddHost(client, (int) stuff->hostFamily,
- stuff->hostLength, (pointer) &stuff[1]);
+ stuff->hostLength, (void *) &stuff[1]);
if (stuff->mode == HostDelete)
return RemoveHost(client, (int) stuff->hostFamily,
- stuff->hostLength, (pointer) &stuff[1]);
+ stuff->hostLength, (void *) &stuff[1]);
client->errorValue = stuff->mode;
return BadValue;
}
@@ -3108,7 +3108,7 @@ ProcListHosts(ClientPtr client)
xListHostsReply reply;
int len, nHosts, result;
BOOL enabled;
- pointer pdata;
+ void *pdata;
/* REQUEST(xListHostsReq); */
@@ -3349,7 +3349,7 @@ CloseDownClient(ClientPtr client)
clientinfo.client = client;
clientinfo.prefix = (xConnSetupPrefix *) NULL;
clientinfo.setup = (xConnSetup *) NULL;
- CallCallbacks((&ClientStateCallback), (pointer) &clientinfo);
+ CallCallbacks((&ClientStateCallback), (void *) &clientinfo);
}
}
client->clientGone = TRUE; /* so events aren't sent to client */
@@ -3379,7 +3379,7 @@ CloseDownClient(ClientPtr client)
clientinfo.client = client;
clientinfo.prefix = (xConnSetupPrefix *) NULL;
clientinfo.setup = (xConnSetup *) NULL;
- CallCallbacks((&ClientStateCallback), (pointer) &clientinfo);
+ CallCallbacks((&ClientStateCallback), (void *) &clientinfo);
}
TouchListenerGone(client->clientAsMask);
FreeClientResources(client);
@@ -3414,7 +3414,7 @@ KillAllClients(void)
}
void
-InitClient(ClientPtr client, int i, pointer ospriv)
+InitClient(ClientPtr client, int i, void *ospriv)
{
client->index = i;
client->clientAsMask = ((Mask) i) << CLIENTOFFSET;
@@ -3436,7 +3436,7 @@ InitClient(ClientPtr client, int i, pointer ospriv)
*************************/
ClientPtr
-NextAvailableClient(pointer ospriv)
+NextAvailableClient(void *ospriv)
{
int i;
ClientPtr client;
@@ -3476,7 +3476,7 @@ NextAvailableClient(pointer ospriv)
clientinfo.client = client;
clientinfo.prefix = (xConnSetupPrefix *) NULL;
clientinfo.setup = (xConnSetup *) NULL;
- CallCallbacks((&ClientStateCallback), (pointer) &clientinfo);
+ CallCallbacks((&ClientStateCallback), (void *) &clientinfo);
}
return client;
}
@@ -3596,7 +3596,7 @@ SendConnSetup(ClientPtr client, const char *reason)
clientinfo.client = client;
clientinfo.prefix = lconnSetupPrefix;
clientinfo.setup = (xConnSetup *) lConnectionInfo;
- CallCallbacks((&ClientStateCallback), (pointer) &clientinfo);
+ CallCallbacks((&ClientStateCallback), (void *) &clientinfo);
}
return Success;
}
diff --git a/dix/dixfonts.c b/dix/dixfonts.c
index 57177acc9..341ca3f95 100644
--- a/dix/dixfonts.c
+++ b/dix/dixfonts.c
@@ -70,7 +70,7 @@ Equipment Corporation.
#include "xf86bigfontsrv.h"
#endif
-extern pointer fosNaturalParams;
+extern void *fosNaturalParams;
extern FontPtr defaultFont;
static FontPathElementPtr *font_path_elements = (FontPathElementPtr *) 0;
@@ -139,7 +139,7 @@ SetDefaultFont(const char *defaultfontname)
(unsigned) strlen(defaultfontname), defaultfontname);
if (err != Success)
return FALSE;
- err = dixLookupResourceByType((pointer *) &pf, fid, RT_FONT, serverClient,
+ err = dixLookupResourceByType((void **) &pf, fid, RT_FONT, serverClient,
DixReadAccess);
if (err != Success)
return FALSE;
@@ -197,7 +197,7 @@ RemoveFontWakeup(FontPathElementPtr fpe)
}
void
-FontWakeup(pointer data, int count, pointer LastSelectMask)
+FontWakeup(void *data, int count, void *LastSelectMask)
{
int i;
FontPathElementPtr fpe;
@@ -267,7 +267,7 @@ doOpenFont(ClientPtr client, OFclosurePtr c)
if (client->clientGone) {
if (c->current_fpe < c->num_fpes) {
fpe = c->fpe_list[c->current_fpe];
- (*fpe_functions[fpe->type].client_died) ((pointer) client, fpe);
+ (*fpe_functions[fpe->type].client_died) ((void *) client, fpe);
}
err = Successful;
goto bail;
@@ -275,7 +275,7 @@ doOpenFont(ClientPtr client, OFclosurePtr c)
while (c->current_fpe < c->num_fpes) {
fpe = c->fpe_list[c->current_fpe];
err = (*fpe_functions[fpe->type].open_font)
- ((pointer) client, fpe, c->flags,
+ ((void *) client, fpe, c->flags,
c->fontname, c->fnamelen, FontFormat,
BitmapFormatMaskByte |
BitmapFormatMaskBit |
@@ -350,7 +350,7 @@ doOpenFont(ClientPtr client, OFclosurePtr c)
}
}
}
- if (!AddResource(c->fontid, RT_FONT, (pointer) pfont)) {
+ if (!AddResource(c->fontid, RT_FONT, (void *) pfont)) {
err = AllocError;
goto bail;
}
@@ -404,7 +404,7 @@ OpenFont(ClientPtr client, XID fid, Mask flags, unsigned lenfname,
cached = FindCachedFontPattern(patternCache, pfontname, lenfname);
if (cached && cached->info.cachable) {
- if (!AddResource(fid, RT_FONT, (pointer) cached))
+ if (!AddResource(fid, RT_FONT, (void *) cached))
return BadAlloc;
cached->refcnt++;
return Success;
@@ -453,7 +453,7 @@ OpenFont(ClientPtr client, XID fid, Mask flags, unsigned lenfname,
* \param value must conform to DeleteType
*/
int
-CloseFont(pointer value, XID fid)
+CloseFont(void *value, XID fid)
{
int nscr;
ScreenPtr pscr;
@@ -571,7 +571,7 @@ doListFontsAndAliases(ClientPtr client, LFclosurePtr c)
if (client->clientGone) {
if (c->current.current_fpe < c->num_fpes) {
fpe = c->fpe_list[c->current.current_fpe];
- (*fpe_functions[fpe->type].client_died) ((pointer) client, fpe);
+ (*fpe_functions[fpe->type].client_died) ((void *) client, fpe);
}
err = Successful;
goto bail;
@@ -588,7 +588,7 @@ doListFontsAndAliases(ClientPtr client, LFclosurePtr c)
/* This FPE doesn't support/require list_fonts_and_aliases */
err = (*fpe_functions[fpe->type].list_fonts)
- ((pointer) c->client, fpe, c->current.pattern,
+ ((void *) c->client, fpe, c->current.pattern,
c->current.patlen, c->current.max_names - c->names->nnames,
c->names);
@@ -615,7 +615,7 @@ doListFontsAndAliases(ClientPtr client, LFclosurePtr c)
if (!c->current.list_started) {
err = (*fpe_functions[fpe->type].start_list_fonts_and_aliases)
- ((pointer) c->client, fpe, c->current.pattern,
+ ((void *) c->client, fpe, c->current.pattern,
c->current.patlen, c->current.max_names - c->names->nnames,
&c->current.private);
if (err == Suspended) {
@@ -635,7 +635,7 @@ doListFontsAndAliases(ClientPtr client, LFclosurePtr c)
name = 0;
err = (*fpe_functions[fpe->type].list_next_font_or_alias)
- ((pointer) c->client, fpe, &name, &namelen, &tmpname,
+ ((void *) c->client, fpe, &name, &namelen, &tmpname,
&resolvedlen, c->current.private);
if (err == Suspended) {
if (!ClientIsAsleep(client))
@@ -687,7 +687,7 @@ doListFontsAndAliases(ClientPtr client, LFclosurePtr c)
tmpname = 0;
(void) (*fpe_functions[fpe->type].list_next_font_or_alias)
- ((pointer) c->client, fpe, &tmpname, &tmpnamelen,
+ ((void *) c->client, fpe, &tmpname, &tmpnamelen,
&tmpname, &tmpnamelen, c->current.private);
if (--aliascount <= 0) {
err = BadFontName;
@@ -869,7 +869,7 @@ doListFontsWithInfo(ClientPtr client, LFWIclosurePtr c)
if (client->clientGone) {
if (c->current.current_fpe < c->num_fpes) {
fpe = c->fpe_list[c->current.current_fpe];
- (*fpe_functions[fpe->type].client_died) ((pointer) client, fpe);
+ (*fpe_functions[fpe->type].client_died) ((void *) client, fpe);
}
err = Successful;
goto bail;
@@ -1118,12 +1118,12 @@ doPolyText(ClientPtr client, PTclosurePtr c)
if (client->clientGone) {
fpe = c->pGC->font->fpe;
- (*fpe_functions[fpe->type].client_died) ((pointer) client, fpe);
+ (*fpe_functions[fpe->type].client_died) ((void *) client, fpe);
if (ClientIsAsleep(client)) {
/* Client has died, but we cannot bail out right now. We
need to clean up after the work we did when going to
- sleep. Setting the drawable pointer to 0 makes this
+ sleep. Setting the drawable poiner to 0 makes this
happen without any attempts to render or perform other
unnecessary activities. */
c->pDraw = (DrawablePtr) 0;
@@ -1144,7 +1144,7 @@ doPolyText(ClientPtr client, PTclosurePtr c)
the FPE code to clean up after client and avoid further
rendering while we clean up after ourself. */
fpe = c->pGC->font->fpe;
- (*fpe_functions[fpe->type].client_died) ((pointer) client, fpe);
+ (*fpe_functions[fpe->type].client_died) ((void *) client, fpe);
c->pDraw = (DrawablePtr) 0;
}
}
@@ -1165,7 +1165,7 @@ doPolyText(ClientPtr client, PTclosurePtr c)
fid = ((Font) *(c->pElt + 4)) /* big-endian */
|((Font) *(c->pElt + 3)) << 8
| ((Font) *(c->pElt + 2)) << 16 | ((Font) *(c->pElt + 1)) << 24;
- err = dixLookupResourceByType((pointer *) &pFont, fid, RT_FONT,
+ err = dixLookupResourceByType((void **) &pFont, fid, RT_FONT,
client, DixUseAccess);
if (err != Success) {
/* restore pFont for step 4 (described below) */
@@ -1399,7 +1399,7 @@ doImageText(ClientPtr client, ITclosurePtr c)
if (client->clientGone) {
fpe = c->pGC->font->fpe;
- (*fpe_functions[fpe->type].client_died) ((pointer) client, fpe);
+ (*fpe_functions[fpe->type].client_died) ((void *) client, fpe);
err = Success;
goto bail;
}
@@ -1413,7 +1413,7 @@ doImageText(ClientPtr client, ITclosurePtr c)
/* Our drawable has disappeared. Treat like client died... ask
the FPE code to clean up after client. */
fpe = c->pGC->font->fpe;
- (*fpe_functions[fpe->type].client_died) ((pointer) client, fpe);
+ (*fpe_functions[fpe->type].client_died) ((void *) client, fpe);
err = Success;
goto bail;
}
@@ -1819,7 +1819,7 @@ DeleteClientFontStuff(ClientPtr client)
for (i = 0; i < num_fpes; i++) {
fpe = font_path_elements[i];
if (fpe_functions[fpe->type].client_died)
- (*fpe_functions[fpe->type].client_died) ((pointer) client, fpe);
+ (*fpe_functions[fpe->type].client_died) ((void *) client, fpe);
}
}
@@ -1937,7 +1937,7 @@ FreeFonts(void)
FontPtr
find_old_font(XID id)
{
- pointer pFont;
+ void *pFont;
dixLookupResourceByType(&pFont, id, RT_NONE, serverClient, DixReadAccess);
return (FontPtr) pFont;
@@ -1954,7 +1954,7 @@ _X_EXPORT
int
StoreFontClientFont(FontPtr pfont, Font id)
{
- return AddResource(id, RT_NONE, (pointer) pfont);
+ return AddResource(id, RT_NONE, (void *) pfont);
}
_X_EXPORT
@@ -1985,7 +1985,7 @@ init_fs_handlers(FontPathElementPtr fpe, BlockHandlerProcPtr block_handler)
}
if (fs_handlers_installed == 0) {
if (!RegisterBlockAndWakeupHandlers(block_handler,
- FontWakeup, (pointer) 0))
+ FontWakeup, (void *) 0))
return AllocError;
fs_handlers_installed++;
}
@@ -2002,7 +2002,7 @@ remove_fs_handlers(FontPathElementPtr fpe, BlockHandlerProcPtr block_handler,
/* remove the handlers if no one else is using them */
if (--fs_handlers_installed == 0) {
RemoveBlockAndWakeupHandlers(block_handler, FontWakeup,
- (pointer) 0);
+ (void *) 0);
}
}
RemoveFontWakeup(fpe);
diff --git a/dix/dixutils.c b/dix/dixutils.c
index c250bb1db..220040fa4 100644
--- a/dix/dixutils.c
+++ b/dix/dixutils.c
@@ -199,7 +199,7 @@ dixLookupDrawable(DrawablePtr *pDraw, XID id, ClientPtr client,
*pDraw = NULL;
- rc = dixLookupResourceByClass((pointer *) &pTmp, id, RC_DRAWABLE, client,
+ rc = dixLookupResourceByClass((void **) &pTmp, id, RC_DRAWABLE, client,
access);
if (rc != Success)
@@ -236,7 +236,7 @@ dixLookupWindow(WindowPtr *pWin, XID id, ClientPtr client, Mask access)
int
dixLookupGC(GCPtr *pGC, XID id, ClientPtr client, Mask access)
{
- return dixLookupResourceByType((pointer *) pGC, id, RT_GC, client, access);
+ return dixLookupResourceByType((void **) pGC, id, RT_GC, client, access);
}
int
@@ -246,11 +246,11 @@ dixLookupFontable(FontPtr *pFont, XID id, ClientPtr client, Mask access)
GC *pGC;
client->errorValue = id; /* EITHER font or gc */
- rc = dixLookupResourceByType((pointer *) pFont, id, RT_FONT, client,
+ rc = dixLookupResourceByType((void **) pFont, id, RT_FONT, client,
access);
if (rc != BadFont)
return rc;
- rc = dixLookupResourceByType((pointer *) &pGC, id, RT_GC, client, access);
+ rc = dixLookupResourceByType((void **) &pGC, id, RT_GC, client, access);
if (rc == BadGC)
return BadFont;
if (rc == Success)
@@ -261,7 +261,7 @@ dixLookupFontable(FontPtr *pFont, XID id, ClientPtr client, Mask access)
int
dixLookupClient(ClientPtr *pClient, XID rid, ClientPtr client, Mask access)
{
- pointer pRes;
+ void *pRes;
int rc = BadValue, clientIndex = CLIENT_ID(rid);
if (!clientIndex || !clients[clientIndex] || (rid & SERVER_BIT))
@@ -296,7 +296,7 @@ AlterSaveSetForClient(ClientPtr client, WindowPtr pWin, unsigned mode,
j = 0;
if (numnow) {
pTmp = client->saveSet;
- while ((j < numnow) && (SaveSetWindow(pTmp[j]) != (pointer) pWin))
+ while ((j < numnow) && (SaveSetWindow(pTmp[j]) != (void *) pWin))
j++;
}
if (mode == SetModeInsert) {
@@ -362,7 +362,7 @@ NoopDDA(void)
typedef struct _BlockHandler {
BlockHandlerProcPtr BlockHandler;
WakeupHandlerProcPtr WakeupHandler;
- pointer blockData;
+ void *blockData;
Bool deleted;
} BlockHandlerRec, *BlockHandlerPtr;
@@ -378,7 +378,7 @@ static Bool handlerDeleted;
* \param pReadMask nor how it represents the det of descriptors
*/
void
-BlockHandler(pointer pTimeout, pointer pReadmask)
+BlockHandler(void *pTimeout, void *pReadmask)
{
int i, j;
@@ -413,7 +413,7 @@ BlockHandler(pointer pTimeout, pointer pReadmask)
* \param pReadmask the resulting descriptor mask
*/
void
-WakeupHandler(int result, pointer pReadmask)
+WakeupHandler(int result, void *pReadmask)
{
int i, j;
@@ -449,7 +449,7 @@ WakeupHandler(int result, pointer pReadmask)
Bool
RegisterBlockAndWakeupHandlers(BlockHandlerProcPtr blockHandler,
WakeupHandlerProcPtr wakeupHandler,
- pointer blockData)
+ void *blockData)
{
BlockHandlerPtr new;
@@ -472,7 +472,7 @@ RegisterBlockAndWakeupHandlers(BlockHandlerProcPtr blockHandler,
void
RemoveBlockAndWakeupHandlers(BlockHandlerProcPtr blockHandler,
WakeupHandlerProcPtr wakeupHandler,
- pointer blockData)
+ void *blockData)
{
int i;
@@ -557,8 +557,8 @@ ProcessWorkQueueZombies(void)
Bool
QueueWorkProc(Bool (*function)
- (ClientPtr /* pClient */ , pointer /* closure */ ),
- ClientPtr client, pointer closure)
+ (ClientPtr /* pClient */ , void */* closure */ ),
+ ClientPtr client, void *closure)
{
WorkQueuePtr q;
@@ -586,13 +586,13 @@ typedef struct _SleepQueue {
struct _SleepQueue *next;
ClientPtr client;
ClientSleepProcPtr function;
- pointer closure;
+ void *closure;
} SleepQueueRec, *SleepQueuePtr;
static SleepQueuePtr sleepQueue = NULL;
Bool
-ClientSleep(ClientPtr client, ClientSleepProcPtr function, pointer closure)
+ClientSleep(ClientPtr client, ClientSleepProcPtr function, void *closure)
{
SleepQueuePtr q;
@@ -666,7 +666,7 @@ static int numCallbackListsToCleanup = 0;
static CallbackListPtr **listsToCleanup = NULL;
static Bool
-_AddCallback(CallbackListPtr *pcbl, CallbackProcPtr callback, pointer data)
+_AddCallback(CallbackListPtr *pcbl, CallbackProcPtr callback, void *data)
{
CallbackPtr cbr;
@@ -682,7 +682,7 @@ _AddCallback(CallbackListPtr *pcbl, CallbackProcPtr callback, pointer data)
}
static Bool
-_DeleteCallback(CallbackListPtr *pcbl, CallbackProcPtr callback, pointer data)
+_DeleteCallback(CallbackListPtr *pcbl, CallbackProcPtr callback, void *data)
{
CallbackListPtr cbl = *pcbl;
CallbackPtr cbr, pcbr;
@@ -709,7 +709,7 @@ _DeleteCallback(CallbackListPtr *pcbl, CallbackProcPtr callback, pointer data)
}
void
-_CallCallbacks(CallbackListPtr *pcbl, pointer call_data)
+_CallCallbacks(CallbackListPtr *pcbl, void *call_data)
{
CallbackListPtr cbl = *pcbl;
CallbackPtr cbr, pcbr;
@@ -821,7 +821,7 @@ CreateCallbackList(CallbackListPtr *pcbl)
/* ===== Public Procedures ===== */
Bool
-AddCallback(CallbackListPtr *pcbl, CallbackProcPtr callback, pointer data)
+AddCallback(CallbackListPtr *pcbl, CallbackProcPtr callback, void *data)
{
if (!pcbl)
return FALSE;
@@ -833,7 +833,7 @@ AddCallback(CallbackListPtr *pcbl, CallbackProcPtr callback, pointer data)
}
Bool
-DeleteCallback(CallbackListPtr *pcbl, CallbackProcPtr callback, pointer data)
+DeleteCallback(CallbackListPtr *pcbl, CallbackProcPtr callback, void *data)
{
if (!pcbl || !*pcbl)
return FALSE;
diff --git a/dix/events.c b/dix/events.c
index e198112eb..ddbd4d281 100644
--- a/dix/events.c
+++ b/dix/events.c
@@ -580,7 +580,7 @@ XineramaSetWindowPntrs(DeviceIntPtr pDev, WindowPtr pWin)
PanoramiXRes *win;
int rc, i;
- rc = dixLookupResourceByType((pointer *) &win, pWin->drawable.id,
+ rc = dixLookupResourceByType((void **) &win, pWin->drawable.id,
XRT_WINDOW, serverClient, DixReadAccess);
if (rc != Success)
return FALSE;
@@ -1162,7 +1162,7 @@ EnqueueEvent(InternalEvent *ev, DeviceIntPtr device)
eventinfo.event = ev;
eventinfo.device = device;
- CallCallbacks(&DeviceEventCallback, (pointer) &eventinfo);
+ CallCallbacks(&DeviceEventCallback, (void *) &eventinfo);
}
if (event->type == ET_Motion) {
@@ -4417,7 +4417,7 @@ RecalculateDeliverableEvents(WindowPtr pWin)
* \param value must conform to DeleteType
*/
int
-OtherClientGone(pointer value, XID id)
+OtherClientGone(void *value, XID id)
{
OtherClientsPtr other, prev;
WindowPtr pWin = (WindowPtr) value;
@@ -4498,7 +4498,7 @@ EventSelectForWindow(WindowPtr pWin, ClientPtr client, Mask mask)
others->resource = FakeClientID(client->index);
others->next = pWin->optional->otherClients;
pWin->optional->otherClients = others;
- if (!AddResource(others->resource, RT_OTHERCLIENT, (pointer) pWin))
+ if (!AddResource(others->resource, RT_OTHERCLIENT, (void *) pWin))
return BadAlloc;
}
maskSet:
@@ -4985,7 +4985,7 @@ ProcChangeActivePointerGrab(ClientPtr client)
if (stuff->cursor == None)
newCursor = NullCursor;
else {
- int rc = dixLookupResourceByType((pointer *) &newCursor, stuff->cursor,
+ int rc = dixLookupResourceByType((void **) &newCursor, stuff->cursor,
RT_CURSOR, client, DixUseAccess);
if (rc != Success) {
@@ -5102,7 +5102,7 @@ GrabDevice(ClientPtr client, DeviceIntPtr dev,
if (curs == None)
cursor = NullCursor;
else {
- rc = dixLookupResourceByType((pointer *) &cursor, curs, RT_CURSOR,
+ rc = dixLookupResourceByType((void **) &cursor, curs, RT_CURSOR,
client, DixUseAccess);
if (rc != Success) {
client->errorValue = curs;
@@ -5628,7 +5628,7 @@ ProcGrabButton(ClientPtr client)
if (stuff->cursor == None)
cursor = NullCursor;
else {
- rc = dixLookupResourceByType((pointer *) &cursor, stuff->cursor,
+ rc = dixLookupResourceByType((void **) &cursor, stuff->cursor,
RT_CURSOR, client, DixUseAccess);
if (rc != Success) {
client->errorValue = stuff->cursor;
@@ -5882,7 +5882,7 @@ ProcRecolorCursor(ClientPtr client)
REQUEST(xRecolorCursorReq);
REQUEST_SIZE_MATCH(xRecolorCursorReq);
- rc = dixLookupResourceByType((pointer *) &pCursor, stuff->cursor, RT_CURSOR,
+ rc = dixLookupResourceByType((void **) &pCursor, stuff->cursor, RT_CURSOR,
client, DixWriteAccess);
if (rc != Success) {
client->errorValue = stuff->cursor;
@@ -5983,7 +5983,7 @@ WriteEventsToClient(ClientPtr pClient, int count, xEvent *events)
eventinfo.client = pClient;
eventinfo.events = events;
eventinfo.count = count;
- CallCallbacks(&EventCallback, (pointer) &eventinfo);
+ CallCallbacks(&EventCallback, (void *) &eventinfo);
}
#ifdef XSERVER_DTRACE
if (XSERVER_SEND_EVENT_ENABLED()) {
diff --git a/dix/gc.c b/dix/gc.c
index f46e0ddc4..efe6d6090 100644
--- a/dix/gc.c
+++ b/dix/gc.c
@@ -339,7 +339,7 @@ ChangeGC(ClientPtr client, GC * pGC, BITS32 mask, ChangeGCValPtr pUnion)
pPixmap->refcnt++;
}
(*pGC->funcs->ChangeClip) (pGC, pPixmap ? CT_PIXMAP : CT_NONE,
- (pointer) pPixmap, 0);
+ (void *) pPixmap, 0);
break;
case GCDashOffset:
NEXTVAL(INT16, pGC->dashOffset);
@@ -494,7 +494,7 @@ NewGCObject(ScreenPtr pScreen, int depth)
pGC->clipOrg.x = 0;
pGC->clipOrg.y = 0;
pGC->clientClipType = CT_NONE;
- pGC->clientClip = (pointer) NULL;
+ pGC->clientClip = (void *) NULL;
pGC->numInDashList = 2;
pGC->dash = DefaultDash;
pGC->dashOffset = 0;
@@ -764,7 +764,7 @@ CopyGC(GC * pgcSrc, GC * pgcDst, BITS32 mask)
* \param value must conform to DeleteType
*/
int
-FreeGC(pointer value, XID gid)
+FreeGC(void *value, XID gid)
{
GCPtr pGC = (GCPtr) value;
@@ -1023,7 +1023,7 @@ SetClipRects(GCPtr pGC, int xOrigin, int yOrigin, int nrects,
if (size)
memmove((char *) prectsNew, (char *) prects, size);
- (*pGC->funcs->ChangeClip) (pGC, newct, (pointer) prectsNew, nrects);
+ (*pGC->funcs->ChangeClip) (pGC, newct, (void *) prectsNew, nrects);
if (pGC->funcs->ChangeGC)
(*pGC->funcs->ChangeGC) (pGC,
GCClipXOrigin | GCClipYOrigin | GCClipMask);
diff --git a/dix/glyphcurs.c b/dix/glyphcurs.c
index 9004cb152..54040253c 100644
--- a/dix/glyphcurs.c
+++ b/dix/glyphcurs.c
@@ -114,7 +114,7 @@ ServerBitsFromGlyph(FontPtr pfont, unsigned ch, CursorMetricPtr cm,
/* fill the pixmap with 0 */
gcval[0].val = GXcopy;
gcval[1].val = 0;
- gcval[2].ptr = (pointer) pfont;
+ gcval[2].ptr = (void *) pfont;
ChangeGC(NullClient, pGC, GCFunction | GCForeground | GCFont, gcval);
ValidateGC((DrawablePtr) ppix, pGC);
(*pGC->ops->PolyFillRect) ((DrawablePtr) ppix, pGC, 1, &rect);
diff --git a/dix/grabs.c b/dix/grabs.c
index a03897af4..5fd68202a 100644
--- a/dix/grabs.c
+++ b/dix/grabs.c
@@ -317,7 +317,7 @@ CopyGrab(GrabPtr dst, const GrabPtr src)
}
int
-DeletePassiveGrab(pointer value, XID id)
+DeletePassiveGrab(void *value, XID id)
{
GrabPtr g, prev;
GrabPtr pGrab = (GrabPtr) value;
@@ -564,7 +564,7 @@ AddPassiveGrabToList(ClientPtr client, GrabPtr pGrab)
pGrab->next = pGrab->window->optional->passiveGrabs;
pGrab->window->optional->passiveGrabs = pGrab;
- if (AddResource(pGrab->resource, RT_PASSIVEGRAB, (pointer) pGrab))
+ if (AddResource(pGrab->resource, RT_PASSIVEGRAB, (void *) pGrab))
return Success;
return BadAlloc;
}
@@ -662,7 +662,7 @@ DeletePassiveGrabFromList(GrabPtr pMinuendGrab)
ok = FALSE;
}
else if (!AddResource(pNewGrab->resource, RT_PASSIVEGRAB,
- (pointer) pNewGrab))
+ (void *) pNewGrab))
ok = FALSE;
else
adds[nadds++] = pNewGrab;
diff --git a/dix/main.c b/dix/main.c
index 05dcbeddd..fcc1ad30a 100644
--- a/dix/main.c
+++ b/dix/main.c
@@ -168,7 +168,7 @@ dix_main(int argc, char *argv[], char *envp[])
serverClient = calloc(sizeof(ClientRec), 1);
if (!serverClient)
FatalError("couldn't create server client");
- InitClient(serverClient, 0, (pointer) NULL);
+ InitClient(serverClient, 0, (void *) NULL);
}
else
ResetWellKnownSockets();
diff --git a/dix/pixmap.c b/dix/pixmap.c
index d5dc3831b..4b880af58 100644
--- a/dix/pixmap.c
+++ b/dix/pixmap.c
@@ -49,7 +49,7 @@ from The Open Group.
/* callable by ddx */
PixmapPtr
GetScratchPixmapHeader(ScreenPtr pScreen, int width, int height, int depth,
- int bitsPerPixel, int devKind, pointer pPixData)
+ int bitsPerPixel, int devKind, void *pPixData)
{
PixmapPtr pPixmap = pScreen->pScratchPixmap;
diff --git a/dix/privates.c b/dix/privates.c
index 41b1a7678..e03b2255b 100644
--- a/dix/privates.c
+++ b/dix/privates.c
@@ -259,7 +259,7 @@ fixupDefaultColormaps(FixupFunc fixup, unsigned bytes)
for (s = 0; s < screenInfo.numScreens; s++) {
ColormapPtr cmap;
- dixLookupResourceByType((pointer *) &cmap,
+ dixLookupResourceByType((void **) &cmap,
screenInfo.screens[s]->defColormap, RT_COLORMAP,
serverClient, DixCreateAccess);
if (cmap &&
@@ -348,7 +348,7 @@ dixRegisterPrivateKey(DevPrivateKey key, DevPrivateType type, unsigned size)
if (size == 0)
bytes = sizeof(void *);
- /* align to void * size */
+ /* align to pointer size */
bytes = (bytes + sizeof(void *) - 1) & ~(sizeof(void *) - 1);
/* Update offsets for all affected keys */
@@ -697,7 +697,7 @@ _dixAllocateScreenObjectWithPrivates(ScreenPtr pScreen,
privates_size = pScreen->screenSpecificPrivates[type].offset;
else
privates_size = global_keys[type].offset;
- /* round up so that void * is aligned */
+ /* round up so that pointer is aligned */
baseSize = (baseSize + sizeof(void *) - 1) & ~(sizeof(void *) - 1);
totalSize = baseSize + privates_size;
object = malloc(totalSize);
diff --git a/dix/property.c b/dix/property.c
index dec409024..9f51cd0ff 100644
--- a/dix/property.c
+++ b/dix/property.c
@@ -242,7 +242,7 @@ ProcChangeProperty(ClientPtr client)
int
dixChangeWindowProperty(ClientPtr pClient, WindowPtr pWin, Atom property,
Atom type, int format, int mode, unsigned long len,
- pointer value, Bool sendevent)
+ void *value, Bool sendevent)
{
PropertyPtr pProp;
PropertyRec savedProp;
@@ -356,7 +356,7 @@ dixChangeWindowProperty(ClientPtr pClient, WindowPtr pWin, Atom property,
int
ChangeWindowProperty(WindowPtr pWin, Atom property, Atom type, int format,
- int mode, unsigned long len, pointer value, Bool sendevent)
+ int mode, unsigned long len, void *value, Bool sendevent)
{
return dixChangeWindowProperty(serverClient, pWin, property, type, format,
mode, len, value, sendevent);
diff --git a/dix/resource.c b/dix/resource.c
index 2aafa343c..623d862d6 100644
--- a/dix/resource.c
+++ b/dix/resource.c
@@ -165,7 +165,7 @@ typedef struct _Resource {
struct _Resource *next;
XID id;
RESTYPE type;
- pointer value;
+ void *value;
} ResourceRec, *ResourcePtr;
typedef struct _ClientResource {
@@ -203,7 +203,7 @@ struct ResourceType {
* resource can't be determined.
*/
static void
-GetDefaultBytes(pointer value, XID id, ResourceSizePtr size)
+GetDefaultBytes(void *value, XID id, ResourceSizePtr size)
{
size->resourceSize = 0;
size->pixmapRefSize = 0;
@@ -224,7 +224,7 @@ GetDefaultBytes(pointer value, XID id, ResourceSizePtr size)
* @param[out] cdata Pointer to opaque data.
*/
static void
-DefaultFindSubRes(pointer value, FindAllRes func, pointer cdata)
+DefaultFindSubRes(void *value, FindAllRes func, void *cdata)
{
/* do nothing */
}
@@ -268,7 +268,7 @@ GetDrawableBytes(DrawablePtr drawable)
* pixmap reference.
*/
static void
-GetPixmapBytes(pointer value, XID id, ResourceSizePtr size)
+GetPixmapBytes(void *value, XID id, ResourceSizePtr size)
{
PixmapPtr pixmap = value;
@@ -297,7 +297,7 @@ GetPixmapBytes(pointer value, XID id, ResourceSizePtr size)
* pixmap references of a window.
*/
static void
-GetWindowBytes(pointer value, XID id, ResourceSizePtr size)
+GetWindowBytes(void *value, XID id, ResourceSizePtr size)
{
SizeType pixmapSizeFunc = GetResourceTypeSizeFunc(RT_PIXMAP);
ResourceSizeRec pixmapSize = { 0, 0, 0 };
@@ -339,7 +339,7 @@ GetWindowBytes(pointer value, XID id, ResourceSizePtr size)
* @param[out] cdata Pointer to opaque data
*/
static void
-FindWindowSubRes(pointer value, FindAllRes func, pointer cdata)
+FindWindowSubRes(void *value, FindAllRes func, void *cdata)
{
WindowPtr window = value;
@@ -370,7 +370,7 @@ FindWindowSubRes(pointer value, FindAllRes func, pointer cdata)
* pixmap references of a graphics context.
*/
static void
-GetGcBytes(pointer value, XID id, ResourceSizePtr size)
+GetGcBytes(void *value, XID id, ResourceSizePtr size)
{
SizeType pixmapSizeFunc = GetResourceTypeSizeFunc(RT_PIXMAP);
ResourceSizeRec pixmapSize = { 0, 0, 0 };
@@ -411,7 +411,7 @@ GetGcBytes(pointer value, XID id, ResourceSizePtr size)
* @param[out] cdata Pointer to opaque data
*/
static void
-FindGCSubRes(pointer value, FindAllRes func, pointer cdata)
+FindGCSubRes(void *value, FindAllRes func, void *cdata)
{
GCPtr gc = value;
@@ -743,7 +743,7 @@ GetXIDList(ClientPtr pClient, unsigned count, XID *pids)
unsigned int found = 0;
XID rc, id = pClient->clientAsMask;
XID maxid;
- pointer val;
+ void *val;
maxid = id | RESOURCE_ID_MASK;
while ((found < count) && (id <= maxid)) {
@@ -787,7 +787,7 @@ FakeClientID(int client)
}
Bool
-AddResource(XID id, RESTYPE type, pointer value)
+AddResource(XID id, RESTYPE type, void *value)
{
int client;
ClientResourceRec *rrec;
@@ -948,7 +948,7 @@ FreeResourceByType(XID id, RESTYPE type, Bool skipFree)
*/
Bool
-ChangeResourceValue(XID id, RESTYPE rtype, pointer value)
+ChangeResourceValue(XID id, RESTYPE rtype, void *value)
{
int cid;
ResourcePtr res;
@@ -973,7 +973,7 @@ ChangeResourceValue(XID id, RESTYPE rtype, pointer value)
void
FindClientResourcesByType(ClientPtr client,
- RESTYPE type, FindResType func, pointer cdata)
+ RESTYPE type, FindResType func, void *cdata)
{
ResourcePtr *resources;
ResourcePtr this, next;
@@ -998,17 +998,17 @@ FindClientResourcesByType(ClientPtr client,
}
}
-void FindSubResources(pointer resource,
+void FindSubResources(void *resource,
RESTYPE type,
FindAllRes func,
- pointer cdata)
+ void *cdata)
{
struct ResourceType rtype = resourceTypes[type & TypeMask];
rtype.findSubResFunc(resource, func, cdata);
}
void
-FindAllClientResources(ClientPtr client, FindAllRes func, pointer cdata)
+FindAllClientResources(ClientPtr client, FindAllRes func, void *cdata)
{
ResourcePtr *resources;
ResourcePtr this, next;
@@ -1031,14 +1031,14 @@ FindAllClientResources(ClientPtr client, FindAllRes func, pointer cdata)
}
}
-pointer
+void *
LookupClientResourceComplex(ClientPtr client,
RESTYPE type,
- FindComplexResType func, pointer cdata)
+ FindComplexResType func, void *cdata)
{
ResourcePtr *resources;
ResourcePtr this, next;
- pointer value;
+ void *value;
int i;
if (!client)
@@ -1158,7 +1158,7 @@ FreeAllResources(void)
Bool
LegalNewID(XID id, ClientPtr client)
{
- pointer val;
+ void *val;
int rc;
#ifdef PANORAMIX
@@ -1181,7 +1181,7 @@ LegalNewID(XID id, ClientPtr client)
}
int
-dixLookupResourceByType(pointer *result, XID id, RESTYPE rtype,
+dixLookupResourceByType(void **result, XID id, RESTYPE rtype,
ClientPtr client, Mask mode)
{
int cid = CLIENT_ID(id);
@@ -1216,7 +1216,7 @@ dixLookupResourceByType(pointer *result, XID id, RESTYPE rtype,
}
int
-dixLookupResourceByClass(pointer *result, XID id, RESTYPE rclass,
+dixLookupResourceByClass(void **result, XID id, RESTYPE rclass,
ClientPtr client, Mask mode)
{
int cid = CLIENT_ID(id);
diff --git a/dix/touch.c b/dix/touch.c
index a7ea213ba..1eeed78bd 100644
--- a/dix/touch.c
+++ b/dix/touch.c
@@ -75,7 +75,7 @@ static unsigned char resize_waiting[(MAXDEVICES + 7) / 8];
* anyway and re-executing this won't help.
*/
static Bool
-TouchResizeQueue(ClientPtr client, pointer closure)
+TouchResizeQueue(ClientPtr client, void *closure)
{
int i;
diff --git a/dix/window.c b/dix/window.c
index fad57fab0..f4acdc889 100644
--- a/dix/window.c
+++ b/dix/window.c
@@ -305,7 +305,7 @@ PrintWindowTree(void)
}
int
-TraverseTree(WindowPtr pWin, VisitWindowProcPtr func, pointer data)
+TraverseTree(WindowPtr pWin, VisitWindowProcPtr func, void *data)
{
int result;
WindowPtr pChild;
@@ -338,7 +338,7 @@ TraverseTree(WindowPtr pWin, VisitWindowProcPtr func, pointer data)
*****/
int
-WalkTree(ScreenPtr pScreen, VisitWindowProcPtr func, pointer data)
+WalkTree(ScreenPtr pScreen, VisitWindowProcPtr func, void *data)
{
return (TraverseTree(pScreen->root, func, data));
}
@@ -363,7 +363,7 @@ SetWindowToDefaults(WindowPtr pWin)
pWin->backingStore = NotUseful;
pWin->DIXsaveUnder = FALSE;
- pWin->backStorage = (pointer) NULL;
+ pWin->backStorage = (void *) NULL;
pWin->mapped = FALSE; /* off */
pWin->realized = FALSE; /* off */
@@ -524,7 +524,7 @@ CreateRootWindow(ScreenPtr pScreen)
RT_WINDOW, pWin, RT_NONE, NULL, DixCreateAccess))
return FALSE;
- if (!AddResource(pWin->drawable.id, RT_WINDOW, (pointer) pWin))
+ if (!AddResource(pWin->drawable.id, RT_WINDOW, (void *) pWin))
return FALSE;
if (disableBackingStore)
@@ -959,7 +959,7 @@ CrushTree(WindowPtr pWin)
*****/
int
-DeleteWindow(pointer value, XID wid)
+DeleteWindow(void *value, XID wid)
{
WindowPtr pParent;
WindowPtr pWin = (WindowPtr) value;
@@ -1107,7 +1107,7 @@ ChangeWindowAttributes(WindowPtr pWin, Mask vmask, XID *vlist, ClientPtr client)
* incremented. */
}
else {
- rc = dixLookupResourceByType((pointer *) &pPixmap, pixID,
+ rc = dixLookupResourceByType((void **) &pPixmap, pixID,
RT_PIXMAP, client, DixReadAccess);
if (rc == Success) {
if ((pPixmap->drawable.depth != pWin->drawable.depth) ||
@@ -1161,7 +1161,7 @@ ChangeWindowAttributes(WindowPtr pWin, Mask vmask, XID *vlist, ClientPtr client)
pixID = pWin->parent->border.pixmap->drawable.id;
}
}
- rc = dixLookupResourceByType((pointer *) &pPixmap, pixID, RT_PIXMAP,
+ rc = dixLookupResourceByType((void **) &pPixmap, pixID, RT_PIXMAP,
client, DixReadAccess);
if (rc == Success) {
if ((pPixmap->drawable.depth != pWin->drawable.depth) ||
@@ -1308,7 +1308,7 @@ ChangeWindowAttributes(WindowPtr pWin, Mask vmask, XID *vlist, ClientPtr client)
error = BadMatch;
goto PatchUp;
}
- rc = dixLookupResourceByType((pointer *) &pCmap, cmap, RT_COLORMAP,
+ rc = dixLookupResourceByType((void **) &pCmap, cmap, RT_COLORMAP,
client, DixUseAccess);
if (rc != Success) {
error = rc;
@@ -1378,7 +1378,7 @@ ChangeWindowAttributes(WindowPtr pWin, Mask vmask, XID *vlist, ClientPtr client)
pCursor = (CursorPtr) None;
}
else {
- rc = dixLookupResourceByType((pointer *) &pCursor, cursorID,
+ rc = dixLookupResourceByType((void **) &pCursor, cursorID,
RT_CURSOR, client, DixUseAccess);
if (rc != Success) {
error = rc;
@@ -2377,7 +2377,7 @@ CirculateWindow(WindowPtr pParent, int direction, ClientPtr client)
}
static int
-CompareWIDs(WindowPtr pWin, pointer value)
+CompareWIDs(WindowPtr pWin, void *value)
{ /* must conform to VisitWindowProcPtr */
Window *wid = (Window *) value;
@@ -2402,7 +2402,7 @@ ReparentWindow(WindowPtr pWin, WindowPtr pParent,
ScreenPtr pScreen;
pScreen = pWin->drawable.pScreen;
- if (TraverseTree(pWin, CompareWIDs, (pointer) &pParent->drawable.id) ==
+ if (TraverseTree(pWin, CompareWIDs, (void *) &pParent->drawable.id) ==
WT_STOPWALKING)
return BadMatch;
if (!MakeWindowOptional(pWin))
@@ -2688,7 +2688,7 @@ UnrealizeTree(WindowPtr pWin, Bool fromConfigure)
#ifdef PANORAMIX
if (!noPanoramiXExtension && !pChild->drawable.pScreen->myNum) {
PanoramiXRes *win;
- int rc = dixLookupResourceByType((pointer *) &win,
+ int rc = dixLookupResourceByType((void **) &win,
pChild->drawable.id,
XRT_WINDOW,
serverClient, DixWriteAccess);
@@ -3167,7 +3167,7 @@ TileScreenSaver(ScreenPtr pScreen, int kind)
&cursor, serverClient, (XID) 0);
if (cursor) {
cursorID = FakeClientID(0);
- if (AddResource(cursorID, RT_CURSOR, (pointer) cursor)) {
+ if (AddResource(cursorID, RT_CURSOR, (void *) cursor)) {
attributes[attri] = cursorID;
mask |= CWCursor;
}
@@ -3196,7 +3196,7 @@ TileScreenSaver(ScreenPtr pScreen, int kind)
return FALSE;
if (!AddResource(pWin->drawable.id, RT_WINDOW,
- (pointer) pScreen->screensaver.pWindow))
+ (void *) pScreen->screensaver.pWindow))
return FALSE;
if (mask & CWBackPixmap) {