(svn r22168) -Codechange: Move ini file IO and file error reporting to virtual functions.

This commit is contained in:
alberth
2011-03-03 20:53:09 +00:00
parent d19a9f5df5
commit 722296e797
3 changed files with 34 additions and 17 deletions

View File

@@ -105,3 +105,15 @@ bool IniFile::SaveToDisk(const char *filename)
return true;
}
/* virtual */ FILE *IniFile::OpenFile(const char *filename, size_t *size)
{
/* Open the text file in binary mode to prevent end-of-line translations
* done by ftell() and friends, as defined by K&R. */
return FioFOpenFile(filename, "rb", DATA_DIR, size);
}
/* virtual */ void IniFile::ReportFileError(const char * const pre, const char * const buffer, const char * const post)
{
ShowInfoF("%s%s%s", pre, buffer, post);
}