diff --git a/COPYING b/COPYING index 443254047..bf0f7d37f 100644 --- a/COPYING +++ b/COPYING @@ -77,7 +77,7 @@ modification follow. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. - + "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. @@ -510,7 +510,7 @@ actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. - + If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties diff --git a/include/entry.h b/include/entry.h index de649ae0c..f02588576 100644 --- a/include/entry.h +++ b/include/entry.h @@ -64,14 +64,14 @@ class Entry * @return the path of the entry. */ std::string getPath() const; - + /** * Get the title of the entry. * * @return the title of the entry. */ std::string getTitle() const; - + /** * Get the content of the entry. * @@ -81,7 +81,7 @@ class Entry * @return the content of the entry. */ std::string getContent() const; - + /** * Get the blob of the entry. * @@ -91,7 +91,7 @@ class Entry * @return the blob of the entry. */ zim::Blob getBlob(offset_type offset = 0) const; - + /** * Get the blob of the entry. * @@ -102,7 +102,7 @@ class Entry * @return the blob of the entry. */ zim::Blob getBlob(offset_type offset, size_type size) const; - + /** * Get the info for direct access to the content of the entry. * @@ -118,7 +118,7 @@ class Entry * Return <"",0> if is not possible to read directly. */ std::pair getDirectAccessInfo() const; - + /** * Get the size of the entry. * @@ -132,8 +132,8 @@ class Entry * @return the mime_type of the entry. */ std::string getMimetype() const; - - + + /** * Get if the entry is a redirect entry. * diff --git a/scripts/kiwix-compile-resources b/scripts/kiwix-compile-resources index e4993ba68..265db5ff6 100755 --- a/scripts/kiwix-compile-resources +++ b/scripts/kiwix-compile-resources @@ -81,12 +81,12 @@ class Resource: data_identifier="_".join([""]+self.identifier), resource_content=",\n ".join(", ".join("{:#04x}".format(i) for i in r) for r in sliced), resource_len=len(self.data), - namespaces_open=" ".join("namespace {} {{".format(id) for id in self.identifier[:-1]), + namespaces_open=" ".join("namespace {} {{".format(id) for id in self.identifier[:-1]), namespaces_close=" ".join(["}"]*(len(self.identifier)-1)), identifier=self.identifier[-1], env_identifier="RES_"+"_".join(self.identifier)+"_PATH" ) - + def dump_getter(self): return resource_getter_template.format( common_name=self.filename, @@ -95,11 +95,11 @@ class Resource: def dump_decl(self): return resource_decl_template.format( - namespaces_open=" ".join("namespace {} {{".format(id) for id in self.identifier[:-1]), + namespaces_open=" ".join("namespace {} {{".format(id) for id in self.identifier[:-1]), namespaces_close=" ".join(["}"]*(len(self.identifier)-1)), identifier=self.identifier[-1] ) - + master_c_template = """//This file is automaically generated. Do not modify it. @@ -113,7 +113,7 @@ static std::string init_resource(const char* name, const unsigned char* content, char * resPath = getenv(name); if (NULL == resPath) return std::string(reinterpret_cast(content), len); - + std::ifstream ifs(resPath); if (!ifs.good()) return std::string(reinterpret_cast(content), len); @@ -137,7 +137,7 @@ def gen_c_file(resources, basename): include_file=basename, basename=to_identifier(basename) ) - + master_h_template = """//This file is automaically generated. Do not modify it. diff --git a/src/server/response.cpp b/src/server/response.cpp index 55da978be..c55fd63bb 100644 --- a/src/server/response.cpp +++ b/src/server/response.cpp @@ -140,7 +140,7 @@ int Response::send(const RequestContext& request, MHD_Connection* connection) bool shouldCompress = m_compress && request.can_compress(); shouldCompress &= m_mimeType.find("text/") != string::npos || m_mimeType.find("application/javascript") != string::npos - || m_mimeType.find("application/json") != string::npos; + || m_mimeType.find("application/json") != string::npos; shouldCompress &= (m_content.size() > KIWIX_MIN_CONTENT_SIZE_TO_DEFLATE); diff --git a/src/tools/base64.cpp b/src/tools/base64.cpp index 48cdaef3c..1eda18cbd 100644 --- a/src/tools/base64.cpp +++ b/src/tools/base64.cpp @@ -1,4 +1,4 @@ -/* +/* base64.cpp and base64.h Copyright (C) 2004-2008 René Nyffenegger @@ -27,7 +27,7 @@ #include #include -static const std::string base64_chars = +static const std::string base64_chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" "abcdefghijklmnopqrstuvwxyz" "0123456789+/"; diff --git a/static/opensearchdescription.xml b/static/opensearchdescription.xml index 28f74181f..709beaa7f 100644 --- a/static/opensearchdescription.xml +++ b/static/opensearchdescription.xml @@ -2,7 +2,7 @@ Zim catalog search Search zim files in the catalog. - diff --git a/test/kiwixserve.cpp b/test/kiwixserve.cpp index 722a0c8b7..5f68608f6 100644 --- a/test/kiwixserve.cpp +++ b/test/kiwixserve.cpp @@ -8,7 +8,7 @@ TEST(KiwixServeTest, PortTest) kiwixServe.setPort(8484); EXPECT_EQ(kiwixServe.getPort(), 8484); EXPECT_EQ(kiwixServe.setPort(0), -1); - EXPECT_EQ(kiwixServe.setPort(3456789), -1); + EXPECT_EQ(kiwixServe.setPort(3456789), -1); } int main(int argc, char** argv) diff --git a/test/library.cpp b/test/library.cpp index 610470fa9..b6946df23 100644 --- a/test/library.cpp +++ b/test/library.cpp @@ -202,7 +202,7 @@ class LibraryTest : public ::testing::Test { }; TEST_F(LibraryTest, getBookMarksTest) -{ +{ auto bookId1 = lib.getBooksIds()[0]; auto bookId2 = lib.getBooksIds()[1];