now using MALLOC, CALLOC, FREE, etc macros

This commit is contained in:
Brian Paul
1999-10-13 18:49:47 +00:00
parent bd5cdaf444
commit 80af3614d8
5 changed files with 24 additions and 24 deletions

View File

@@ -52,7 +52,7 @@ static tfxTexInfo *fxAllocTexObjData(fxMesaContext fxMesa)
tfxTexInfo *ti;
int i;
if(!(ti=malloc(sizeof(tfxTexInfo)))) {
if(!(ti=MALLOC(sizeof(tfxTexInfo)))) {
fprintf(stderr,"fx Driver: out of memory !\n");
fxCloseHardware();
exit(-1);
@@ -276,7 +276,7 @@ void fxDDTexDel(GLcontext *ctx, struct gl_texture_object *tObj)
fxTMFreeTexture(fxMesa,tObj);
free(ti);
FREE(ti);
tObj->DriverData=NULL;
ctx->NewState|=NEW_TEXTURING;
@@ -833,7 +833,7 @@ static void fxTexBuildImageMap(const struct gl_texture_image *image,
(*istranslate)=GL_TRUE;
if(!(*dest)) {
if(!((*dest)=src=(unsigned short *)malloc(sizeof(unsigned char)*w*h))) {
if(!((*dest)=src=(unsigned short *)MALLOC(sizeof(unsigned char)*w*h))) {
fprintf(stderr,"fx Driver: out of memory !\n");
fxCloseHardware();
exit(-1);
@@ -861,7 +861,7 @@ static void fxTexBuildImageMap(const struct gl_texture_image *image,
(*istranslate)=GL_TRUE;
if(!(*dest)) {
if(!((*dest)=src=(unsigned short *)malloc(sizeof(unsigned short)*w*h))) {
if(!((*dest)=src=(unsigned short *)MALLOC(sizeof(unsigned short)*w*h))) {
fprintf(stderr,"fx Driver: out of memory !\n");
fxCloseHardware();
exit(-1);
@@ -905,7 +905,7 @@ static void fxTexBuildImageMap(const struct gl_texture_image *image,
(*istranslate)=GL_TRUE;
if(!(*dest)) {
if(!((*dest)=src=(unsigned short *)malloc(sizeof(unsigned short)*w*h))) {
if(!((*dest)=src=(unsigned short *)MALLOC(sizeof(unsigned short)*w*h))) {
fprintf(stderr,"fx Driver: out of memory !\n");
fxCloseHardware();
exit(-1);
@@ -955,7 +955,7 @@ static void fxTexBuildImageMap(const struct gl_texture_image *image,
(*istranslate)=GL_TRUE;
if(!(*dest)) {
if(!((*dest)=src=(unsigned short *)malloc(sizeof(unsigned short)*w*h))) {
if(!((*dest)=src=(unsigned short *)MALLOC(sizeof(unsigned short)*w*h))) {
fprintf(stderr,"fx Driver: out of memory !\n");
fxCloseHardware();
exit(-1);
@@ -1046,7 +1046,7 @@ void fxDDTexImg(GLcontext *ctx, GLenum target,
return;
} else {
if(mml->translated)
free(mml->data);
FREE(mml->data);
mml->data=NULL;
}
}