From: kramm Date: Tue, 23 Oct 2001 17:00:00 +0000 (+0000) Subject: * now uses the args_long2short function X-Git-Tag: release-0-0-2~13 X-Git-Url: http://git.asbjorn.biz/?a=commitdiff_plain;h=bcf7fbf2cd6a7e9ecdfb50ac7bff750c27936c02;hp=d609c6ade28fa58a154225333bdfb245ae691d2d;p=swftools.git * now uses the args_long2short function * header files: args.h is moved into lib --- diff --git a/pdf2swf/pdf2swf.cc b/pdf2swf/pdf2swf.cc index c784f80..a99e176 100644 --- a/pdf2swf/pdf2swf.cc +++ b/pdf2swf/pdf2swf.cc @@ -12,7 +12,7 @@ #include #include #include "../config.h" -#include "args.h" +#include "../lib/args.h" #include "pdfswf.h" #include "t1lib.h" extern "C" { @@ -89,39 +89,18 @@ int args_callback_option(char*name,char*val) { return 0; } -struct options_t -{ - char shortoption; - char*longoption; -} options[] = -{{'o',"output"}, - {'V',"version"}, - {'i',"ignore"}, - {'s',"shapes"}, - {'j',"jpegquality"}, - {'p',"pages"} +struct options_t options[] = +{{"o","output"}, + {"V","version"}, + {"i","ignore"}, + {"s","shapes"}, + {"j","jpegquality"}, + {"p","pages"}, + {0,0} }; int args_callback_longoption(char*name,char*val) { - int t; - char*equal = strchr(name,'='); - if (equal) { - *equal = 0; - equal++; - } - for(t=0;t