mirror of
https://github.com/tio/tio.git
synced 2026-05-01 23:07:58 +02:00
Fix config file error messages
This commit is contained in:
parent
c7b27b022f
commit
c96c3c4c83
1 changed files with 4 additions and 4 deletions
|
|
@ -56,7 +56,7 @@ static int get_match(const char *input, const char *pattern, char **match)
|
||||||
if (ret)
|
if (ret)
|
||||||
{
|
{
|
||||||
regerror(ret, &re, err, sizeof(err));
|
regerror(ret, &re, err, sizeof(err));
|
||||||
printf("reg error: %s\n", err);
|
error_printf("regex error: %s", err);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -264,7 +264,7 @@ void config_file_parse(const int argc, char *argv[])
|
||||||
ret = ini_parse(c->path, data_handler, NULL);
|
ret = ini_parse(c->path, data_handler, NULL);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
{
|
{
|
||||||
fprintf(stderr, "Error: unable to parse configuration file (%d)\n", ret);
|
error_printf("Unable to parse configuration file (%d)", ret);
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
c->section_name = NULL;
|
c->section_name = NULL;
|
||||||
|
|
@ -276,7 +276,7 @@ void config_file_parse(const int argc, char *argv[])
|
||||||
ret = ini_parse(c->path, section_name_search_handler, NULL);
|
ret = ini_parse(c->path, section_name_search_handler, NULL);
|
||||||
if (!c->section_name)
|
if (!c->section_name)
|
||||||
{
|
{
|
||||||
debug_printf("unable to match user input to configuration section (%d)\n", ret);
|
debug_printf("Unable to match user input to configuration section (%d)", ret);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -285,7 +285,7 @@ void config_file_parse(const int argc, char *argv[])
|
||||||
ret = ini_parse(c->path, data_handler, NULL);
|
ret = ini_parse(c->path, data_handler, NULL);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
{
|
{
|
||||||
fprintf(stderr, "Error: unable to parse configuration file (%d)\n", ret);
|
error_printf("Unable to parse configuration file (%d)", ret);
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue