[MPlayer-cvslog] CVS: main m_option.c,1.47,1.48
Alban Bedel CVS
syncmail at mplayerhq.hu
Wed Mar 15 18:16:16 CET 2006
CVS change done by Alban Bedel CVS
Update of /cvsroot/mplayer/main
In directory mail:/var2/tmp/cvs-serv17818
Modified Files:
m_option.c
Log Message:
Small fix with object list (-vf) help.
Tell the user when an object have no option description instead of
falling back to the "normal" help, like with -vf pp=help.
Don't display a useless error message when querying the help of
an object option (as in -vf scale=presize=help).
Index: m_option.c
===================================================================
RCS file: /cvsroot/mplayer/main/m_option.c,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -r1.47 -r1.48
--- m_option.c 4 Mar 2006 17:33:55 -0000 1.47
+++ m_option.c 15 Mar 2006 17:16:13 -0000 1.48
@@ -1211,7 +1211,8 @@
}
r = m_option_parse(opt,str,p,NULL,M_CONFIG_FILE);
if(r < 0) {
- mp_msg(MSGT_CFGPARSER, MSGL_ERR, "Option %s: Error while parsing %s parameter %s (%s)\n",opt_name,obj_name,str,p);
+ if(r > M_OPT_EXIT)
+ mp_msg(MSGT_CFGPARSER, MSGL_ERR, "Option %s: Error while parsing %s parameter %s (%s)\n",opt_name,obj_name,str,p);
eq[0] = '=';
return r;
}
@@ -1229,7 +1230,8 @@
opt = &desc->fields[(*nold)];
r = m_option_parse(opt,opt->name,str,NULL,M_CONFIG_FILE);
if(r < 0) {
- mp_msg(MSGT_CFGPARSER, MSGL_ERR, "Option %s: Error while parsing %s parameter %s (%s)\n",opt_name,obj_name,opt->name,str);
+ if(r > M_OPT_EXIT)
+ mp_msg(MSGT_CFGPARSER, MSGL_ERR, "Option %s: Error while parsing %s parameter %s (%s)\n",opt_name,obj_name,opt->name,str);
return r;
}
if(dst) {
@@ -1424,6 +1426,10 @@
if(param) {
if(!desc && _ret) {
+ if(!strcmp(param,"help")) {
+ mp_msg(MSGT_CFGPARSER, MSGL_INFO, "Option %s: %s have no option description.\n",opt,str);
+ return M_OPT_EXIT - 1;
+ }
plist = calloc(4,sizeof(char*));
plist[0] = strdup("_oldargs_");
plist[1] = strdup(param);
More information about the MPlayer-cvslog
mailing list