[Scummvm-cvs-logs] SF.net SVN: scummvm: [29029] scummvm/trunk/backends/fs/amigaos4/amigaos4-fs .cpp

lordhoto at users.sourceforge.net lordhoto at users.sourceforge.net
Sat Sep 22 22:47:42 CEST 2007


Revision: 29029
          http://scummvm.svn.sourceforge.net/scummvm/?rev=29029&view=rev
Author:   lordhoto
Date:     2007-09-22 13:47:41 -0700 (Sat, 22 Sep 2007)

Log Message:
-----------
Hopefully fix amigos4 fs implementation.

Modified Paths:
--------------
    scummvm/trunk/backends/fs/amigaos4/amigaos4-fs.cpp

Modified: scummvm/trunk/backends/fs/amigaos4/amigaos4-fs.cpp
===================================================================
--- scummvm/trunk/backends/fs/amigaos4/amigaos4-fs.cpp	2007-09-22 20:19:55 UTC (rev 29028)
+++ scummvm/trunk/backends/fs/amigaos4/amigaos4-fs.cpp	2007-09-22 20:47:41 UTC (rev 29029)
@@ -106,6 +106,28 @@
 	virtual AbstractFSList listVolumes() const;
 };
 
+// TODO: this is ripped of
+// AmigaOSFilesystemNode::AmigaOSFilesystemNode(const String &p)
+// maybe change it to use this function instead?
+/**
+ * Returns the last component of a given path.
+ * 
+ * @param str String containing the path.
+ * @return Pointer to the first char of the last component inside str.
+ */
+const char *lastPathComponent(const Common::String &str) {
+	int offset = p.size();
+	const char *str = p.c_str();
+
+	while (offset > 0 && (str[offset-1] == '/' || str[offset-1] == ':'))
+		offset--;
+
+	while (offset > 0 && (str[offset-1] != '/' && str[offset-1] != ':'))
+		offset--;
+
+	return str.c_str() + offset;
+}
+
 AmigaOSFilesystemNode::AmigaOSFilesystemNode() {
 	ENTER();
 	_sDisplayName = "Available Disks";


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