aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/GL/glx/glxext.c
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/glx/glxext.c
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/glx/glxext.c')
-rw-r--r--nx-X11/programs/Xserver/GL/glx/glxext.c27
1 files changed, 14 insertions, 13 deletions
diff --git a/nx-X11/programs/Xserver/GL/glx/glxext.c b/nx-X11/programs/Xserver/GL/glx/glxext.c
index f908c08cf..f6d572d2a 100644
--- a/nx-X11/programs/Xserver/GL/glx/glxext.c
+++ b/nx-X11/programs/Xserver/GL/glx/glxext.c
@@ -62,17 +62,18 @@ static void ResetClientState(int clientIndex)
{
__GLXclientState *cl = __glXClients[clientIndex];
- if (cl->returnBuf) __glXFree(cl->returnBuf);
- if (cl->largeCmdBuf) __glXFree(cl->largeCmdBuf);
- if (cl->currentContexts) __glXFree(cl->currentContexts);
- __glXMemset(cl, 0, sizeof(__GLXclientState));
+ if (cl->returnBuf) free(cl->returnBuf);
+ if (cl->largeCmdBuf) free(cl->largeCmdBuf);
+ if (cl->currentContexts) free(cl->currentContexts);
+ memset(cl, 0, sizeof(__GLXclientState));
/*
** By default, assume that the client supports
** GLX major version 1 minor version 0 protocol.
*/
cl->GLClientmajorVersion = 1;
cl->GLClientminorVersion = 0;
- if (cl->GLClientextensions) __glXFree(cl->GLClientextensions);
+ if (cl->GLClientextensions)
+ free(cl->GLClientextensions);
}
@@ -151,7 +152,7 @@ static int PixmapGone(__GLXpixmap *pGlxPixmap, XID id)
** only if it's zero.
*/
(*pGlxPixmap->pScreen->DestroyPixmap)(pPixmap);
- __glXFree(pGlxPixmap);
+ free(pGlxPixmap);
}
return True;
@@ -169,9 +170,9 @@ GLboolean __glXFreeContext(__GLXcontext *cx)
return GL_FALSE;
}
}
- if (cx->feedbackBuf) __glXFree(cx->feedbackBuf);
- if (cx->selectBuf) __glXFree(cx->selectBuf);
- __glXFree(cx);
+ if (cx->feedbackBuf) free(cx->feedbackBuf);
+ if (cx->selectBuf) free(cx->selectBuf);
+ free(cx);
if (cx == __glXLastContext) {
__glXFlushContextCache();
}
@@ -404,12 +405,12 @@ static int __glXDispatch(ClientPtr client)
opcode = stuff->glxCode;
cl = __glXClients[client->index];
if (!cl) {
- cl = (__GLXclientState *) __glXMalloc(sizeof(__GLXclientState));
+ cl = (__GLXclientState *) malloc(sizeof(__GLXclientState));
__glXClients[client->index] = cl;
if (!cl) {
return BadAlloc;
}
- __glXMemset(cl, 0, sizeof(__GLXclientState));
+ memset(cl, 0, sizeof(__GLXclientState));
}
if (!cl->inUse) {
@@ -458,12 +459,12 @@ static int __glXSwapDispatch(ClientPtr client)
opcode = stuff->glxCode;
cl = __glXClients[client->index];
if (!cl) {
- cl = (__GLXclientState *) __glXMalloc(sizeof(__GLXclientState));
+ cl = (__GLXclientState *) malloc(sizeof(__GLXclientState));
__glXClients[client->index] = cl;
if (!cl) {
return BadAlloc;
}
- __glXMemset(cl, 0, sizeof(__GLXclientState));
+ memset(cl, 0, sizeof(__GLXclientState));
}
if (!cl->inUse) {