From 639537b59f2caa6f5bb016f3b15ceb3c2be3fe3b Mon Sep 17 00:00:00 2001 From: kramm Date: Tue, 23 Oct 2001 17:07:48 +0000 Subject: [PATCH] command line option --version now works --- src/swfdump.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) 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) { -- 1.7.10.4