X-Git-Url: http://git.code-monkey.de/?a=blobdiff_plain;f=src%2Fconf.c;h=2a83e53e0712025f072a3587f4d29d3bb8ff86a1;hb=76f6cc6fd2eecb29f265226e43408a0d9ad41174;hp=2873a9e40e7d5bd6da75a2ee9137b6d1f34b5919;hpb=ddc0e8af6bbcb1f7635ea78297c5158611821aec;p=umurmur.git diff --git a/src/conf.c b/src/conf.c index 2873a9e..2a83e53 100644 --- a/src/conf.c +++ b/src/conf.c @@ -58,16 +58,19 @@ void Conf_init(const char *conffile) } } -void Conf_test(const char *conffile) +bool_t Conf_ok(const char *conffile) { + bool_t rc = true; config_init(&configuration); if (conffile == NULL) conffile = defaultconfig; if (config_read_file(&configuration, conffile) != CONFIG_TRUE) { - fprintf(stderr, "Error in config file %s line %d: %s", conffile, + fprintf(stderr, "Error in config file %s line %d: %s\n", conffile, config_error_line(&configuration), config_error_text(&configuration)); - exit(1); + rc = false; } + config_destroy(&configuration); + return rc; } void Conf_deinit()