New way to read configuration tables:

(config_tables): New econfig key.
(read_config_tables): New, implements config_tables.
(main): Call it.  Need to call ef_init() and chdir(configdir) first.
(ef_init_srv): Don't call ef_init(), since main() did it already.

Remove old way to do the same:
(ef_load): Remove, along with calls.
(empfile): Set configuration tables' member file back to NULL.
This commit is contained in:
Markus Armbruster 2006-02-18 13:57:52 +00:00
parent e4865d473e
commit bd65a84eb5
8 changed files with 68 additions and 43 deletions

View file

@ -202,6 +202,13 @@ main(int argc, char **argv)
if (emp_config(config_file) < 0)
exit(EXIT_FAILURE);
ef_init();
if (chdir(configdir)) {
fprintf(stderr, "Can't chdir to %s (%s)\n", configdir, strerror(errno));
exit(EXIT_FAILURE);
}
if (read_config_tables() < 0)
exit(EXIT_FAILURE);
if (chdir(gamedir)) {
fprintf(stderr, "Can't chdir to %s (%s)\n", gamedir, strerror(errno));
exit(EXIT_FAILURE);