aboutsummaryrefslogtreecommitdiff
path: root/backends/fs
diff options
context:
space:
mode:
Diffstat (limited to 'backends/fs')
-rw-r--r--backends/fs/amigaos4/amigaos4-fs.cpp8
-rw-r--r--backends/fs/fs.h6
-rw-r--r--backends/fs/palmos/palmos-fs.cpp10
-rw-r--r--backends/fs/posix/posix-fs.cpp12
-rw-r--r--backends/fs/ps2/ps2-fs.cpp6
-rw-r--r--backends/fs/symbian/symbian-fs.cpp16
-rw-r--r--backends/fs/windows/windows-fs.cpp10
7 files changed, 34 insertions, 34 deletions
diff --git a/backends/fs/amigaos4/amigaos4-fs.cpp b/backends/fs/amigaos4/amigaos4-fs.cpp
index 3e677a3ee8..e9e9618916 100644
--- a/backends/fs/amigaos4/amigaos4-fs.cpp
+++ b/backends/fs/amigaos4/amigaos4-fs.cpp
@@ -94,14 +94,14 @@ AmigaOSFilesystemNode::AmigaOSFilesystemNode(const String &p) {
ENTER();
int len = 0, offset = p.size();
-
+
assert(offset > 0);
_sPath = p;
// Extract last component from path
const char *str = p.c_str();
-
+
while (offset > 0 && (str[offset-1] == '/' || str[offset-1] == ':'))
offset--;
@@ -109,7 +109,7 @@ AmigaOSFilesystemNode::AmigaOSFilesystemNode(const String &p) {
len++;
offset--;
}
-
+
_sDisplayName = String(str + offset, len);
// Check whether it is a directory, and whether the file actually exists
@@ -132,7 +132,7 @@ AmigaOSFilesystemNode::AmigaOSFilesystemNode(const String &p) {
if (_bIsDirectory) {
if (fib->fib_EntryType != ST_ROOT)
_sPath += "/";
-
+
_pFileLock = IDOS->DupLock(pLock);
_bIsValid = (_pFileLock != 0);
}
diff --git a/backends/fs/fs.h b/backends/fs/fs.h
index 3b9254f512..7c08e0c210 100644
--- a/backends/fs/fs.h
+++ b/backends/fs/fs.h
@@ -44,8 +44,8 @@
* And if we ever want to support devices with no FS in the classical sense (Palm...),
* we can build upon this.
*/
-
-/*
+
+/*
* TODO - Instead of starting with getRoot(), we should rather add a getDefaultDir()
* call that on Unix might return the current dir or the users home dir...
* i.e. the root dir is usually not the best starting point for browsing.
@@ -81,7 +81,7 @@ protected:
virtual AbstractFilesystemNode *parent() const = 0;
/**
- * This method is a rather ugly hack which is used internally by the
+ * This method is a rather ugly hack which is used internally by the
* actual node implementions to wrap up raw nodes inside FilesystemNode
* objects. We probably want to get rid of this eventually and replace it
* with a cleaner / more elegant solution, but for now it works.
diff --git a/backends/fs/palmos/palmos-fs.cpp b/backends/fs/palmos/palmos-fs.cpp
index 96be354afc..99ebe4faa8 100644
--- a/backends/fs/palmos/palmos-fs.cpp
+++ b/backends/fs/palmos/palmos-fs.cpp
@@ -36,7 +36,7 @@ protected:
bool _isValid;
bool _isPseudoRoot;
String _path;
-
+
public:
PalmOSFilesystemNode();
PalmOSFilesystemNode(const Char *path);
@@ -71,7 +71,7 @@ void PalmOSFilesystemNode::addFile(FSList &list, ListMode mode, const char *base
if (entry._isDirectory)
entry._path += "/";
- entry._isValid = true;
+ entry._isValid = true;
entry._isPseudoRoot = false;
list.push_back(wrap(new PalmOSFilesystemNode(&entry)));
}
@@ -111,7 +111,7 @@ FSList PalmOSFilesystemNode::listDir(ListMode mode) const {
if (e)
return myList;
-
+
while(dirIterator != expIteratorStop) {
e = VFSDirEntryEnumerate(handle, &dirIterator, &desc);
if (!e) {
@@ -137,11 +137,11 @@ const char *lastPathComponent(const Common::String &str) {
AbstractFilesystemNode *PalmOSFilesystemNode::parent() const {
PalmOSFilesystemNode *p = 0;
-
+
if (!_isPseudoRoot) {
const char *start = _path.c_str();
const char *end = lastPathComponent(_path);
-
+
p = new PalmOSFilesystemNode();
p->_path = String(start, end - start);
p->_isValid = true;
diff --git a/backends/fs/posix/posix-fs.cpp b/backends/fs/posix/posix-fs.cpp
index 0224eb67a2..076548356f 100644
--- a/backends/fs/posix/posix-fs.cpp
+++ b/backends/fs/posix/posix-fs.cpp
@@ -45,7 +45,7 @@ protected:
bool _isDirectory;
bool _isValid;
String _path;
-
+
public:
POSIXFilesystemNode();
POSIXFilesystemNode(const String &path);
@@ -64,11 +64,11 @@ public:
static const char *lastPathComponent(const Common::String &str) {
const char *start = str.c_str();
const char *cur = start + str.size() - 2;
-
+
while (cur > start && *cur != '/') {
--cur;
}
-
+
return cur+1;
}
@@ -84,7 +84,7 @@ POSIXFilesystemNode::POSIXFilesystemNode() {
#ifndef __DC__
char buf[MAXPATHLEN];
getcwd(buf, MAXPATHLEN);
-
+
_path = buf;
_displayName = lastPathComponent(_path);
_path += '/';
@@ -99,7 +99,7 @@ POSIXFilesystemNode::POSIXFilesystemNode() {
POSIXFilesystemNode::POSIXFilesystemNode(const String &p) {
int len = 0, offset = p.size();
struct stat st;
-
+
assert(offset > 0);
_path = p;
@@ -147,7 +147,7 @@ FSList POSIXFilesystemNode::listDir(ListMode mode) const {
// Skip 'invisible' files
if (dp->d_name[0] == '.')
continue;
-
+
POSIXFilesystemNode entry;
entry._displayName = dp->d_name;
entry._path = _path;
diff --git a/backends/fs/ps2/ps2-fs.cpp b/backends/fs/ps2/ps2-fs.cpp
index 993b323daa..c44440a383 100644
--- a/backends/fs/ps2/ps2-fs.cpp
+++ b/backends/fs/ps2/ps2-fs.cpp
@@ -32,7 +32,7 @@ protected:
bool _isDirectory;
bool _isRoot;
String _path;
-
+
public:
Ps2FilesystemNode(void);
Ps2FilesystemNode(const Ps2FilesystemNode *node);
@@ -109,7 +109,7 @@ FSList Ps2FilesystemNode::listDir(ListMode mode) const {
if (tocEntries[fCnt].filename[0] != '.') { // skip .. directory
dirEntry._isDirectory = (bool)(tocEntries[fCnt].fileProperties & 2);
dirEntry._isRoot = false;
-
+
dirEntry._path = _path;
dirEntry._path += "/";
dirEntry._path += tocEntries[fCnt].filename;
@@ -135,7 +135,7 @@ AbstractFilesystemNode *Ps2FilesystemNode::parent() const {
slash = cnt;
cnt++;
}
-
+
p->_path = String(_path.c_str(), slash - _path.c_str());
p->_isDirectory = true;
p->_displayName = slash + 1;
diff --git a/backends/fs/symbian/symbian-fs.cpp b/backends/fs/symbian/symbian-fs.cpp
index ef9ad4a5d8..cd2ee3b2dc 100644
--- a/backends/fs/symbian/symbian-fs.cpp
+++ b/backends/fs/symbian/symbian-fs.cpp
@@ -21,7 +21,7 @@
* $Header$
*/
-#if defined (__SYMBIAN32__)
+#if defined (__SYMBIAN32__)
#include "common/stdafx.h"
#include "../fs.h"
@@ -62,11 +62,11 @@ public:
static const char *lastPathComponent(const Common::String &str) {
const char *start = str.c_str();
const char *cur = start + str.size() - 2;
-
+
while (cur > start && *cur != '\\') {
--cur;
}
-
+
return cur+1;
}
@@ -88,7 +88,7 @@ SymbianFilesystemNode::SymbianFilesystemNode(bool aIsRoot) {
}
// SumthinWicked says: added next function myself, since it was not in 0.7.1.
-// might still be a little buggy, or simply the reason ScummVM can't run any
+// might still be a little buggy, or simply the reason ScummVM can't run any
// games on the phone yet :P
SymbianFilesystemNode::SymbianFilesystemNode(const String &path) {
if (path.size() == 0)
@@ -121,7 +121,7 @@ FSList SymbianFilesystemNode::listDir(ListMode mode) const {
CEikonEnv::Static()->FsSession().DriveList(drivelist);
for (int loop=0;loop<KMaxDrives;loop++) {
if(drivelist[loop]>0) {
- SymbianFilesystemNode entry(false);
+ SymbianFilesystemNode entry(false);
char drive_name[2];
drive_name[0] = loop+'A';
drive_name[1] = '\0';
@@ -149,17 +149,17 @@ FSList SymbianFilesystemNode::listDir(ListMode mode) const {
nameBuf.Copy(fileentry.iName);
SymbianFilesystemNode entry(false);
entry._isPseudoRoot = false;
-
+
entry._displayName =(char*)nameBuf.PtrZ();
entry._path = _path;
entry._path +=(char*)nameBuf.PtrZ();
entry._isDirectory = fileentry.IsDir();
-
+
// Honor the chosen mode
if ((mode == kListFilesOnly && entry._isDirectory) ||
(mode == kListDirectoriesOnly && !entry._isDirectory))
continue;
-
+
if (entry._isDirectory)
entry._path += "\\";
myList.push_back(wrap(new SymbianFilesystemNode(&entry)));
diff --git a/backends/fs/windows/windows-fs.cpp b/backends/fs/windows/windows-fs.cpp
index 2de92b83f1..93ed3d799e 100644
--- a/backends/fs/windows/windows-fs.cpp
+++ b/backends/fs/windows/windows-fs.cpp
@@ -38,7 +38,7 @@ protected:
bool _isValid;
bool _isPseudoRoot;
String _path;
-
+
public:
WindowsFilesystemNode();
WindowsFilesystemNode(const String &path);
@@ -63,7 +63,7 @@ char* WindowsFilesystemNode::toAscii(TCHAR *x) {
#ifndef UNICODE
return (char*)x;
-#else
+#else
static char asciiString[MAX_PATH];
WideCharToMultiByte(CP_ACP, 0, x, _tcslen(x) + 1, asciiString, sizeof(asciiString), NULL, NULL);
return asciiString;
@@ -128,7 +128,7 @@ WindowsFilesystemNode::WindowsFilesystemNode() {
_isValid = true;
_path = "\\";
_isPseudoRoot = false;
-#endif
+#endif
}
WindowsFilesystemNode::WindowsFilesystemNode(const String &p) {
@@ -179,9 +179,9 @@ FSList WindowsFilesystemNode::listDir(ListMode mode) const {
TCHAR drive_buffer[100];
GetLogicalDriveStrings(sizeof(drive_buffer) / sizeof(TCHAR), drive_buffer);
- for (TCHAR *current_drive = drive_buffer; *current_drive;
+ for (TCHAR *current_drive = drive_buffer; *current_drive;
current_drive += _tcslen(current_drive) + 1) {
- WindowsFilesystemNode entry;
+ WindowsFilesystemNode entry;
char drive_name[2];
drive_name[0] = toAscii(current_drive)[0];