X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=src%2Fjpeg2swf.c;h=4781b486154bd8438a1e1187e49a3470b2bc9053;hb=ca99f5ffc66edc170076cfee5d32da6258b5d040;hp=17e6226a111d6a261577288453191da0963d279d;hpb=0534ee54aaf7fc82a1f8b4f565e1e277619173d6;p=swftools.git diff --git a/src/jpeg2swf.c b/src/jpeg2swf.c index 17e6226..4781b48 100644 --- a/src/jpeg2swf.c +++ b/src/jpeg2swf.c @@ -15,8 +15,7 @@ #include #include #include "../lib/rfxswf.h" - -#include "args.h" // not really a header ;-) +#include "../lib/args.h" // not really a header ;-) #define MAX_INPUT_FILES 1024 #define VERBOSE(x) (global.verbose>=x) @@ -176,7 +175,7 @@ int CheckInputFile(char * fname,char ** realname) if ((f=fopen(s,"rb"))==NULL) { sprintf(s,"%s.JPEG",fname); if ((f=fopen(s,"rb"))==NULL) - return 0; + return -1; } } } @@ -233,7 +232,7 @@ int args_callback_option(char*arg,char*val) if (val) global.force_height = atoi(val); res = 1; break; case 'V': - printf("jpeg2swf - part of swftools 0.0.1\n");exit(0); + printf("jpeg2swf - part of %s %s\n", PACKAGE, VERSION);exit(0); default: res = -1; @@ -247,27 +246,18 @@ int args_callback_option(char*arg,char*val) return res; } -struct options_t -{ char*shortoption; - char*longoption; -} options[] = +struct options_t options[] = {{"q","quality"}, {"o","output"}, {"r","rate"}, {"v","verbose"}, {"X","width"}, {"Y","height"}, - {"v","verbose"}, {"V","version"} }; int args_callback_longoption(char*name,char*val) { - int t; - for(t=0;t