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);
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
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;
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);
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);