Mercurial > mplayer.hg
comparison parser-mecmd.c @ 21312:d78e7d5bc6d5
localization of parser-m*cmd.c messages
author | ptt |
---|---|
date | Mon, 27 Nov 2006 15:46:36 +0000 |
parents | 1a14fde7680d |
children | 75837c33484b |
comparison
equal
deleted
inserted
replaced
21311:3e29b787f3b8 | 21312:d78e7d5bc6d5 |
---|---|
12 #ifdef MP_DEBUG | 12 #ifdef MP_DEBUG |
13 #include <assert.h> | 13 #include <assert.h> |
14 #endif | 14 #endif |
15 | 15 |
16 #include "mp_msg.h" | 16 #include "mp_msg.h" |
17 #include "help_mp.h" | |
17 #include "m_option.h" | 18 #include "m_option.h" |
18 #include "m_config.h" | 19 #include "m_config.h" |
19 #include "parser-mecmd.h" | 20 #include "parser-mecmd.h" |
20 | 21 |
21 void | 22 void |
75 if ((*opt == '-') && (*(opt+1) == '-') && (*(opt+2) == 0)) | 76 if ((*opt == '-') && (*(opt+1) == '-') && (*(opt+2) == 0)) |
76 { | 77 { |
77 no_more_opts = 1; | 78 no_more_opts = 1; |
78 if (i+1 >= argc) | 79 if (i+1 >= argc) |
79 { | 80 { |
80 mp_msg(MSGT_CFGPARSER, MSGL_ERR, "'--' indicates no more options, but no filename was given on the command line.\n"); | 81 mp_msg(MSGT_CFGPARSER, MSGL_ERR, MSGTR_NoFileGivenOnCommandLine); |
81 goto err_out; | 82 goto err_out; |
82 } | 83 } |
83 continue; | 84 continue; |
84 } | 85 } |
85 | 86 |
90 opt++; | 91 opt++; |
91 mp_msg(MSGT_CFGPARSER, MSGL_DBG3, "this_opt = option: %s\n", opt); | 92 mp_msg(MSGT_CFGPARSER, MSGL_DBG3, "this_opt = option: %s\n", opt); |
92 mp_opt = m_config_get_option(config,opt); | 93 mp_opt = m_config_get_option(config,opt); |
93 if(!mp_opt) { | 94 if(!mp_opt) { |
94 tmp = M_OPT_UNKNOWN; | 95 tmp = M_OPT_UNKNOWN; |
95 mp_msg(MSGT_CFGPARSER, MSGL_ERR, "-%s is not an MEncoder option\n",opt); | 96 mp_msg(MSGT_CFGPARSER, MSGL_ERR, MSGTR_NotAnMEncoderOption, opt); |
96 goto err_out; | 97 goto err_out; |
97 } | 98 } |
98 if(!entry || (mp_opt->flags & M_OPT_GLOBAL)){ | 99 if(!entry || (mp_opt->flags & M_OPT_GLOBAL)){ |
99 tmp = m_config_set_option(config, opt, argv[i + 1]); | 100 tmp = m_config_set_option(config, opt, argv[i + 1]); |
100 if (tmp <= M_OPT_EXIT) { | 101 if (tmp <= M_OPT_EXIT) { |
102 tmp = M_OPT_EXIT - tmp; | 103 tmp = M_OPT_EXIT - tmp; |
103 } | 104 } |
104 else | 105 else |
105 if(tmp < 0){ | 106 if(tmp < 0){ |
106 // mp_msg(MSGT_CFGPARSER, MSGL_ERR, "m_config_set_option() failed (%d)\n",tmp); | 107 // mp_msg(MSGT_CFGPARSER, MSGL_ERR, "m_config_set_option() failed (%d)\n",tmp); |
107 mp_msg(MSGT_CFGPARSER, MSGL_FATAL, "Error parsing option on the command line: -%s\n",opt); | 108 mp_msg(MSGT_CFGPARSER, MSGL_FATAL, MSGTR_ErrorParsingOptionOnCommandLine, opt); |
108 goto err_out; | 109 goto err_out; |
109 } | 110 } |
110 } else { | 111 } else { |
111 tmp = m_config_check_option(config, opt, argv[i + 1]); | 112 tmp = m_config_check_option(config, opt, argv[i + 1]); |
112 if (tmp <= M_OPT_EXIT) { | 113 if (tmp <= M_OPT_EXIT) { |
139 | 140 |
140 if (opt_exit) | 141 if (opt_exit) |
141 exit(0); | 142 exit(0); |
142 if(nf == 0) { | 143 if(nf == 0) { |
143 m_entry_list_free(lst); | 144 m_entry_list_free(lst); |
144 mp_msg(MSGT_CFGPARSER, MSGL_ERR, "No file given\n"); | 145 mp_msg(MSGT_CFGPARSER, MSGL_ERR, MSGTR_NoFileGiven); |
145 return NULL; | 146 return NULL; |
146 } | 147 } |
147 return lst; | 148 return lst; |
148 | 149 |
149 err_out: | 150 err_out: |