diff options
author | wm4 <wm4@nowhere> | 2014-07-13 20:11:46 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-07-13 20:11:46 +0200 |
commit | d54d21cbd5fdcb3004b55f1779e87b23a3d4a6ea (patch) | |
tree | 9aead87847a0e217f04b08b97ada611bb38bdc75 /options | |
parent | 9b654fd540d83cc637270326bb13dfe78f97a376 (diff) | |
download | mpv-d54d21cbd5fdcb3004b55f1779e87b23a3d4a6ea.tar.bz2 mpv-d54d21cbd5fdcb3004b55f1779e87b23a3d4a6ea.tar.xz |
config: adjust config parser messages
Some cleanup. Also, try not to call mp_msg multiple times for 1 line.
Diffstat (limited to 'options')
-rw-r--r-- | options/parse_configfile.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/options/parse_configfile.c b/options/parse_configfile.c index 01d5f41b9f..44ac649592 100644 --- a/options/parse_configfile.c +++ b/options/parse_configfile.c @@ -63,16 +63,15 @@ int m_config_parse_config_file(m_config_t *config, const char *conffile, flags = flags | M_SETOPT_FROM_CONFIG_FILE; - MP_VERBOSE(config, "Reading config file %s", conffile); + MP_VERBOSE(config, "Reading config file %s\n", conffile); if (config->recursion_depth > MAX_RECURSION_DEPTH) { - MP_ERR(config, ": too deep 'include'. check your configfiles\n"); + MP_ERR(config, "Maximum 'include' nesting depth exceeded.\n"); ret = -1; goto out; } if ((line = malloc(MAX_LINE_LEN + 1)) == NULL) { - MP_FATAL(config, "\ncan't get memory for 'line': %s", strerror(errno)); ret = -1; goto out; } else @@ -80,7 +79,7 @@ int m_config_parse_config_file(m_config_t *config, const char *conffile, MP_VERBOSE(config, "\n"); if ((fp = fopen(conffile, "r")) == NULL) { - MP_VERBOSE(config, ": %s\n", strerror(errno)); + MP_VERBOSE(config, "Can't open config file: %s\n", strerror(errno)); ret = 0; goto out; } @@ -114,7 +113,7 @@ int m_config_parse_config_file(m_config_t *config, const char *conffile, opt[opt_pos++] = line[line_pos++]; if (opt_pos >= MAX_OPT_LEN) { PRINT_LINENUM; - MP_ERR(config, "too long option\n"); + MP_ERR(config, "option name too long\n"); errors++; ret = -1; goto nextline; |