Clean up initialization of empfile[]

Split ef_init() into two functions: empfile_init() for initialization,
and empfile_fixup() to fix it up for configuration.  Put them next to
empfile[].  Move the call to empfile_init() from behind emp_config()
to before it.
This commit is contained in:
Markus Armbruster 2008-02-06 20:14:39 +01:00
parent 3290e87576
commit 55ff4f8e3a
6 changed files with 69 additions and 48 deletions

View file

@ -105,10 +105,10 @@ main(int argc, char *argv[])
}
}
empfile_init();
if (emp_config(config_file) < 0)
exit(1);
ef_init();
empfile_fixup();
if (mkdir(gamedir, S_IRWXU | S_IRWXG) < 0 && errno != EEXIST) {
perror(gamedir);