From: kramm Date: Fri, 5 Nov 2004 17:32:46 +0000 (+0000) Subject: removed high-level memory allocation functions from q.c to rfxswf.c. X-Git-Tag: release-0-6-3~213 X-Git-Url: http://git.asbjorn.biz/?p=swftools.git;a=commitdiff_plain;h=efc92c191c8417ab626b0e8e639f8d516e4000ff removed high-level memory allocation functions from q.c to rfxswf.c. --- diff --git a/lib/q.c b/lib/q.c index 400c92d..7d257f7 100644 --- a/lib/q.c +++ b/lib/q.c @@ -36,30 +36,6 @@ char* strdup_n(const char*str, int size) return m; } #endif -void* qmalloc_internal(int len) -{ - void*val = malloc(len); - if(!val) { - printf("memory error! Couldn't reserve %d bytes\n", len); - fprintf(stderr, "memory error! Couldn't reserve %d bytes\n", len); - exit(1); - } - return val; -} -void* qrealloc_internal(void*old, int len) -{ - void*val = realloc(old, len); - if(!val) { - printf("memory error! Couldn't reserve %d bytes\n", len); - fprintf(stderr, "memory error! Couldn't reserve %d bytes\n", len); - exit(1); - } - return val; -} -void qfree_internal(void*old) -{ - free(old); -} char*qstrdup(const char*string) { return strdup(string); diff --git a/lib/q.h b/lib/q.h index 064949a..0e9d602 100644 --- a/lib/q.h +++ b/lib/q.h @@ -128,14 +128,6 @@ void** heap_flatten(heap_t*h); char* strdup_n(const char*str, int size); -void* qmalloc_internal(int len); -void* qrealloc_internal(void*old, int len); -void qfree_internal(void*old); - -#define qmalloc(len) qmalloc_internal(len) -#define qrealloc(old, len) qmalloc_internal(old, len) -#define qfree(old) qmalloc_internal(old) - #ifdef __cplusplus } #endif diff --git a/lib/rfxswf.c b/lib/rfxswf.c index 15b7e2a..8513966 100644 --- a/lib/rfxswf.c +++ b/lib/rfxswf.c @@ -835,13 +835,6 @@ void swf_ResetTag(TAG*tag, U16 id) tag->id = id; } -TAG* swf_CopyTag(TAG*tag, TAG*to_copy) -{ - tag = swf_InsertTag(tag, to_copy->id); - swf_SetBlock(tag, to_copy->data, to_copy->len); - return tag; -} - int swf_DeleteTag(TAG * t) { if (!t) return -1; diff --git a/lib/rfxswf.h b/lib/rfxswf.h index 548e679..5fa7d1b 100644 --- a/lib/rfxswf.h +++ b/lib/rfxswf.h @@ -224,7 +224,6 @@ int swf_DeleteTag(TAG * t); void swf_ClearTag(TAG * t); //frees tag data void swf_ResetTag(TAG*tag, U16 id); //set's tag position and length to 0, without freeing it -TAG* swf_CopyTag(TAG*tag, TAG*to_copy); //stores a copy of another tag into this taglist void swf_SetTagPos(TAG * t,U32 pos); // resets Bitcount U32 swf_GetTagPos(TAG * t); @@ -731,9 +730,6 @@ void swf_Optimize(SWF*swf); U8 swf_isDefiningTag(TAG * t); U8 swf_isPseudoDefiningTag(TAG * t); U8 swf_isAllowedSpriteTag(TAG * t); -U8 swf_isImageTag(TAG*tag); -U8 swf_isShapeTag(TAG*tag); - U16 swf_GetDefineID(TAG * t); SRECT swf_GetDefineBBox(TAG * t); void swf_SetDefineID(TAG * t, U16 newid);