rfxswf cleanups: TAG structure and ResetWriteBits/ResetReadBits
[swftools.git] / src / swfdump.c
index ca8ee27..c292c89 100644 (file)
@@ -81,6 +81,13 @@ int args_callback_command(char*name,char*val)
     return 0;
 }
 
+char* what;
+char* testfunc(char*str)
+{
+    printf("%s: %s\n", what, str);
+    return 0;
+}
+
 int main (int argc,char ** argv)
 { 
     SWF swf;
@@ -117,9 +124,9 @@ int main (int argc,char ** argv)
 
 #ifdef HAVE_STAT
     fstat(f, &statbuf);
-    if(statbuf.st_size != swf.fileSize)
+    if(statbuf.st_size != swf.FileSize)
         fprintf(stderr, "Error: Real Filesize (%d) doesn't match header Filesize (%d)",
-                statbuf.st_size, swf.fileSize);
+                statbuf.st_size, swf.FileSize);
 #endif
 
     close(f);
@@ -152,8 +159,8 @@ int main (int argc,char ** argv)
         else if(tag->id == ST_PLACEOBJECT || 
                 tag->id == ST_PLACEOBJECT2) {
             printf(" places id %04x at depth %04x", swf_GetPlaceID(tag), swf_GetDepth(tag));
-            if(swf_TagGetName(tag))
-                printf(" name \"%s\"",swf_TagGetName(tag));
+            if(swf_GetName(tag))
+                printf(" name \"%s\"",swf_GetName(tag));
         }
         else if(tag->id == ST_REMOVEOBJECT) {
             printf(" removes id %04x from depth %04x", swf_GetPlaceID(tag), swf_GetDepth(tag));
@@ -178,6 +185,13 @@ int main (int argc,char ** argv)
             actions = swf_GetActions(tag);
 
             swf_DumpActions(actions, myprefix);
+
+/*          what = "URL";
+            ActionEnumerateURLs(actions, testfunc);
+            what = "String";
+            ActionEnumerateStrings(actions, testfunc);
+            what = "Target";
+            ActionEnumerateTargets(actions, testfunc);*/
         }
         tag = tag->next;
     }