[Scummvm-cvs-logs] CVS: scummvm/backends/fs/amigaos4 amigaos4-fs.cpp,1.6,1.7

Eugene Sandulenko sev at users.sourceforge.net
Fri Jan 27 07:52:09 CET 2006


Update of /cvsroot/scummvm/scummvm/backends/fs/amigaos4
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16042

Modified Files:
	amigaos4-fs.cpp 
Log Message:
Patch #1416370: "AmigaOS 4 changes"


Index: amigaos4-fs.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/fs/amigaos4/amigaos4-fs.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- amigaos4-fs.cpp	18 Jan 2006 17:39:30 -0000	1.6
+++ amigaos4-fs.cpp	27 Jan 2006 15:51:41 -0000	1.7
@@ -33,7 +33,7 @@
 
 #include <common/stdafx.h>
 
-#include "util.h"
+//#include "util.h"
 
 #include "base/engine.h"
 #include "backends/fs/fs.h"
@@ -116,7 +116,7 @@
 
 	struct FileInfoBlock *fib = (struct FileInfoBlock *)IDOS->AllocDosObject(DOS_FIB, NULL);
 	if (!fib) {
-		debug(6, "fib == 0\n");
+		//debug(6, "fib == 0\n");
 		LEAVE();
 		return;
 	}
@@ -154,26 +154,26 @@
 		if (IDOS->NameFromLock(pLock, name, bufsize) != DOSFALSE) {
 			_sPath = name;
 			_sDisplayName = pDisplayName ? pDisplayName : IDOS->FilePart(name);
-			delete name;
+			delete [] name;
 			break;
 		}
 
 		if (IDOS->IoErr() != ERROR_LINE_TOO_LONG) {
 			_bIsValid = false;
-			debug(6, "Error\n");
+			//debug(6, "Error\n");
 			LEAVE();
-			delete name;
+			delete [] name;
 			return;
 		}
 		bufsize *= 2;
-		delete name;
+		delete [] name;
 	}
 
 	_bIsValid =	false;
 
 	struct FileInfoBlock *fib = (struct	FileInfoBlock *)IDOS->AllocDosObject(DOS_FIB, NULL);
 	if (!fib) {
-		debug(6, "fib == 0\n");
+		//debug(6, "fib == 0\n");
 		LEAVE();
 		return;
 	}
@@ -219,19 +219,19 @@
 	ENTER();
 
 	if (!_bIsValid) {
-		debug(6, "Invalid node\n");
+		//debug(6, "Invalid node\n");
 		LEAVE();
 		//return 0;
 	}
 
 	if (!_bIsDirectory) {
-		debug(6, "Not a directory\n");
+		//debug(6, "Not a directory\n");
 		LEAVE();
 		//return 0;
 	}
 
 	if (_pFileLock == 0) {
-		debug(6, "Root node\n");
+		//debug(6, "Root node\n");
 		LEAVE();
 		return listVolumes();
 	}
@@ -299,21 +299,21 @@
 	AmigaOSFilesystemNode *node;
 
 	if (!_bIsDirectory) {
-		debug(6, "No directory\n");
+		//debug(6, "No directory\n");
 		LEAVE();
 		return 0;
 	}
 
 	if (_pFileLock == 0) {
-		debug(6, "Root node\n");
+		//debug(6, "Root node\n");
 		LEAVE();
 		return clone();
 	}
 
-	BPTR parent = IDOS->ParentDir(_pFileLock);
-	if (parent) {
-		node = new AmigaOSFilesystemNode(parent);
-		IDOS->UnLock(parent);
+	BPTR parentDir = IDOS->ParentDir( _pFileLock );
+	if (parentDir) {
+		node = new AmigaOSFilesystemNode(parentDir);
+		IDOS->UnLock(parentDir);
 	}
 	else
 		node = new AmigaOSFilesystemNode();
@@ -334,7 +334,7 @@
 
 	dosList = IDOS->LockDosList(lockFlags);
 	if (!dosList) {
-		debug(6, "Cannot lock dos list\n");
+		//debug(6, "Cannot lock dos list\n");
 		LEAVE();
 		return myList;
 	}





More information about the Scummvm-git-logs mailing list