diff options
author | marha <marha@users.sourceforge.net> | 2014-01-15 21:37:10 +0100 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2014-01-15 21:37:10 +0100 |
commit | b7f01cb1f6cfd1ec301f650a073436c91ec614aa (patch) | |
tree | 1dbf32344313ad7e5884e6686251cad398a231fa /xorg-server/dix | |
parent | 7b4b94b4449aec056c4c92f5cacc2f89a292a80e (diff) | |
parent | 1b0fcca503ae9cf2d462b60770f96c794dfbb27a (diff) | |
download | vcxsrv-b7f01cb1f6cfd1ec301f650a073436c91ec614aa.tar.gz vcxsrv-b7f01cb1f6cfd1ec301f650a073436c91ec614aa.tar.bz2 vcxsrv-b7f01cb1f6cfd1ec301f650a073436c91ec614aa.zip |
Merge remote-tracking branch 'origin/released'
* origin/released:
mesa xkeyboard-config xserver git update 15 jan 2014
randrproto libfontenc mesa xserver git update 10 Jan 2014
randsrproto fontconfig libX11 git update 6 Jan 2014
Conflicts:
mesalib/src/glsl/builtin_functions.cpp
mesalib/src/glsl/ir_builder.h
xorg-server/Xext/xres.c
xorg-server/dix/dispatch.c
xorg-server/dix/dixfonts.c
xorg-server/hw/xwin/wingc.c
xorg-server/hw/xwin/winwindowswm.c
xorg-server/include/gc.h
xorg-server/os/access.c
Diffstat (limited to 'xorg-server/dix')
-rw-r--r-- | xorg-server/dix/colormap.c | 26 | ||||
-rw-r--r-- | xorg-server/dix/cursor.c | 10 | ||||
-rw-r--r-- | xorg-server/dix/devices.c | 43 | ||||
-rwxr-xr-x[-rw-r--r--] | xorg-server/dix/dispatch.c | 82 | ||||
-rwxr-xr-x[-rw-r--r--] | xorg-server/dix/dixfonts.c | 81 | ||||
-rw-r--r-- | xorg-server/dix/dixutils.c | 41 | ||||
-rw-r--r-- | xorg-server/dix/events.c | 23 | ||||
-rw-r--r-- | xorg-server/dix/extension.c | 14 | ||||
-rw-r--r-- | xorg-server/dix/gc.c | 8 | ||||
-rw-r--r-- | xorg-server/dix/getevents.c | 11 | ||||
-rw-r--r-- | xorg-server/dix/globals.c | 8 | ||||
-rw-r--r-- | xorg-server/dix/glyphcurs.c | 2 | ||||
-rw-r--r-- | xorg-server/dix/grabs.c | 6 | ||||
-rw-r--r-- | xorg-server/dix/inpututils.c | 16 | ||||
-rw-r--r-- | xorg-server/dix/main.c | 2 | ||||
-rw-r--r-- | xorg-server/dix/pixmap.c | 2 | ||||
-rw-r--r-- | xorg-server/dix/privates.c | 6 | ||||
-rw-r--r-- | xorg-server/dix/property.c | 4 | ||||
-rw-r--r-- | xorg-server/dix/resource.c | 42 | ||||
-rw-r--r-- | xorg-server/dix/touch.c | 2 | ||||
-rw-r--r-- | xorg-server/dix/window.c | 34 |
21 files changed, 236 insertions, 227 deletions
diff --git a/xorg-server/dix/colormap.c b/xorg-server/dix/colormap.c index 9feb3e159..4107df98d 100644 --- a/xorg-server/dix/colormap.c +++ b/xorg-server/dix/colormap.c @@ -371,7 +371,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; /* @@ -401,7 +401,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; @@ -409,7 +409,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 @@ -478,7 +478,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; @@ -503,7 +503,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; @@ -849,7 +849,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); @@ -867,7 +867,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); @@ -921,7 +921,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; @@ -1467,9 +1467,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; @@ -1536,7 +1536,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 @@ -1618,7 +1618,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 @@ -2496,7 +2496,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/xorg-server/dix/cursor.c b/xorg-server/dix/cursor.c index 8cc54bd1f..56c560640 100644 --- a/xorg-server/dix/cursor.c +++ b/xorg-server/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/xorg-server/dix/devices.c b/xorg-server/dix/devices.c index 1f5193c1b..1d6c06d41 100644 --- a/xorg-server/dix/devices.c +++ b/xorg-server/dix/devices.c @@ -387,7 +387,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 */ @@ -587,7 +587,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; @@ -751,7 +751,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; @@ -819,7 +819,7 @@ FreeDeviceClass(int type, pointer *class) } static void -FreeFeedbackClass(int type, pointer *class) +FreeFeedbackClass(int type, void **class) { if (!(*class)) return; @@ -907,19 +907,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); + 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, (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); + 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); } @@ -956,7 +956,7 @@ CloseDevice(DeviceIntPtr dev) while (dev->xkb_interest) XkbRemoveResourceClient((DevicePtr) dev, dev->xkb_interest->resource); - free(dev->name); + free((void *) dev->name); classes = (ClassesPtr) &dev->key; FreeAllDeviceClasses(classes); @@ -2736,6 +2736,7 @@ AllocDevicePair(ClientPtr client, const char *name, { DeviceIntPtr pointer; DeviceIntPtr keyboard; + char *dev_name; *ptr = *keybd = NULL; @@ -2746,12 +2747,12 @@ AllocDevicePair(ClientPtr client, const char *name, if (!pointer) return BadAlloc; - if (asprintf(&pointer->name, "%s pointer", name) == -1) { - pointer->name = NULL; + if (asprintf(&dev_name, "%s pointer", name) == -1) { RemoveDevice(pointer, FALSE); return BadAlloc; } + pointer->name = dev_name; pointer->public.processInputProc = ProcessOtherEvent; pointer->public.realInputProc = ProcessOtherEvent; @@ -2772,13 +2773,13 @@ AllocDevicePair(ClientPtr client, const char *name, return BadAlloc; } - if (asprintf(&keyboard->name, "%s keyboard", name) == -1) { - keyboard->name = NULL; + if (asprintf(&dev_name, "%s keyboard", name) == -1) { RemoveDevice(keyboard, FALSE); RemoveDevice(pointer, FALSE); return BadAlloc; } + keyboard->name = dev_name; keyboard->public.processInputProc = ProcessOtherEvent; keyboard->public.realInputProc = ProcessOtherEvent; diff --git a/xorg-server/dix/dispatch.c b/xorg-server/dix/dispatch.c index a034a7bc5..dbaaee907 100644..100755 --- a/xorg-server/dix/dispatch.c +++ b/xorg-server/dix/dispatch.c @@ -504,7 +504,7 @@ Dispatch(void) }
static int VendorRelease = VENDOR_RELEASE;
-static char *VendorString = VENDOR_NAME;
+static const char *VendorString = VENDOR_NAME;
void
SetVendorRelease(int release)
@@ -513,7 +513,7 @@ SetVendorRelease(int release) }
void
-SetVendorString(char *string)
+SetVendorString(const char *string)
{
VendorString = string;
}
@@ -686,7 +686,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;
}
@@ -1116,7 +1116,7 @@ ProcGrabServer(ClientPtr client) grabinfo.client = client;
grabinfo.grabstate = SERVER_GRABBED;
- CallCallbacks(&ServerGrabCallback, (pointer) &grabinfo);
+ CallCallbacks(&ServerGrabCallback, (void *) &grabinfo);
}
return Success;
@@ -1143,7 +1143,7 @@ UngrabServer(ClientPtr client) grabinfo.client = client;
grabinfo.grabstate = SERVER_UNGRABBED;
- CallCallbacks(&ServerGrabCallback, (pointer) &grabinfo);
+ CallCallbacks(&ServerGrabCallback, (void *) &grabinfo);
}
}
@@ -1254,7 +1254,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);
@@ -1381,7 +1381,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;
@@ -1448,7 +1448,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;
@@ -1463,7 +1463,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);
@@ -1500,7 +1500,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;
}
@@ -2167,7 +2167,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,
@@ -2194,7 +2194,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,
@@ -2354,7 +2354,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 */
@@ -2380,7 +2380,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)
@@ -2398,7 +2398,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;
@@ -2427,7 +2427,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;
@@ -2495,7 +2495,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;
@@ -2531,7 +2531,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;
@@ -2576,7 +2576,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;
@@ -2636,7 +2636,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;
@@ -2698,7 +2698,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;
@@ -2724,7 +2724,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;
@@ -2750,7 +2750,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;
@@ -2778,7 +2778,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;
@@ -2825,7 +2825,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;
@@ -2876,7 +2876,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;
@@ -2888,7 +2888,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;
@@ -2920,7 +2920,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;
@@ -2932,7 +2932,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;
@@ -2945,7 +2945,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;
}
@@ -2975,7 +2975,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;
}
@@ -2989,7 +2989,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);
@@ -3138,10 +3138,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;
}
@@ -3152,7 +3152,7 @@ ProcListHosts(ClientPtr client) xListHostsReply reply;
int len, nHosts, result;
BOOL enabled;
- pointer pdata;
+ void *pdata;
/* REQUEST(xListHostsReq); */
@@ -3392,7 +3392,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 */
@@ -3422,7 +3422,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);
@@ -3457,7 +3457,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;
@@ -3479,7 +3479,7 @@ InitClient(ClientPtr client, int i, pointer ospriv) *************************/
ClientPtr
-NextAvailableClient(pointer ospriv)
+NextAvailableClient(void *ospriv)
{
int i;
ClientPtr client;
@@ -3519,7 +3519,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;
}
@@ -3639,7 +3639,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/xorg-server/dix/dixfonts.c b/xorg-server/dix/dixfonts.c index dd7700860..6260f48b9 100644..100755 --- a/xorg-server/dix/dixfonts.c +++ b/xorg-server/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; @@ -128,7 +128,7 @@ dixGetGlyphs(FontPtr font, unsigned long count, unsigned char *chars, * adding RT_FONT prevents conflict with default cursor font */ Bool -SetDefaultFont(char *defaultfontname) +SetDefaultFont(const char *defaultfontname) { int err; FontPtr pf; @@ -140,7 +140,7 @@ SetDefaultFont(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) last_pf = pf; if (last_pf == (FontPtr) NULL) @@ -199,7 +199,7 @@ RemoveFontWakeup(FontPathElementPtr fpe) } void -FontWakeup(pointer data, int count, pointer LastSelectMask) +FontWakeup(void *data, int count, void *LastSelectMask) { int i; FontPathElementPtr fpe; @@ -226,7 +226,7 @@ FreeFPE(FontPathElementPtr fpe) fpe->refcount--; if (fpe->refcount == 0) { (*fpe_functions[fpe->type].free_fpe) (fpe); - free(fpe->name); + free((void *) fpe->name); free(fpe); } } @@ -272,7 +272,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; @@ -280,7 +280,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 | @@ -293,7 +293,7 @@ doOpenFont(ClientPtr client, OFclosurePtr c) if (err == FontNameAlias && alias) { newlen = strlen(alias); - newname = (char *) realloc(c->fontname, newlen); + newname = (char *) realloc((char *) c->fontname, newlen); if (!newname) { err = AllocError; break; @@ -355,7 +355,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; } @@ -375,7 +375,7 @@ doOpenFont(ClientPtr client, OFclosurePtr c) FreeFPE(c->fpe_list[i]); } free(c->fpe_list); - free(c->fontname); + free((void *) c->fontname); free(c); } return TRUE; @@ -383,7 +383,7 @@ doOpenFont(ClientPtr client, OFclosurePtr c) int OpenFont(ClientPtr client, XID fid, Mask flags, unsigned lenfname, - char *pfontname) + const char *pfontname) { OFclosurePtr c; int i; @@ -412,7 +412,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; @@ -434,7 +434,7 @@ OpenFont(ClientPtr client, XID fid, Mask flags, unsigned lenfname, */ c->fpe_list = malloc(sizeof(FontPathElementPtr) * num_fpes); if (!c->fpe_list) { - free(c->fontname); + free((void *) c->fontname); free(c); return BadAlloc; } @@ -462,7 +462,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; @@ -584,7 +584,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; @@ -601,7 +601,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); @@ -628,7 +628,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) { @@ -648,7 +648,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)) @@ -700,7 +700,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; @@ -889,7 +889,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; @@ -1145,12 +1145,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; @@ -1171,7 +1171,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; } } @@ -1192,7 +1192,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) */ @@ -1433,7 +1433,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; } @@ -1447,7 +1447,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; } @@ -1574,7 +1574,7 @@ ImageText(ClientPtr client, DrawablePtr pDraw, GC * pGC, int nChars, /* does the necessary magic to figure out the fpe type */ static int -DetermineFPEType(char *pathname) +DetermineFPEType(const char *pathname) { int i; @@ -1670,21 +1670,23 @@ SetFontPathElements(int npaths, unsigned char *paths, int *bad, Bool persist) } /* if error or can't do it, act like it's a new one */ if (!fpe) { + char *name; fpe = malloc(sizeof(FontPathElementRec)); if (!fpe) { err = BadAlloc; goto bail; } - fpe->name = malloc(len + 1); - if (!fpe->name) { + name = malloc(len + 1); + if (!name) { free(fpe); err = BadAlloc; goto bail; } fpe->refcount = 1; - strncpy(fpe->name, (char *) cp, (int) len); - fpe->name[len] = '\0'; + strncpy(name, (char *) cp, (int) len); + name[len] = '\0'; + fpe->name = name; fpe->name_length = len; fpe->type = DetermineFPEType(fpe->name); if (fpe->type == -1) @@ -1697,7 +1699,7 @@ SetFontPathElements(int npaths, unsigned char *paths, int *bad, Bool persist) ("[dix] Could not init font path element %s, removing from list!\n", fpe->name); } - free(fpe->name); + free((void *) fpe->name); free(fpe); } } @@ -1749,9 +1751,10 @@ SetFontPath(ClientPtr client, int npaths, unsigned char *paths) } int -SetDefaultFontPath(char *path) +SetDefaultFontPath(const char *path) { - char *temp_path, *start, *end; + const char *start, *end; + char *temp_path; unsigned char *cp, *pp, *nump, *newpath; int num = 1, len, err, size = 0, bad; @@ -1853,7 +1856,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); } } @@ -1971,7 +1974,7 @@ FreeFonts(void) FontPtr find_old_font(XID id) { - pointer pFont; + void *pFont; dixLookupResourceByType(&pFont, id, RT_NONE, serverClient, DixReadAccess); return (FontPtr) pFont; @@ -1988,7 +1991,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 @@ -2019,7 +2022,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++; } @@ -2036,7 +2039,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/xorg-server/dix/dixutils.c b/xorg-server/dix/dixutils.c index c250bb1db..5de74c8b4 100644 --- a/xorg-server/dix/dixutils.c +++ b/xorg-server/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; @@ -556,9 +556,8 @@ ProcessWorkQueueZombies(void) } Bool -QueueWorkProc(Bool (*function) - (ClientPtr /* pClient */ , pointer /* closure */ ), - ClientPtr client, pointer closure) +QueueWorkProc(Bool (*function) (ClientPtr pClient, void *closure), + ClientPtr client, void *closure) { WorkQueuePtr q; @@ -586,13 +585,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 +665,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 +681,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 +708,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 +820,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 +832,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/xorg-server/dix/events.c b/xorg-server/dix/events.c index 291eec5ed..3c3febdc5 100644 --- a/xorg-server/dix/events.c +++ b/xorg-server/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; @@ -1165,7 +1165,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) { @@ -2674,6 +2674,9 @@ DeliverOneEvent(InternalEvent *event, DeviceIntPtr dev, enum InputLevel level, case CORE: rc = EventToCore(event, &xE, &count); break; + default: + rc = BadImplementation; + break; } if (rc == Success) { @@ -3832,6 +3835,8 @@ MatchForType(const GrabPtr grab, GrabPtr tmp, enum InputLevel level, match = CORE_MATCH; ignore_device = TRUE; break; + default: + return NO_MATCH; } tmp->grabtype = grabtype; @@ -4416,7 +4421,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 +4503,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 +4990,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 +5107,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; @@ -5627,7 +5632,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; @@ -5880,7 +5885,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; @@ -5981,7 +5986,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/xorg-server/dix/extension.c b/xorg-server/dix/extension.c index bdbbf014c..8240c42d9 100644 --- a/xorg-server/dix/extension.c +++ b/xorg-server/dix/extension.c @@ -96,7 +96,7 @@ AddExtension(const char *name, int NumEvents, int NumErrors, } ext->name = strdup(name); ext->num_aliases = 0; - ext->aliases = (char **) NULL; + ext->aliases = (const char **) NULL; if (!ext->name) { dixFreePrivates(ext->devPrivates, PRIVATE_EXTENSION); free(ext); @@ -106,7 +106,7 @@ AddExtension(const char *name, int NumEvents, int NumErrors, newexts = (ExtensionEntry **) realloc(extensions, (i + 1) * sizeof(ExtensionEntry *)); if (!newexts) { - free(ext->name); + free((void *) ext->name); dixFreePrivates(ext->devPrivates, PRIVATE_EXTENSION); free(ext); return ((ExtensionEntry *) NULL); @@ -147,12 +147,12 @@ Bool AddExtensionAlias(const char *alias, ExtensionEntry * ext) { char *name; - char **aliases; + const char **aliases; if (!ext) return FALSE; - aliases = (char **) realloc(ext->aliases, - (ext->num_aliases + 1) * sizeof(char *)); + aliases = realloc(ext->aliases, + (ext->num_aliases + 1) * sizeof(char *)); if (!aliases) return FALSE; ext->aliases = aliases; @@ -229,9 +229,9 @@ CloseDownExtensions(void) if (extensions[i]->CloseDown) extensions[i]->CloseDown(extensions[i]); NumExtensions = i; - free(extensions[i]->name); + free((void *) extensions[i]->name); for (j = extensions[i]->num_aliases; --j >= 0;) - free(extensions[i]->aliases[j]); + free((void *) extensions[i]->aliases[j]); free(extensions[i]->aliases); dixFreePrivates(extensions[i]->devPrivates, PRIVATE_EXTENSION); free(extensions[i]); diff --git a/xorg-server/dix/gc.c b/xorg-server/dix/gc.c index 57190d11f..1fb577e53 100644 --- a/xorg-server/dix/gc.c +++ b/xorg-server/dix/gc.c @@ -357,7 +357,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); @@ -512,7 +512,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; @@ -782,7 +782,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; @@ -1041,7 +1041,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/xorg-server/dix/getevents.c b/xorg-server/dix/getevents.c index 3b87e17d4..5a0296ba5 100644 --- a/xorg-server/dix/getevents.c +++ b/xorg-server/dix/getevents.c @@ -1398,10 +1398,10 @@ fill_pointer_events(InternalEvent *events, DeviceIntPtr pDev, int type, { int num_events = 1; DeviceEvent *event; - RawDeviceEvent *raw; + RawDeviceEvent *raw = NULL; double screenx = 0.0, screeny = 0.0; /* desktop coordinate system */ double devx = 0.0, devy = 0.0; /* desktop-wide in device coords */ - int sx, sy; /* for POINTER_SCREEN */ + int sx = 0, sy = 0; /* for POINTER_SCREEN */ ValuatorMask mask; ScreenPtr scr; int num_barrier_events = 0; @@ -1453,7 +1453,7 @@ fill_pointer_events(InternalEvent *events, DeviceIntPtr pDev, int type, transformAbsolute(pDev, &mask); clipAbsolute(pDev, &mask); - if ((flags & POINTER_NORAW) == 0) + if ((flags & POINTER_NORAW) == 0 && raw) set_raw_valuators(raw, &mask, raw->valuators.data); } else { @@ -1461,7 +1461,7 @@ fill_pointer_events(InternalEvent *events, DeviceIntPtr pDev, int type, if (flags & POINTER_ACCELERATE) accelPointer(pDev, &mask, ms); - if ((flags & POINTER_NORAW) == 0) + if ((flags & POINTER_NORAW) == 0 && raw) set_raw_valuators(raw, &mask, raw->valuators.data); moveRelative(pDev, flags, &mask); @@ -1528,7 +1528,8 @@ fill_pointer_events(InternalEvent *events, DeviceIntPtr pDev, int type, event_set_root_coordinates(event, screenx - scr->x, screeny - scr->y); if (flags & POINTER_EMULATED) { - raw->flags = XIPointerEmulated; + if (raw) + raw->flags = XIPointerEmulated; event->flags = XIPointerEmulated; } diff --git a/xorg-server/dix/globals.c b/xorg-server/dix/globals.c index ad9145b01..9738e9cdf 100644 --- a/xorg-server/dix/globals.c +++ b/xorg-server/dix/globals.c @@ -112,9 +112,9 @@ int defaultScreenSaverAllowExposures = DEFAULT_SCREEN_SAVER_EXPOSURES; Bool screenSaverSuspended = FALSE; #endif -char *defaultFontPath = COMPILEDDEFAULTFONTPATH; -char *defaultTextFont = COMPILEDDEFAULTFONT; -char *defaultCursorFont = COMPILEDCURSORFONT; +const char *defaultFontPath = COMPILEDDEFAULTFONTPATH; +const char *defaultTextFont = COMPILEDDEFAULTFONT; +const char *defaultCursorFont = COMPILEDCURSORFONT; FontPtr defaultFont; /* not declared in dix.h to avoid including font.h in every compilation of dix code */ CursorPtr rootCursor; @@ -126,7 +126,7 @@ TimeStamp currentTime; int defaultColorVisualClass = -1; int monitorResolution = 0; -char *display; +const char *display; int displayfd; char *ConnectionInfo; diff --git a/xorg-server/dix/glyphcurs.c b/xorg-server/dix/glyphcurs.c index 9004cb152..54040253c 100644 --- a/xorg-server/dix/glyphcurs.c +++ b/xorg-server/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/xorg-server/dix/grabs.c b/xorg-server/dix/grabs.c index a03897af4..5fd68202a 100644 --- a/xorg-server/dix/grabs.c +++ b/xorg-server/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/xorg-server/dix/inpututils.c b/xorg-server/dix/inpututils.c index 3098cdb0b..1ab16d14b 100644 --- a/xorg-server/dix/inpututils.c +++ b/xorg-server/dix/inpututils.c @@ -351,7 +351,7 @@ DuplicateInputAttributes(InputAttributes * attrs) { InputAttributes *new_attr; int ntags = 0; - char **tags, **new_tags; + const char **tags, **new_tags; if (!attrs) return NULL; @@ -403,20 +403,20 @@ DuplicateInputAttributes(InputAttributes * attrs) void FreeInputAttributes(InputAttributes * attrs) { - char **tags; + const char **tags; if (!attrs) return; - free(attrs->product); - free(attrs->vendor); - free(attrs->device); - free(attrs->pnp_id); - free(attrs->usb_id); + free((void *) attrs->product); + free((void *) attrs->vendor); + free((void *) attrs->device); + free((void *) attrs->pnp_id); + free((void *) attrs->usb_id); if ((tags = attrs->tags)) while (*tags) - free(*tags++); + free((void *) *tags++); free(attrs->tags); free(attrs); diff --git a/xorg-server/dix/main.c b/xorg-server/dix/main.c index 374ec2cf7..5f499741c 100644 --- a/xorg-server/dix/main.c +++ b/xorg-server/dix/main.c @@ -212,7 +212,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/xorg-server/dix/pixmap.c b/xorg-server/dix/pixmap.c index d5dc3831b..4b880af58 100644 --- a/xorg-server/dix/pixmap.c +++ b/xorg-server/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/xorg-server/dix/privates.c b/xorg-server/dix/privates.c index f9b45d816..ffa07fede 100644 --- a/xorg-server/dix/privates.c +++ b/xorg-server/dix/privates.c @@ -268,7 +268,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 && @@ -370,7 +370,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 */ @@ -719,7 +719,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/xorg-server/dix/property.c b/xorg-server/dix/property.c index 833c3ca59..b40e6f0c1 100644 --- a/xorg-server/dix/property.c +++ b/xorg-server/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/xorg-server/dix/resource.c b/xorg-server/dix/resource.c index c04b5578e..a3f5fc845 100644 --- a/xorg-server/dix/resource.c +++ b/xorg-server/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/xorg-server/dix/touch.c b/xorg-server/dix/touch.c index a7ea213ba..1eeed78bd 100644 --- a/xorg-server/dix/touch.c +++ b/xorg-server/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/xorg-server/dix/window.c b/xorg-server/dix/window.c index 4a455c9c7..7bbfc719b 100644 --- a/xorg-server/dix/window.c +++ b/xorg-server/dix/window.c @@ -227,7 +227,7 @@ log_window_info(WindowPtr pWin, int depth) win_name = get_window_name(pWin); ErrorF("win 0x%.8x (%s), [%d, %d] to [%d, %d]", - pWin->drawable.id, + (unsigned) pWin->drawable.id, win_name ? win_name : "no name", pWin->drawable.x, pWin->drawable.y, pWin->drawable.x + pWin->drawable.width, @@ -240,7 +240,7 @@ log_window_info(WindowPtr pWin, int depth) ErrorF(" (%s compositing: pixmap %x)", (pWin->redirectDraw == RedirectDrawAutomatic) ? "automatic" : "manual", - pScreen->GetWindowPixmap(pWin)->drawable.id); + (unsigned) pScreen->GetWindowPixmap(pWin)->drawable.id); #endif switch (pWin->visibility) { @@ -283,7 +283,7 @@ PrintWindowTree(void) for (scrnum = 0; scrnum < screenInfo.numScreens; scrnum++) { pScreen = screenInfo.screens[scrnum]; ErrorF("[dix] Dumping windows for screen %d (pixmap %x):\n", scrnum, - pScreen->GetScreenPixmap(pScreen)->drawable.id); + (unsigned) pScreen->GetScreenPixmap(pScreen)->drawable.id); pWin = pScreen->root; depth = 1; while (pWin) { @@ -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) @@ -961,7 +961,7 @@ CrushTree(WindowPtr pWin) *****/ int -DeleteWindow(pointer value, XID wid) +DeleteWindow(void *value, XID wid) { WindowPtr pParent; WindowPtr pWin = (WindowPtr) value; @@ -1111,7 +1111,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) || @@ -1165,7 +1165,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) || @@ -1312,7 +1312,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; @@ -1382,7 +1382,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; @@ -2380,7 +2380,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; @@ -2405,7 +2405,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)) @@ -2691,7 +2691,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); @@ -3170,7 +3170,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; } @@ -3199,7 +3199,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) { |