diff options
Diffstat (limited to '')
-rw-r--r-- | src/IniFile.cpp (renamed from lib/inifile/iniFile.cpp) | 26 |
1 files changed, 4 insertions, 22 deletions
diff --git a/lib/inifile/iniFile.cpp b/src/IniFile.cpp index 7cfe7661f..ded7e4199 100644 --- a/lib/inifile/iniFile.cpp +++ b/src/IniFile.cpp @@ -9,7 +9,7 @@ // Email: Shane.Hill@dsto.defence.gov.au // Reason: Remove dependancy on MFC. Code should compile on any // platform. -////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////// /* !! MODIFIED BY FAKETRUTH and xoft !! @@ -24,7 +24,7 @@ #include <ctype.h> // Local Includes -#include "iniFile.h" +#include "IniFile.h" #if defined(WIN32) #define iniEOL endl @@ -32,10 +32,6 @@ #define iniEOL '\r' << endl #endif -#ifndef _WIN32 - #define sscanf_s(buffer, stringbuffer, ...) (sscanf(buffer, stringbuffer, __VA_ARGS__)) -#endif - using namespace std; @@ -83,7 +79,7 @@ bool cIniFile::ReadFile(const AString & a_FileName, bool a_AllowExampleRedirect) } } - bool IsFirstLine = true; + bool IsFirstLine = true; while (getline(f, line)) { @@ -465,20 +461,6 @@ bool cIniFile::SetValueF(const AString & a_KeyName, const AString & a_ValueName, -bool cIniFile::SetValueV(const AString & a_KeyName, const AString & a_ValueName, const char * a_Format, ...) -{ - va_list args; - va_start(args, a_Format); - AString Data; - AppendVPrintf(Data, a_Format, args); - va_end(args); - return SetValue(a_KeyName, a_ValueName, Data); -} - - - - - AString cIniFile::GetValue(const int keyID, const int valueID, const AString & defValue) const { if ((keyID < (int)keys.size()) && (valueID < (int)keys[keyID].names.size())) @@ -884,7 +866,7 @@ AString cIniFile::CheckCase(const AString & s) const void cIniFile::RemoveBom(AString & a_line) const { - // The BOM sequence for UTF-8 is 0xEF,0xBB,0xBF + // The BOM sequence for UTF-8 is 0xEF, 0xBB, 0xBF static unsigned const char BOM[] = { 0xEF, 0xBB, 0xBF }; // The BOM sequence, if present, is always th e first three characters of the input. |