summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-05-05 20:18:28 +0300
committerAndrei Karas <akaras@inbox.ru>2017-05-05 20:18:28 +0300
commit4c37700df953b84f1d6533e7be5a798869b64a57 (patch)
tree6c5117f1d23ae21da609afa6861c09dee31a4eff /src
parentab311005113b2648cf5d709ec2a12baea90ede95 (diff)
downloadmanaplus-4c37700df953b84f1d6533e7be5a798869b64a57.tar.gz
manaplus-4c37700df953b84f1d6533e7be5a798869b64a57.tar.bz2
manaplus-4c37700df953b84f1d6533e7be5a798869b64a57.tar.xz
manaplus-4c37700df953b84f1d6533e7be5a798869b64a57.zip
Rename virtzipentry into zipentry.
Diffstat (limited to 'src')
-rw-r--r--src/CMakeLists.txt8
-rw-r--r--src/Makefile.am4
-rw-r--r--src/fs/virtfs/fs.cpp8
-rw-r--r--src/fs/virtfs/fszip.cpp20
-rw-r--r--src/fs/virtfs/zip_unittest.cc18
-rw-r--r--src/fs/virtfs/zipentry.cpp (renamed from src/fs/virtfs/virtzipentry.cpp)8
-rw-r--r--src/fs/virtfs/zipentry.h (renamed from src/fs/virtfs/virtzipentry.h)10
-rw-r--r--src/fs/virtfs/ziplocalheader.h4
-rw-r--r--src/fs/virtfs/zipreader.cpp4
-rw-r--r--src/fs/virtfs/zipreader.h4
10 files changed, 44 insertions, 44 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 8ce7e9462..8f6c5f58a 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -912,8 +912,8 @@ SET(SRCS
fs/virtfs/fszip.h
fs/virtfs/fsziprwops.cpp
fs/virtfs/fsziprwops.h
- fs/virtfs/virtzipentry.cpp
- fs/virtfs/virtzipentry.h
+ fs/virtfs/zipentry.cpp
+ fs/virtfs/zipentry.h
fs/virtfs/zipreader.cpp
fs/virtfs/zipreader.h
fs/virtfs/ziplocalheader.cpp
@@ -1821,8 +1821,8 @@ SET(DYE_CMD_SRCS
fs/virtfs/fszip.h
fs/virtfs/fsziprwops.cpp
fs/virtfs/fsziprwops.h
- fs/virtfs/virtzipentry.cpp
- fs/virtfs/virtzipentry.h
+ fs/virtfs/zipentry.cpp
+ fs/virtfs/zipentry.h
fs/virtfs/zipreader.cpp
fs/virtfs/zipreader.h
fs/virtfs/ziplocalheader.cpp
diff --git a/src/Makefile.am b/src/Makefile.am
index e3ce6bc45..3165918dd 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -860,8 +860,8 @@ BASE_SRC += events/actionevent.h \
fs/virtfs/fszip.h \
fs/virtfs/fsziprwops.cpp \
fs/virtfs/fsziprwops.h \
- fs/virtfs/virtzipentry.cpp \
- fs/virtfs/virtzipentry.h \
+ fs/virtfs/zipentry.cpp \
+ fs/virtfs/zipentry.h \
fs/virtfs/zipreader.cpp \
fs/virtfs/zipreader.h \
fs/virtfs/ziplocalheader.cpp \
diff --git a/src/fs/virtfs/fs.cpp b/src/fs/virtfs/fs.cpp
index 4d73784dd..20c245dd9 100644
--- a/src/fs/virtfs/fs.cpp
+++ b/src/fs/virtfs/fs.cpp
@@ -29,7 +29,7 @@
#include "fs/virtfs/fsfuncs.h"
#include "fs/virtfs/fszip.h"
#include "fs/virtfs/list.h"
-#include "fs/virtfs/virtzipentry.h"
+#include "fs/virtfs/zipentry.h"
#include "fs/virtfs/zipreader.h"
#include "utils/checkutils.h"
@@ -475,7 +475,7 @@ namespace VirtFs
newDir.c_str());
return false;
}
- VirtZipEntry *const entry = new VirtZipEntry(newDir,
+ ZipEntry *const entry = new ZipEntry(newDir,
FsZip::getFuncs());
if (ZipReader::readArchiveInfo(entry) == false)
{
@@ -502,7 +502,7 @@ namespace VirtFs
if (entry->root == oldDir &&
entry->type == FsEntryType::Zip)
{
- VirtZipEntry *const zipEntry = static_cast<VirtZipEntry*>(
+ ZipEntry *const zipEntry = static_cast<ZipEntry*>(
entry);
logger->log("Remove virtual zip: " + oldDir);
mEntries.erase(it);
@@ -565,7 +565,7 @@ namespace VirtFs
if (entry->type == FsEntryType::Dir)
delete static_cast<DirEntry*>(entry);
else if (entry->type == FsEntryType::Zip)
- delete static_cast<VirtZipEntry*>(entry);
+ delete static_cast<ZipEntry*>(entry);
else
delete entry;
}
diff --git a/src/fs/virtfs/fszip.cpp b/src/fs/virtfs/fszip.cpp
index c3e51cf45..eda5dd078 100644
--- a/src/fs/virtfs/fszip.cpp
+++ b/src/fs/virtfs/fszip.cpp
@@ -24,7 +24,7 @@
#include "fs/virtfs/fsfuncs.h"
#include "fs/virtfs/fsziprwops.h"
#include "fs/virtfs/list.h"
-#include "fs/virtfs/virtzipentry.h"
+#include "fs/virtfs/zipentry.h"
#include "fs/virtfs/zipreader.h"
#include "fs/virtfs/ziplocalheader.h"
@@ -93,7 +93,7 @@ namespace FsZip
const std::string &dirName,
std::string &realDir)
{
- VirtZipEntry *const zipEntry = static_cast<VirtZipEntry*>(entry);
+ ZipEntry *const zipEntry = static_cast<ZipEntry*>(entry);
FOR_EACH (std::vector<ZipLocalHeader*>::const_iterator,
it2,
zipEntry->mHeaders)
@@ -121,7 +121,7 @@ namespace FsZip
const std::string &filename,
const std::string &dirName)
{
- VirtZipEntry *const zipEntry = static_cast<VirtZipEntry*>(entry);
+ ZipEntry *const zipEntry = static_cast<ZipEntry*>(entry);
FOR_EACH (std::vector<ZipLocalHeader*>::const_iterator,
it2,
zipEntry->mHeaders)
@@ -143,7 +143,7 @@ namespace FsZip
const std::string &dirName,
StringVect &names)
{
- VirtZipEntry *const zipEntry = static_cast<VirtZipEntry*>(entry);
+ ZipEntry *const zipEntry = static_cast<ZipEntry*>(entry);
if (dirName == dirSeparator)
{
FOR_EACH (std::vector<ZipLocalHeader*>::const_iterator,
@@ -203,7 +203,7 @@ namespace FsZip
const std::string &dirName,
StringVect &names)
{
- VirtZipEntry *const zipEntry = static_cast<VirtZipEntry*>(entry);
+ ZipEntry *const zipEntry = static_cast<ZipEntry*>(entry);
if (dirName == dirSeparator)
{
FOR_EACH (std::vector<ZipLocalHeader*>::const_iterator,
@@ -298,7 +298,7 @@ namespace FsZip
const std::string &dirName,
StringVect &names)
{
- VirtZipEntry *const zipEntry = static_cast<VirtZipEntry*>(entry);
+ ZipEntry *const zipEntry = static_cast<ZipEntry*>(entry);
if (dirName == dirSeparator)
{
FOR_EACH (std::vector<ZipLocalHeader*>::const_iterator,
@@ -393,7 +393,7 @@ namespace FsZip
const std::string &dirName,
StringVect &names)
{
- VirtZipEntry *const zipEntry = static_cast<VirtZipEntry*>(entry);
+ ZipEntry *const zipEntry = static_cast<ZipEntry*>(entry);
if (dirName == dirSeparator)
{
FOR_EACH (std::vector<ZipLocalHeader*>::const_iterator,
@@ -488,7 +488,7 @@ namespace FsZip
const std::string &dirName,
bool &isDirFlag)
{
- VirtZipEntry *const zipEntry = static_cast<VirtZipEntry*>(entry);
+ ZipEntry *const zipEntry = static_cast<ZipEntry*>(entry);
FOR_EACH (std::vector<std::string>::const_iterator,
it2,
zipEntry->mDirs)
@@ -510,7 +510,7 @@ namespace FsZip
File *openRead(FsEntry *restrict const entry,
const std::string &filename)
{
- VirtZipEntry *const zipEntry = static_cast<VirtZipEntry*>(entry);
+ ZipEntry *const zipEntry = static_cast<ZipEntry*>(entry);
FOR_EACH (std::vector<ZipLocalHeader*>::const_iterator,
it2,
zipEntry->mHeaders)
@@ -640,7 +640,7 @@ namespace FsZip
const std::string &restrict filename,
int &restrict fileSize)
{
- VirtZipEntry *const zipEntry = static_cast<VirtZipEntry*>(entry);
+ ZipEntry *const zipEntry = static_cast<ZipEntry*>(entry);
FOR_EACH (std::vector<ZipLocalHeader*>::const_iterator,
it2,
zipEntry->mHeaders)
diff --git a/src/fs/virtfs/zip_unittest.cc b/src/fs/virtfs/zip_unittest.cc
index 39aa17ae2..e0d468941 100644
--- a/src/fs/virtfs/zip_unittest.cc
+++ b/src/fs/virtfs/zip_unittest.cc
@@ -25,7 +25,7 @@
#include "fs/files.h"
#include "fs/virtfs/fszip.h"
-#include "fs/virtfs/virtzipentry.h"
+#include "fs/virtfs/zipentry.h"
#include "fs/virtfs/zipreader.h"
#include "fs/virtfs/ziplocalheader.h"
@@ -48,7 +48,7 @@ TEST_CASE("Zip readArchiveInfo")
{
name = prefix + "data/test/test.zip";
- VirtFs::VirtZipEntry *const entry = new VirtFs::VirtZipEntry(name,
+ VirtFs::ZipEntry *const entry = new VirtFs::ZipEntry(name,
VirtFs::FsZip::getFuncs());
std::vector<VirtFs::ZipLocalHeader*> &headers = entry->mHeaders;
@@ -69,7 +69,7 @@ TEST_CASE("Zip readArchiveInfo")
{
name = prefix + "data/test/test2.zip";
- VirtFs::VirtZipEntry *const entry = new VirtFs::VirtZipEntry(name,
+ VirtFs::ZipEntry *const entry = new VirtFs::ZipEntry(name,
VirtFs::FsZip::getFuncs());
std::vector<VirtFs::ZipLocalHeader*> &headers = entry->mHeaders;
@@ -131,7 +131,7 @@ TEST_CASE("Zip readArchiveInfo")
{
name = prefix + "data/test/test3.zip";
- VirtFs::VirtZipEntry *const entry = new VirtFs::VirtZipEntry(name,
+ VirtFs::ZipEntry *const entry = new VirtFs::ZipEntry(name,
VirtFs::FsZip::getFuncs());
std::vector<VirtFs::ZipLocalHeader*> &headers = entry->mHeaders;
@@ -152,7 +152,7 @@ TEST_CASE("Zip readArchiveInfo")
{
name = prefix + "data/test/test4.zip";
- VirtFs::VirtZipEntry *const entry = new VirtFs::VirtZipEntry(name,
+ VirtFs::ZipEntry *const entry = new VirtFs::ZipEntry(name,
VirtFs::FsZip::getFuncs());
std::vector<VirtFs::ZipLocalHeader*> &headers = entry->mHeaders;
@@ -183,7 +183,7 @@ TEST_CASE("Zip readCompressedFile")
{
name = prefix + "data/test/test2.zip";
- VirtFs::VirtZipEntry *const entry = new VirtFs::VirtZipEntry(name,
+ VirtFs::ZipEntry *const entry = new VirtFs::ZipEntry(name,
VirtFs::FsZip::getFuncs());
std::vector<VirtFs::ZipLocalHeader*> &headers = entry->mHeaders;
@@ -217,7 +217,7 @@ TEST_CASE("Zip readFile")
{
name = prefix + "data/test/test.zip";
- VirtFs::VirtZipEntry *const entry = new VirtFs::VirtZipEntry(name,
+ VirtFs::ZipEntry *const entry = new VirtFs::ZipEntry(name,
VirtFs::FsZip::getFuncs());
std::vector<VirtFs::ZipLocalHeader*> &headers = entry->mHeaders;
@@ -241,7 +241,7 @@ TEST_CASE("Zip readFile")
{
name = prefix + "data/test/test2.zip";
- VirtFs::VirtZipEntry *const entry = new VirtFs::VirtZipEntry(name,
+ VirtFs::ZipEntry *const entry = new VirtFs::ZipEntry(name,
VirtFs::FsZip::getFuncs());
std::vector<VirtFs::ZipLocalHeader*> &headers = entry->mHeaders;
@@ -272,7 +272,7 @@ TEST_CASE("Zip readFile")
{
name = prefix + "data/test/test3.zip";
- VirtFs::VirtZipEntry *const entry = new VirtFs::VirtZipEntry(name,
+ VirtFs::ZipEntry *const entry = new VirtFs::ZipEntry(name,
VirtFs::FsZip::getFuncs());
std::vector<VirtFs::ZipLocalHeader*> &headers = entry->mHeaders;
diff --git a/src/fs/virtfs/virtzipentry.cpp b/src/fs/virtfs/zipentry.cpp
index 938059c5d..e23055db9 100644
--- a/src/fs/virtfs/virtzipentry.cpp
+++ b/src/fs/virtfs/zipentry.cpp
@@ -18,7 +18,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "fs/virtfs/virtzipentry.h"
+#include "fs/virtfs/zipentry.h"
#include "fs/virtfs/ziplocalheader.h"
@@ -29,8 +29,8 @@
namespace VirtFs
{
-VirtZipEntry::VirtZipEntry(const std::string &restrict archiveName,
- FsFuncs *restrict const funcs0) :
+ZipEntry::ZipEntry(const std::string &restrict archiveName,
+ FsFuncs *restrict const funcs0) :
FsEntry(FsEntryType::Zip, funcs0),
mHeaders(),
mDirs()
@@ -38,7 +38,7 @@ VirtZipEntry::VirtZipEntry(const std::string &restrict archiveName,
root = archiveName;
}
-VirtZipEntry::~VirtZipEntry()
+ZipEntry::~ZipEntry()
{
delete_all(mHeaders);
}
diff --git a/src/fs/virtfs/virtzipentry.h b/src/fs/virtfs/zipentry.h
index 792434b45..b8e2632b1 100644
--- a/src/fs/virtfs/virtzipentry.h
+++ b/src/fs/virtfs/zipentry.h
@@ -32,14 +32,14 @@ namespace VirtFs
struct ZipLocalHeader;
-struct VirtZipEntry final : public FsEntry
+struct ZipEntry final : public FsEntry
{
- VirtZipEntry(const std::string &restrict archiveName,
- FsFuncs *restrict const funcs);
+ ZipEntry(const std::string &restrict archiveName,
+ FsFuncs *restrict const funcs);
- A_DELETE_COPY(VirtZipEntry)
+ A_DELETE_COPY(ZipEntry)
- ~VirtZipEntry();
+ ~ZipEntry();
std::vector<ZipLocalHeader*> mHeaders;
std::vector<std::string> mDirs;
diff --git a/src/fs/virtfs/ziplocalheader.h b/src/fs/virtfs/ziplocalheader.h
index c81d414bf..88bfc2458 100644
--- a/src/fs/virtfs/ziplocalheader.h
+++ b/src/fs/virtfs/ziplocalheader.h
@@ -28,7 +28,7 @@
namespace VirtFs
{
-struct VirtZipEntry;
+struct ZipEntry;
struct ZipLocalHeader final
{
@@ -37,7 +37,7 @@ struct ZipLocalHeader final
A_DELETE_COPY(ZipLocalHeader)
std::string fileName;
- VirtZipEntry *zipEntry;
+ ZipEntry *zipEntry;
uint32_t dataOffset;
uint32_t compressSize;
uint32_t uncompressSize;
diff --git a/src/fs/virtfs/zipreader.cpp b/src/fs/virtfs/zipreader.cpp
index 0c8bb9247..319528277 100644
--- a/src/fs/virtfs/zipreader.cpp
+++ b/src/fs/virtfs/zipreader.cpp
@@ -22,7 +22,7 @@
#include "fs/paths.h"
-#include "fs/virtfs/virtzipentry.h"
+#include "fs/virtfs/zipentry.h"
#include "fs/virtfs/ziplocalheader.h"
#include "utils/checkutils.h"
@@ -70,7 +70,7 @@ namespace VirtFs
namespace ZipReader
{
- bool readArchiveInfo(VirtZipEntry *const entry)
+ bool readArchiveInfo(ZipEntry *const entry)
{
if (entry == nullptr)
{
diff --git a/src/fs/virtfs/zipreader.h b/src/fs/virtfs/zipreader.h
index d227315f1..cf7a85033 100644
--- a/src/fs/virtfs/zipreader.h
+++ b/src/fs/virtfs/zipreader.h
@@ -28,12 +28,12 @@
namespace VirtFs
{
-struct VirtZipEntry;
+struct ZipEntry;
struct ZipLocalHeader;
namespace ZipReader
{
- bool readArchiveInfo(VirtZipEntry *const entry);
+ bool readArchiveInfo(ZipEntry *const entry);
std::string getZlibError(const int err);
void reportZlibError(const std::string &text,
const int err);