X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=Source%2FMacCompatibility.cpp;h=467c978ce7c2c32af40cf7a071b9af7103001a00;hb=250a16d5fa14b462b44b1e698372164ac33aa721;hp=272288a639b09da4b3fd4551d9db6f5e2a8b66be;hpb=cd043e3f9e26c2b3406b40a354c2840941e9db7f;p=lugaru.git diff --git a/Source/MacCompatibility.cpp b/Source/MacCompatibility.cpp index 272288a..467c978 100644 --- a/Source/MacCompatibility.cpp +++ b/Source/MacCompatibility.cpp @@ -1,5 +1,6 @@ /* Copyright (C) 2003, 2010 - Wolfire Games +Copyright (C) 2010-2016 - Lugaru contributors (see AUTHORS file) This file is part of Lugaru. @@ -17,8 +18,6 @@ You should have received a copy of the GNU General Public License along with Lugaru. If not, see . */ -#if !PLATFORM_MACOSX - /**> HEADER FILES <**/ #include "MacCompatibility.h" @@ -71,23 +70,6 @@ public: }; static AppTime g_appTime; - -void CopyCStringToPascal( const char* src, unsigned char dst[256]) -{ - int len = strlen( src); - dst[ 0] = len; - memcpy( dst + 1, src, len); -} - - -void CopyPascalStringToC( const unsigned char* src, char* dst) -{ - int len = src[ 0]; - memcpy( dst, src + 1, len); - dst[ len] = 0; -} - - AbsoluteTime UpTime() { __int64 counter; @@ -215,10 +197,8 @@ static inline const char *getPrefPath(void) static int locateCorrectCase(char *buf, bool makedirs) { int rc; - char *ptr; - char *prevptr; + char *ptr = buf; - ptr = prevptr = buf; while (ptr = strchr(ptr + 1, '/')) { *ptr = '\0'; /* block this path section off */ rc = locateOneElement(buf); @@ -287,7 +267,3 @@ char* ConvertFileName( const char* orgfilename, const char *mode) return g_filename; } - -#endif - -