git.asbjorn.biz
/
swftools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rfxswf cleanups: added prefixes and altered structure name conventions
[swftools.git]
/
lib
/
args.h
diff --git
a/lib/args.h
b/lib/args.h
index
0e99360
..
733ab75
100644
(file)
--- a/
lib/args.h
+++ b/
lib/args.h
@@
-66,7
+66,7
@@
struct options_t
char*longoption;
};
char*longoption;
};
-int args_long2shortoption(options_t*options, char*name, char*val)
+int args_long2shortoption(struct options_t*options, char*name, char*val)
{
char*equal = strchr(name,'=');
if (equal) {
{
char*equal = strchr(name,'=');
if (equal) {
@@
-79,7
+79,12
@@
int args_long2shortoption(options_t*options, char*name, char*val)
+(equal?strlen(equal)+2:2));
strcpy(tmp, options->shortoption);
if(equal) {
+(equal?strlen(equal)+2:2));
strcpy(tmp, options->shortoption);
if(equal) {
- strcpy(&tmp[strlen(tmp)], equal);
+ //strcpy(&tmp[strlen(tmp)], equal);
+ int ret = args_callback_option(tmp, equal);
+ if(!ret) {
+ fprintf(stderr, "Warning: Option --%s takes no parameter.\n", name);
+ }
+ return 0;
}
return args_callback_option(tmp,val);
}
}
return args_callback_option(tmp,val);
}