mp_msg level fix

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@5935 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
albeu 2002-05-02 10:43:27 +00:00
parent 4189e06396
commit 5a7be363f5
1 changed files with 11 additions and 11 deletions

View File

@ -821,7 +821,7 @@ int m_config_parse_config_file(m_config_t *config, char *conffile)
mp_msg(MSGT_CFGPARSER,MSGL_INFO,"Reading config file: %s", conffile); mp_msg(MSGT_CFGPARSER,MSGL_INFO,"Reading config file: %s", conffile);
if (config->recursion_depth > MAX_RECURSION_DEPTH) { if (config->recursion_depth > MAX_RECURSION_DEPTH) {
mp_msg(MSGT_CFGPARSER,MSGL_INFO,": too deep 'include'. check your configfiles\n"); mp_msg(MSGT_CFGPARSER,MSGL_ERR,": too deep 'include'. check your configfiles\n");
ret = -1; ret = -1;
goto out; goto out;
} }
@ -832,14 +832,14 @@ int m_config_parse_config_file(m_config_t *config, char *conffile)
} }
if ((line = (char *) malloc(MAX_LINE_LEN + 1)) == NULL) { if ((line = (char *) malloc(MAX_LINE_LEN + 1)) == NULL) {
mp_msg(MSGT_CFGPARSER,MSGL_INFO,"\ncan't get memory for 'line': %s", strerror(errno)); mp_msg(MSGT_CFGPARSER,MSGL_FATAL,"\ncan't get memory for 'line': %s", strerror(errno));
ret = -1; ret = -1;
goto out; goto out;
} }
if ((fp = fopen(conffile, "r")) == NULL) { if ((fp = fopen(conffile, "r")) == NULL) {
if (config->recursion_depth > 1) if (config->recursion_depth > 1)
mp_msg(MSGT_CFGPARSER,MSGL_INFO,": %s\n", strerror(errno)); mp_msg(MSGT_CFGPARSER,MSGL_ERR,": %s\n", strerror(errno));
free(line); free(line);
ret = 0; ret = 0;
goto out; goto out;
@ -849,7 +849,7 @@ int m_config_parse_config_file(m_config_t *config, char *conffile)
while (fgets(line, MAX_LINE_LEN, fp)) { while (fgets(line, MAX_LINE_LEN, fp)) {
if (errors >= 16) { if (errors >= 16) {
mp_msg(MSGT_CFGPARSER,MSGL_INFO,"too many errors\n"); mp_msg(MSGT_CFGPARSER,MSGL_FATAL,"too many errors\n");
goto out; goto out;
} }
@ -872,7 +872,7 @@ int m_config_parse_config_file(m_config_t *config, char *conffile)
opt[opt_pos++] = line[line_pos++]; opt[opt_pos++] = line[line_pos++];
if (opt_pos >= MAX_OPT_LEN) { if (opt_pos >= MAX_OPT_LEN) {
PRINT_LINENUM; PRINT_LINENUM;
mp_msg(MSGT_CFGPARSER,MSGL_INFO,"too long option\n"); mp_msg(MSGT_CFGPARSER,MSGL_ERR,"too long option\n");
errors++; errors++;
ret = -1; ret = -1;
goto nextline; goto nextline;
@ -880,7 +880,7 @@ int m_config_parse_config_file(m_config_t *config, char *conffile)
} }
if (opt_pos == 0) { if (opt_pos == 0) {
PRINT_LINENUM; PRINT_LINENUM;
mp_msg(MSGT_CFGPARSER,MSGL_INFO,"parse error\n"); mp_msg(MSGT_CFGPARSER,MSGL_ERR,"parse error\n");
ret = -1; ret = -1;
errors++; errors++;
continue; continue;
@ -899,7 +899,7 @@ int m_config_parse_config_file(m_config_t *config, char *conffile)
/* check '=' */ /* check '=' */
if (line[line_pos++] != '=') { if (line[line_pos++] != '=') {
PRINT_LINENUM; PRINT_LINENUM;
mp_msg(MSGT_CFGPARSER,MSGL_INFO,"option without parameter\n"); mp_msg(MSGT_CFGPARSER,MSGL_ERR,"option without parameter\n");
ret = -1; ret = -1;
errors++; errors++;
continue; continue;
@ -917,7 +917,7 @@ int m_config_parse_config_file(m_config_t *config, char *conffile)
param[param_pos++] = line[line_pos++]; param[param_pos++] = line[line_pos++];
if (param_pos >= MAX_PARAM_LEN) { if (param_pos >= MAX_PARAM_LEN) {
PRINT_LINENUM; PRINT_LINENUM;
mp_msg(MSGT_CFGPARSER,MSGL_INFO,"too long parameter\n"); mp_msg(MSGT_CFGPARSER,MSGL_ERR,"too long parameter\n");
ret = -1; ret = -1;
errors++; errors++;
goto nextline; goto nextline;
@ -930,7 +930,7 @@ int m_config_parse_config_file(m_config_t *config, char *conffile)
param[param_pos++] = line[line_pos++]; param[param_pos++] = line[line_pos++];
if (param_pos >= MAX_PARAM_LEN) { if (param_pos >= MAX_PARAM_LEN) {
PRINT_LINENUM; PRINT_LINENUM;
mp_msg(MSGT_CFGPARSER,MSGL_INFO,"too long parameter\n"); mp_msg(MSGT_CFGPARSER,MSGL_ERR,"too long parameter\n");
ret = -1; ret = -1;
errors++; errors++;
goto nextline; goto nextline;
@ -942,7 +942,7 @@ int m_config_parse_config_file(m_config_t *config, char *conffile)
/* did we read a parameter? */ /* did we read a parameter? */
if (param_pos == 0) { if (param_pos == 0) {
PRINT_LINENUM; PRINT_LINENUM;
mp_msg(MSGT_CFGPARSER,MSGL_INFO,"option without parameter\n"); mp_msg(MSGT_CFGPARSER,MSGL_ERR,"option without parameter\n");
ret = -1; ret = -1;
errors++; errors++;
continue; continue;
@ -961,7 +961,7 @@ int m_config_parse_config_file(m_config_t *config, char *conffile)
/* EOL / comment */ /* EOL / comment */
if (line[line_pos] != '\0' && line[line_pos] != '#') { if (line[line_pos] != '\0' && line[line_pos] != '#') {
PRINT_LINENUM; PRINT_LINENUM;
mp_msg(MSGT_CFGPARSER,MSGL_INFO,"extra characters on line: %s\n", line+line_pos); mp_msg(MSGT_CFGPARSER,MSGL_WARN,"extra characters on line: %s\n", line+line_pos);
ret = -1; ret = -1;
} }