summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2016-10-15 19:07:24 +0900
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2016-10-15 19:07:24 +0900
commitdf19921b833d9a46c68fce1da4e54ec677cfa65d (patch)
tree5e527bbdeb4f1703c615827ede961e11c2983440 /src
parent54e465194b65b621b438c695e4593f93937160d6 (diff)
parentaa4ea8889c827df4b178b6ae6259b82e86bfbc5f (diff)
Merge branch 'clang-format-3.9'
Diffstat (limited to 'src')
-rw-r--r--src/AbstractCommand.cc3
-rw-r--r--src/Adler32MessageDigestImpl.h6
-rw-r--r--src/AppleMessageDigestImpl.cc22
-rw-r--r--src/AppleTLSSession.cc6
-rw-r--r--src/AuthConfigFactory.cc4
-rw-r--r--src/AuthConfigFactory.h3
-rw-r--r--src/ConsoleStatCalc.cc4
-rw-r--r--src/DHTGetPeersCommand.cc7
-rw-r--r--src/DHTMessageDispatcher.h16
-rw-r--r--src/DHTMessageDispatcherImpl.h17
-rw-r--r--src/DNSCache.h3
-rw-r--r--src/DefaultBtAnnounce.cc38
-rw-r--r--src/DefaultBtMessageReceiver.cc5
-rw-r--r--src/DownloadEngine.cc4
-rw-r--r--src/EpollEventPoll.h3
-rw-r--r--src/FileAllocationCommand.cc11
-rw-r--r--src/HttpHeader.cc33
-rw-r--r--src/IndexedList.h13
-rw-r--r--src/InitiateConnectionCommandFactory.cc3
-rw-r--r--src/KqueueEventPoll.h3
-rw-r--r--src/LibuvEventPoll.h3
-rw-r--r--src/OptionHandlerFactory.cc12
-rw-r--r--src/PollEventPoll.h3
-rw-r--r--src/PortEventPoll.h3
-rw-r--r--src/RequestGroupMan.cc3
-rw-r--r--src/RpcMethodFactory.cc44
-rw-r--r--src/SelectEventPoll.h3
-rw-r--r--src/ServerStatMan.h3
-rw-r--r--src/SimpleRandomizer.cc3
-rw-r--r--src/SpeedCalc.cc9
-rw-r--r--src/TimerA2.h3
-rw-r--r--src/ValueBase.h3
-rw-r--r--src/a2netcompat.h4
-rw-r--r--src/alloca.c4
-rw-r--r--src/array_fun.h2
-rw-r--r--src/bignum.h2
-rw-r--r--src/cookie_helper.cc3
-rw-r--r--src/crypto_hash.cc16
-rw-r--r--src/uri_split.c13
-rw-r--r--src/util.cc45
-rw-r--r--src/version_usage.cc26
41 files changed, 229 insertions, 182 deletions
diff --git a/src/AbstractCommand.cc b/src/AbstractCommand.cc
index afe11fe9..bf307b75 100644
--- a/src/AbstractCommand.cc
+++ b/src/AbstractCommand.cc
@@ -329,7 +329,8 @@ bool AbstractCommand::execute()
req_->getConnectedPort());
}
if (e_->findCachedIPAddress(req_->getConnectedHostname(),
- req_->getConnectedPort()).empty()) {
+ req_->getConnectedPort())
+ .empty()) {
A2_LOG_DEBUG(fmt("CUID#%" PRId64 " - All IP addresses were marked bad."
" Removing Entry.",
getCuid()));
diff --git a/src/Adler32MessageDigestImpl.h b/src/Adler32MessageDigestImpl.h
index 048edbaf..29b81bc8 100644
--- a/src/Adler32MessageDigestImpl.h
+++ b/src/Adler32MessageDigestImpl.h
@@ -41,11 +41,7 @@ namespace aria2 {
#ifdef HAVE_ZLIB
-#define ADLER32_MESSAGE_DIGEST \
- { \
- "adler32", make_hi<Adler32MessageDigestImpl>() \
- } \
- ,
+#define ADLER32_MESSAGE_DIGEST {"adler32", make_hi<Adler32MessageDigestImpl>()},
class Adler32MessageDigestImpl : public MessageDigestImpl {
public:
diff --git a/src/AppleMessageDigestImpl.cc b/src/AppleMessageDigestImpl.cc
index 34660cc5..d21707ea 100644
--- a/src/AppleMessageDigestImpl.cc
+++ b/src/AppleMessageDigestImpl.cc
@@ -71,21 +71,23 @@ private:
};
typedef MessageDigestBase<CC_MD5_DIGEST_LENGTH, CC_MD5_CTX, CC_MD5_Init,
- CC_MD5_Update, CC_MD5_Final> MessageDigestMD5;
+ CC_MD5_Update, CC_MD5_Final>
+ MessageDigestMD5;
typedef MessageDigestBase<CC_SHA1_DIGEST_LENGTH, CC_SHA1_CTX, CC_SHA1_Init,
- CC_SHA1_Update, CC_SHA1_Final> MessageDigestSHA1;
+ CC_SHA1_Update, CC_SHA1_Final>
+ MessageDigestSHA1;
typedef MessageDigestBase<CC_SHA224_DIGEST_LENGTH, CC_SHA256_CTX,
- CC_SHA224_Init, CC_SHA224_Update,
- CC_SHA224_Final> MessageDigestSHA224;
+ CC_SHA224_Init, CC_SHA224_Update, CC_SHA224_Final>
+ MessageDigestSHA224;
typedef MessageDigestBase<CC_SHA256_DIGEST_LENGTH, CC_SHA256_CTX,
- CC_SHA256_Init, CC_SHA256_Update,
- CC_SHA256_Final> MessageDigestSHA256;
+ CC_SHA256_Init, CC_SHA256_Update, CC_SHA256_Final>
+ MessageDigestSHA256;
typedef MessageDigestBase<CC_SHA384_DIGEST_LENGTH, CC_SHA512_CTX,
- CC_SHA384_Init, CC_SHA384_Update,
- CC_SHA384_Final> MessageDigestSHA384;
+ CC_SHA384_Init, CC_SHA384_Update, CC_SHA384_Final>
+ MessageDigestSHA384;
typedef MessageDigestBase<CC_SHA512_DIGEST_LENGTH, CC_SHA512_CTX,
- CC_SHA512_Init, CC_SHA512_Update,
- CC_SHA512_Final> MessageDigestSHA512;
+ CC_SHA512_Init, CC_SHA512_Update, CC_SHA512_Final>
+ MessageDigestSHA512;
} // namespace
diff --git a/src/AppleTLSSession.cc b/src/AppleTLSSession.cc
index 2361a0be..bdafa1b3 100644
--- a/src/AppleTLSSession.cc
+++ b/src/AppleTLSSession.cc
@@ -107,7 +107,8 @@ static struct {
} kSuites[] = {
// From CipherSuite.h (10.11)
SUITE(SSL_NULL_WITH_NULL_NULL, 0x0000),
- SUITE(SSL_RSA_WITH_NULL_MD5, 0x0001), SUITE(SSL_RSA_WITH_NULL_SHA, 0x0002),
+ SUITE(SSL_RSA_WITH_NULL_MD5, 0x0001),
+ SUITE(SSL_RSA_WITH_NULL_SHA, 0x0002),
SUITE(SSL_RSA_EXPORT_WITH_RC4_40_MD5, 0x0003),
SUITE(SSL_RSA_WITH_RC4_128_MD5, 0x0004),
SUITE(SSL_RSA_WITH_RC4_128_SHA, 0x0005),
@@ -173,7 +174,8 @@ static struct {
SUITE(TLS_ECDH_anon_WITH_AES_128_CBC_SHA, 0xC018),
SUITE(TLS_ECDH_anon_WITH_AES_256_CBC_SHA, 0xC019),
SUITE(TLS_NULL_WITH_NULL_NULL, 0x0000),
- SUITE(TLS_RSA_WITH_NULL_MD5, 0x0001), SUITE(TLS_RSA_WITH_NULL_SHA, 0x0002),
+ SUITE(TLS_RSA_WITH_NULL_MD5, 0x0001),
+ SUITE(TLS_RSA_WITH_NULL_SHA, 0x0002),
SUITE(TLS_RSA_WITH_RC4_128_MD5, 0x0004),
SUITE(TLS_RSA_WITH_RC4_128_SHA, 0x0005),
SUITE(TLS_RSA_WITH_3DES_EDE_CBC_SHA, 0x000A),
diff --git a/src/AuthConfigFactory.cc b/src/AuthConfigFactory.cc
index b6c9b6f4..6c542e74 100644
--- a/src/AuthConfigFactory.cc
+++ b/src/AuthConfigFactory.cc
@@ -84,8 +84,8 @@ AuthConfigFactory::createAuthConfig(const std::shared_ptr<Request>& request,
request->getPassword());
}
else {
- return createHttpAuthResolver(op)
- ->resolveAuthConfig(request->getHost());
+ return createHttpAuthResolver(op)->resolveAuthConfig(
+ request->getHost());
}
}
}
diff --git a/src/AuthConfigFactory.h b/src/AuthConfigFactory.h
index c9ae60ec..1c8fe923 100644
--- a/src/AuthConfigFactory.h
+++ b/src/AuthConfigFactory.h
@@ -76,7 +76,8 @@ public:
class AuthConfigFactory {
public:
typedef std::set<std::unique_ptr<BasicCred>,
- DerefLess<std::unique_ptr<BasicCred>>> BasicCredSet;
+ DerefLess<std::unique_ptr<BasicCred>>>
+ BasicCredSet;
private:
std::unique_ptr<Netrc> netrc_;
diff --git a/src/ConsoleStatCalc.cc b/src/ConsoleStatCalc.cc
index 3186a8e0..14d35d87 100644
--- a/src/ConsoleStatCalc.cc
+++ b/src/ConsoleStatCalc.cc
@@ -259,8 +259,8 @@ void printProgressSummary(const RequestGroupList& groups, size_t cols,
o << " as of " << buf;
}
}
- o << " *** \n" << std::setfill(SEP_CHAR) << std::setw(cols) << SEP_CHAR
- << "\n";
+ o << " *** \n"
+ << std::setfill(SEP_CHAR) << std::setw(cols) << SEP_CHAR << "\n";
global::cout()->write(o.str().c_str());
std::for_each(groups.begin(), groups.end(),
PrintSummary(cols, e, sizeFormatter));
diff --git a/src/DHTGetPeersCommand.cc b/src/DHTGetPeersCommand.cc
index fbb6e8ee..9c6564d0 100644
--- a/src/DHTGetPeersCommand.cc
+++ b/src/DHTGetPeersCommand.cc
@@ -97,9 +97,10 @@ bool DHTGetPeersCommand::execute()
elapsed >= GET_PEER_INTERVAL_LOW)) ||
(btRuntime_->getConnections() == 0 &&
elapsed >= GET_PEER_INTERVAL_ZERO))))) {
- A2_LOG_DEBUG(fmt("Issuing PeerLookup for infoHash=%s",
- bittorrent::getInfoHashString(
- requestGroup_->getDownloadContext()).c_str()));
+ A2_LOG_DEBUG(
+ fmt("Issuing PeerLookup for infoHash=%s",
+ bittorrent::getInfoHashString(requestGroup_->getDownloadContext())
+ .c_str()));
task_ = taskFactory_->createPeerLookupTask(
requestGroup_->getDownloadContext(), e_->getBtRegistry()->getTcpPort(),
peerStorage_);
diff --git a/src/DHTMessageDispatcher.h b/src/DHTMessageDispatcher.h
index 9acd6fb8..72617876 100644
--- a/src/DHTMessageDispatcher.h
+++ b/src/DHTMessageDispatcher.h
@@ -50,16 +50,14 @@ class DHTMessageDispatcher {
public:
virtual ~DHTMessageDispatcher() = default;
- virtual void
- addMessageToQueue(std::unique_ptr<DHTMessage> message,
- std::chrono::seconds timeout,
- std::unique_ptr<DHTMessageCallback>
- callback = std::unique_ptr<DHTMessageCallback>{}) = 0;
+ virtual void addMessageToQueue(std::unique_ptr<DHTMessage> message,
+ std::chrono::seconds timeout,
+ std::unique_ptr<DHTMessageCallback> callback =
+ std::unique_ptr<DHTMessageCallback>{}) = 0;
- virtual void
- addMessageToQueue(std::unique_ptr<DHTMessage> message,
- std::unique_ptr<DHTMessageCallback>
- callback = std::unique_ptr<DHTMessageCallback>{}) = 0;
+ virtual void addMessageToQueue(std::unique_ptr<DHTMessage> message,
+ std::unique_ptr<DHTMessageCallback> callback =
+ std::unique_ptr<DHTMessageCallback>{}) = 0;
virtual void sendMessages() = 0;
diff --git a/src/DHTMessageDispatcherImpl.h b/src/DHTMessageDispatcherImpl.h
index 992899e3..c65076c0 100644
--- a/src/DHTMessageDispatcherImpl.h
+++ b/src/DHTMessageDispatcherImpl.h
@@ -56,15 +56,16 @@ private:
public:
DHTMessageDispatcherImpl(const std::shared_ptr<DHTMessageTracker>& tracker);
- virtual void addMessageToQueue(
- std::unique_ptr<DHTMessage> message, std::chrono::seconds timeout,
- std::unique_ptr<DHTMessageCallback>
- callback = std::unique_ptr<DHTMessageCallback>{}) CXX11_OVERRIDE;
+ virtual void
+ addMessageToQueue(std::unique_ptr<DHTMessage> message,
+ std::chrono::seconds timeout,
+ std::unique_ptr<DHTMessageCallback> callback =
+ std::unique_ptr<DHTMessageCallback>{}) CXX11_OVERRIDE;
- virtual void addMessageToQueue(
- std::unique_ptr<DHTMessage> message,
- std::unique_ptr<DHTMessageCallback>
- callback = std::unique_ptr<DHTMessageCallback>{}) CXX11_OVERRIDE;
+ virtual void
+ addMessageToQueue(std::unique_ptr<DHTMessage> message,
+ std::unique_ptr<DHTMessageCallback> callback =
+ std::unique_ptr<DHTMessageCallback>{}) CXX11_OVERRIDE;
virtual void sendMessages() CXX11_OVERRIDE;
diff --git a/src/DNSCache.h b/src/DNSCache.h
index 18eb393b..501b6fd1 100644
--- a/src/DNSCache.h
+++ b/src/DNSCache.h
@@ -98,7 +98,8 @@ private:
};
typedef std::set<std::shared_ptr<CacheEntry>,
- DerefLess<std::shared_ptr<CacheEntry>>> CacheEntrySet;
+ DerefLess<std::shared_ptr<CacheEntry>>>
+ CacheEntrySet;
CacheEntrySet entries_;
public:
diff --git a/src/DefaultBtAnnounce.cc b/src/DefaultBtAnnounce.cc
index c60bc56a..98d4ac0d 100644
--- a/src/DefaultBtAnnounce.cc
+++ b/src/DefaultBtAnnounce.cc
@@ -161,24 +161,26 @@ std::string DefaultBtAnnounce::getAnnounceUrl()
const size_t keyLen = 8;
std::string uri = announceList_.getAnnounce();
uri += uriHasQuery(uri) ? "&" : "?";
- uri += fmt("info_hash=%s&"
- "peer_id=%s&"
- "uploaded=%" PRId64 "&"
- "downloaded=%" PRId64 "&"
- "left=%" PRId64 "&"
- "compact=1&"
- "key=%s&"
- "numwant=%d&"
- "no_peer_id=1",
- util::percentEncode(bittorrent::getInfoHash(downloadContext_),
- INFO_HASH_LENGTH).c_str(),
- util::percentEncode(bittorrent::getStaticPeerId(), PEER_ID_LENGTH)
- .c_str(),
- stat.getSessionUploadLength(), stat.getSessionDownloadLength(),
- left, util::percentEncode(bittorrent::getStaticPeerId() +
- PEER_ID_LENGTH - keyLen,
- keyLen).c_str(),
- numWant);
+ uri +=
+ fmt("info_hash=%s&"
+ "peer_id=%s&"
+ "uploaded=%" PRId64 "&"
+ "downloaded=%" PRId64 "&"
+ "left=%" PRId64 "&"
+ "compact=1&"
+ "key=%s&"
+ "numwant=%d&"
+ "no_peer_id=1",
+ util::percentEncode(bittorrent::getInfoHash(downloadContext_),
+ INFO_HASH_LENGTH)
+ .c_str(),
+ util::percentEncode(bittorrent::getStaticPeerId(), PEER_ID_LENGTH)
+ .c_str(),
+ stat.getSessionUploadLength(), stat.getSessionDownloadLength(), left,
+ util::percentEncode(
+ bittorrent::getStaticPeerId() + PEER_ID_LENGTH - keyLen, keyLen)
+ .c_str(),
+ numWant);
if (tcpPort_) {
uri += fmt("&port=%u", tcpPort_);
}
diff --git a/src/DefaultBtMessageReceiver.cc b/src/DefaultBtMessageReceiver.cc
index 454f0685..e201bce7 100644
--- a/src/DefaultBtMessageReceiver.cc
+++ b/src/DefaultBtMessageReceiver.cc
@@ -88,8 +88,9 @@ DefaultBtMessageReceiver::receiveHandshake(bool quickReply)
}
else {
throw DL_ABORT_EX(
- fmt("Bad Info Hash %s", util::toHex(peerConnection_->getBuffer() + 28,
- INFO_HASH_LENGTH).c_str()));
+ fmt("Bad Info Hash %s",
+ util::toHex(peerConnection_->getBuffer() + 28, INFO_HASH_LENGTH)
+ .c_str()));
}
if (peerConnection_->getBufferLength() ==
BtHandshakeMessage::MESSAGE_LENGTH &&
diff --git a/src/DownloadEngine.cc b/src/DownloadEngine.cc
index 8ebd34a4..111009bd 100644
--- a/src/DownloadEngine.cc
+++ b/src/DownloadEngine.cc
@@ -431,8 +431,8 @@ std::multimap<std::string, DownloadEngine::SocketPoolEntry>::iterator
DownloadEngine::findSocketPoolEntry(const std::string& key)
{
std::pair<std::multimap<std::string, SocketPoolEntry>::iterator,
- std::multimap<std::string, SocketPoolEntry>::iterator> range =
- socketPool_.equal_range(key);
+ std::multimap<std::string, SocketPoolEntry>::iterator>
+ range = socketPool_.equal_range(key);
for (auto i = range.first, eoi = range.second; i != eoi; ++i) {
const SocketPoolEntry& e = (*i).second;
// We assume that if socket is readable it means peer shutdowns
diff --git a/src/EpollEventPoll.h b/src/EpollEventPoll.h
index da670354..d14afe82 100644
--- a/src/EpollEventPoll.h
+++ b/src/EpollEventPoll.h
@@ -76,7 +76,8 @@ private:
KSocketEntrySet socketEntries_;
#ifdef ENABLE_ASYNC_DNS
typedef std::map<std::pair<AsyncNameResolver*, Command*>,
- KAsyncNameResolverEntry> KAsyncNameResolverEntrySet;
+ KAsyncNameResolverEntry>
+ KAsyncNameResolverEntrySet;
KAsyncNameResolverEntrySet nameResolverEntries_;
#endif // ENABLE_ASYNC_DNS
diff --git a/src/FileAllocationCommand.cc b/src/FileAllocationCommand.cc
index 36ba57d1..1ac63e7b 100644
--- a/src/FileAllocationCommand.cc
+++ b/src/FileAllocationCommand.cc
@@ -72,11 +72,12 @@ bool FileAllocationCommand::executeInternal()
}
fileAllocationEntry_->allocateChunk();
if (fileAllocationEntry_->finished()) {
- A2_LOG_DEBUG(fmt(MSG_ALLOCATION_COMPLETED,
- static_cast<long int>(
- std::chrono::duration_cast<std::chrono::seconds>(
- timer_.difference(global::wallclock())).count()),
- getRequestGroup()->getTotalLength()));
+ A2_LOG_DEBUG(fmt(
+ MSG_ALLOCATION_COMPLETED,
+ static_cast<long int>(std::chrono::duration_cast<std::chrono::seconds>(
+ timer_.difference(global::wallclock()))
+ .count()),
+ getRequestGroup()->getTotalLength()));
std::vector<std::unique_ptr<Command>> commands;
fileAllocationEntry_->prepareForNextAction(commands, getDownloadEngine());
getDownloadEngine()->addCommand(std::move(commands));
diff --git a/src/HttpHeader.cc b/src/HttpHeader.cc
index 2b554bf2..cc75e4d5 100644
--- a/src/HttpHeader.cc
+++ b/src/HttpHeader.cc
@@ -195,8 +195,8 @@ void HttpHeader::setReasonPhrase(const std::string& reasonPhrase)
bool HttpHeader::fieldContains(int hdKey, const char* value)
{
std::pair<std::multimap<int, std::string>::const_iterator,
- std::multimap<int, std::string>::const_iterator> range =
- equalRange(hdKey);
+ std::multimap<int, std::string>::const_iterator>
+ range = equalRange(hdKey);
for (auto i = range.first; i != range.second; ++i) {
std::vector<Scip> values;
util::splitIter((*i).second.begin(), (*i).second.end(),
@@ -221,12 +221,29 @@ bool HttpHeader::isKeepAlive() const
namespace {
const char* INTERESTING_HEADER_NAMES[] = {
- "accept-encoding", "access-control-request-headers",
- "access-control-request-method", "authorization", "connection",
- "content-disposition", "content-encoding", "content-length",
- "content-range", "content-type", "digest", "infohash", "last-modified",
- "link", "location", "origin", "port", "retry-after", "sec-websocket-key",
- "sec-websocket-version", "set-cookie", "transfer-encoding", "upgrade",
+ "accept-encoding",
+ "access-control-request-headers",
+ "access-control-request-method",
+ "authorization",
+ "connection",
+ "content-disposition",
+ "content-encoding",
+ "content-length",
+ "content-range",
+ "content-type",
+ "digest",
+ "infohash",
+ "last-modified",
+ "link",
+ "location",
+ "origin",
+ "port",
+ "retry-after",
+ "sec-websocket-key",
+ "sec-websocket-version",
+ "set-cookie",
+ "transfer-encoding",
+ "upgrade",
};
} // namespace
diff --git a/src/IndexedList.h b/src/IndexedList.h
index 2fb64f96..79653d48 100644
--- a/src/IndexedList.h
+++ b/src/IndexedList.h
@@ -50,10 +50,12 @@ template <typename SeqType, typename ValueType, typename ReferenceType,
typename PointerType, typename SeqIteratorType>
struct IndexedListIterator {
typedef IndexedListIterator<SeqType, ValueType, ValueType&, ValueType*,
- typename SeqType::iterator> iterator;
+ typename SeqType::iterator>
+ iterator;
typedef IndexedListIterator<SeqType, ValueType, const ValueType&,
const ValueType*,
- typename SeqType::const_iterator> const_iterator;
+ typename SeqType::const_iterator>
+ const_iterator;
typedef typename SeqIteratorType::iterator_category iterator_category;
typedef ValueType value_type;
@@ -314,11 +316,12 @@ public:
typedef std::deque<std::pair<KeyType, ValuePtrType>> SeqType;
typedef IndexedListIterator<SeqType, ValuePtrType, ValuePtrType&,
- ValuePtrType*,
- typename SeqType::iterator> iterator;
+ ValuePtrType*, typename SeqType::iterator>
+ iterator;
typedef IndexedListIterator<SeqType, ValuePtrType, const ValuePtrType&,
const ValuePtrType*,
- typename SeqType::const_iterator> const_iterator;
+ typename SeqType::const_iterator>
+ const_iterator;
ValuePtrType& operator[](size_t n) { return seq_[n].second; }
diff --git a/src/InitiateConnectionCommandFactory.cc b/src/InitiateConnectionCommandFactory.cc
index ecaafa5b..2f864501 100644
--- a/src/InitiateConnectionCommandFactory.cc
+++ b/src/InitiateConnectionCommandFactory.cc
@@ -56,8 +56,7 @@ InitiateConnectionCommandFactory::createInitiateConnectionCommand(
if (req->getProtocol() == "http"
#ifdef ENABLE_SSL
// for SSL
- ||
- req->getProtocol() == "https"
+ || req->getProtocol() == "https"
#endif // ENABLE_SSL
) {
diff --git a/src/KqueueEventPoll.h b/src/KqueueEventPoll.h
index 4e22b2d8..d1ef45ab 100644
--- a/src/KqueueEventPoll.h
+++ b/src/KqueueEventPoll.h
@@ -81,7 +81,8 @@ private:
KSocketEntrySet socketEntries_;
#ifdef ENABLE_ASYNC_DNS
typedef std::map<std::pair<AsyncNameResolver*, Command*>,
- KAsyncNameResolverEntry> KAsyncNameResolverEntrySet;
+ KAsyncNameResolverEntry>
+ KAsyncNameResolverEntrySet;
KAsyncNameResolverEntrySet nameResolverEntries_;
#endif // ENABLE_ASYNC_DNS
diff --git a/src/LibuvEventPoll.h b/src/LibuvEventPoll.h
index 5c56a108..23cccec3 100644
--- a/src/LibuvEventPoll.h
+++ b/src/LibuvEventPoll.h
@@ -115,7 +115,8 @@ private:
#ifdef ENABLE_ASYNC_DNS
typedef std::map<std::pair<AsyncNameResolver*, Command*>,
- KAsyncNameResolverEntry> KAsyncNameResolverEntrySet;
+ KAsyncNameResolverEntry>
+ KAsyncNameResolverEntrySet;
#endif // ENABLE_ASYNC_DNS
uv_loop_t* loop_;
diff --git a/src/OptionHandlerFactory.cc b/src/OptionHandlerFactory.cc
index 77fd61e3..99b6ca35 100644
--- a/src/OptionHandlerFactory.cc
+++ b/src/OptionHandlerFactory.cc
@@ -299,21 +299,21 @@ std::vector<OptionHandler*> OptionHandlerFactory::createOptionHandlers()
#endif // defined(HAVE_EPOLL)
{
#ifdef HAVE_EPOLL
- V_EPOLL,
+ V_EPOLL,
#endif // HAVE_EPOLL
#ifdef HAVE_KQUEUE
- V_KQUEUE,
+ V_KQUEUE,
#endif // HAVE_KQUEUE
#ifdef HAVE_PORT_ASSOCIATE
- V_PORT,
+ V_PORT,
#endif // HAVE_PORT_ASSOCIATE
#ifdef HAVE_LIBUV
- V_LIBUV,
+ V_LIBUV,
#endif // HAVE_LIBUV
#ifdef HAVE_POLL
- V_POLL,
+ V_POLL,
#endif // HAVE_POLL
- V_SELECT}));
+ V_SELECT}));
op->addTag(TAG_ADVANCED);
handlers.push_back(op);
}
diff --git a/src/PollEventPoll.h b/src/PollEventPoll.h
index 9094aeca..2ae74fce 100644
--- a/src/PollEventPoll.h
+++ b/src/PollEventPoll.h
@@ -76,7 +76,8 @@ private:
KSocketEntrySet socketEntries_;
#ifdef ENABLE_ASYNC_DNS
typedef std::map<std::pair<AsyncNameResolver*, Command*>,
- KAsyncNameResolverEntry> KAsyncNameResolverEntrySet;
+ KAsyncNameResolverEntry>
+ KAsyncNameResolverEntrySet;
KAsyncNameResolverEntrySet nameResolverEntries_;
#endif // ENABLE_ASYNC_DNS
diff --git a/src/PortEventPoll.h b/src/PortEventPoll.h
index 6978c7b1..dabf6874 100644
--- a/src/PortEventPoll.h
+++ b/src/PortEventPoll.h
@@ -77,7 +77,8 @@ private:
private:
typedef std::set<std::shared_ptr<KSocketEntry>,
- DerefLess<std::shared_ptr<KSocketEntry>>> KSocketEntrySet;
+ DerefLess<std::shared_ptr<KSocketEntry>>>
+ KSocketEntrySet;
KSocketEntrySet socketEntries_;
#ifdef ENABLE_ASYNC_DNS
typedef std::set<std::shared_ptr<KAsyncNameResolverEntry>,
diff --git a/src/RequestGroupMan.cc b/src/RequestGroupMan.cc
index 169a6041..916fb14e 100644
--- a/src/RequestGroupMan.cc
+++ b/src/RequestGroupMan.cc
@@ -777,7 +777,8 @@ void formatDownloadResultCommon(
if (downloadResult->sessionTime.count() > 0) {
o << std::setw(8)
<< util::abbrevSize(downloadResult->sessionDownloadLength * 1000 /
- downloadResult->sessionTime.count()) << "B/s";
+ downloadResult->sessionTime.count())
+ << "B/s";
}
else {
o << std::setw(11);
diff --git a/src/RpcMethodFactory.cc b/src/RpcMethodFactory.cc
index 0e276f8a..bafbffd8 100644
--- a/src/RpcMethodFactory.cc
+++ b/src/RpcMethodFactory.cc
@@ -53,21 +53,43 @@ namespace {
std::vector<std::string> rpcMethodNames = {
"aria2.addUri",
#ifdef ENABLE_BITTORRENT
- "aria2.addTorrent", "aria2.getPeers",
+ "aria2.addTorrent",
+ "aria2.getPeers",
#endif // ENABLE_BITTORRENT
#ifdef ENABLE_METALINK
"aria2.addMetalink",
#endif // ENABLE_METALINK
- "aria2.remove", "aria2.pause", "aria2.forcePause", "aria2.pauseAll",
- "aria2.forcePauseAll", "aria2.unpause", "aria2.unpauseAll",
- "aria2.forceRemove", "aria2.changePosition", "aria2.tellStatus",
- "aria2.getUris", "aria2.getFiles", "aria2.getServers", "aria2.tellActive",
- "aria2.tellWaiting", "aria2.tellStopped", "aria2.getOption",
- "aria2.changeUri", "aria2.changeOption", "aria2.getGlobalOption",
- "aria2.changeGlobalOption", "aria2.purgeDownloadResult",
- "aria2.removeDownloadResult", "aria2.getVersion", "aria2.getSessionInfo",
- "aria2.shutdown", "aria2.forceShutdown", "aria2.getGlobalStat",
- "aria2.saveSession", "system.multicall", "system.listMethods",
+ "aria2.remove",
+ "aria2.pause",
+ "aria2.forcePause",
+ "aria2.pauseAll",
+ "aria2.forcePauseAll",
+ "aria2.unpause",
+ "aria2.unpauseAll",
+ "aria2.forceRemove",
+ "aria2.changePosition",
+ "aria2.tellStatus",
+ "aria2.getUris",
+ "aria2.getFiles",
+ "aria2.getServers",
+ "aria2.tellActive",
+ "aria2.tellWaiting",
+ "aria2.tellStopped",
+ "aria2.getOption",
+ "aria2.changeUri",
+ "aria2.changeOption",
+ "aria2.getGlobalOption",
+ "aria2.changeGlobalOption",
+ "aria2.purgeDownloadResult",
+ "aria2.removeDownloadResult",
+ "aria2.getVersion",
+ "aria2.getSessionInfo",
+ "aria2.shutdown",
+ "aria2.forceShutdown",
+ "aria2.getGlobalStat",
+ "aria2.saveSession",
+ "system.multicall",
+ "system.listMethods",
"system.listNotifications",
};
} // namespace
diff --git a/src/SelectEventPoll.h b/src/SelectEventPoll.h
index 8b871557..311d4134 100644
--- a/src/SelectEventPoll.h
+++ b/src/SelectEventPoll.h
@@ -156,7 +156,8 @@ private:
SocketEntrySet socketEntries_;
#ifdef ENABLE_ASYNC_DNS
typedef std::map<std::pair<AsyncNameResolver*, Command*>,
- AsyncNameResolverEntry> AsyncNameResolverEntrySet;
+ AsyncNameResolverEntry>
+ AsyncNameResolverEntrySet;
AsyncNameResolverEntrySet nameResolverEntries_;
#endif // ENABLE_ASYNC_DNS
diff --git a/src/ServerStatMan.h b/src/ServerStatMan.h
index 8ebb71b6..615723d6 100644
--- a/src/ServerStatMan.h
+++ b/src/ServerStatMan.h
@@ -66,7 +66,8 @@ public:
private:
typedef std::set<std::shared_ptr<ServerStat>,
- DerefLess<std::shared_ptr<ServerStat>>> ServerStatSet;
+ DerefLess<std::shared_ptr<ServerStat>>>
+ ServerStatSet;
ServerStatSet serverStats_;
};
diff --git a/src/SimpleRandomizer.cc b/src/SimpleRandomizer.cc
index c68fbfc8..ca859f5a 100644
--- a/src/SimpleRandomizer.cc
+++ b/src/SimpleRandomizer.cc
@@ -107,8 +107,7 @@ void SimpleRandomizer::getRandomBytes(unsigned char* buf, size_t len)
* check out. If the call failed, we'll not take this branch at all
* and disable support below.
*/
- ||
- errno != ENOSYS
+ || errno != ENOSYS
#endif
) {
if (rv < -1) {
diff --git a/src/SpeedCalc.cc b/src/SpeedCalc.cc
index 2c49c9ef..c45c7197 100644
--- a/src/SpeedCalc.cc
+++ b/src/SpeedCalc.cc
@@ -75,7 +75,8 @@ int SpeedCalc::calculateSpeed()
return 0;
}
auto elapsed = std::chrono::duration_cast<std::chrono::milliseconds>(
- timeSlots_[0].first.difference(now)).count();
+ timeSlots_[0].first.difference(now))
+ .count();
if (elapsed <= 0) {
elapsed = 1;
}
@@ -102,7 +103,8 @@ int SpeedCalc::calculateNewestSpeed(int seconds)
}
auto elapsed = std::chrono::duration_cast<std::chrono::milliseconds>(
- (*--it).first.difference(now)).count();
+ (*--it).first.difference(now))
+ .count();
if (elapsed <= 0) {
elapsed = 1;
}
@@ -128,7 +130,8 @@ void SpeedCalc::update(size_t bytes)
int SpeedCalc::calculateAvgSpeed() const
{
auto milliElapsed = std::chrono::duration_cast<std::chrono::milliseconds>(
- start_.difference(global::wallclock())).count();
+ start_.difference(global::wallclock()))
+ .count();
// if milliElapsed is too small, the average speed is rubbish, better
// return 0
if (milliElapsed > 4) {
diff --git a/src/TimerA2.h b/src/TimerA2.h
index baf5ef22..bf678f38 100644
--- a/src/TimerA2.h
+++ b/src/TimerA2.h
@@ -55,8 +55,7 @@ public:
Timer(Timer&& time) = default;
template <typename duration>
- constexpr explicit Timer(const duration& t)
- : tp_(t)
+ constexpr explicit Timer(const duration& t) : tp_(t)
{
}
diff --git a/src/ValueBase.h b/src/ValueBase.h
index 7bd4b24b..275477f5 100644
--- a/src/ValueBase.h
+++ b/src/ValueBase.h
@@ -87,8 +87,7 @@ public:
String(const unsigned char* data, size_t length);
template <typename InputIterator>
- String(InputIterator first, InputIterator last)
- : str_(first, last)
+ String(InputIterator first, InputIterator last) : str_(first, last)
{
}
diff --git a/src/a2netcompat.h b/src/a2netcompat.h
index 28024b13..4c09da79 100644
--- a/src/a2netcompat.h
+++ b/src/a2netcompat.h
@@ -44,14 +44,14 @@
#endif // __MINGW32__
#ifdef __MINGW32__
-#define a2_sockopt_t char *
+#define a2_sockopt_t char*
#ifndef HAVE_GETADDRINFO
#define HAVE_GETADDRINFO
#endif // !HAVE_GETADDRINFO
#undef HAVE_GAI_STRERROR
#undef gai_strerror
#else
-#define a2_sockopt_t void *
+#define a2_sockopt_t void*
#endif // __MINGW32__
#ifdef HAVE_NETDB_H
diff --git a/src/alloca.c b/src/alloca.c
index d1ed9ee5..aa30eb66 100644
--- a/src/alloca.c
+++ b/src/alloca.c
@@ -61,7 +61,7 @@ you lose-- must know STACK_DIRECTION at compile - time
#if defined(CRAY) && defined(CRAY_STACKSEG_END)
long
i00afunc();
-#define ADDRESS_FUNCTION(arg) (char*) i00afunc(&(arg))
+#define ADDRESS_FUNCTION(arg) (char*)i00afunc(&(arg))
#else
#define ADDRESS_FUNCTION(arg) &(arg)
#endif
@@ -344,7 +344,7 @@ static long i00afunc(long* address)
{
struct stk_stat status;
struct stk_trailer* trailer;
- long* block, size;
+ long *block, size;
long result = 0;
/* We want to iterate through all of the segments. The first
diff --git a/src/array_fun.h b/src/array_fun.h
index 100ceb00..2cce48e8 100644
--- a/src/array_fun.h
+++ b/src/array_fun.h
@@ -42,7 +42,7 @@
namespace aria2 {
-template <typename T, size_t N> constexpr size_t arraySize(T(&)[N])
+template <typename T, size_t N> constexpr size_t arraySize(T (&)[N])
{
return N;
}
diff --git a/src/bignum.h b/src/bignum.h
index da02ccfd..33e631ad 100644
--- a/src/bignum.h
+++ b/src/bignum.h
@@ -196,7 +196,7 @@ public:
}
ulong<dim>& operator*=(const ulong<dim>& rhs)
{
- *this = *this* rhs;
+ *this = *this * rhs;
return *this;
}
diff --git a/src/cookie_helper.cc b/src/cookie_helper.cc
index 74a9e86e..0e546109 100644
--- a/src/cookie_helper.cc
+++ b/src/cookie_helper.cc
@@ -135,8 +135,7 @@ bool parseDate(time_t& time, std::string::const_iterator first,
minute = getInteger(hEnd + 1, mEnd);
second = getInteger(mEnd + 1, sEnd);
continue;
- NOT_TIME:
- ;
+ NOT_TIME:;
}
if (!foundDayOfMonth) {
std::string::const_iterator j = getNextDigit((*i).begin(), (*i).end());
diff --git a/src/crypto_hash.cc b/src/crypto_hash.cc
index 8448269e..f6fb6d99 100644
--- a/src/crypto_hash.cc
+++ b/src/crypto_hash.cc
@@ -1032,18 +1032,10 @@ static const std::set<std::string> names{
// For fast name |lookup|
static const std::unordered_map<std::string, Algorithms> mapped{
- {"md5", algoMD5},
- {"sha", algoSHA1},
- {"sha1", algoSHA1},
- {"sha-1", algoSHA1},
- {"sha224", algoSHA224},
- {"sha-224", algoSHA224},
- {"sha256", algoSHA256},
- {"sha-256", algoSHA256},
- {"sha384", algoSHA384},
- {"sha-384", algoSHA384},
- {"sha512", algoSHA512},
- {"sha-512", algoSHA512},
+ {"md5", algoMD5}, {"sha", algoSHA1}, {"sha1", algoSHA1},
+ {"sha-1", algoSHA1}, {"sha224", algoSHA224}, {"sha-224", algoSHA224},
+ {"sha256", algoSHA256}, {"sha-256", algoSHA256}, {"sha384", algoSHA384},
+ {"sha-384", algoSHA384}, {"sha512", algoSHA512}, {"sha-512", algoSHA512},
};
static const auto mapped_end = mapped.end();
} // namespace
diff --git a/src/uri_split.c b/src/uri_split.c
index d35dc245..6e95acf8 100644
--- a/src/uri_split.c
+++ b/src/uri_split.c
@@ -74,13 +74,12 @@ static int is_digit(char c) { return '0' <= c && c <= '9'; }
int uri_split(uri_split_result* res, const char* uri)
{
int state = URI_BEFORE_SCHEME;
- const char* scheme_first = NULL, * scheme_last = NULL, * host_first = NULL,
- * host_last = NULL, * path_first = NULL, * path_last = NULL,
- * query_first = NULL, * query_last = NULL,
- * fragment_first = NULL, * fragment_last = NULL,
- * user_first = NULL, * user_last = NULL, * passwd_first = NULL,
- * passwd_last = NULL, * last_atmark = NULL, * last_slash = NULL,
- * p = uri;
+ const char *scheme_first = NULL, *scheme_last = NULL, *host_first = NULL,
+ *host_last = NULL, *path_first = NULL, *path_last = NULL,
+ *query_first = NULL, *query_last = NULL, *fragment_first = NULL,
+ *fragment_last = NULL, *user_first = NULL, *user_last = NULL,
+ *passwd_first = NULL, *passwd_last = NULL, *last_atmark = NULL,
+ *last_slash = NULL, *p = uri;
int32_t port = -1;
uint8_t flags = 0;
diff --git a/src/util.cc b/src/util.cc
index 3c9c19b1..8229f98b 100644
--- a/src/util.cc
+++ b/src/util.cc
@@ -547,7 +547,7 @@ bool parseLong(T& res, F f, const std::string& s, int base)
return false;
}
if (*endptr != '\0') {
- for (const char* i = endptr, * eoi = s.c_str() + s.size(); i < eoi; ++i) {
+ for (const char *i = endptr, *eoi = s.c_str() + s.size(); i < eoi; ++i) {
if (!isspace(*i)) {
return false;
}
@@ -750,7 +750,7 @@ void parsePrioritizePieceRange(
std::string iso8859p1ToUtf8(const char* src, size_t len)
{
std::string dest;
- for (const char* p = src, * last = src + len; p != last; ++p) {
+ for (const char *p = src, *last = src + len; p != last; ++p) {
unsigned char c = *p;
if (0xa0u <= c) {
if (c <= 0xbfu) {
@@ -810,31 +810,28 @@ static const uint8_t utf8d[] = {
* The first part of the table maps bytes to character classes that
* to reduce the size of the transition table and create bitmasks.
*/
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 9, 9, 9, 9, 9, 9, 9, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 8, 8, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 10, 3, 3, 3,
- 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 3, 3, 11, 6, 6, 6, 5, 8, 8,
- 8, 8, 8, 8, 8, 8, 8, 8, 8,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
+ 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 10,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 3, 3, 11, 6, 6, 6, 5, 8, 8, 8, 8, 8,
+ 8, 8, 8, 8, 8, 8,
/*
* The second part is a transition table that maps a combination
* of a state of the automaton and a character class to a state.
*/
- 0, 12, 24, 36, 60, 96, 84, 12, 12, 12, 48, 72, 12, 12, 12, 12, 12, 12, 12,
- 12, 12, 12, 12, 12, 12, 0, 12, 12, 12, 12, 12, 0, 12, 0, 12, 12, 12, 24,
- 12, 12, 12, 12, 12, 24, 12, 24, 12, 12, 12, 12, 12, 12, 12, 12, 12, 24, 12,
- 12, 12, 12, 12, 24, 12, 12, 12, 12, 12, 12, 12, 24, 12, 12, 12, 12, 12, 12,
- 12, 12, 12, 36, 12, 36, 12, 12, 12, 36, 12, 12, 12, 12, 12, 36, 12, 36, 12,
- 12, 12, 36, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
+ 0, 12, 24, 36, 60, 96, 84, 12, 12, 12, 48, 72, 12, 12, 12, 12, 12, 12, 12,
+ 12, 12, 12, 12, 12, 12, 0, 12, 12, 12, 12, 12, 0, 12, 0, 12, 12, 12, 24, 12,
+ 12, 12, 12, 12, 24, 12, 24, 12, 12, 12, 12, 12, 12, 12, 12, 12, 24, 12, 12,
+ 12, 12, 12, 24, 12, 12, 12, 12, 12, 12, 12, 24, 12, 12, 12, 12, 12, 12, 12,
+ 12, 12, 36, 12, 36, 12, 12, 12, 36, 12, 12, 12, 12, 12, 36, 12, 36, 12, 12,
+ 12, 36, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
};
static uint32_t utf8dfa(uint32_t* state, uint32_t* codep, uint32_t byte)
@@ -884,8 +881,8 @@ ssize_t parse_content_disposition(char* dest, size_t destlen,
const char** charsetp, size_t* charsetlenp,
const char* in, size_t len)
{
- const char* p = in, * eop = in + len, * mark_first = nullptr,
- * mark_last = nullptr;
+ const char *p = in, *eop = in + len, *mark_first = nullptr,
+ *mark_last = nullptr;
int state = CD_BEFORE_DISPOSITION_TYPE;
int in_file_parm = 0;
int flags = 0;
diff --git a/src/version_usage.cc b/src/version_usage.cc
index e4b779da..e30e41d9 100644
--- a/src/version_usage.cc
+++ b/src/version_usage.cc
@@ -67,14 +67,17 @@ void showVersion()
"This program is distributed in the hope that it will be useful,\n"
"but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
"MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n"
- "GNU General Public License for more details.\n") << "\n"
- << _("** Configuration **") << "\n" << _("Enabled Features") << ": "
- << featureSummary() << "\n" << _("Hash Algorithms") << ": "
- << MessageDigest::getSupportedHashTypeString() << "\n" << _("Libraries")
- << ": " << usedLibs() << "\n" << _("Compiler") << ": "
- << usedCompilerAndPlatform() << "\n" << _("System") << ": "
- << getOperatingSystemInfo() << "\n"
- << "\n" << fmt(_("Report bugs to %s"), PACKAGE_BUGREPORT) << "\n"
+ "GNU General Public License for more details.\n")
+ << "\n"
+ << _("** Configuration **") << "\n"
+ << _("Enabled Features") << ": " << featureSummary() << "\n"
+ << _("Hash Algorithms") << ": "
+ << MessageDigest::getSupportedHashTypeString() << "\n"
+ << _("Libraries") << ": " << usedLibs() << "\n"
+ << _("Compiler") << ": " << usedCompilerAndPlatform() << "\n"
+ << _("System") << ": " << getOperatingSystemInfo() << "\n"
+ << "\n"
+ << fmt(_("Report bugs to %s"), PACKAGE_BUGREPORT) << "\n"
<< _("Visit") << " " << PACKAGE_URL << std::endl;
}
@@ -105,8 +108,9 @@ void showUsage(const std::string& keyword,
out->printf("\n");
out->printf(_("Options:"));
out->printf("\n");
- for (std::vector<const OptionHandler*>::const_iterator i = handlers.begin(),
- eoi = handlers.end();
+ for (std::vector<const OptionHandler *>::const_iterator
+ i = handlers.begin(),
+ eoi = handlers.end();
i != eoi; ++i) {
write(out, *(*i));
out->printf("\n");
@@ -121,7 +125,7 @@ void showUsage(const std::string& keyword,
out->printf("\n");
out->printf(_("Options:"));
out->printf("\n");
- for (std::vector<const OptionHandler*>::const_iterator
+ for (std::vector<const OptionHandler *>::const_iterator
i = handlers.begin(),
eoi = handlers.end();
i != eoi; ++i) {