]> git.jsancho.org Git - lugaru.git/blobdiff - Source/MacCompatibility.cpp
Switched all data access to the new methods
[lugaru.git] / Source / MacCompatibility.cpp
index 7d049058f71297a7de57fe463bffbedae3ff4465..1777791269b6c84a174e369cbbc5b881bb57844d 100644 (file)
@@ -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 <http://www.gnu.org/licenses/>.
 */
 
-#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;
@@ -150,7 +132,6 @@ static int locateOneElement(char *buf)
     char *ptr;
     DIR *dirp;
 
-    //if (PHYSFS_exists(buf))
     if (access(buf, F_OK) == 0)
         return(1);  /* quick rejection: exists in current case. */
 
@@ -258,34 +239,3 @@ static int locateCorrectFile(char *buf, const char *mode)
     return(rc);
 } /* locateCorrectFile */
 #endif
-
-
-static char g_filename[4096];
-char* ConvertFileName( const char* orgfilename, const char *mode)
-{
-    if (orgfilename == g_filename) // recursion?
-        return g_filename;
-
-    // translate filename into proper path name
-    if (orgfilename[ 0] == ':')
-        orgfilename++;
-    strcpy( g_filename, orgfilename);
-
-    for (int n = 0; g_filename[ n]; n++) {
-        if (g_filename[ n] == ':')
-            g_filename[ n] = '/';
-
-        else if (g_filename[ n] == '\\')
-            g_filename[ n] = '/';
-    }
-
-#if PLATFORM_UNIX
-    locateCorrectFile(g_filename, mode);
-#endif
-
-    return g_filename;
-}
-
-#endif
-
-