summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-05-05 18:54:26 +0300
committerAndrei Karas <akaras@inbox.ru>2017-05-05 18:54:26 +0300
commitc1fb7369bc8ce56abf5a8693dc56d741d675ae3b (patch)
tree9fa0fdde64e7c9a6bf309460e2bd34510bd5d540
parentf0683382ed9ba3d2cbc9e3ef2018049b6e2c3d63 (diff)
downloadplus-c1fb7369bc8ce56abf5a8693dc56d741d675ae3b.tar.gz
plus-c1fb7369bc8ce56abf5a8693dc56d741d675ae3b.tar.bz2
plus-c1fb7369bc8ce56abf5a8693dc56d741d675ae3b.tar.xz
plus-c1fb7369bc8ce56abf5a8693dc56d741d675ae3b.zip
Rename virtfszip into fszip.
-rw-r--r--src/CMakeLists.txt8
-rw-r--r--src/Makefile.am4
-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
8 files changed, 54 insertions, 54 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 3e7492b1f..5dfa40c6f 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -908,8 +908,8 @@ SET(SRCS
fs/virtfs/fsdirrwops.h
fs/virtfs/fsentry.cpp
fs/virtfs/fsentry.h
- fs/virtfs/virtfszip.cpp
- fs/virtfs/virtfszip.h
+ fs/virtfs/fszip.cpp
+ fs/virtfs/fszip.h
fs/virtfs/virtfsziprwops.cpp
fs/virtfs/virtfsziprwops.h
fs/virtfs/virtzipentry.cpp
@@ -1817,8 +1817,8 @@ SET(DYE_CMD_SRCS
fs/virtfs/fsdirrwops.h
fs/virtfs/fsentry.cpp
fs/virtfs/fsentry.h
- fs/virtfs/virtfszip.cpp
- fs/virtfs/virtfszip.h
+ fs/virtfs/fszip.cpp
+ fs/virtfs/fszip.h
fs/virtfs/virtfsziprwops.cpp
fs/virtfs/virtfsziprwops.h
fs/virtfs/virtzipentry.cpp
diff --git a/src/Makefile.am b/src/Makefile.am
index 8cd11f727..a3b8966d9 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -856,8 +856,8 @@ BASE_SRC += events/actionevent.h \
fs/virtfs/fsdirrwops.h \
fs/virtfs/fsentry.cpp \
fs/virtfs/fsentry.h \
- fs/virtfs/virtfszip.cpp \
- fs/virtfs/virtfszip.h \
+ fs/virtfs/fszip.cpp \
+ fs/virtfs/fszip.h \
fs/virtfs/virtfsziprwops.cpp \
fs/virtfs/virtfsziprwops.h \
fs/virtfs/virtzipentry.cpp \
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));