aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/GL/mesa/X
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@redhat.com>2016-10-31 15:06:37 +0100
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2016-12-04 21:31:10 +0100
commitcee997dacb28aa9378b834b66a33c441145dceb7 (patch)
tree1078c9fd4376594c3aae178808f5d99076d2932d /nx-X11/programs/Xserver/GL/mesa/X
parentb38d5b97dbd6c6b61c3ef0d046a4ba1c183a74f9 (diff)
downloadnx-libs-cee997dacb28aa9378b834b66a33c441145dceb7.tar.gz
nx-libs-cee997dacb28aa9378b834b66a33c441145dceb7.tar.bz2
nx-libs-cee997dacb28aa9378b834b66a33c441145dceb7.zip
Drop glx_ansic.h wrapper and call malloc, realloc, free and str-funcs directly.
commit 2d2d38d17cc2558f8a41166a4a1578bc4c663c37 Author: Kristian Høgsberg <krh@redhat.com> Date: Fri Mar 17 01:47:25 2006 +0000 Check for glproto when building GLX and make sure we have at least 1.4.6. Drop glx_ansic.h wrapper and call xalloc, xrealloc, xfree and str-funcs directly. We don't check the glproto version as we know what it is (we have our own proto file). Furthermore, we skip the switch from --glX<func> -> x<func> and directly switch to <func> (e.g. __glXMalloc() -> malloc()). Backported-to-NX-by: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
Diffstat (limited to 'nx-X11/programs/Xserver/GL/mesa/X')
-rw-r--r--nx-X11/programs/Xserver/GL/mesa/X/xf86glx.c68
1 files changed, 34 insertions, 34 deletions
diff --git a/nx-X11/programs/Xserver/GL/mesa/X/xf86glx.c b/nx-X11/programs/Xserver/GL/mesa/X/xf86glx.c
index 0d7496a0e..eae82f663 100644
--- a/nx-X11/programs/Xserver/GL/mesa/X/xf86glx.c
+++ b/nx-X11/programs/Xserver/GL/mesa/X/xf86glx.c
@@ -319,15 +319,15 @@ static Bool init_visuals(int *nvisualp, VisualPtr *visualp,
/* Alloc space for the list of new GLX visuals */
pNewVisualConfigs = (__GLXvisualConfig *)
- __glXMalloc(numNewConfigs * sizeof(__GLXvisualConfig));
+ malloc(numNewConfigs * sizeof(__GLXvisualConfig));
if (!pNewVisualConfigs) {
return FALSE;
}
/* Alloc space for the list of new GLX visual privates */
- pNewVisualPriv = (void **) __glXMalloc(numNewConfigs * sizeof(void *));
+ pNewVisualPriv = (void **) malloc(numNewConfigs * sizeof(void *));
if (!pNewVisualPriv) {
- __glXFree(pNewVisualConfigs);
+ free(pNewVisualConfigs);
return FALSE;
}
@@ -371,40 +371,40 @@ static Bool init_visuals(int *nvisualp, VisualPtr *visualp,
numConfigs = 0;
/* Alloc temp space for the list of orig VisualIDs for each new visual */
- orig_vid = (VisualID *)__glXMalloc(numNewVisuals * sizeof(VisualID));
+ orig_vid = (VisualID *)malloc(numNewVisuals * sizeof(VisualID));
if (!orig_vid) {
- __glXFree(pNewVisualPriv);
- __glXFree(pNewVisualConfigs);
+ free(pNewVisualPriv);
+ free(pNewVisualConfigs);
return FALSE;
}
/* Alloc space for the list of glXVisuals */
modes = _gl_context_modes_create(numNewVisuals, sizeof(__GLcontextModes));
if (modes == NULL) {
- __glXFree(orig_vid);
- __glXFree(pNewVisualPriv);
- __glXFree(pNewVisualConfigs);
+ free(orig_vid);
+ free(pNewVisualPriv);
+ free(pNewVisualConfigs);
return FALSE;
}
/* Alloc space for the list of glXVisualPrivates */
- glXVisualPriv = (void **)__glXMalloc(numNewVisuals * sizeof(void *));
+ glXVisualPriv = (void **)malloc(numNewVisuals * sizeof(void *));
if (!glXVisualPriv) {
_gl_context_modes_destroy( modes );
- __glXFree(orig_vid);
- __glXFree(pNewVisualPriv);
- __glXFree(pNewVisualConfigs);
+ free(orig_vid);
+ free(pNewVisualPriv);
+ free(pNewVisualConfigs);
return FALSE;
}
/* Alloc space for the new list of the X server's visuals */
- pVisualNew = (VisualPtr)__glXMalloc(numNewVisuals * sizeof(VisualRec));
+ pVisualNew = (VisualPtr)malloc(numNewVisuals * sizeof(VisualRec));
if (!pVisualNew) {
- __glXFree(glXVisualPriv);
+ free(glXVisualPriv);
_gl_context_modes_destroy( modes );
- __glXFree(orig_vid);
- __glXFree(pNewVisualPriv);
- __glXFree(pNewVisualConfigs);
+ free(orig_vid);
+ free(pNewVisualPriv);
+ free(pNewVisualConfigs);
return FALSE;
}
@@ -487,7 +487,7 @@ static Bool init_visuals(int *nvisualp, VisualPtr *visualp,
numVids++;
/* Allocate a new list of VisualIDs for this depth */
- pVids = (VisualID *)__glXMalloc(numVids * sizeof(VisualID));
+ pVids = (VisualID *)malloc(numVids * sizeof(VisualID));
/* Initialize the new list of VisualIDs for this depth */
for (j = 0; j < pdepth[i].numVids; j++)
@@ -496,7 +496,7 @@ static Bool init_visuals(int *nvisualp, VisualPtr *visualp,
pVids[n++] = pVisualNew[k].vid;
/* Update this depth's list of VisualIDs */
- __glXFree(pdepth[i].vids);
+ free(pdepth[i].vids);
pdepth[i].vids = pVids;
pdepth[i].numVids = numVids;
}
@@ -506,12 +506,12 @@ static Bool init_visuals(int *nvisualp, VisualPtr *visualp,
*visualp = pVisualNew;
/* Free the old list of the X server's visuals */
- __glXFree(pVisual);
+ free(pVisual);
/* Clean up temporary allocations */
- __glXFree(orig_vid);
- __glXFree(pNewVisualPriv);
- __glXFree(pNewVisualConfigs);
+ free(orig_vid);
+ free(pNewVisualPriv);
+ free(pNewVisualConfigs);
/* Free the private list created by DDX HW driver */
if (visualPrivates)
@@ -581,19 +581,19 @@ static void init_screen_visuals(int screen)
int i, j;
/* Alloc space for the list of XMesa visuals */
- pXMesaVisual = (XMesaVisual *)__glXMalloc(MESAScreens[screen].num_vis *
+ pXMesaVisual = (XMesaVisual *)malloc(MESAScreens[screen].num_vis *
sizeof(XMesaVisual));
- __glXMemset(pXMesaVisual, 0,
+ memset(pXMesaVisual, 0,
MESAScreens[screen].num_vis * sizeof(XMesaVisual));
/* FIXME: Change 'used' to be a array of bits (rather than of ints),
* FIXME: create a stack array of 8 or 16 bytes. If 'numVisuals' is less
* FIXME: than 64 or 128 the stack array can be used instead of calling
- * FIXME: __glXMalloc / __glXFree. If nothing else, convert 'used' to
+ * FIXME: malloc / free. If nothing else, convert 'used' to
* FIXME: array of bytes instead of ints!
*/
- used = (int *)__glXMalloc(pScreen->numVisuals * sizeof(int));
- __glXMemset(used, 0, pScreen->numVisuals * sizeof(int));
+ used = (int *)malloc(pScreen->numVisuals * sizeof(int));
+ memset(used, 0, pScreen->numVisuals * sizeof(int));
i = 0;
for ( modes = MESAScreens[screen].modes
@@ -652,7 +652,7 @@ static void init_screen_visuals(int screen)
i++;
}
- __glXFree(used);
+ free(used);
MESAScreens[screen].xm_vis = pXMesaVisual;
}
@@ -703,9 +703,9 @@ extern void __MESA_resetExtension(void)
}
_gl_context_modes_destroy( MESAScreens[i].modes );
MESAScreens[i].modes = NULL;
- __glXFree(MESAScreens[i].private);
+ free(MESAScreens[i].private);
MESAScreens[i].private = NULL;
- __glXFree(MESAScreens[i].xm_vis);
+ free(MESAScreens[i].xm_vis);
MESAScreens[i].xm_vis = NULL;
MESAScreens[i].num_vis = 0;
}
@@ -725,7 +725,7 @@ void __MESA_createBuffer(__GLXdrawablePrivate *glxPriv)
ErrorF("find_mesa_visual returned NULL for visualID = 0x%04x\n",
glxPriv->modes->visualID);
}
- buf = (__MESA_buffer)__glXMalloc(sizeof(struct __MESA_bufferRec));
+ buf = (__MESA_buffer)malloc(sizeof(struct __MESA_bufferRec));
/* Create Mesa's buffers */
if (glxPriv->type == DRAWABLE_WINDOW) {
@@ -793,7 +793,7 @@ void __MESA_destroyBuffer(__GLdrawablePrivate *glPriv)
glxPriv->swapBuffers = buf->fbswap;
glPriv->frontBuffer.resize = buf->fbresize;
- __glXFree(glPriv->private);
+ free(glPriv->private);
glPriv->private = NULL;
}