From b3bf5bf6cdf7d80df45de711b079ce3544acd39f Mon Sep 17 00:00:00 2001 From: kramm Date: Sun, 2 Dec 2001 12:09:06 +0000 Subject: [PATCH] s/GetDataSize/GetTagLen/g s/GetDataSizePtr/GetTagLenPtr/g --- lib/old_rfxswf.h | 2 ++ lib/rfxswf.c | 6 +++--- lib/rfxswf.h | 4 ++-- pdf2swf/swfoutput.cc | 6 +++--- 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/lib/old_rfxswf.h b/lib/old_rfxswf.h index 95b3f11..f70d063 100644 --- a/lib/old_rfxswf.h +++ b/lib/old_rfxswf.h @@ -21,3 +21,5 @@ #define bitmask bitWritePos */ +#define GetDataSize GetTagLen +#define GetDataSizePtr GetTagLenPtr diff --git a/lib/rfxswf.c b/lib/rfxswf.c index 605e630..e3f174f 100644 --- a/lib/rfxswf.c +++ b/lib/rfxswf.c @@ -52,8 +52,8 @@ TAG * swf_NextTag(TAG * t) { return t->next; } TAG * swf_PrevTag(TAG * t) { return t->prev; } int swf_GetFrameNo(TAG * t) { return t->frame; } U16 swf_GetTagID(TAG * t) { return t->id; } -U32 swf_GetDataSize(TAG * t) { return t->len; } -U8* swf_GetDataSizePtr(TAG * t) { return &(t->data[t->len]); } +U32 swf_GetTagLen(TAG * t) { return t->len; } +U8* swf_GetTagLenPtr(TAG * t) { return &(t->data[t->len]); } U32 swf_GetTagPos(TAG * t) { return t->pos; } // Basic Data Access Functions @@ -746,7 +746,7 @@ int swf_WriteSWF(int handle,SWF * swf) // Writes SWF to file, returns lengt swf_SetU16(&t1,swf->frameRate); swf_SetU16(&t1,swf->frameCount); - l = swf_GetDataSize(&t1); + l = swf_GetTagLen(&t1); swf->fileSize = l+len; t1.len = 4; // bad & ugly trick ! swf_SetU32(&t1,swf->fileSize); diff --git a/lib/rfxswf.h b/lib/rfxswf.h index 62d270d..d619aeb 100644 --- a/lib/rfxswf.h +++ b/lib/rfxswf.h @@ -132,8 +132,8 @@ TAG * swf_PrevTag(TAG * t); int swf_GetFrameNo(TAG * t); // should be renamed to TagGetFrame U16 swf_GetTagID(TAG * t); // ... TagGetID -U32 swf_GetDataSize(TAG * t); // ... TagGetDataSize -U8* swf_GetDataSizePtr(TAG * t); +U32 swf_GetTagLen(TAG * t); // ... TagGetTagLen +U8* swf_GetTagLenPtr(TAG * t); U32 swf_GetBits(TAG * t,int nbits); S32 swf_GetSBits(TAG * t,int nbits); diff --git a/pdf2swf/swfoutput.cc b/pdf2swf/swfoutput.cc index 4644df3..de6ace2 100644 --- a/pdf2swf/swfoutput.cc +++ b/pdf2swf/swfoutput.cc @@ -606,7 +606,7 @@ SWFFont::~SWFFont() logf(" Font %s has %d used characters",fontid, usednum); TAG*ftag = swf_InsertTag(swf.firstTag,ST_DEFINEFONT); swf_SetU16(ftag, this->swfid); - int initpos = swf_GetDataSize(ftag); + int initpos = swf_GetTagLen(ftag); swfmatrix m; m.m11 = m.m22 = 1; m.m21 = m.m12 = 0; @@ -615,12 +615,12 @@ SWFFont::~SWFFont() for(t=0;tdata[ptr[t]] = swf_GetDataSize(ftag)-initpos; + *(U16*)&ftag->data[ptr[t]] = swf_GetTagLen(ftag)-initpos; swflastx=0; swflasty=0; swf_SetU8(ftag,0x10); //0 fill bits, 0 linestyle bits -- 1.7.10.4