Make cmdutils.c:parse_options accept as argument a function to parse

bare command line parameters.
patch by Stefano Sabatini, stefano.sabatini-lala poste it

Originally committed as revision 10112 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Stefano Sabatini 2007-08-13 23:03:36 +00:00 committed by Diego Biurrun
parent 9c0edaaf13
commit 60a9966e4d
4 changed files with 18 additions and 11 deletions

View file

@ -61,7 +61,8 @@ static const OptionDef* find_option(const OptionDef *po, const char *name){
return po;
}
void parse_options(int argc, char **argv, const OptionDef *options)
void parse_options(int argc, char **argv, const OptionDef *options,
void (* parse_arg_function)(const char*))
{
const char *opt, *arg;
int optindex, handleoptions=1;
@ -112,7 +113,8 @@ unknown_opt:
po->u.func_arg(arg);
}
} else {
parse_arg_file(opt);
if (parse_arg_function)
parse_arg_function(opt);
}
}
}