git.asbjorn.biz
/
swftools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
gcc 2.95.x fixes
[swftools.git]
/
src
/
png2swf.c
diff --git
a/src/png2swf.c
b/src/png2swf.c
index
91cfb32
..
b03a11d
100644
(file)
--- a/
src/png2swf.c
+++ b/
src/png2swf.c
@@
-746,9
+746,10
@@
int CheckInputFile(char *fname, char **realname)
sprintf(s, "%s.PNG", fname);
if ((fi = fopen(s, "rb")) == NULL) {
sprintf(s, "%s.Png", fname);
sprintf(s, "%s.PNG", fname);
if ((fi = fopen(s, "rb")) == NULL) {
sprintf(s, "%s.Png", fname);
- if ((fi = fopen(s, "rb")) == NULL)
+ if ((fi = fopen(s, "rb")) == NULL) {
fprintf(stderr, "Couldn't open %s!\n", fname);
return -1;
fprintf(stderr, "Couldn't open %s!\n", fname);
return -1;
+ }
}
}
}
}
}
}
@@
-778,7
+779,9
@@
int args_callback_option(char *arg, char *val)
case 'r':
if (val)
global.framerate = atof(val);
case 'r':
if (val)
global.framerate = atof(val);
- if ((global.framerate < 1.0/256) ||(global.framerate >= 256.0)) {
+ /* removed framerate>0 restriction in order to make
+ Flash Communication Server compatible SWFs */
+ if ((global.framerate < 0) ||(global.framerate >= 256.0)) {
if (VERBOSE(1))
fprintf(stderr,
"Error: You must specify a valid framerate between 1/256 and 255.\n");
if (VERBOSE(1))
fprintf(stderr,
"Error: You must specify a valid framerate between 1/256 and 255.\n");
@@
-803,9
+806,15
@@
int args_callback_option(char *arg, char *val)
break;
case 'v':
break;
case 'v':
- if (val)
- global.verbose = atoi(val);
- res = 1;
+ global.verbose++;
+ res = 0;
+ break;
+
+ case 'q':
+ global.verbose--;
+ if(global.verbose<0)
+ global.verbose = 0;
+ res = 0;
break;
case 'X':
break;
case 'X':
@@
-845,6
+854,7
@@
static struct options_t options[] = {
{"X", "pixel"},
{"Y", "pixel"},
{"v", "verbose"},
{"X", "pixel"},
{"Y", "pixel"},
{"v", "verbose"},
+{"q", "quiet"},
{"C", "cgi"},
{"V", "version"},
{0,0}
{"C", "cgi"},
{"V", "version"},
{0,0}
@@
-884,7
+894,8
@@
void args_callback_usage(char *name)
printf("-z , --zlib <zlib> Enable Flash 6 (MX) Zlib Compression\n");
printf("-X , --pixel <width> Force movie width to <width> (default: autodetect)\n");
printf("-Y , --pixel <height> Force movie height to <height> (default: autodetect)\n");
printf("-z , --zlib <zlib> Enable Flash 6 (MX) Zlib Compression\n");
printf("-X , --pixel <width> Force movie width to <width> (default: autodetect)\n");
printf("-Y , --pixel <height> Force movie height to <height> (default: autodetect)\n");
- printf("-v , --verbose <level> Set verbose level (0=quiet, 1=default, 2=debug)\n");
+ printf("-v , --verbose Be verbose. Use more than one -v for greater effect \n");
+ printf("-q , --quiet Omit normal log messages, only log errors\n");
printf("-C , --cgi For use as CGI- prepend http header, write to stdout\n");
printf("-V , --version Print version information and exit\n");
printf("\n");
printf("-C , --cgi For use as CGI- prepend http header, write to stdout\n");
printf("-V , --version Print version information and exit\n");
printf("\n");