remove spaces etc. at end of line (no functional change)

This commit is contained in:
Albert S. 2019-10-02 22:06:19 +02:00
parent ad6fb8d731
commit 1549603c9b
11 changed files with 27 additions and 27 deletions

View File

@ -11,22 +11,22 @@ SOURCES=$(wildcard *.cpp)
SOURCES+=$(wildcard gateway/*.cpp)
SOURCES+=$(wildcard handlers/*.cpp)
SOURCES+=$(wildcard database/*.cpp)
SOURCES+=$(wildcard cache/*.cpp)
SOURCES+=$(wildcard sandbox/*.cpp)
SOURCES+=$(wildcard cache/*.cpp)
SOURCES+=$(wildcard sandbox/*.cpp)
HEADERS=$(wildcard *.h)
HEADERS+=$(wildcard gateway/*.h)
HEADERS+=$(wildcard handlers/*.h)
HEADERS+=$(wildcard database/*.h)
HEADERS+=$(wildcard cache/*.h)
HEADERS+=$(wildcard sandbox/*.h)
HEADERS+=$(wildcard cache/*.h)
HEADERS+=$(wildcard sandbox/*.h)
OBJECTS=$(patsubst %.cpp, %.o, $(SOURCES))
WIKIOBJECTS=$(filter-out test.o, $(OBJECTS))
TESTOBJECTS=$(filter-out qswiki.o, $(OBJECTS))
DEPENDS = ${WIKIOBJECTS:.o=.d}
-include ${DEPENDS}
DEPENDS = ${WIKIOBJECTS:.o=.d}
-include ${DEPENDS}
# Points to the root of Google Test, relative to where this file is.
# Remember to tweak this if you move this file.
@ -43,18 +43,18 @@ GTEST_OBJECTS=$(filter-out qswiki.o, $(WIKIOBJECTS))
release: CXXFLAGS=$(RELEASE_CXXFLAGS)
release: qswiki
qswiki: $(WIKIOBJECTS)
$(CXX) $(WIKIOBJECTS) ${LDFLAGS} -I database/hdr -o qswiki
$(CXX) $(WIKIOBJECTS) ${LDFLAGS} -I database/hdr -o qswiki
test: $(TESTOBJECTS)
$(CXX) $(TESTOBJECTS) ${LDFLAGS} -o test
gtest: $(GTESTS_TESTDIR)/*.cpp $(GTEST_OBJECTS)
$(CXX) -o gtest $(GTESTS_TESTDIR)/*.cpp $(GTEST_OBJECTS) $(GTEST_CXXFLAGS) $(GTEST_DIR)/src/gtest_main.cc $(GTEST_DIR)/src/gtest-all.cc $(GTEST_LDFLAGS)
%.o:%.cpp
$(CXX) ${CXXFLAGS} ${LDFLAGS} -I database/hdr -c -o $@ $<
clean:
rm -f $(OBJECTS) $(DEPENDS)

View File

@ -69,7 +69,7 @@ std::string HandlerPageView::createIndexContent(IParser &parser, std::string con
Response HandlerPageView::handleRequest(PageDao &pageDao, std::string pagename, const Request &r)
{
{
std::string revisionparam = r.get("revision");
unsigned int revisionid=0;

View File

@ -175,7 +175,7 @@ bool SandboxLinux::enableForInit()
{
umask(0027);
//TODO. there is execv for SPARC. Sigh...
//TODO. there is execv for SPARC. Sigh...
if(!seccomp_blacklist({ SCMP_SYS(execveat), SCMP_SYS(execve) }))
{
Logger::error() << "Failed to install blacklisting seccomp filter";

View File

@ -20,7 +20,7 @@ public:
/* Activated after we have acquired resources (bound to ports etc.)
*
*
* This should allow us to further restrcit the process */
virtual bool enableForWorker() = 0;
};

View File

@ -1,7 +1,7 @@
{qswiki:include:general_header}
<main id="content">
<h2>Login</h2>
Register a new user
Register a new user
<form action="{qswiki:var:adminregisterurl}" method="POST">
Username: <input type="text" name="user"></input><br>
Password: <input type="password" name="password"></input><br>

View File

@ -14,7 +14,7 @@
<li><a href="{qswiki:config:linkallpages}">All pages</a></li>
<li><a href="{qswiki:config:linkallcats}">All categories</a></li>
</ul>
<ul id="right" class="search">
<li><div><form action="{qswiki:config:wikipath}" method="GET"><input type="hidden" name="action" value="search"/><input type="text" name="q"value="search here" onfocus="this.value=''"></form></div></li>
</ul>

View File

@ -1,5 +1,5 @@
function refreshSession()
{
function refreshSession()
{
fetch(new Request("{qswiki:config:refreshsessionurl}"));
}
}
setInterval(refreshSession, 60*2*1000);

View File

@ -14,11 +14,11 @@
<li><a href="{qswiki:config:linkallpages}">All pages</a></li>
<li><a href="{qswiki:config:linkallcats}">All categories</a></li>
</ul>
<ul>
{qswiki:var:headerlinks}
</ul>
<ul id="right" class="search">
<li><div><form action="{qswiki:config:wikipath}" method="GET"><input type="hidden" name="action" value="search"/><input type="text" value="search here" onfocus="this.value=''" name="q"/></form></div></li>
</ul>

View File

@ -29,7 +29,7 @@ h1, h2, h3
nav
{
padding: 0px;
margin: 0px;
margin: 0px;
display: flex;
background-color: #062463;
justify-content: space-between;
@ -92,7 +92,7 @@ a:hover
{
background-color: #062463;
color: white;
}
#content
@ -137,7 +137,7 @@ list-style-type: none;
{
background-color: #062463;
color: white;
}
footer

View File

@ -32,7 +32,7 @@ TEST(Utils, hasKey) {
ASSERT_TRUE(utils::hasKey(testmap, std::string { "test2"}));
ASSERT_FALSE(utils::hasKey(testmap, std::string { "testthere" }));
ASSERT_FALSE(utils::hasKey(testmap, std::string { }));
}
TEST(Utils, urldecode)

View File

@ -30,7 +30,7 @@ SOFTWARE.
//TODO: instead of returning vector maybe provide an iterator version too.
//TODO: % may not be necessary (was in C version just to be sure against format string attacks
//TODO: % may not be necessary (was in C version just to be sure against format string attacks
//TODO: hopefully not too slow looking up every character here:
const std::map<char, std::string> replacements = { {'<', "&lt;"}, {'>', "gt;"}, { '\"', "&quot;" }, { '%', "&#37;" }};
std::string utils::html_xss(std::string_view str)
@ -62,9 +62,9 @@ std::string utils::urldecode(std::string_view str)
char c = str[i];
if(c == '%' && (size-i>1))
{
char h[3];
h[0] = str[i+1];
h[1] = str[i+2];
char h[3];
h[0] = str[i+1];
h[1] = str[i+2];
h[2] = 0;
if(std::isxdigit(h[0]) && std::isxdigit(h[1]))
{