From: kramm Date: Tue, 23 Oct 2001 17:07:48 +0000 (+0000) Subject: command line option --version now works X-Git-Tag: release-0-0-2~9 X-Git-Url: http://git.asbjorn.biz/?p=swftools.git;a=commitdiff_plain;h=639537b59f2caa6f5bb016f3b15ceb3c2be3fe3b command line option --version now works --- diff --git a/src/swfdump.c b/src/swfdump.c index fc9fda1..c6ab0d2 100644 --- a/src/swfdump.c +++ b/src/swfdump.c @@ -10,7 +10,7 @@ #include #include #include "../lib/rfxswf.h" -#include "args.h" +#include "../lib/args.h" char * filename = 0; @@ -19,16 +19,27 @@ char * filename = 0; once */ char idtab[65536]; +struct options_t options[] = +{ + {"v","verbose"}, + {"V","version"}, + {0,0} +}; + + int args_callback_option(char*name,char*val) { + if(!strcmp(name, "V")) { + printf("swfdump - part of %s %s\n", PACKAGE, VERSION); + } } int args_callback_longoption(char*name,char*val) { + return args_long2shortoption(options, name, val); } void args_callback_usage(char*name) { printf("Usage: %s file.swf\n", name); - printf("\n"); } int args_callback_command(char*name,char*val) {