[Scummvm-cvs-logs] SF.net SVN: scummvm:[38300] scummvm/trunk/engines/sci/scicore/tools.cpp

wjpalenstijn at users.sourceforge.net wjpalenstijn at users.sourceforge.net
Sun Feb 15 21:54:20 CET 2009


Revision: 38300
          http://scummvm.svn.sourceforge.net/scummvm/?rev=38300&view=rev
Author:   wjpalenstijn
Date:     2009-02-15 20:54:20 +0000 (Sun, 15 Feb 2009)

Log Message:
-----------
temporarily re-include fnmatch to fix compilation and case-insensitive matching

Modified Paths:
--------------
    scummvm/trunk/engines/sci/scicore/tools.cpp

Modified: scummvm/trunk/engines/sci/scicore/tools.cpp
===================================================================
--- scummvm/trunk/engines/sci/scicore/tools.cpp	2009-02-15 20:51:14 UTC (rev 38299)
+++ scummvm/trunk/engines/sci/scicore/tools.cpp	2009-02-15 20:54:20 UTC (rev 38300)
@@ -24,9 +24,15 @@
 
 ***************************************************************************/
 
+
+#include <stdlib.h>
+
+#ifndef _WIN32
 #define _GNU_SOURCE /* For FNM_CASEFOLD in fnmatch.h */
+#include <fnmatch.h>
+#endif
 
-#include <stdlib.h>
+#include "common/str.h"
 #include "sci/include/engine.h"
 
 #ifdef HAVE_SYS_TIME_H
@@ -422,8 +428,13 @@
 		if (match->d_name[0] == '.')
 			continue;
 
+#ifdef _WIN32
+		if (Common::matchString(match->d_name, dir->mask_copy, true))
+			return match->d_name;
+#else
 		if (!fnmatch(dir->mask_copy, match->d_name, FNM_CASEFOLD))
 			return match->d_name;
+#endif
 	}
 
 	sci_finish_find(dir);


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