1
0
Fork 0
mirror of https://github.com/geometer/FBReaderJ.git synced 2025-10-04 18:29:23 +02:00
This commit is contained in:
Nikolay Pultsin 2014-02-24 01:00:41 +00:00
parent 41d9dfffee
commit 3849860f70
4 changed files with 3 additions and 6 deletions

View file

@ -189,8 +189,6 @@ void OEBBookReader::endElementHandler(const char *tag) {
} }
bool OEBBookReader::readBook(const ZLFile &file) { bool OEBBookReader::readBook(const ZLFile &file) {
ZLLogger::Instance().registerClass("MARLIN");
const ZLFile epub = file.getContainerArchive(); const ZLFile epub = file.getContainerArchive();
epub.forceArchiveType(ZLFile::ZIP); epub.forceArchiveType(ZLFile::ZIP);
shared_ptr<ZLDir> epubDir = epub.directory(); shared_ptr<ZLDir> epubDir = epub.directory();

View file

@ -204,13 +204,13 @@ void XHTMLTagStyleAction::doAtEnd(XHTMLReader &reader) {
void XHTMLTagLinkAction::doAtStart(XHTMLReader &reader, const char **xmlattributes) { void XHTMLTagLinkAction::doAtStart(XHTMLReader &reader, const char **xmlattributes) {
static const std::string REL = "stylesheet"; static const std::string REL = "stylesheet";
const char *rel = reader.attributeValue(xmlattributes, "rel"); const char *rel = reader.attributeValue(xmlattributes, "rel");
if ((rel == 0) || (REL != rel)) { if (rel == 0 || REL != rel) {
return; return;
} }
static const std::string TYPE = "text/css"; static const std::string TYPE = "text/css";
const char *type = reader.attributeValue(xmlattributes, "type"); const char *type = reader.attributeValue(xmlattributes, "type");
if ((type == 0) || (TYPE != type)) { if (type == 0 || TYPE != type) {
return; return;
} }

View file

@ -99,7 +99,6 @@ shared_ptr<ZLInputStream> ZLFile::envelopeCompressedStream(shared_ptr<ZLInputStr
shared_ptr<ZLInputStream> ZLFile::inputStream(shared_ptr<EncryptionMap> encryptionMap) const { shared_ptr<ZLInputStream> ZLFile::inputStream(shared_ptr<EncryptionMap> encryptionMap) const {
shared_ptr<FileEncryptionInfo> encryptionInfo = shared_ptr<FileEncryptionInfo> encryptionInfo =
encryptionMap.isNull() ? 0 : encryptionMap->info(myPath); encryptionMap.isNull() ? 0 : encryptionMap->info(myPath);
ZLLogger::Instance().println("MARLIN", myPath + " :: " + (encryptionInfo.isNull() ? "not encrypted" : "encrypted"));
if (!encryptionInfo.isNull()) { if (!encryptionInfo.isNull()) {
return 0; return 0;
} }

View file

@ -45,7 +45,7 @@ ZLZDecompressor::~ZLZDecompressor() {
} }
std::size_t ZLZDecompressor::decompress(ZLInputStream &stream, char *buffer, std::size_t maxSize) { std::size_t ZLZDecompressor::decompress(ZLInputStream &stream, char *buffer, std::size_t maxSize) {
while ((myBuffer.length() < maxSize) && (myAvailableSize > 0)) { while (myBuffer.length() < maxSize && myAvailableSize > 0) {
std::size_t size = std::min(myAvailableSize, (std::size_t)IN_BUFFER_SIZE); std::size_t size = std::min(myAvailableSize, (std::size_t)IN_BUFFER_SIZE);
myZStream->next_in = (Bytef*)myInBuffer; myZStream->next_in = (Bytef*)myInBuffer;