switch to new util file functions

Replace all fopen(), rename(), and unlink() calls with the new util
functions.
This commit is contained in:
Miroslav Lichvar
2019-10-22 18:06:25 +02:00
parent 7dfd4ae556
commit e18903a6b5
10 changed files with 49 additions and 149 deletions

9
conf.c
View File

@@ -402,14 +402,7 @@ CNF_ReadFile(const char *filename)
char line[2048];
int i;
in = fopen(filename, "r");
if (!in) {
LOG_FATAL("Could not open configuration file %s : %s",
filename, strerror(errno));
return;
}
DEBUG_LOG("Reading %s", filename);
in = UTI_OpenFile(NULL, filename, NULL, 'R', 0);
for (i = 1; fgets(line, sizeof(line), in); i++) {
CNF_ParseLine(filename, i, line);