Index: cpp/common/Convert.cpp
===================================================================
--- cpp/common/Convert.cpp	(revision 251)
+++ cpp/common/Convert.cpp	(revision 257)
@@ -90,5 +90,5 @@
 #if defined LINUX // || android?
 	return *::localtime_r(&timep,&ret);
-#elif defined _WIN32 && !defined __BORLANDC__ // and not bada?
+#elif defined _WIN32 && !defined __BORLANDC__
 	::localtime_s(&ret, &timep);
 	return ret;
@@ -115,5 +115,5 @@
 #if defined LINUX // || android?
 	ret=::asctime_r(&tm,buf);
-#elif defined _WIN32 && !defined __BORLANDC__ // and not bada?
+#elif defined _WIN32 && !defined __BORLANDC__
 	asctime_s(buf, sizeof(buf), &tm);
 	ret = buf;
Index: cpp/common/stl-util.cpp
===================================================================
--- cpp/common/stl-util.cpp	(revision 251)
+++ cpp/common/stl-util.cpp	(revision 257)
@@ -11,8 +11,8 @@
 #include <assert.h>
 #ifdef USE_VIRTFILE
- #include <frams/virtfile/virtfile.h>
+#include <frams/virtfile/virtfile.h>
 #endif
 #ifdef __BORLANDC__
- #define va_copy(to,from) to=from //borland does not have va_copy() at all; va_list is just a pointer in borland
+#define va_copy(to,from) to=from //borland does not have va_copy() at all; va_list is just a pointer in borland
 #endif
 
@@ -27,5 +27,5 @@
 	//almost like SString::sprintf, but there is no common code to share because SString can use its directWrite to avoid double allocating/copying
 #ifdef USE_VSCPRINTF
-	va_copy(ap_copy,ap);
+	va_copy(ap_copy, ap);
 	size = _vscprintf(format, ap_copy) + 1; //+1 for terminating null character
 	va_end(ap_copy);
@@ -36,5 +36,5 @@
 		buf = (char*)malloc(size);
 		assert(buf != NULL);
-		va_copy(ap_copy,ap);
+		va_copy(ap_copy, ap);
 		int n = vsnprintf(buf, size, format, ap_copy);
 		va_end(ap_copy);
@@ -55,4 +55,12 @@
 }
 
+char* strmove(char *a, char *b) //strcpy that works well for overlapping strings ("Source and destination overlap")
+{
+	if (a == NULL || b == NULL)
+		return NULL;
+	memmove(a, b, strlen(b) + 1);
+	return a;
+}
+
 string ssprintf(const char* format, ...)
 {
@@ -66,11 +74,11 @@
 bool readCompleteFile(const char* filename, vector<char>& data, bool warn_on_missing_file)
 {
-    bool ok=false;
+	bool ok = false;
 #ifdef USE_VIRTFILE
 	if (!isAbsolutePath(filename))
-		{
+	{
 		VirtFILE *f=Vfopen(filename,FOPEN_READ_BINARY);
 		if (f)
-			{
+		{
 			int size=f->getSize();
 			data.resize(size);
@@ -78,18 +86,18 @@
 			ok = przeczytane == 1;
 			delete f;
-			}
 		}
+	}
 	else
 #endif
 	{
-	MFILE *f = mfopen(filename, FOPEN_READ_BINARY);
-	if (f)
-	{
-		int size=getFileSize(f);
-		data.resize(size);
-		int przeczytane = mfread(&data[0], size, 1, f);
-		mfclose(f);
-		ok = przeczytane == 1;
-	}
+		MFILE *f = mfopen(filename, FOPEN_READ_BINARY);
+		if (f)
+		{
+			int size = getFileSize(f);
+			data.resize(size);
+			int przeczytane = mfread(&data[0], size, 1, f);
+			mfclose(f);
+			ok = przeczytane == 1;
+		}
 	}
 	if (warn_on_missing_file && !ok)
Index: cpp/common/stl-util.h
===================================================================
--- cpp/common/stl-util.h	(revision 251)
+++ cpp/common/stl-util.h	(revision 257)
@@ -11,29 +11,32 @@
 template<typename T, std::size_t N> void push_back(vector<T>& v, T(&d)[N])
 {
-for(unsigned int i=0;i<N;i++)
-	v.push_back(d[i]);
+	for (unsigned int i = 0; i < N; i++)
+		v.push_back(d[i]);
 }
 
 template<typename T> void erase(vector<T>& v, const T& e)
 {
-typename vector<T>::iterator it=std::find(v.begin(),v.end(),e);
-if (it!=v.end())
-	v.erase(it);
+	typename vector<T>::iterator it = std::find(v.begin(), v.end(), e);
+	if (it != v.end())
+		v.erase(it);
 }
 
 template<typename T> void deleteVectorElements(vector<T*>& v)
 {
-for(typename vector<T*>::iterator it=v.begin();it!=v.end();it++)
-	delete *it;
-v.clear();
+	for (typename vector<T*>::iterator it = v.begin(); it != v.end(); it++)
+		delete *it;
+	v.clear();
 }
 
 template<typename T> int findIndex(vector<T>& v, const T& e)
 {
-typename vector<T>::iterator it=find(v.begin(),v.end(),e);
-if (it!=v.end())
-	return &*it-&v.front();
-return -1;
+	typename vector<T>::iterator it = find(v.begin(), v.end(), e);
+	if (it != v.end())
+		return &*it - &v.front();
+	return -1;
 }
+
+
+char* strmove(char *a, char *b); //strcpy that works well for overlapping strings ("Source and destination overlap")
 
 string ssprintf(const char* format, ...);
@@ -45,21 +48,21 @@
 
 
-bool readCompleteFile(const char* filename, vector<char>& data, bool warn_on_missing_file=true);
-bool readCompleteFile(const char* filename, string& out, bool warn_on_missing_file=true);
-bool writeCompleteFile(const char* filename, const std::string& text,bool warn_on_fail=true);
-bool writeCompleteFile(const char* filename, vector<char>& data, bool warn_on_fail=true);
+bool readCompleteFile(const char* filename, vector<char>& data, bool warn_on_missing_file = true);
+bool readCompleteFile(const char* filename, string& out, bool warn_on_missing_file = true);
+bool writeCompleteFile(const char* filename, const std::string& text, bool warn_on_fail = true);
+bool writeCompleteFile(const char* filename, vector<char>& data, bool warn_on_fail = true);
 
 template<class T> class DeletingVector  // deletes the elements (pointers) in destructor
 {
-  public:
-std::vector<T*> vector;
-~DeletingVector()
+public:
+	std::vector<T*> vector;
+	~DeletingVector()
 	{
-	for(int i=vector.size()-1;i>=0;i--)
-		delete vector[i];
+		for (int i = vector.size() - 1; i >= 0; i--)
+			delete vector[i];
 	}
-T* operator[](int i) {return vector[i];}
-int size() {return vector.size();}
-void push_back(T* x) {vector.push_back(x);}
+	T* operator[](int i) { return vector[i]; }
+	int size() { return vector.size(); }
+	void push_back(T* x) { vector.push_back(x); }
 };
 
