Mercurial > mplayer.hg
diff m_option.c @ 16345:feb16d0117c8
allow multiple help clauses on the command line, Patch by kiriuja " mplayer-patches AH en-directo POUM net "
This one makes
mplayer -vo help -ao help -ac help -vc help -pphelp -af help -vfm help -vf help -afm help -fstype help
produce the desired output.
From the thread:
Date: Jul 16, 2005 8:25 PM
Subject: [MPlayer-dev-eng] [PATCH] allow multiple help clauses on the command line
author | gpoirier |
---|---|
date | Fri, 02 Sep 2005 08:29:30 +0000 |
parents | 32d9c8a0a02b |
children | 7ca9d8c0ae47 |
line wrap: on
line diff
--- a/m_option.c Fri Sep 02 00:05:21 2005 +0000 +++ b/m_option.c Fri Sep 02 08:29:30 2005 +0000 @@ -1005,7 +1005,7 @@ for(i = 0 ; mp_imgfmt_list[i].name ; i++) mp_msg(MSGT_CFGPARSER, MSGL_INFO, " %s",mp_imgfmt_list[i].name); mp_msg(MSGT_CFGPARSER, MSGL_INFO, "\n"); - return M_OPT_EXIT; + return M_OPT_EXIT - 1; } if (sscanf(param, "0x%x", &fmt) != 1) @@ -1093,7 +1093,7 @@ for(i = 0 ; mp_afmt_list[i].name ; i++) mp_msg(MSGT_CFGPARSER, MSGL_INFO, " %s",mp_afmt_list[i].name); mp_msg(MSGT_CFGPARSER, MSGL_INFO, "\n"); - return M_OPT_EXIT; + return M_OPT_EXIT - 1; } if (sscanf(param, "0x%x", &fmt) != 1) @@ -1212,7 +1212,7 @@ char min[50],max[50]; if(!desc->fields) { printf("%s doesn't have any options.\n\n",name); - return M_OPT_EXIT; + return M_OPT_EXIT - 1; } printf("\n Name Type Min Max\n\n"); for(n = 0 ; desc->fields[n].name ; n++) { @@ -1233,7 +1233,7 @@ max); } printf("\n"); - return M_OPT_EXIT; + return M_OPT_EXIT - 1; } for(nopts = 0 ; desc->fields[nopts].name ; nopts++) @@ -1545,7 +1545,7 @@ mp_msg(MSGT_VFILTER,MSGL_INFO," %-15s: %s\n", M_ST_MB(char*,ol->list[n],ol->name_off), M_ST_MB(char*,ol->list[n],ol->info_off)); - return M_OPT_EXIT; + return M_OPT_EXIT - 1; } ptr = str = strdup(param); @@ -1688,7 +1688,7 @@ pre += s) mp_msg(MSGT_CFGPARSER, MSGL_ERR, " %s",pre_name); mp_msg(MSGT_CFGPARSER, MSGL_ERR, "\n"); - return M_OPT_EXIT; + return M_OPT_EXIT - 1; } for(pre_name = M_ST_MB(char*,pre,obj_p->name_off) ; pre_name ;