diff options
author | Keith Packard <keithp@keithp.com> | 2015-06-22 09:36:08 +0200 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2015-12-28 12:54:40 +0100 |
commit | 68dd0b52e13c844d662192654fb10cb993257a59 (patch) | |
tree | a97ab98a06147cd5fb194063a9984dc3973fba55 /nx-X11/programs/Xserver/render | |
parent | e9f44221b2520a1d894b3c125269b5d10438453b (diff) | |
download | nx-libs-68dd0b52e13c844d662192654fb10cb993257a59.tar.gz nx-libs-68dd0b52e13c844d662192654fb10cb993257a59.tar.bz2 nx-libs-68dd0b52e13c844d662192654fb10cb993257a59.zip |
Replace 'pointer' type with 'void *'
This lets us stop using the 'pointer' typedef in Xdefs.h as 'pointer'
is used throughout the X server for other things, and having duplicate
names generates compiler warnings.
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Rebased against NX: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
Diffstat (limited to 'nx-X11/programs/Xserver/render')
-rw-r--r-- | nx-X11/programs/Xserver/render/animcur.c | 8 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/render/glyph.c | 24 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/render/glyphstr.h | 8 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/render/miglyph.c | 8 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/render/mipict.c | 8 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/render/mipict.h | 2 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/render/mirect.c | 2 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/render/picture.c | 24 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/render/picturestr.h | 12 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/render/render.c | 26 |
10 files changed, 61 insertions, 61 deletions
diff --git a/nx-X11/programs/Xserver/render/animcur.c b/nx-X11/programs/Xserver/render/animcur.c index e3915b2b8..15293af64 100644 --- a/nx-X11/programs/Xserver/render/animcur.c +++ b/nx-X11/programs/Xserver/render/animcur.c @@ -95,7 +95,7 @@ int AnimCurGeneration; #define GetAnimCur(c) ((AnimCurPtr) ((c) + 1)) #define GetAnimCurScreen(s) ((AnimCurScreenPtr) ((s)->devPrivates[AnimCurScreenPrivateIndex].ptr)) #define GetAnimCurScreenIfSet(s) ((AnimCurScreenPrivateIndex != -1) ? GetAnimCurScreen(s) : NULL) -#define SetAnimCurScreen(s,p) ((s)->devPrivates[AnimCurScreenPrivateIndex].ptr = (pointer) (p)) +#define SetAnimCurScreen(s,p) ((s)->devPrivates[AnimCurScreenPrivateIndex].ptr = (void *) (p)) #define Wrap(as,s,elt,func) (((as)->elt = (s)->elt), (s)->elt = func) #define Unwrap(as,s,elt) ((s)->elt = (as)->elt) @@ -164,9 +164,9 @@ AnimCurCursorLimits (ScreenPtr pScreen, static void AnimCurScreenBlockHandler (int screenNum, - pointer blockData, - pointer pTimeout, - pointer pReadmask) + void * blockData, + void * pTimeout, + void * pReadmask) { ScreenPtr pScreen = screenInfo.screens[screenNum]; AnimCurScreenPtr as = GetAnimCurScreen(pScreen); diff --git a/nx-X11/programs/Xserver/render/glyph.c b/nx-X11/programs/Xserver/render/glyph.c index 9f4d1c87b..900cf9844 100644 --- a/nx-X11/programs/Xserver/render/glyph.c +++ b/nx-X11/programs/Xserver/render/glyph.c @@ -114,30 +114,30 @@ ResetGlyphSetPrivateIndex (void) } Bool -_GlyphSetSetNewPrivate (GlyphSetPtr glyphSet, int n, pointer ptr) +_GlyphSetSetNewPrivate (GlyphSetPtr glyphSet, int n, void * ptr) { - pointer *new; + void **new; if (n > glyphSet->maxPrivate) { if (glyphSet->devPrivates && - glyphSet->devPrivates != (pointer)(&glyphSet[1])) { - new = (pointer *) xrealloc (glyphSet->devPrivates, - (n + 1) * sizeof (pointer)); + glyphSet->devPrivates != (void *)(&glyphSet[1])) { + new = (void **) xrealloc (glyphSet->devPrivates, + (n + 1) * sizeof (void *)); if (!new) return FALSE; } else { - new = (pointer *) xalloc ((n + 1) * sizeof (pointer)); + new = (void **) xalloc ((n + 1) * sizeof (void *)); if (!new) return FALSE; if (glyphSet->devPrivates) memcpy (new, glyphSet->devPrivates, - (glyphSet->maxPrivate + 1) * sizeof (pointer)); + (glyphSet->maxPrivate + 1) * sizeof (void *)); } glyphSet->devPrivates = new; /* Zero out new, uninitialize privates */ while (++glyphSet->maxPrivate < n) - glyphSet->devPrivates[glyphSet->maxPrivate] = (pointer)0; + glyphSet->devPrivates[glyphSet->maxPrivate] = (void *)0; } glyphSet->devPrivates[n] = ptr; return TRUE; @@ -430,14 +430,14 @@ AllocateGlyphSet (int fdepth, PictFormatPtr format) } size = (sizeof (GlyphSetRec) + - (sizeof (pointer) * _GlyphSetPrivateAllocateIndex)); + (sizeof (void *) * _GlyphSetPrivateAllocateIndex)); glyphSet = xalloc (size); if (!glyphSet) return FALSE; bzero((char *)glyphSet, size); glyphSet->maxPrivate = _GlyphSetPrivateAllocateIndex - 1; if (_GlyphSetPrivateAllocateIndex) - glyphSet->devPrivates = (pointer)(&glyphSet[1]); + glyphSet->devPrivates = (void *)(&glyphSet[1]); if (!AllocateGlyphHash (&glyphSet->hash, &glyphHashSets[0])) { @@ -451,7 +451,7 @@ AllocateGlyphSet (int fdepth, PictFormatPtr format) } int -FreeGlyphSet (pointer value, +FreeGlyphSet (void *value, XID gid) { GlyphSetPtr glyphSet = (GlyphSetPtr) value; @@ -479,7 +479,7 @@ FreeGlyphSet (pointer value, xfree (table); if (glyphSet->devPrivates && - glyphSet->devPrivates != (pointer)(&glyphSet[1])) + glyphSet->devPrivates != (void *)(&glyphSet[1])) xfree(glyphSet->devPrivates); xfree (glyphSet); diff --git a/nx-X11/programs/Xserver/render/glyphstr.h b/nx-X11/programs/Xserver/render/glyphstr.h index f4777a248..e9bbd19b0 100644 --- a/nx-X11/programs/Xserver/render/glyphstr.h +++ b/nx-X11/programs/Xserver/render/glyphstr.h @@ -69,12 +69,12 @@ typedef struct _GlyphSet { int fdepth; GlyphHashRec hash; int maxPrivate; - pointer *devPrivates; + void **devPrivates; } GlyphSetRec, *GlyphSetPtr; #define GlyphSetGetPrivate(pGlyphSet,n) \ ((n) > (pGlyphSet)->maxPrivate ? \ - (pointer) 0 : \ + (void *) 0 : \ (pGlyphSet)->devPrivates[n]) #define GlyphSetSetPrivate(pGlyphSet,n,ptr) \ @@ -101,7 +101,7 @@ void ResetGlyphSetPrivateIndex (void); Bool -_GlyphSetSetNewPrivate (GlyphSetPtr glyphSet, int n, pointer ptr); +_GlyphSetSetNewPrivate (GlyphSetPtr glyphSet, int n, void * ptr); Bool GlyphInit (ScreenPtr pScreen); @@ -140,7 +140,7 @@ GlyphSetPtr AllocateGlyphSet (int fdepth, PictFormatPtr format); int -FreeGlyphSet (pointer value, +FreeGlyphSet (void *value, XID gid); diff --git a/nx-X11/programs/Xserver/render/miglyph.c b/nx-X11/programs/Xserver/render/miglyph.c index 237ec13a4..8b046bd46 100644 --- a/nx-X11/programs/Xserver/render/miglyph.c +++ b/nx-X11/programs/Xserver/render/miglyph.c @@ -168,7 +168,7 @@ miGlyphs (CARD8 op, pPixmap = GetScratchPixmapHeader (pScreen, glyph->info.width, glyph->info.height, list->format->depth, list->format->depth, - 0, (pointer) (glyph + 1)); + 0, (void *) (glyph + 1)); if (!pPixmap) return; component_alpha = NeedsComponent(list->format->format); @@ -183,7 +183,7 @@ miGlyphs (CARD8 op, } (*pScreen->ModifyPixmapHeader) (pPixmap, glyph->info.width, glyph->info.height, - 0, 0, -1, (pointer) (glyph + 1)); + 0, 0, -1, (void *) (glyph + 1)); pPixmap->drawable.serialNumber = NEXT_SERIAL_NUMBER; if (maskFormat) { @@ -219,7 +219,7 @@ miGlyphs (CARD8 op, if (pPicture) { FreeScratchPixmapHeader (pPixmap); - FreePicture ((pointer) pPicture, 0); + FreePicture ((void *) pPicture, 0); pPicture = 0; pPixmap = 0; } @@ -237,7 +237,7 @@ miGlyphs (CARD8 op, 0, 0, x, y, width, height); - FreePicture ((pointer) pMask, (XID) 0); + FreePicture ((void *) pMask, (XID) 0); (*pScreen->DestroyPixmap) (pMaskPixmap); } } diff --git a/nx-X11/programs/Xserver/render/mipict.c b/nx-X11/programs/Xserver/render/mipict.c index 59707ea70..cf9c27f01 100644 --- a/nx-X11/programs/Xserver/render/mipict.c +++ b/nx-X11/programs/Xserver/render/mipict.c @@ -75,18 +75,18 @@ miDestroyPictureClip (PicturePtr pPicture) int miChangePictureClip (PicturePtr pPicture, int type, - pointer value, + void * value, int n) { ScreenPtr pScreen = pPicture->pDrawable->pScreen; PictureScreenPtr ps = GetPictureScreen(pScreen); - pointer clientClip; + void * clientClip; int clientClipType; switch (type) { case CT_PIXMAP: /* convert the pixmap to a region */ - clientClip = (pointer) BITMAP_TO_REGION(pScreen, (PixmapPtr) value); + clientClip = (void *) BITMAP_TO_REGION(pScreen, (PixmapPtr) value); if (!clientClip) return BadAlloc; clientClipType = CT_REGION; @@ -101,7 +101,7 @@ miChangePictureClip (PicturePtr pPicture, clientClipType = CT_NONE; break; default: - clientClip = (pointer) RECTS_TO_REGION(pScreen, n, + clientClip = (void *) RECTS_TO_REGION(pScreen, n, (xRectangle *) value, type); if (!clientClip) diff --git a/nx-X11/programs/Xserver/render/mipict.h b/nx-X11/programs/Xserver/render/mipict.h index 0c2ed04d5..726d8be65 100644 --- a/nx-X11/programs/Xserver/render/mipict.h +++ b/nx-X11/programs/Xserver/render/mipict.h @@ -60,7 +60,7 @@ miDestroyPictureClip (PicturePtr pPicture); int miChangePictureClip (PicturePtr pPicture, int type, - pointer value, + void * value, int n); void diff --git a/nx-X11/programs/Xserver/render/mirect.c b/nx-X11/programs/Xserver/render/mirect.c index 096bb5cb2..c4aeb9aba 100644 --- a/nx-X11/programs/Xserver/render/mirect.c +++ b/nx-X11/programs/Xserver/render/mirect.c @@ -174,7 +174,7 @@ miCompositeRects (CARD8 op, rects++; } - FreePicture ((pointer) pSrc, 0); + FreePicture ((void *) pSrc, 0); bail4: FreeScratchGC (pGC); bail3: diff --git a/nx-X11/programs/Xserver/render/picture.c b/nx-X11/programs/Xserver/render/picture.c index 3ed60310e..754d468bb 100644 --- a/nx-X11/programs/Xserver/render/picture.c +++ b/nx-X11/programs/Xserver/render/picture.c @@ -114,7 +114,7 @@ PictureDestroyWindow (WindowPtr pWindow) SetPictureWindow(pWindow, pPicture->pNext); if (pPicture->id) FreeResource (pPicture->id, PictureType); - FreePicture ((pointer) pPicture, pPicture->id); + FreePicture ((void *) pPicture, pPicture->id); } pScreen->DestroyWindow = ps->DestroyWindow; ret = (*pScreen->DestroyWindow) (pWindow); @@ -653,7 +653,7 @@ PictureInit (ScreenPtr pScreen, PictFormatPtr formats, int nformats) } for (n = 0; n < nformats; n++) { - if (!AddResource (formats[n].id, PictFormatType, (pointer) (formats+n))) + if (!AddResource (formats[n].id, PictFormatType, (void *) (formats+n))) { xfree (formats); return FALSE; @@ -789,11 +789,11 @@ AllocatePicture (ScreenPtr pScreen) { if ( (size = *sizes) ) { - ppriv->ptr = (pointer)ptr; + ppriv->ptr = (void *)ptr; ptr += size; } else - ppriv->ptr = (pointer)NULL; + ppriv->ptr = (void *)NULL; } return pPicture; } @@ -1223,7 +1223,7 @@ ChangePicture (PicturePtr pPicture, if (pAlpha && pAlpha->pDrawable->type == DRAWABLE_PIXMAP) pAlpha->refcnt++; if (pPicture->alphaMap) - FreePicture ((pointer) pPicture->alphaMap, (XID) 0); + FreePicture ((void *) pPicture->alphaMap, (XID) 0); pPicture->alphaMap = pAlpha; } } @@ -1295,7 +1295,7 @@ ChangePicture (PicturePtr pPicture, } } error = (*ps->ChangePictureClip)(pPicture, clipType, - (pointer)pPixmap, 0); + (void *)pPixmap, 0); break; } case CPGraphicsExposure: @@ -1395,7 +1395,7 @@ SetPictureClipRects (PicturePtr pPicture, if (!clientClip) return BadAlloc; result =(*ps->ChangePictureClip) (pPicture, CT_REGION, - (pointer) clientClip, 0); + (void *) clientClip, 0); if (result == Success) { pPicture->clipOrigin.x = xOrigin; @@ -1439,7 +1439,7 @@ SetPictureClipRegion (PicturePtr pPicture, } result =(*ps->ChangePictureClip) (pPicture, type, - (pointer) clientClip, 0); + (void *) clientClip, 0); if (result == Success) { pPicture->clipOrigin.x = xOrigin; @@ -1511,7 +1511,7 @@ CopyPicture (PicturePtr pSrc, if (pSrc->alphaMap && pSrc->alphaMap->pDrawable->type == DRAWABLE_PIXMAP) pSrc->alphaMap->refcnt++; if (pDst->alphaMap) - FreePicture ((pointer) pDst->alphaMap, (XID) 0); + FreePicture ((void *) pDst->alphaMap, (XID) 0); pDst->alphaMap = pSrc->alphaMap; break; case CPAlphaXOrigin: @@ -1593,7 +1593,7 @@ ValidatePicture(PicturePtr pPicture) } int -FreePicture (pointer value, +FreePicture (void * value, XID pid) { PicturePtr pPicture = (PicturePtr) value; @@ -1613,7 +1613,7 @@ FreePicture (pointer value, PictureScreenPtr ps = GetPictureScreen(pScreen); if (pPicture->alphaMap) - FreePicture ((pointer) pPicture->alphaMap, (XID) 0); + FreePicture ((void *) pPicture->alphaMap, (XID) 0); (*ps->DestroyPicture) (pPicture); (*ps->DestroyPictureClip) (pPicture); if (pPicture->pDrawable->type == DRAWABLE_WINDOW) @@ -1643,7 +1643,7 @@ FreePicture (pointer value, } int -FreePictFormat (pointer pPictFormat, +FreePictFormat (void * pPictFormat, XID pid) { return Success; diff --git a/nx-X11/programs/Xserver/render/picturestr.h b/nx-X11/programs/Xserver/render/picturestr.h index 561625766..96c2b8abc 100644 --- a/nx-X11/programs/Xserver/render/picturestr.h +++ b/nx-X11/programs/Xserver/render/picturestr.h @@ -149,7 +149,7 @@ typedef struct _Picture { DDXPointRec alphaOrigin; DDXPointRec clipOrigin; - pointer clientClip; + void *clientClip; Atom dither; @@ -195,7 +195,7 @@ typedef int (*CreatePictureProcPtr) (PicturePtr pPicture); typedef void (*DestroyPictureProcPtr) (PicturePtr pPicture); typedef int (*ChangePictureClipProcPtr) (PicturePtr pPicture, int clipType, - pointer value, + void *value, int n); typedef void (*DestroyPictureClipProcPtr)(PicturePtr pPicture); @@ -374,9 +374,9 @@ extern RESTYPE GlyphSetType; #define GetPictureScreen(s) ((PictureScreenPtr) ((s)->devPrivates[PictureScreenPrivateIndex].ptr)) #define GetPictureScreenIfSet(s) ((PictureScreenPrivateIndex != -1) ? GetPictureScreen(s) : NULL) -#define SetPictureScreen(s,p) ((s)->devPrivates[PictureScreenPrivateIndex].ptr = (pointer) (p)) +#define SetPictureScreen(s,p) ((s)->devPrivates[PictureScreenPrivateIndex].ptr = (void *) (p)) #define GetPictureWindow(w) ((PicturePtr) ((w)->devPrivates[PictureWindowPrivateIndex].ptr)) -#define SetPictureWindow(w,p) ((w)->devPrivates[PictureWindowPrivateIndex].ptr = (pointer) (p)) +#define SetPictureWindow(w,p) ((w)->devPrivates[PictureWindowPrivateIndex].ptr = (void *) (p)) #define VERIFY_PICTURE(pPicture, pid, client, mode, err) {\ pPicture = SecurityLookupIDByType(client, pid, PictureType, mode);\ @@ -516,11 +516,11 @@ void ValidatePicture(PicturePtr pPicture); int -FreePicture (pointer pPicture, +FreePicture (void *pPicture, XID pid); int -FreePictFormat (pointer pPictFormat, +FreePictFormat (void *pPictFormat, XID pid); void diff --git a/nx-X11/programs/Xserver/render/render.c b/nx-X11/programs/Xserver/render/render.c index 6a65631ea..8d644b35e 100644 --- a/nx-X11/programs/Xserver/render/render.c +++ b/nx-X11/programs/Xserver/render/render.c @@ -230,8 +230,8 @@ typedef struct _RenderClient { static void RenderClientCallback (CallbackListPtr *list, - pointer closure, - pointer data) + void * closure, + void * data) { NewClientInfoRec *clientinfo = (NewClientInfoRec *) data; ClientPtr pClient = clientinfo->client; @@ -660,7 +660,7 @@ ProcRenderCreatePicture (ClientPtr client) &error); if (!pPicture) return error; - if (!AddResource (stuff->pid, PictureType, (pointer)pPicture)) + if (!AddResource (stuff->pid, PictureType, (void *)pPicture)) return BadAlloc; return Success; } @@ -1031,7 +1031,7 @@ ProcRenderCreateGlyphSet (ClientPtr client) glyphSet = AllocateGlyphSet (f, format); if (!glyphSet) return BadAlloc; - if (!AddResource (stuff->gsid, GlyphSetType, (pointer)glyphSet)) + if (!AddResource (stuff->gsid, GlyphSetType, (void *)glyphSet)) return BadAlloc; return Success; } @@ -1056,7 +1056,7 @@ ProcRenderReferenceGlyphSet (ClientPtr client) return RenderErrBase + BadGlyphSet; } glyphSet->refcnt++; - if (!AddResource (stuff->gsid, GlyphSetType, (pointer)glyphSet)) + if (!AddResource (stuff->gsid, GlyphSetType, (void *)glyphSet)) return BadAlloc; return client->noClientException; } @@ -1540,7 +1540,7 @@ ProcRenderCreateCursor (ClientPtr client) { (*pScreen->GetImage) (pSrc->pDrawable, 0, 0, width, height, ZPixmap, - 0xffffffff, (pointer) argbbits); + 0xffffffff, (void *) argbbits); } else { @@ -1580,7 +1580,7 @@ ProcRenderCreateCursor (ClientPtr client) 0, 0, 0, 0, 0, 0, width, height); (*pScreen->GetImage) (pPicture->pDrawable, 0, 0, width, height, ZPixmap, - 0xffffffff, (pointer) argbbits); + 0xffffffff, (void *) argbbits); FreePicture (pPicture, 0); } /* @@ -1673,7 +1673,7 @@ ProcRenderCreateCursor (ClientPtr client) GetColor(twocolor[1], 16), GetColor(twocolor[1], 8), GetColor(twocolor[1], 0)); - if (pCursor && AddResource(stuff->cid, RT_CURSOR, (pointer)pCursor)) + if (pCursor && AddResource(stuff->cid, RT_CURSOR, (void *)pCursor)) return (client->noClientException); return BadAlloc; } @@ -1864,7 +1864,7 @@ ProcRenderCreateAnimCursor (ClientPtr client) if (ret != Success) return ret; - if (AddResource (stuff->cid, RT_CURSOR, (pointer)pCursor)) + if (AddResource (stuff->cid, RT_CURSOR, (void *)pCursor)) return client->noClientException; return BadAlloc; } @@ -1905,7 +1905,7 @@ static int ProcRenderCreateSolidFill(ClientPtr client) pPicture = CreateSolidPicture(stuff->pid, &stuff->color, &error); if (!pPicture) return error; - if (!AddResource (stuff->pid, PictureType, (pointer)pPicture)) + if (!AddResource (stuff->pid, PictureType, (void *)pPicture)) return BadAlloc; return Success; } @@ -1936,7 +1936,7 @@ static int ProcRenderCreateLinearGradient (ClientPtr client) stuff->nStops, stops, colors, &error); if (!pPicture) return error; - if (!AddResource (stuff->pid, PictureType, (pointer)pPicture)) + if (!AddResource (stuff->pid, PictureType, (void *)pPicture)) return BadAlloc; return Success; } @@ -1966,7 +1966,7 @@ static int ProcRenderCreateRadialGradient (ClientPtr client) stuff->nStops, stops, colors, &error); if (!pPicture) return error; - if (!AddResource (stuff->pid, PictureType, (pointer)pPicture)) + if (!AddResource (stuff->pid, PictureType, (void *)pPicture)) return BadAlloc; return Success; } @@ -1995,7 +1995,7 @@ static int ProcRenderCreateConicalGradient (ClientPtr client) stuff->nStops, stops, colors, &error); if (!pPicture) return error; - if (!AddResource (stuff->pid, PictureType, (pointer)pPicture)) + if (!AddResource (stuff->pid, PictureType, (void *)pPicture)) return BadAlloc; return Success; } |