summaryrefslogtreecommitdiff
path: root/hw/dmx
diff options
context:
space:
mode:
Diffstat (limited to 'hw/dmx')
-rw-r--r--hw/dmx/dmx-config.h2
-rw-r--r--hw/dmx/dmx.c48
-rw-r--r--hw/dmx/dmxextension.c12
-rw-r--r--hw/dmx/dmxpict.c10
-rw-r--r--hw/dmx/dmxpixmap.c3
-rw-r--r--hw/dmx/dmxpixmap.h3
6 files changed, 39 insertions, 39 deletions
diff --git a/hw/dmx/dmx-config.h b/hw/dmx/dmx-config.h
index 18a05356b..343fdabf5 100644
--- a/hw/dmx/dmx-config.h
+++ b/hw/dmx/dmx-config.h
@@ -83,9 +83,7 @@
#undef XF86MISC
#undef XFreeXDGA
#undef XF86DRI
-#undef MITSHM
#undef TOGCUP
-#undef DPSEXT
#undef MITMISC
#undef SCREENSAVER
#undef RANDR
diff --git a/hw/dmx/dmx.c b/hw/dmx/dmx.c
index a4d6beb08..840356f02 100644
--- a/hw/dmx/dmx.c
+++ b/hw/dmx/dmx.c
@@ -464,7 +464,7 @@ static int ProcDMXChangeScreensAttributes(ClientPtr client)
if (!_DMXXineramaActive()) goto noxinerama;
- if (!(attribs = ALLOCATE_LOCAL(stuff->screenCount * sizeof(*attribs))))
+ if (!(attribs = xalloc(stuff->screenCount * sizeof(*attribs))))
return BadAlloc;
for (i = 0; i < stuff->screenCount; i++) {
@@ -483,7 +483,7 @@ static int ProcDMXChangeScreensAttributes(ClientPtr client)
&errorScreen);
#endif
- DEALLOCATE_LOCAL(attribs);
+ xfree(attribs);
if (status == BadValue) return status;
@@ -529,7 +529,7 @@ static int ProcDMXAddScreen(ClientPtr client)
value_list = (CARD32 *)(stuff + 1);
count = dmxFetchScreenAttributes(stuff->valueMask, &attr, value_list);
- if (!(name = ALLOCATE_LOCAL(stuff->displayNameLength + 1 + 4)))
+ if (!(name = xalloc(stuff->displayNameLength + 1 + 4)))
return BadAlloc;
memcpy(name, &value_list[count], stuff->displayNameLength);
name[stuff->displayNameLength] = '\0';
@@ -537,7 +537,7 @@ static int ProcDMXAddScreen(ClientPtr client)
status = dmxAttachScreen(stuff->physicalScreen, &attr);
- DEALLOCATE_LOCAL(name);
+ xfree(name);
rep.type = X_Reply;
rep.sequenceNumber = client->sequence;
@@ -657,30 +657,30 @@ static int ProcDMXGetWindowAttributes(ClientPtr client)
REQUEST_SIZE_MATCH(xDMXGetWindowAttributesReq);
- if (!(screens = ALLOCATE_LOCAL(count * sizeof(*screens))))
+ if (!(screens = xalloc(count * sizeof(*screens))))
return BadAlloc;
- if (!(windows = ALLOCATE_LOCAL(count * sizeof(*windows)))) {
- DEALLOCATE_LOCAL(screens);
+ if (!(windows = xalloc(count * sizeof(*windows)))) {
+ xfree(screens);
return BadAlloc;
}
- if (!(pos = ALLOCATE_LOCAL(count * sizeof(*pos)))) {
- DEALLOCATE_LOCAL(windows);
- DEALLOCATE_LOCAL(screens);
+ if (!(pos = xalloc(count * sizeof(*pos)))) {
+ xfree(windows);
+ xfree(screens);
return BadAlloc;
}
- if (!(vis = ALLOCATE_LOCAL(count * sizeof(*vis)))) {
- DEALLOCATE_LOCAL(pos);
- DEALLOCATE_LOCAL(windows);
- DEALLOCATE_LOCAL(screens);
+ if (!(vis = xalloc(count * sizeof(*vis)))) {
+ xfree(pos);
+ xfree(windows);
+ xfree(screens);
return BadAlloc;
}
if ((count = dmxPopulate(client, stuff->window, screens, windows,
pos, vis)) < 0) {
- DEALLOCATE_LOCAL(vis);
- DEALLOCATE_LOCAL(pos);
- DEALLOCATE_LOCAL(windows);
- DEALLOCATE_LOCAL(screens);
+ xfree(vis);
+ xfree(pos);
+ xfree(windows);
+ xfree(screens);
return BadWindow;
}
@@ -718,10 +718,10 @@ static int ProcDMXGetWindowAttributes(ClientPtr client)
WriteToClient(client, count * sizeof(*vis), (char *)vis);
}
- DEALLOCATE_LOCAL(vis);
- DEALLOCATE_LOCAL(pos);
- DEALLOCATE_LOCAL(windows);
- DEALLOCATE_LOCAL(screens);
+ xfree(vis);
+ xfree(pos);
+ xfree(windows);
+ xfree(screens);
return client->noClientException;
}
@@ -882,7 +882,7 @@ static int ProcDMXAddInput(ClientPtr client)
value_list = (CARD32 *)(stuff + 1);
count = dmxFetchInputAttributes(stuff->valueMask, &attr, value_list);
- if (!(name = ALLOCATE_LOCAL(stuff->displayNameLength + 1 + 4)))
+ if (!(name = xalloc(stuff->displayNameLength + 1 + 4)))
return BadAlloc;
memcpy(name, &value_list[count], stuff->displayNameLength);
name[stuff->displayNameLength] = '\0';
@@ -890,7 +890,7 @@ static int ProcDMXAddInput(ClientPtr client)
status = dmxAddInput(&attr, &id);
- DEALLOCATE_LOCAL(name);
+ xfree(name);
if (status) return status;
diff --git a/hw/dmx/dmxextension.c b/hw/dmx/dmxextension.c
index 103364446..560468c4b 100644
--- a/hw/dmx/dmxextension.c
+++ b/hw/dmx/dmxextension.c
@@ -1121,9 +1121,9 @@ static void dmxBERestoreRenderGlyph(pointer value, XID id, pointer n)
}
/* Now allocate the memory we need */
- images = ALLOCATE_LOCAL(len_images*sizeof(char));
- gids = ALLOCATE_LOCAL(glyphSet->hash.tableEntries*sizeof(Glyph));
- glyphs = ALLOCATE_LOCAL(glyphSet->hash.tableEntries*sizeof(XGlyphInfo));
+ images = xalloc(len_images*sizeof(char));
+ gids = xalloc(glyphSet->hash.tableEntries*sizeof(Glyph));
+ glyphs = xalloc(glyphSet->hash.tableEntries*sizeof(XGlyphInfo));
memset(images, 0, len_images * sizeof(char));
pos = images;
@@ -1159,9 +1159,9 @@ static void dmxBERestoreRenderGlyph(pointer value, XID id, pointer n)
len_images);
/* Clean up */
- DEALLOCATE_LOCAL(len_images);
- DEALLOCATE_LOCAL(gids);
- DEALLOCATE_LOCAL(glyphs);
+ xfree(len_images);
+ xfree(gids);
+ xfree(glyphs);
}
#endif
diff --git a/hw/dmx/dmxpict.c b/hw/dmx/dmxpict.c
index f2110b534..37dfa10ac 100644
--- a/hw/dmx/dmxpict.c
+++ b/hw/dmx/dmxpict.c
@@ -530,13 +530,13 @@ static int dmxProcRenderCompositeGlyphs(ClientPtr client)
/* The following only works for Render version > 0.2 */
/* All of the XGlyphElt* structure sizes are identical */
- elts = ALLOCATE_LOCAL(nelt * sizeof(XGlyphElt8));
+ elts = xalloc(nelt * sizeof(XGlyphElt8));
if (!elts)
return BadAlloc;
- glyphs = ALLOCATE_LOCAL(nglyph * size);
+ glyphs = xalloc(nglyph * size);
if (!glyphs) {
- DEALLOCATE_LOCAL(elts);
+ xfree(elts);
return BadAlloc;
}
@@ -604,8 +604,8 @@ static int dmxProcRenderCompositeGlyphs(ClientPtr client)
dmxSync(dmxScreen, FALSE);
- DEALLOCATE_LOCAL(elts);
- DEALLOCATE_LOCAL(glyphs);
+ xfree(elts);
+ xfree(glyphs);
}
return ret;
diff --git a/hw/dmx/dmxpixmap.c b/hw/dmx/dmxpixmap.c
index f8d012630..d24988204 100644
--- a/hw/dmx/dmxpixmap.c
+++ b/hw/dmx/dmxpixmap.c
@@ -81,7 +81,8 @@ void dmxBECreatePixmap(PixmapPtr pPixmap)
/** Create a pixmap for \a pScreen with the specified \a width, \a
* height, and \a depth. */
-PixmapPtr dmxCreatePixmap(ScreenPtr pScreen, int width, int height, int depth)
+PixmapPtr dmxCreatePixmap(ScreenPtr pScreen, int width, int height, int depth,
+ unsigned usage_hint)
{
DMXScreenInfo *dmxScreen = &dmxScreens[pScreen->myNum];
PixmapPtr pPixmap;
diff --git a/hw/dmx/dmxpixmap.h b/hw/dmx/dmxpixmap.h
index 3cfd99e6d..64418340c 100644
--- a/hw/dmx/dmxpixmap.h
+++ b/hw/dmx/dmxpixmap.h
@@ -49,7 +49,8 @@ typedef struct _dmxPixPriv {
extern Bool dmxInitPixmap(ScreenPtr pScreen);
extern PixmapPtr dmxCreatePixmap(ScreenPtr pScreen,
- int width, int height, int depth);
+ int width, int height, int depth,
+ unsigned usage_hint);
extern Bool dmxDestroyPixmap(PixmapPtr pPixmap);
extern RegionPtr dmxBitmapToRegion(PixmapPtr pPixmap);