aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/drivers/dri
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-09-03 09:54:39 +0200
committermarha <marha@users.sourceforge.net>2012-09-04 14:23:32 +0200
commitc18d12d1e36354ff32724c86ae25374d1a78607f (patch)
tree3db58d40725863f1d1145002f998a6cf0662fbf9 /mesalib/src/mesa/drivers/dri
parent77f54d0b20cc194e708bc664740e4c0b0e13c3dd (diff)
downloadvcxsrv-c18d12d1e36354ff32724c86ae25374d1a78607f.tar.gz
vcxsrv-c18d12d1e36354ff32724c86ae25374d1a78607f.tar.bz2
vcxsrv-c18d12d1e36354ff32724c86ae25374d1a78607f.zip
mesa xkeyboard-config git update 3 sep 2012
Diffstat (limited to 'mesalib/src/mesa/drivers/dri')
-rw-r--r--mesalib/src/mesa/drivers/dri/common/drisw_util.c12
-rw-r--r--mesalib/src/mesa/drivers/dri/common/xmlconfig.c30
-rw-r--r--mesalib/src/mesa/drivers/dri/swrast/swrast.c6
3 files changed, 24 insertions, 24 deletions
diff --git a/mesalib/src/mesa/drivers/dri/common/drisw_util.c b/mesalib/src/mesa/drivers/dri/common/drisw_util.c
index ed30e135f..a5bdf8988 100644
--- a/mesalib/src/mesa/drivers/dri/common/drisw_util.c
+++ b/mesalib/src/mesa/drivers/dri/common/drisw_util.c
@@ -68,7 +68,7 @@ driCreateNewScreen(int scrn, const __DRIextension **extensions,
*driver_configs = driDriverAPI.InitScreen(psp);
if (*driver_configs == NULL) {
- FREE(psp);
+ free(psp);
return NULL;
}
@@ -79,7 +79,7 @@ static void driDestroyScreen(__DRIscreen *psp)
{
if (psp) {
driDriverAPI.DestroyScreen(psp);
- FREE(psp);
+ free(psp);
}
}
@@ -179,7 +179,7 @@ driCreateContextAttribs(__DRIscreen *screen, int api,
if (!driDriverAPI.CreateContext(mesa_api, modes, pcp,
major_version, minor_version,
flags, error, shareCtx)) {
- FREE(pcp);
+ free(pcp);
return NULL;
}
@@ -210,7 +210,7 @@ driDestroyContext(__DRIcontext *pcp)
{
if (pcp) {
driDriverAPI.DestroyContext(pcp);
- FREE(pcp);
+ free(pcp);
}
}
@@ -290,7 +290,7 @@ static void dri_put_drawable(__DRIdrawable *pdp)
return;
driDriverAPI.DestroyBuffer(pdp);
- FREE(pdp);
+ free(pdp);
}
}
@@ -312,7 +312,7 @@ driCreateNewDrawable(__DRIscreen *psp,
dri_get_drawable(pdp);
if (!driDriverAPI.CreateBuffer(psp, pdp, &config->modes, GL_FALSE)) {
- FREE(pdp);
+ free(pdp);
return NULL;
}
diff --git a/mesalib/src/mesa/drivers/dri/common/xmlconfig.c b/mesalib/src/mesa/drivers/dri/common/xmlconfig.c
index 6d1d5ec61..929748400 100644
--- a/mesalib/src/mesa/drivers/dri/common/xmlconfig.c
+++ b/mesalib/src/mesa/drivers/dri/common/xmlconfig.c
@@ -86,7 +86,7 @@ static const char *__getProgramName () {
#endif
#if !defined(GET_PROGRAM_NAME)
-# if defined(__OpenBSD__) || defined(NetBSD) || defined(__UCLIBC__)
+# if defined(__OpenBSD__) || defined(NetBSD) || defined(__UCLIBC__) || defined(ANDROID)
/* This is a hack. It's said to work on OpenBSD, NetBSD and GNU.
* Rogelio M.Serrano Jr. reported it's also working with UCLIBC. It's
* used as a last resort, if there is no documented facility available. */
@@ -142,10 +142,10 @@ static GLuint countOptions (const driOptionCache *cache) {
return count;
}
-/** \brief Like strdup but using MALLOC and with error checking. */
+/** \brief Like strdup but using malloc and with error checking. */
#define XSTRDUP(dest,source) do { \
GLuint len = strlen (source); \
- if (!(dest = MALLOC (len+1))) { \
+ if (!(dest = malloc(len+1))) { \
fprintf (stderr, "%s: %d: out of memory.\n", __FILE__, __LINE__); \
abort(); \
} \
@@ -347,7 +347,7 @@ static GLboolean parseRanges (driOptionInfo *info, const XML_Char *string) {
if (*range == ',')
++nRanges;
- if ((ranges = MALLOC (nRanges*sizeof(driOptionRange))) == NULL) {
+ if ((ranges = malloc(nRanges*sizeof(driOptionRange))) == NULL) {
fprintf (stderr, "%s: %d: out of memory.\n", __FILE__, __LINE__);
abort();
}
@@ -382,9 +382,9 @@ static GLboolean parseRanges (driOptionInfo *info, const XML_Char *string) {
else
range = NULL;
}
- FREE (cp);
+ free(cp);
if (i < nRanges) {
- FREE (ranges);
+ free(ranges);
return GL_FALSE;
} else
assert (range == NULL);
@@ -702,8 +702,8 @@ void driParseOptionInfo (driOptionCache *info,
GLuint size, log2size;
for (size = 1, log2size = 0; size < minSize; size <<= 1, ++log2size);
info->tableSize = log2size;
- info->info = CALLOC (size * sizeof (driOptionInfo));
- info->values = CALLOC (size * sizeof (driOptionValue));
+ info->info = calloc(size, sizeof (driOptionInfo));
+ info->values = calloc(size, sizeof (driOptionValue));
if (info->info == NULL || info->values == NULL) {
fprintf (stderr, "%s: %d: out of memory.\n", __FILE__, __LINE__);
abort();
@@ -895,7 +895,7 @@ static void optConfEndElem (void *userData, const XML_Char *name) {
static void initOptionCache (driOptionCache *cache, const driOptionCache *info) {
cache->info = info->info;
cache->tableSize = info->tableSize;
- cache->values = MALLOC ((1<<info->tableSize) * sizeof (driOptionValue));
+ cache->values = malloc((1<<info->tableSize) * sizeof (driOptionValue));
if (cache->values == NULL) {
fprintf (stderr, "%s: %d: out of memory.\n", __FILE__, __LINE__);
abort();
@@ -959,7 +959,7 @@ void driParseConfigFiles (driOptionCache *cache, const driOptionCache *info,
if ((home = getenv ("HOME"))) {
GLuint len = strlen (home);
- filenames[1] = MALLOC (len + 7+1);
+ filenames[1] = malloc(len + 7+1);
if (filenames[1] == NULL)
__driUtilMessage ("Can't allocate memory for %s/.drirc.", home);
else {
@@ -990,7 +990,7 @@ void driParseConfigFiles (driOptionCache *cache, const driOptionCache *info,
}
if (filenames[1])
- FREE (filenames[1]);
+ free(filenames[1]);
}
void driDestroyOptionInfo (driOptionCache *info) {
@@ -999,18 +999,18 @@ void driDestroyOptionInfo (driOptionCache *info) {
GLuint i, size = 1 << info->tableSize;
for (i = 0; i < size; ++i) {
if (info->info[i].name) {
- FREE (info->info[i].name);
+ free(info->info[i].name);
if (info->info[i].ranges)
- FREE (info->info[i].ranges);
+ free(info->info[i].ranges);
}
}
- FREE (info->info);
+ free(info->info);
}
}
void driDestroyOptionCache (driOptionCache *cache) {
if (cache->values)
- FREE (cache->values);
+ free(cache->values);
}
GLboolean driCheckOption (const driOptionCache *cache, const char *name,
diff --git a/mesalib/src/mesa/drivers/dri/swrast/swrast.c b/mesalib/src/mesa/drivers/dri/swrast/swrast.c
index d528804b4..dbd339bd8 100644
--- a/mesalib/src/mesa/drivers/dri/swrast/swrast.c
+++ b/mesalib/src/mesa/drivers/dri/swrast/swrast.c
@@ -273,7 +273,7 @@ swrast_delete_renderbuffer(struct gl_renderbuffer *rb)
TRACE;
free(xrb->Base.Buffer);
- free(xrb);
+ _mesa_delete_renderbuffer(rb);
}
/* see bytes_per_line in libGL */
@@ -509,7 +509,7 @@ drawable_fail:
if (drawable)
free(drawable->row);
- FREE(drawable);
+ free(drawable);
return GL_FALSE;
}
@@ -811,7 +811,7 @@ dri_create_context(gl_api api,
context_fail:
- FREE(ctx);
+ free(ctx);
return GL_FALSE;
}