diff options
Diffstat (limited to 'src/common')
-rw-r--r-- | src/common/grfio.c | 12 | ||||
-rw-r--r-- | src/common/malloc.h | 5 | ||||
-rw-r--r-- | src/common/strlib.c | 2 |
3 files changed, 7 insertions, 12 deletions
diff --git a/src/common/grfio.c b/src/common/grfio.c index 88642cfe5..cc0e1bb42 100644 --- a/src/common/grfio.c +++ b/src/common/grfio.c @@ -406,7 +406,7 @@ void* grfio_reads(const char* fname, int* size) fseek(in,0,SEEK_END); declen = ftell(in); fseek(in,0,SEEK_SET); - buf2 = (unsigned char *)aMallocA(declen+1); // +1 for resnametable zero-termination + buf2 = (unsigned char *)aMalloc(declen+1); // +1 for resnametable zero-termination fileReadCount = fread(buf2, 1, declen, in); fclose(in); @@ -430,13 +430,13 @@ void* grfio_reads(const char* fname, int* size) FILE* in = fopen(grfname, "rb"); if( in != NULL ) { - unsigned char *buf = (unsigned char *)aMallocA(entry->srclen_aligned); + unsigned char *buf = (unsigned char *)aMalloc(entry->srclen_aligned); size_t fileReadCount; fseek(in, entry->srcpos, 0); fileReadCount = fread(buf, 1, entry->srclen_aligned, in); fclose(in); - buf2 = (unsigned char *)aMallocA(entry->declen+1); // +1 for resnametable zero-termination + buf2 = (unsigned char *)aMalloc(entry->declen+1); // +1 for resnametable zero-termination if( entry->type & FILELIST_TYPE_FILE ) {// file uLongf len; @@ -538,7 +538,7 @@ static int grfio_entryread(const char* grfname, int gentry) {// ****** Grf version 01xx ****** size_t fileReadCount; list_size = grf_size - ftell(fp); - grf_filelist = (unsigned char *) aMallocA(list_size); + grf_filelist = (unsigned char *) aMalloc(list_size); fileReadCount = fread(grf_filelist,1,list_size,fp); fclose(fp); @@ -604,8 +604,8 @@ static int grfio_entryread(const char* grfname, int gentry) return 4; } - rBuf = (unsigned char *)aMallocA(rSize); // Get a Read Size - grf_filelist = (unsigned char *)aMallocA(eSize); // Get a Extend Size + rBuf = (unsigned char *)aMalloc(rSize); // Get a Read Size + grf_filelist = (unsigned char *)aMalloc(eSize); // Get a Extend Size fileReadCount = fread(rBuf,1,rSize,fp); fclose(fp); decode_zip(grf_filelist, &eSize, rBuf, rSize); // Decode function diff --git a/src/common/malloc.h b/src/common/malloc.h index 5f8191d92..6b4e8e5c4 100644 --- a/src/common/malloc.h +++ b/src/common/malloc.h @@ -61,11 +61,6 @@ #endif -// deprecated, do not use -#define aMallocA aMalloc -#define aCallocA aCalloc -#define CREATE_A CREATE - /////////////// Buffer Creation ///////////////// // Full credit for this goes to Shinomori [Ajarn] diff --git a/src/common/strlib.c b/src/common/strlib.c index 7f79a5ef0..dfacbf136 100644 --- a/src/common/strlib.c +++ b/src/common/strlib.c @@ -1051,7 +1051,7 @@ StringBuf* StringBuf_Malloc() void StringBuf_Init(StringBuf* self) { self->max_ = 1024; - self->ptr_ = self->buf_ = (char*)aMallocA(self->max_ + 1); + self->ptr_ = self->buf_ = (char*)aMalloc(self->max_ + 1); } /// Appends the result of printf to the StringBuf |