[Scummvm-cvs-logs] SF.net SVN: scummvm:[46388] tools/branches/gsoc2009-gui/common

lordhoto at users.sourceforge.net lordhoto at users.sourceforge.net
Wed Dec 16 16:05:26 CET 2009


Revision: 46388
          http://scummvm.svn.sourceforge.net/scummvm/?rev=46388&view=rev
Author:   lordhoto
Date:     2009-12-16 15:05:25 +0000 (Wed, 16 Dec 2009)

Log Message:
-----------
Compare file extension case insensitive on non WIN32 platforms too (this fixes detection of Kyra's .vrm files with lowercase .vrm extension for me).

Modified Paths:
--------------
    tools/branches/gsoc2009-gui/common/file.cpp
    tools/branches/gsoc2009-gui/common/scummsys.h

Modified: tools/branches/gsoc2009-gui/common/file.cpp
===================================================================
--- tools/branches/gsoc2009-gui/common/file.cpp	2009-12-15 18:22:59 UTC (rev 46387)
+++ tools/branches/gsoc2009-gui/common/file.cpp	2009-12-16 15:05:25 UTC (rev 46388)
@@ -116,12 +116,8 @@
 		ext = ext.substr(1);
 
 	std::string tmp = _path.substr(dot);
-#ifdef _WIN32
 	// On Windows paths are case-insensitive
 	return scumm_stricmp(tmp.c_str(), ext.c_str()) == 0;
-#else
-	return tmp == ext;
-#endif
 }
 
 std::string Filename::getFullPath() const {

Modified: tools/branches/gsoc2009-gui/common/scummsys.h
===================================================================
--- tools/branches/gsoc2009-gui/common/scummsys.h	2009-12-15 18:22:59 UTC (rev 46387)
+++ tools/branches/gsoc2009-gui/common/scummsys.h	2009-12-16 15:05:25 UTC (rev 46388)
@@ -65,6 +65,9 @@
 	#define SCUMM_LITTLE_ENDIAN
 
 #elif defined(UNIX)
+	// For strcasecmp and strncasecmp
+	#include <strings.h>
+
 	#define scumm_stricmp strcasecmp
 	#define scumm_strnicmp strncasecmp
 


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list