summaryrefslogtreecommitdiff
path: root/hw/xwin/glx
diff options
context:
space:
mode:
authorMikhail Gusarov <dottedmag@dottedmag.net>2010-05-06 01:44:06 +0700
committerMikhail Gusarov <dottedmag@dottedmag.net>2010-05-13 00:22:37 +0700
commit3f3ff971ecff9936cebafc813af9193b97bba89c (patch)
treefdbbad794a42488b7ffe41eed7aba4e498335f55 /hw/xwin/glx
parent96c7ab27c383ec767f62a7a11e5fd76f86363fbc (diff)
Replace X-allocation functions with their C89 counterparts
The only remaining X-functions used in server are XNF*, the rest is converted to plain alloc/calloc/realloc/free/strdup. X* functions are still exported from server and x* macros are still defined in header file, so both ABI and API are not affected by this change. Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'hw/xwin/glx')
-rwxr-xr-xhw/xwin/glx/indirect.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/hw/xwin/glx/indirect.c b/hw/xwin/glx/indirect.c
index c12cd1fbf..5e0e917bc 100755
--- a/hw/xwin/glx/indirect.c
+++ b/hw/xwin/glx/indirect.c
@@ -420,7 +420,7 @@ glxWinScreenDestroy(__GLXscreen *screen)
{
GLWIN_DEBUG_MSG("glxWinScreenDestroy(%p)", screen);
__glXScreenDestroy(screen);
- xfree(screen);
+ free(screen);
}
static int
@@ -442,7 +442,7 @@ glxLogExtensions(const char *prefix, const char *extensions)
{
int length = 0;
char *strl;
- char *str = xalloc(strlen(extensions) + 1);
+ char *str = malloc(strlen(extensions) + 1);
if (str == NULL)
{
@@ -480,7 +480,7 @@ glxLogExtensions(const char *prefix, const char *extensions)
ErrorF("\n");
- xfree(str);
+ free(str);
}
/* This is called by GlxExtensionInit() asking the GLX provider if it can handle the screen... */
@@ -507,7 +507,7 @@ glxWinScreenProbe(ScreenPtr pScreen)
return NULL;
}
- screen = xcalloc(1, sizeof(glxWinScreen));
+ screen = calloc(1, sizeof(glxWinScreen));
if (NULL == screen)
return NULL;
@@ -685,7 +685,7 @@ glxWinScreenProbe(ScreenPtr pScreen)
{
if (screen->base.GLXextensions != NULL)
{
- xfree(screen->base.GLXextensions);
+ free(screen->base.GLXextensions);
}
screen->base.GLXextensions = xnfalloc(buffer_size);
@@ -702,7 +702,7 @@ glxWinScreenProbe(ScreenPtr pScreen)
//
if (screen->has_WGL_ARB_pbuffer && glx_sgi_make_current_read)
{
- xfree(screen->base.GLXversion);
+ free(screen->base.GLXversion);
if (screen->has_WGL_ARB_multisample)
{
@@ -897,7 +897,7 @@ glxWinDrawableDestroy(__GLXdrawable *base)
}
GLWIN_DEBUG_MSG("glxWinDestroyDrawable");
- xfree(glxPriv);
+ free(glxPriv);
}
static __GLXdrawable *
@@ -909,7 +909,7 @@ glxWinCreateDrawable(__GLXscreen *screen,
{
__GLXWinDrawable *glxPriv;
- glxPriv = xalloc(sizeof *glxPriv);
+ glxPriv = malloc(sizeof *glxPriv);
if (glxPriv == NULL)
return NULL;
@@ -917,7 +917,7 @@ glxWinCreateDrawable(__GLXscreen *screen,
memset(glxPriv, 0, sizeof *glxPriv);
if(!__glXDrawableInit(&glxPriv->base, screen, pDraw, type, drawId, conf)) {
- xfree(glxPriv);
+ free(glxPriv);
return NULL;
}
@@ -1517,7 +1517,7 @@ glxWinContextDestroy(__GLXcontext *base)
gc->ctx = NULL;
}
- xfree(gc);
+ free(gc);
}
}
@@ -1535,7 +1535,7 @@ glxWinCreateContext(__GLXscreen *screen,
glxWinReleaseTexImage
};
- context = (__GLXWinContext *)xcalloc(1, sizeof(__GLXWinContext));
+ context = (__GLXWinContext *)calloc(1, sizeof(__GLXWinContext));
if (!context)
return NULL;
@@ -1749,7 +1749,7 @@ glxWinCreateConfigs(HDC hdc, glxWinScreen *screen)
GLWIN_DEBUG_MSG("DescribePixelFormat says %d possible pixel formats", numConfigs);
/* alloc */
- result = xalloc(sizeof(GLXWinConfig) * numConfigs);
+ result = malloc(sizeof(GLXWinConfig) * numConfigs);
if (NULL == result)
{
@@ -1992,7 +1992,7 @@ glxWinCreateConfigsExt(HDC hdc, glxWinScreen *screen)
GLWIN_DEBUG_MSG("wglGetPixelFormatAttribivARB says %d possible pixel formats", numConfigs);
/* alloc */
- result = xalloc(sizeof(GLXWinConfig) * numConfigs);
+ result = malloc(sizeof(GLXWinConfig) * numConfigs);
if (NULL == result)
{