aboutsummaryrefslogtreecommitdiff
path: root/backends/fs
diff options
context:
space:
mode:
authorNicola Mettifogo2007-09-19 08:40:12 +0000
committerNicola Mettifogo2007-09-19 08:40:12 +0000
commit258901bab96f0050385a9912c8ea0fe2a41b2d6f (patch)
treea3ae8675b679c9f3b58ac8d97c79369502ea23c1 /backends/fs
parenta89694c0d61a75a960f5bec6c498659c988401cc (diff)
downloadscummvm-rg350-258901bab96f0050385a9912c8ea0fe2a41b2d6f.tar.gz
scummvm-rg350-258901bab96f0050385a9912c8ea0fe2a41b2d6f.tar.bz2
scummvm-rg350-258901bab96f0050385a9912c8ea0fe2a41b2d6f.zip
Merged common/stdafx.h into common/scummsys.h. All referencing files have been updated.
svn-id: r28966
Diffstat (limited to 'backends/fs')
-rw-r--r--backends/fs/abstract-fs-factory.h15
-rw-r--r--backends/fs/amigaos4/amigaos4-fs.cpp2
-rw-r--r--backends/fs/dc/dc-fs.cpp1
-rw-r--r--backends/fs/ds/ds-fs.cpp1
-rw-r--r--backends/fs/gp32/gp32-fs.cpp1
-rw-r--r--backends/fs/morphos/abox-fs.cpp2
-rw-r--r--backends/fs/palmos/palmos-fs.cpp1
-rw-r--r--backends/fs/posix/posix-fs.cpp1
-rw-r--r--backends/fs/symbian/symbian-fs.cpp1
-rw-r--r--backends/fs/windows/windows-fs.cpp45
10 files changed, 29 insertions, 41 deletions
diff --git a/backends/fs/abstract-fs-factory.h b/backends/fs/abstract-fs-factory.h
index 79ec3f7520..c4ce277505 100644
--- a/backends/fs/abstract-fs-factory.h
+++ b/backends/fs/abstract-fs-factory.h
@@ -25,7 +25,6 @@
#ifndef ABSTRACT_FILESYSTEM_FACTORY_H
#define ABSTRACT_FILESYSTEM_FACTORY_H
-#include "common/stdafx.h"
#include "common/str.h"
#include "backends/fs/abstract-fs.h"
@@ -35,12 +34,12 @@
class AbstractFilesystemFactory {
public:
typedef Common::String String;
-
+
/**
* Destructor.
*/
virtual ~AbstractFilesystemFactory() {}
-
+
/**
* Returns a node representing the "current directory".
* If your system does not support this concept, you can either try to
@@ -48,7 +47,7 @@ public:
* e.g. the same value as getRoot() returns.
*/
virtual AbstractFilesystemNode *makeCurrentDirectoryFileNode() const = 0;
-
+
/**
* Construct a node based on a path; the path is in the same format as it
* would be for calls to fopen().
@@ -60,17 +59,17 @@ public:
* @param path The path string to create a FilesystemNode for.
*/
virtual AbstractFilesystemNode *makeFileNodePath(const String &path) const = 0;
-
+
/**
* Returns a special node representing the filesystem root.
* The starting point for any file system browsing.
- *
+ *
* On Unix, this will be simply the node for / (the root directory).
* On Windows, it will be a special node which "contains" all drives (C:, D:, E:).
*/
virtual AbstractFilesystemNode *makeRootFileNode() const = 0;
-
-
+
+
/**
* Meta-factory method which returns a concrete AbstractFilesystemFactory
* instance depending on the current architecture.
diff --git a/backends/fs/amigaos4/amigaos4-fs.cpp b/backends/fs/amigaos4/amigaos4-fs.cpp
index 3eefd6507e..4ad02e0655 100644
--- a/backends/fs/amigaos4/amigaos4-fs.cpp
+++ b/backends/fs/amigaos4/amigaos4-fs.cpp
@@ -35,8 +35,6 @@
#include <strings.h>
#endif
-#include <common/stdafx.h>
-
#include "common/util.h"
#include "engines/engine.h"
#include "backends/fs/abstract-fs.h"
diff --git a/backends/fs/dc/dc-fs.cpp b/backends/fs/dc/dc-fs.cpp
index 0b204dc309..a814d05cec 100644
--- a/backends/fs/dc/dc-fs.cpp
+++ b/backends/fs/dc/dc-fs.cpp
@@ -24,7 +24,6 @@
#if defined(__DC__)
-#include "common/stdafx.h"
#include "backends/fs/abstract-fs.h"
#include <ronin/cdfs.h>
diff --git a/backends/fs/ds/ds-fs.cpp b/backends/fs/ds/ds-fs.cpp
index 11d373ea1e..891f0df636 100644
--- a/backends/fs/ds/ds-fs.cpp
+++ b/backends/fs/ds/ds-fs.cpp
@@ -20,7 +20,6 @@
*
*/
-#include "stdafx.h"
#include "str.h"
#include "common/util.h"
//#include <NDS/ARM9/console.h> //basic print funcionality
diff --git a/backends/fs/gp32/gp32-fs.cpp b/backends/fs/gp32/gp32-fs.cpp
index 1585bd22f1..4fb88467ea 100644
--- a/backends/fs/gp32/gp32-fs.cpp
+++ b/backends/fs/gp32/gp32-fs.cpp
@@ -23,7 +23,6 @@
*
*/
-#include "stdafx.h"
#include "backends/fs/abstract-fs.h"
#define MAX_PATH_SIZE 256
diff --git a/backends/fs/morphos/abox-fs.cpp b/backends/fs/morphos/abox-fs.cpp
index ef50a11e4e..05c13662bc 100644
--- a/backends/fs/morphos/abox-fs.cpp
+++ b/backends/fs/morphos/abox-fs.cpp
@@ -29,8 +29,6 @@
#include <stdio.h>
#include <sys/stat.h>
-#include <common/stdafx.h>
-
#include "common/util.h"
#include "base/engine.h"
#include "backends/fs/abstract-fs.h"
diff --git a/backends/fs/palmos/palmos-fs.cpp b/backends/fs/palmos/palmos-fs.cpp
index d44958254d..cda3ee3c33 100644
--- a/backends/fs/palmos/palmos-fs.cpp
+++ b/backends/fs/palmos/palmos-fs.cpp
@@ -27,7 +27,6 @@
#include "PalmVersion.h"
#include "globals.h"
-#include "common/stdafx.h"
#include "backends/fs/abstract-fs.h"
/**
diff --git a/backends/fs/posix/posix-fs.cpp b/backends/fs/posix/posix-fs.cpp
index 5871d1ef42..1f66d5639d 100644
--- a/backends/fs/posix/posix-fs.cpp
+++ b/backends/fs/posix/posix-fs.cpp
@@ -24,7 +24,6 @@
#if defined(UNIX)
-#include "common/stdafx.h"
#include "backends/fs/abstract-fs.h"
#ifdef MACOSX
diff --git a/backends/fs/symbian/symbian-fs.cpp b/backends/fs/symbian/symbian-fs.cpp
index e8a9553927..0d7b37ee4d 100644
--- a/backends/fs/symbian/symbian-fs.cpp
+++ b/backends/fs/symbian/symbian-fs.cpp
@@ -23,7 +23,6 @@
*/
#if defined (__SYMBIAN32__)
-#include "common/stdafx.h"
#include "backends/fs/abstract-fs.h"
#include <dirent.h>
diff --git a/backends/fs/windows/windows-fs.cpp b/backends/fs/windows/windows-fs.cpp
index c7f500f108..b2c3bc64fb 100644
--- a/backends/fs/windows/windows-fs.cpp
+++ b/backends/fs/windows/windows-fs.cpp
@@ -27,7 +27,6 @@
#ifdef _WIN32_WCE
#include <windows.h>
#endif
-#include "common/stdafx.h"
#include "backends/fs/abstract-fs.h"
#include <io.h>
#include <stdio.h>
@@ -54,7 +53,7 @@
/**
* Implementation of the ScummVM file system API based on Windows API.
- *
+ *
* Parts of this class are documented in the base interface class, AbstractFilesystemNode.
*/
class WindowsFilesystemNode : public AbstractFilesystemNode {
@@ -68,25 +67,25 @@ protected:
public:
/**
* Creates a WindowsFilesystemNode with the root node as path.
- *
+ *
* In regular windows systems, a virtual root path is used "".
* In windows CE, the "\" root is used instead.
*/
WindowsFilesystemNode();
-
+
/**
* Creates a WindowsFilesystemNode for a given path.
- *
+ *
* Examples:
* path=c:\foo\bar.txt, currentDir=false -> c:\foo\bar.txt
* path=c:\foo\bar.txt, currentDir=true -> current directory
* path=NULL, currentDir=true -> current directory
- *
+ *
* @param path String with the path the new node should point to.
* @param currentDir if true, the path parameter will be ignored and the resulting node will point to the current directory.
*/
WindowsFilesystemNode(const String &path, const bool currentDir);
-
+
virtual bool exists() const { return _access(_path.c_str(), F_OK) == 0; }
virtual String getDisplayName() const { return _displayName; }
virtual String getName() const { return _displayName; }
@@ -103,26 +102,26 @@ public:
private:
/**
* Adds a single WindowsFilesystemNode to a given list.
- * This method is used by getChildren() to populate the directory entries list.
- *
+ * This method is used by getChildren() to populate the directory entries list.
+ *
* @param list List to put the file entry node in.
* @param mode Mode to use while adding the file entry to the list.
* @param base String with the directory being listed.
* @param find_data Describes a file that the FindFirstFile, FindFirstFileEx, or FindNextFile functions find.
*/
static void addFile(AbstractFSList &list, ListMode mode, const char *base, WIN32_FIND_DATA* find_data);
-
+
/**
* Converts a Unicode string to Ascii format.
- *
+ *
* @param str String to convert from Unicode to Ascii.
* @return str in Ascii format.
*/
static char *toAscii(TCHAR *str);
-
+
/**
* Converts an Ascii string to Unicode format.
- *
+ *
* @param str String to convert from Ascii to Unicode.
* @return str in Unicode format.
*/
@@ -131,11 +130,11 @@ private:
/**
* Returns the last component of a given path.
- *
+ *
* Examples:
* c:\foo\bar.txt would return "\bar.txt"
* c:\foo\bar\ would return "\bar\"
- *
+ *
* @param str Path to obtain the last component from.
* @return Pointer to the first char of the last component inside str.
*/
@@ -229,7 +228,7 @@ WindowsFilesystemNode::WindowsFilesystemNode(const String &p, const bool current
assert(p.size() > 0);
_path = p;
}
-
+
_displayName = lastPathComponent(_path);
// Check whether it is a directory, and whether the file actually exists
@@ -247,7 +246,7 @@ WindowsFilesystemNode::WindowsFilesystemNode(const String &p, const bool current
AbstractFilesystemNode *WindowsFilesystemNode::getChild(const String &n) const {
assert(_isDirectory);
-
+
String newPath(_path);
if (_path.lastChar() != '\\')
newPath += '\\';
@@ -297,12 +296,12 @@ bool WindowsFilesystemNode::getChildren(AbstractFSList &myList, ListMode mode, b
sprintf(searchPath, "%s*", _path.c_str());
handle = FindFirstFile(toUnicode(searchPath), &desc);
-
+
if (handle == INVALID_HANDLE_VALUE)
return false;
-
+
addFile(myList, mode, _path.c_str(), &desc);
-
+
while (FindNextFile(handle, &desc))
addFile(myList, mode, _path.c_str(), &desc);
@@ -314,10 +313,10 @@ bool WindowsFilesystemNode::getChildren(AbstractFSList &myList, ListMode mode, b
AbstractFilesystemNode *WindowsFilesystemNode::getParent() const {
assert(_isValid || _isPseudoRoot);
-
+
if (_isPseudoRoot)
return 0;
-
+
WindowsFilesystemNode *p = new WindowsFilesystemNode();
if (_path.size() > 3) {
const char *start = _path.c_str();
@@ -330,7 +329,7 @@ AbstractFilesystemNode *WindowsFilesystemNode::getParent() const {
p->_displayName = lastPathComponent(p->_path);
p->_isPseudoRoot = false;
}
-
+
return p;
}