summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorHowaner <franzi.moos@googlemail.com>2014-11-18 14:56:32 +0100
committerHowaner <franzi.moos@googlemail.com>2014-11-18 14:56:32 +0100
commit42120e2ea5db0cdb9920ff1c5efef33e0f496d48 (patch)
tree20ba1ae0a53f757cb8814b6cd6a466fe5acf1308 /lib
parentFixed compile errors. (diff)
parentMerge pull request #1598 from mc-server/SignEditor (diff)
downloadcuberite-42120e2ea5db0cdb9920ff1c5efef33e0f496d48.tar
cuberite-42120e2ea5db0cdb9920ff1c5efef33e0f496d48.tar.gz
cuberite-42120e2ea5db0cdb9920ff1c5efef33e0f496d48.tar.bz2
cuberite-42120e2ea5db0cdb9920ff1c5efef33e0f496d48.tar.lz
cuberite-42120e2ea5db0cdb9920ff1c5efef33e0f496d48.tar.xz
cuberite-42120e2ea5db0cdb9920ff1c5efef33e0f496d48.tar.zst
cuberite-42120e2ea5db0cdb9920ff1c5efef33e0f496d48.zip
Diffstat (limited to '')
-rw-r--r--lib/inifile/CMakeLists.txt11
m---------lib/polarssl0
-rw-r--r--src/IniFile.cpp (renamed from lib/inifile/iniFile.cpp)26
-rw-r--r--src/IniFile.h (renamed from lib/inifile/iniFile.h)8
4 files changed, 5 insertions, 40 deletions
diff --git a/lib/inifile/CMakeLists.txt b/lib/inifile/CMakeLists.txt
deleted file mode 100644
index 321d501d7..000000000
--- a/lib/inifile/CMakeLists.txt
+++ /dev/null
@@ -1,11 +0,0 @@
-cmake_minimum_required (VERSION 2.6)
-project (iniFile)
-
-include_directories ("${PROJECT_SOURCE_DIR}/../../src/")
-
-file(GLOB SOURCE
- "*.h"
- "*.cpp"
-)
-
-add_library(iniFile ${SOURCE})
diff --git a/lib/polarssl b/lib/polarssl
-Subproject 1ed82759c68f92c4acc7e3f33b850cf9f01c8ab
+Subproject d6a15321ae51762098e49a976d26efa2493c94f
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.
diff --git a/lib/inifile/iniFile.h b/src/IniFile.h
index 33229bff0..e5879f46c 100644
--- a/lib/inifile/iniFile.h
+++ b/src/IniFile.h
@@ -9,7 +9,7 @@
// Email: Shane.Hill@dsto.defence.gov.au
// Reason: Remove dependancy on MFC. Code should compile on any
// platform. Tested on Windows/Linux/Irix
-//////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////
/*
!! MODIFIED BY FAKETRUTH and madmaxoft!!
@@ -154,12 +154,6 @@ public:
}
bool SetValueF(const AString & a_KeyName, const AString & a_ValueName, const double a_Value, const bool a_CreateIfNotExists = true);
- // tolua_end
-
- bool SetValueV( const AString & a_KeyName, const AString & a_ValueName, const char * a_Format, ...);
-
- // tolua_begin
-
// Deletes specified value.
// Returns true if value existed and deleted, false otherwise.
bool DeleteValueByID(const int keyID, const int valueID);