summaryrefslogtreecommitdiff
path: root/src/fs/virtfs
diff options
context:
space:
mode:
Diffstat (limited to 'src/fs/virtfs')
-rw-r--r--src/fs/virtfs/fs.cpp12
-rw-r--r--src/fs/virtfs/fszip.cpp (renamed from src/fs/virtfs/virtfszip.cpp)54
-rw-r--r--src/fs/virtfs/fszip.h (renamed from src/fs/virtfs/virtfszip.h)4
-rw-r--r--src/fs/virtfs/virtfsziprwops.cpp4
-rw-r--r--src/fs/virtfs/virtfsziprwops.h4
-rw-r--r--src/fs/virtfs/zip_unittest.cc18
6 files changed, 48 insertions, 48 deletions
diff --git a/src/fs/virtfs/fs.cpp b/src/fs/virtfs/fs.cpp
index 9c3228775..c4f1e7f42 100644
--- a/src/fs/virtfs/fs.cpp
+++ b/src/fs/virtfs/fs.cpp
@@ -27,7 +27,7 @@
#include "fs/virtfs/file.h"
#include "fs/virtfs/fsdir.h"
#include "fs/virtfs/fsfuncs.h"
-#include "fs/virtfs/virtfszip.h"
+#include "fs/virtfs/fszip.h"
#include "fs/virtfs/virtlist.h"
#include "fs/virtfs/virtzipentry.h"
#include "fs/virtfs/zipreader.h"
@@ -56,7 +56,7 @@ namespace VirtFs
{
updateDirSeparator();
FsDir::init(name);
- VirtFsZip::init();
+ FsZip::init();
}
void updateDirSeparator()
@@ -459,7 +459,7 @@ namespace VirtFs
prepareFsPath(newDir);
if (Files::existsLocal(newDir) == false)
{
- reportNonTests("VirtFsZip::addToSearchPath file not exists: %s",
+ reportNonTests("FsZip::addToSearchPath file not exists: %s",
newDir.c_str());
return false;
}
@@ -471,12 +471,12 @@ namespace VirtFs
}
if (searchEntryByRootInternal(newDir) != nullptr)
{
- reportAlways("VirtFsZip::addToSearchPath already exists: %s",
+ reportAlways("FsZip::addToSearchPath already exists: %s",
newDir.c_str());
return false;
}
VirtZipEntry *const entry = new VirtZipEntry(newDir,
- VirtFsZip::getFuncs());
+ FsZip::getFuncs());
if (ZipReader::readArchiveInfo(entry) == false)
{
delete entry;
@@ -558,7 +558,7 @@ namespace VirtFs
bool deinit()
{
FsDir::deinit();
- VirtFsZip::deinit();
+ FsZip::deinit();
FOR_EACH (std::vector<FsEntry*>::iterator, it, mEntries)
{
FsEntry *const entry = *it;
diff --git a/src/fs/virtfs/virtfszip.cpp b/src/fs/virtfs/fszip.cpp
index 0f58dd5f5..3781380ae 100644
--- a/src/fs/virtfs/virtfszip.cpp
+++ b/src/fs/virtfs/fszip.cpp
@@ -18,7 +18,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "fs/virtfs/virtfszip.h"
+#include "fs/virtfs/fszip.h"
#include "fs/virtfs/file.h"
#include "fs/virtfs/fsfuncs.h"
@@ -43,7 +43,7 @@ namespace
namespace VirtFs
{
-namespace VirtFsZip
+namespace FsZip
{
FsFuncs *getFuncs()
{
@@ -61,30 +61,30 @@ namespace VirtFsZip
void initFuncs(FsFuncs *restrict const ptr)
{
- ptr->close = &VirtFsZip::close;
- ptr->read = &VirtFsZip::read;
- ptr->write = &VirtFsZip::write;
- ptr->fileLength = &VirtFsZip::fileLength;
- ptr->tell = &VirtFsZip::tell;
- ptr->seek = &VirtFsZip::seek;
- ptr->eof = &VirtFsZip::eof;
- ptr->exists = &VirtFsZip::exists;
- ptr->getRealDir = &VirtFsZip::getRealDir;
- ptr->enumerate = &VirtFsZip::enumerate;
- ptr->isDirectory = &VirtFsZip::isDirectory;
- ptr->openRead = &VirtFsZip::openRead;
- ptr->openWrite = &VirtFsZip::openWrite;
- ptr->openAppend = &VirtFsZip::openAppend;
- ptr->loadFile = &VirtFsZip::loadFile;
- ptr->getFiles = &VirtFsZip::getFiles;
- ptr->getFilesWithDir = &VirtFsZip::getFilesWithDir;
- ptr->getDirs = &VirtFsZip::getDirs;
- ptr->rwops_seek = &VirtFsZip::rwops_seek;
- ptr->rwops_read = &VirtFsZip::rwops_read;
- ptr->rwops_write = &VirtFsZip::rwops_write;
- ptr->rwops_close = &VirtFsZip::rwops_close;
+ ptr->close = &FsZip::close;
+ ptr->read = &FsZip::read;
+ ptr->write = &FsZip::write;
+ ptr->fileLength = &FsZip::fileLength;
+ ptr->tell = &FsZip::tell;
+ ptr->seek = &FsZip::seek;
+ ptr->eof = &FsZip::eof;
+ ptr->exists = &FsZip::exists;
+ ptr->getRealDir = &FsZip::getRealDir;
+ ptr->enumerate = &FsZip::enumerate;
+ ptr->isDirectory = &FsZip::isDirectory;
+ ptr->openRead = &FsZip::openRead;
+ ptr->openWrite = &FsZip::openWrite;
+ ptr->openAppend = &FsZip::openAppend;
+ ptr->loadFile = &FsZip::loadFile;
+ ptr->getFiles = &FsZip::getFiles;
+ ptr->getFilesWithDir = &FsZip::getFilesWithDir;
+ ptr->getDirs = &FsZip::getDirs;
+ ptr->rwops_seek = &FsZip::rwops_seek;
+ ptr->rwops_read = &FsZip::rwops_read;
+ ptr->rwops_write = &FsZip::rwops_write;
+ ptr->rwops_close = &FsZip::rwops_close;
#ifdef USE_SDL2
- ptr->rwops_size = &VirtFsZip::rwops_size;
+ ptr->rwops_size = &FsZip::rwops_size;
#endif // USE_SDL2
}
@@ -566,7 +566,7 @@ namespace VirtFsZip
}
if (buffer == nullptr)
{
- reportAlways("VirtFsZip::read buffer is null");
+ reportAlways("FsZip::read buffer is null");
return 0;
}
const size_t pos = file->mPos;
@@ -663,6 +663,6 @@ namespace VirtFsZip
}
return nullptr;
}
-} // namespace VirtFsZip
+} // namespace FsZip
} // namespace VirtFs
diff --git a/src/fs/virtfs/virtfszip.h b/src/fs/virtfs/fszip.h
index 60ecb3a8f..03981f0ec 100644
--- a/src/fs/virtfs/virtfszip.h
+++ b/src/fs/virtfs/fszip.h
@@ -33,7 +33,7 @@ struct VirtList;
struct FsFuncs;
struct FsEntry;
-namespace VirtFsZip
+namespace FsZip
{
FsFuncs *getFuncs();
void init();
@@ -86,7 +86,7 @@ namespace VirtFsZip
const char *loadFile(FsEntry *restrict const entry,
const std::string &restrict fileName,
int &restrict fileSize);
-} // namespace VirtFsZip
+} // namespace FsZip
} // namespace VirtFs
diff --git a/src/fs/virtfs/virtfsziprwops.cpp b/src/fs/virtfs/virtfsziprwops.cpp
index d0c386bab..60199cc83 100644
--- a/src/fs/virtfs/virtfsziprwops.cpp
+++ b/src/fs/virtfs/virtfsziprwops.cpp
@@ -32,7 +32,7 @@
namespace VirtFs
{
-namespace VirtFsZip
+namespace FsZip
{
RWOPSINT rwops_seek(SDL_RWops *const rw,
const RWOPSINT offset,
@@ -148,6 +148,6 @@ namespace VirtFsZip
}
#endif // USE_SDL2
-} // namespace VirtFsZip
+} // namespace FsZip
} // namespace VirtFs
diff --git a/src/fs/virtfs/virtfsziprwops.h b/src/fs/virtfs/virtfsziprwops.h
index b2fa65319..508b2213c 100644
--- a/src/fs/virtfs/virtfsziprwops.h
+++ b/src/fs/virtfs/virtfsziprwops.h
@@ -30,7 +30,7 @@ struct SDL_RWops;
namespace VirtFs
{
-namespace VirtFsZip
+namespace FsZip
{
RWOPSINT rwops_seek(SDL_RWops *const rw,
const RWOPSINT offset,
@@ -48,7 +48,7 @@ namespace VirtFsZip
RWOPSINT rwops_size(SDL_RWops *const rw);
#endif // USE_SDL2
-} // namespace VirtFsZip
+} // namespace FsZip
} // namespace VirtFs
diff --git a/src/fs/virtfs/zip_unittest.cc b/src/fs/virtfs/zip_unittest.cc
index 3853bee79..39aa17ae2 100644
--- a/src/fs/virtfs/zip_unittest.cc
+++ b/src/fs/virtfs/zip_unittest.cc
@@ -24,7 +24,7 @@
#include "fs/files.h"
-#include "fs/virtfs/virtfszip.h"
+#include "fs/virtfs/fszip.h"
#include "fs/virtfs/virtzipentry.h"
#include "fs/virtfs/zipreader.h"
#include "fs/virtfs/ziplocalheader.h"
@@ -49,7 +49,7 @@ TEST_CASE("Zip readArchiveInfo")
name = prefix + "data/test/test.zip";
VirtFs::VirtZipEntry *const entry = new VirtFs::VirtZipEntry(name,
- VirtFs::VirtFsZip::getFuncs());
+ VirtFs::FsZip::getFuncs());
std::vector<VirtFs::ZipLocalHeader*> &headers = entry->mHeaders;
REQUIRE(VirtFs::ZipReader::readArchiveInfo(entry));
@@ -70,7 +70,7 @@ TEST_CASE("Zip readArchiveInfo")
name = prefix + "data/test/test2.zip";
VirtFs::VirtZipEntry *const entry = new VirtFs::VirtZipEntry(name,
- VirtFs::VirtFsZip::getFuncs());
+ VirtFs::FsZip::getFuncs());
std::vector<VirtFs::ZipLocalHeader*> &headers = entry->mHeaders;
REQUIRE(VirtFs::ZipReader::readArchiveInfo(entry));
@@ -132,7 +132,7 @@ TEST_CASE("Zip readArchiveInfo")
name = prefix + "data/test/test3.zip";
VirtFs::VirtZipEntry *const entry = new VirtFs::VirtZipEntry(name,
- VirtFs::VirtFsZip::getFuncs());
+ VirtFs::FsZip::getFuncs());
std::vector<VirtFs::ZipLocalHeader*> &headers = entry->mHeaders;
REQUIRE(VirtFs::ZipReader::readArchiveInfo(entry));
@@ -153,7 +153,7 @@ TEST_CASE("Zip readArchiveInfo")
name = prefix + "data/test/test4.zip";
VirtFs::VirtZipEntry *const entry = new VirtFs::VirtZipEntry(name,
- VirtFs::VirtFsZip::getFuncs());
+ VirtFs::FsZip::getFuncs());
std::vector<VirtFs::ZipLocalHeader*> &headers = entry->mHeaders;
REQUIRE(VirtFs::ZipReader::readArchiveInfo(entry));
@@ -184,7 +184,7 @@ TEST_CASE("Zip readCompressedFile")
name = prefix + "data/test/test2.zip";
VirtFs::VirtZipEntry *const entry = new VirtFs::VirtZipEntry(name,
- VirtFs::VirtFsZip::getFuncs());
+ VirtFs::FsZip::getFuncs());
std::vector<VirtFs::ZipLocalHeader*> &headers = entry->mHeaders;
REQUIRE(VirtFs::ZipReader::readArchiveInfo(entry));
@@ -218,7 +218,7 @@ TEST_CASE("Zip readFile")
name = prefix + "data/test/test.zip";
VirtFs::VirtZipEntry *const entry = new VirtFs::VirtZipEntry(name,
- VirtFs::VirtFsZip::getFuncs());
+ VirtFs::FsZip::getFuncs());
std::vector<VirtFs::ZipLocalHeader*> &headers = entry->mHeaders;
REQUIRE(VirtFs::ZipReader::readArchiveInfo(entry));
@@ -242,7 +242,7 @@ TEST_CASE("Zip readFile")
name = prefix + "data/test/test2.zip";
VirtFs::VirtZipEntry *const entry = new VirtFs::VirtZipEntry(name,
- VirtFs::VirtFsZip::getFuncs());
+ VirtFs::FsZip::getFuncs());
std::vector<VirtFs::ZipLocalHeader*> &headers = entry->mHeaders;
REQUIRE(VirtFs::ZipReader::readArchiveInfo(entry));
@@ -273,7 +273,7 @@ TEST_CASE("Zip readFile")
name = prefix + "data/test/test3.zip";
VirtFs::VirtZipEntry *const entry = new VirtFs::VirtZipEntry(name,
- VirtFs::VirtFsZip::getFuncs());
+ VirtFs::FsZip::getFuncs());
std::vector<VirtFs::ZipLocalHeader*> &headers = entry->mHeaders;
REQUIRE(VirtFs::ZipReader::readArchiveInfo(entry));