From 38c19185b95fb1c520088809254ab915db31ff5c Mon Sep 17 00:00:00 2001 From: kramm Date: Fri, 21 Jan 2005 17:49:55 +0000 Subject: [PATCH] new option -E. --- src/swfdump.c | 52 +++++++++++++++++++++++++++++++++++----------------- src/swfdump.doc | 2 ++ 2 files changed, 37 insertions(+), 17 deletions(-) diff --git a/src/swfdump.c b/src/swfdump.c index 051b8a2..294a3f2 100644 --- a/src/swfdump.c +++ b/src/swfdump.c @@ -51,6 +51,7 @@ static char * indent = " "; static int placements = 0; static int action = 0; static int html = 0; +static int xhtml = 0; static int xy = 0; static int showtext = 0; static int showshapes = 0; @@ -63,6 +64,7 @@ static struct options_t options[] = { {"D", "full"}, {"V", "version"}, {"e", "html"}, +{"E", "xhtml"}, {"a", "action"}, {"t", "text"}, {"s", "shapes"}, @@ -103,6 +105,11 @@ int args_callback_option(char*name,char*val) html = 1; return 0; } + else if(name[0]=='E') { + html = 1; + xhtml = 1; + return 0; + } else if(name[0]=='X') { xy |= 1; return 0; @@ -816,23 +823,34 @@ int main (int argc,char ** argv) fprintf(stderr, "Fileversion>9\n"); exit(1); } - printf("\n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - "\n", xsize, ysize, fileversions[swf.fileVersion], - filename, filename, xsize, ysize); + + if(xhtml) { + printf("\n" + "\n" + "\n" + "\n" + "\n" + "\n" + "\n\n", filename, xsize, ysize, filename); + } else { + printf("\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + "\n", xsize, ysize, fileversions[swf.fileVersion], + filename, filename, xsize, ysize); + } return 0; } printf("[HEADER] File version: %d\n", swf.fileVersion); diff --git a/src/swfdump.doc b/src/swfdump.doc index 45aaa04..5e30568 100644 --- a/src/swfdump.doc +++ b/src/swfdump.doc @@ -16,6 +16,8 @@ display placement information about objects. Print version info and exit -e, --html Print out html code for embedding the file +-E, --xhtml + Print out xhtml code for embedding the file -a, --action Disassemble action tags -t, --text -- 1.7.10.4