[Scummvm-cvs-logs] SF.net SVN: scummvm:[38206] scummvm/trunk/engines/sci

sev at users.sourceforge.net sev at users.sourceforge.net
Sun Feb 15 10:35:14 CET 2009


Revision: 38206
          http://scummvm.svn.sourceforge.net/scummvm/?rev=38206&view=rev
Author:   sev
Date:     2009-02-15 09:35:14 +0000 (Sun, 15 Feb 2009)

Log Message:
-----------
Portability fixes

Modified Paths:
--------------
    scummvm/trunk/engines/sci/engine/kfile.c
    scummvm/trunk/engines/sci/include/engine.h
    scummvm/trunk/engines/sci/scicore/resource.c
    scummvm/trunk/engines/sci/scicore/resource_patch.c

Modified: scummvm/trunk/engines/sci/engine/kfile.c
===================================================================
--- scummvm/trunk/engines/sci/engine/kfile.c	2009-02-15 09:34:39 UTC (rev 38205)
+++ scummvm/trunk/engines/sci/engine/kfile.c	2009-02-15 09:35:14 UTC (rev 38206)
@@ -411,7 +411,7 @@
 reg_t
 kDeviceInfo_Win32(state_t *s, int funct_nr, int argc, reg_t *argv)
 {
-	char dir_buffer [MAX_PATH], dir_buffer2 [MAX_PATH];
+	char dir_buffer [MAXPATHLEN], dir_buffer2 [MAX_PATHLEN];
 	int mode = UKPV(0);
 
 
@@ -991,8 +991,8 @@
 kValidPath(state_t *s, int funct_nr, int argc, reg_t *argv)
 {
 	char *pathname = kernel_dereference_char_pointer(s, argv[0], 0);
-	char cpath[PATH_MAX + 1];
-	getcwd(cpath, PATH_MAX + 1);
+	char cpath[MAXPATHLEN + 1];
+	getcwd(cpath, MAXPATHLEN + 1);
 
 	s->r_acc = make_reg(0, !chdir(pathname)); /* Try to go there. If it works, return 1, 0 otherwise. */
 

Modified: scummvm/trunk/engines/sci/include/engine.h
===================================================================
--- scummvm/trunk/engines/sci/include/engine.h	2009-02-15 09:34:39 UTC (rev 38205)
+++ scummvm/trunk/engines/sci/include/engine.h	2009-02-15 09:35:14 UTC (rev 38206)
@@ -30,6 +30,9 @@
 #include <config.h>
 #endif /* HAVE_CONFIG_H */
 
+// FIXME. Remove after transiton to File class
+#include <sys/stat.h>
+
 #include "sci/include/resource.h"
 #include "sci/include/sciresource.h"
 #include "sci/include/script.h"

Modified: scummvm/trunk/engines/sci/scicore/resource.c
===================================================================
--- scummvm/trunk/engines/sci/scicore/resource.c	2009-02-15 09:34:39 UTC (rev 38205)
+++ scummvm/trunk/engines/sci/scicore/resource.c	2009-02-15 09:35:14 UTC (rev 38206)
@@ -259,7 +259,7 @@
 static void
 _scir_load_resource(resource_mgr_t *mgr, resource_t *res, int protect)
 {
-	char filename[PATH_MAX];
+	char filename[MAXPATHLEN];
 	int fh;
 	resource_t backup;
 	char *save_cwd = sci_getcwd();
@@ -356,7 +356,7 @@
 sci_test_view_type(resource_mgr_t *mgr)
 {
 	int fh;
-	char filename[PATH_MAX];
+	char filename[MAXPATHLEN];
 	int compression;
 	resource_t *res;
 	int i;
@@ -445,7 +445,7 @@
 	char *name;
 	resource_source_t *map;
 	int fd;
-	char fullname[PATH_MAX];
+	char fullname[MAXPATHLEN];
 
 	if (dir[strlen(dir)-1] != G_DIR_SEPARATOR)
 	{

Modified: scummvm/trunk/engines/sci/scicore/resource_patch.c
===================================================================
--- scummvm/trunk/engines/sci/scicore/resource_patch.c	2009-02-15 09:34:39 UTC (rev 38205)
+++ scummvm/trunk/engines/sci/scicore/resource_patch.c	2009-02-15 09:35:14 UTC (rev 38206)
@@ -48,7 +48,7 @@
 	      char *entry, int restype, int resnumber, resource_t **resource_p, int *resource_nr_p)
 {
 	int fsize;
-	char filename[PATH_MAX];
+	char filename[MAXPATHLEN];
 
 	if (restype == sci_invalid_resource)
 		return;


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