Skip to content

Commit

Permalink
Remove trailing spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
kelson42 committed Dec 8, 2019
1 parent 316deeb commit b7c5e5f
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 22 deletions.
4 changes: 2 additions & 2 deletions COPYING
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand Down
16 changes: 8 additions & 8 deletions include/entry.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
Expand All @@ -81,7 +81,7 @@ class Entry
* @return the content of the entry.
*/
std::string getContent() const;

/**
* Get the blob of the entry.
*
Expand All @@ -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.
*
Expand All @@ -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.
*
Expand All @@ -118,7 +118,7 @@ class Entry
* Return <"",0> if is not possible to read directly.
*/
std::pair<std::string, offset_type> getDirectAccessInfo() const;

/**
* Get the size of the entry.
*
Expand All @@ -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.
*
Expand Down
12 changes: 6 additions & 6 deletions scripts/kiwix-compile-resources
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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.
Expand All @@ -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<const char*>(content), len);
std::ifstream ifs(resPath);
if (!ifs.good())
return std::string(reinterpret_cast<const char*>(content), len);
Expand All @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion src/server/response.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
4 changes: 2 additions & 2 deletions src/tools/base64.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*
/*
base64.cpp and base64.h
Copyright (C) 2004-2008 René Nyffenegger
Expand Down Expand Up @@ -27,7 +27,7 @@
#include <tools/base64.h>
#include <iostream>

static const std::string base64_chars =
static const std::string base64_chars =
"ABCDEFGHIJKLMNOPQRSTUVWXYZ"
"abcdefghijklmnopqrstuvwxyz"
"0123456789+/";
Expand Down
2 changes: 1 addition & 1 deletion static/opensearchdescription.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
<ShortName>Zim catalog search</ShortName>
<Description>Search zim files in the catalog.</Description>
<Url type="application/atom+xml;profile=opds-catalog"
<Url type="application/atom+xml;profile=opds-catalog"
xmlns:atom="http://www.w3.org/2005/Atom"
indexOffset="0"
template="/{{root}}/catalog/search?q={searchTerms}&lang={language}&count={count}&start={startIndex}"/>
Expand Down
2 changes: 1 addition & 1 deletion test/kiwixserve.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion test/library.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ class LibraryTest : public ::testing::Test {
};

TEST_F(LibraryTest, getBookMarksTest)
{
{
auto bookId1 = lib.getBooksIds()[0];
auto bookId2 = lib.getBooksIds()[1];

Expand Down

0 comments on commit b7c5e5f

Please sign in to comment.