Prechádzať zdrojové kódy

Removed trailing spaces

Tatsuhiro Tsujikawa 13 rokov pred
rodič
commit
8b0c701266
100 zmenil súbory, kde vykonal 180 pridanie a 180 odobranie
  1. 2 2
      deps/wslay/tests/wslay_event_test.c
  2. 1 1
      src/AbstractDiskWriter.cc
  3. 1 1
      src/AbstractDiskWriter.h
  4. 3 3
      src/AbstractSingleDiskAdaptor.h
  5. 1 1
      src/ActivePeerConnectionCommand.h
  6. 1 1
      src/AdaptiveFileAllocationIterator.cc
  7. 1 1
      src/AdaptiveFileAllocationIterator.h
  8. 9 9
      src/AdaptiveURISelector.cc
  9. 1 1
      src/AdaptiveURISelector.h
  10. 3 3
      src/BitfieldMan.cc
  11. 2 2
      src/BitfieldMan.h
  12. 3 3
      src/BtLeecherStateChoke.cc
  13. 1 1
      src/BtRegistry.cc
  14. 2 2
      src/BtSeederStateChoke.cc
  15. 1 1
      src/BtSeederStateChoke.h
  16. 4 4
      src/BtSetup.cc
  17. 1 1
      src/BtStopDownloadCommand.h
  18. 1 1
      src/Checksum.cc
  19. 1 1
      src/Checksum.h
  20. 1 1
      src/ChunkChecksum.h
  21. 1 1
      src/ChunkedDecodingStreamFilter.h
  22. 1 1
      src/CookieStorage.cc
  23. 2 2
      src/CookieStorage.h
  24. 1 1
      src/DHTAbstractMessage.h
  25. 5 5
      src/DHTAbstractNodeLookupTask.h
  26. 2 2
      src/DHTAbstractTask.h
  27. 1 1
      src/DHTAnnouncePeerMessage.h
  28. 1 1
      src/DHTAutoSaveCommand.h
  29. 2 2
      src/DHTBucket.cc
  30. 1 1
      src/DHTBucket.h
  31. 1 1
      src/DHTConnectionImpl.h
  32. 2 2
      src/DHTEntryPointNameResolveCommand.cc
  33. 1 1
      src/DHTFindNodeMessage.h
  34. 3 3
      src/DHTFindNodeReplyMessage.h
  35. 1 1
      src/DHTGetPeersMessage.h
  36. 1 1
      src/DHTGetPeersReplyMessage.h
  37. 1 1
      src/DHTMessage.h
  38. 1 1
      src/DHTMessageFactoryImpl.h
  39. 1 1
      src/DHTMessageReceiver.h
  40. 1 1
      src/DHTMessageTracker.h
  41. 2 2
      src/DHTMessageTrackerEntry.h
  42. 2 2
      src/DHTNode.h
  43. 1 1
      src/DHTPeerAnnounceEntry.h
  44. 1 1
      src/DHTPeerAnnounceStorage.cc
  45. 2 2
      src/DHTPeerLookupTask.cc
  46. 2 2
      src/DHTPeerLookupTask.h
  47. 1 1
      src/DHTPingTask.h
  48. 1 1
      src/DHTQueryMessage.h
  49. 1 1
      src/DHTReplaceNodeTask.h
  50. 1 1
      src/DHTResponseMessage.h
  51. 2 2
      src/DHTRoutingTable.h
  52. 2 2
      src/DHTRoutingTableDeserializer.cc
  53. 1 1
      src/DHTRoutingTableSerializer.cc
  54. 1 1
      src/DHTTaskFactory.h
  55. 1 1
      src/DHTTaskFactoryImpl.h
  56. 2 2
      src/DNSCache.h
  57. 3 3
      src/DefaultBtInteractive.cc
  58. 2 2
      src/DefaultBtInteractive.h
  59. 2 2
      src/DefaultBtMessageDispatcher.cc
  60. 2 2
      src/DefaultBtProgressInfoFile.cc
  61. 1 1
      src/DefaultPeerStorage.h
  62. 5 5
      src/DefaultPieceStorage.h
  63. 3 3
      src/DownloadContext.h
  64. 3 3
      src/DownloadEngine.h
  65. 1 1
      src/EpollEventPoll.cc
  66. 12 12
      src/Event.h
  67. 1 1
      src/Exception.h
  68. 1 1
      src/FatalException.cc
  69. 1 1
      src/FeedbackURISelector.cc
  70. 1 1
      src/File.h
  71. 1 1
      src/FileAllocationCommand.cc
  72. 1 1
      src/FtpConnection.cc
  73. 3 3
      src/FtpInitiateConnectionCommand.cc
  74. 4 4
      src/FtpNegotiationCommand.cc
  75. 1 1
      src/GZipDecodingStreamFilter.h
  76. 1 1
      src/GrowSegment.h
  77. 3 3
      src/HttpRequest.cc
  78. 4 4
      src/HttpRequest.h
  79. 1 1
      src/HttpResponse.h
  80. 1 1
      src/HttpResponseCommand.cc
  81. 1 1
      src/HttpServerResponseCommand.h
  82. 1 1
      src/HttpSkipResponseCommand.cc
  83. 1 1
      src/InitiatorMSEHandshakeCommand.cc
  84. 1 1
      src/LibgcryptMessageDigestImpl.h
  85. 1 1
      src/LibsslMessageDigestImpl.h
  86. 2 2
      src/MSEHandshake.cc
  87. 1 1
      src/MSEHandshake.h
  88. 1 1
      src/MetadataInfo.h
  89. 1 1
      src/MetalinkEntry.h
  90. 1 1
      src/MetalinkParserController.cc
  91. 1 1
      src/MetalinkParserState.h
  92. 1 1
      src/MetalinkParserStateMachine.cc
  93. 2 2
      src/MetalinkParserStateMachine.h
  94. 5 5
      src/MultiDiskAdaptor.cc
  95. 1 1
      src/MultiFileAllocationIterator.h
  96. 1 1
      src/Netrc.cc
  97. 1 1
      src/Option.h
  98. 1 1
      src/Peer.cc
  99. 4 4
      src/Peer.h
  100. 1 1
      src/PeerAbstractCommand.cc

+ 2 - 2
deps/wslay/tests/wslay_event_test.c

@@ -190,7 +190,7 @@ void test_wslay_event_send_fragmented_msg_with_ctrl(void)
   memset(&acc, 0, sizeof(acc));
   ud.acc = &acc;
   wslay_event_context_server_init(&ctx, &callbacks, &ud);
-  
+
   memset(&arg, 0, sizeof(arg));
   arg.opcode = WSLAY_TEXT_FRAME;
   arg.source.data = &df;
@@ -231,7 +231,7 @@ void test_wslay_event_send_ctrl_msg_first(void)
   memset(&acc, 0, sizeof(acc));
   ud.acc = &acc;
   wslay_event_context_server_init(&ctx, &callbacks, &ud);
-  
+
   memset(&arg, 0, sizeof(arg));
   arg.opcode = WSLAY_PING;
   arg.msg_length = 0;

+ 1 - 1
src/AbstractDiskWriter.cc

@@ -142,7 +142,7 @@ void AbstractDiskWriter::createFile(int addFlags)
            filename_.c_str(),
            util::safeStrerror(errNum).c_str()),
        error_code::FILE_CREATE_ERROR);
-  }  
+  }
 }
 
 ssize_t AbstractDiskWriter::writeDataInternal(const unsigned char* data,

+ 1 - 1
src/AbstractDiskWriter.h

@@ -80,7 +80,7 @@ public:
   virtual void allocate(int64_t offset, int64_t length);
 
   virtual int64_t size();
-  
+
   virtual void enableReadOnly();
 
   virtual void disableReadOnly();

+ 3 - 3
src/AbstractSingleDiskAdaptor.h

@@ -70,7 +70,7 @@ public:
   virtual int64_t size();
 
   virtual void truncate(int64_t length);
-  
+
   virtual SharedHandle<FileAllocationIterator> fileAllocationIterator();
 
   // Make sure that DiskWriter is set before calling this function.
@@ -78,11 +78,11 @@ public:
 
   // Make sure that DiskWriter is set before calling this function.
   virtual void disableReadOnly();
-    
+
   virtual bool isReadOnlyEnabled() const { return readOnly_; }
 
   virtual void enableMmap();
-  
+
   virtual void cutTrailingGarbage();
 
   virtual const std::string& getFilePath() = 0;

+ 1 - 1
src/ActivePeerConnectionCommand.h

@@ -68,7 +68,7 @@ public:
                               time_t interval);
 
   virtual ~ActivePeerConnectionCommand();
-     
+
   virtual bool execute();
 
   void connectToPeer(const SharedHandle<Peer>& peer);

+ 1 - 1
src/AdaptiveFileAllocationIterator.cc

@@ -86,7 +86,7 @@ void AdaptiveFileAllocationIterator::allocateChunk()
     allocator_->allocateChunk();
   }
 }
-  
+
 bool AdaptiveFileAllocationIterator::finished()
 {
   if(!allocator_) {

+ 1 - 1
src/AdaptiveFileAllocationIterator.h

@@ -58,7 +58,7 @@ public:
   virtual ~AdaptiveFileAllocationIterator();
 
   virtual void allocateChunk();
-  
+
   virtual bool finished();
 
   virtual int64_t getCurrentLength();

+ 9 - 9
src/AdaptiveURISelector.cc

@@ -58,10 +58,10 @@
 
 namespace aria2 {
 
-/* In that URI Selector, select method returns one of the bests 
- * mirrors for first and reserved connections. For supplementary 
- * ones, it returns mirrors which has not been tested yet, and 
- * if each of them already tested, returns mirrors which has to 
+/* In that URI Selector, select method returns one of the bests
+ * mirrors for first and reserved connections. For supplementary
+ * ones, it returns mirrors which has not been tested yet, and
+ * if each of them already tested, returns mirrors which has to
  * be tested again. Otherwise, it doesn't return anymore mirrors.
  */
 
@@ -87,7 +87,7 @@ std::string AdaptiveURISelector::select
     // failed uris that may succeed with more permissive values
     mayRetryWithIncreasedTimeout(fileEntry);
   }
- 
+
   std::string selected = selectOne(uris);
 
   if(selected != A2STR::NIL)
@@ -128,12 +128,12 @@ std::string AdaptiveURISelector::selectOne(const std::deque<std::string>& uris)
     const size_t numPieces =
       requestGroup_->getDownloadContext()->getNumPieces();
 
-    bool reservedContext = numPieces > 0 && 
+    bool reservedContext = numPieces > 0 &&
       static_cast<size_t>(nbConnections_) > std::min
       (numPieces,
        static_cast<size_t>(requestGroup_->getNumConcurrentCommand()));
     bool selectBest = numPieces == 0 || reservedContext;
-    
+
     if(numPieces > 0)
       ++nbConnections_;
 
@@ -148,7 +148,7 @@ std::string AdaptiveURISelector::selectOne(const std::deque<std::string>& uris)
         return notTested;
       }
     }
-    
+
     if(!selectBest && nbConnections_ > 1 && nbServerToEvaluate_ > 0) {
       nbServerToEvaluate_--;
       std::string notTested = getFirstNotTestedUri(uris);
@@ -184,7 +184,7 @@ std::string AdaptiveURISelector::getBestMirror
   int max = getMaxDownloadSpeed(uris);
   int min = max-(int)(max*0.25);
   std::deque<std::string> bests = getUrisBySpeed(uris, min);
-  
+
   if (bests.size() < 2) {
     std::string uri = getMaxDownloadSpeedUri(uris);
     A2_LOG_DEBUG(fmt("AdaptiveURISelector: choosing the best mirror :"

+ 1 - 1
src/AdaptiveURISelector.h

@@ -70,7 +70,7 @@ private:
   int getNbTestedServers(const std::deque<std::string>& uris) const;
   std::string getBestMirror(const std::deque<std::string>& uris) const;
 public:
-  AdaptiveURISelector(const SharedHandle<ServerStatMan>& serverStatMan, 
+  AdaptiveURISelector(const SharedHandle<ServerStatMan>& serverStatMan,
                       RequestGroup* requestGroup);
 
   virtual ~AdaptiveURISelector();

+ 3 - 3
src/BitfieldMan.cc

@@ -266,7 +266,7 @@ bool getSparseMissingUnusedIndex
       maxRange = currentRange;
     }
     nextIndex = currentRange.endIndex;
-      
+
   }
   if(maxRange.getSize()) {
     if(maxRange.startIndex == 0) {
@@ -897,7 +897,7 @@ BitfieldMan::Range::Range(size_t startIndex, size_t endIndex)
   startIndex(startIndex),
   endIndex(endIndex)
 {}
-  
+
 size_t BitfieldMan::Range::getSize() const
 {
   return endIndex-startIndex;
@@ -912,7 +912,7 @@ bool BitfieldMan::Range::operator<(const Range& range) const
 {
   return getSize() < range.getSize();
 }
-    
+
 bool BitfieldMan::Range::operator==(const Range& range) const
 {
   return getSize() == range.getSize();

+ 2 - 2
src/BitfieldMan.h

@@ -80,7 +80,7 @@ public:
     Range(size_t startIndex = 0, size_t endIndex = 0);
     size_t getSize() const;
     size_t getMidIndex() const;
-    bool operator<(const Range& range) const;    
+    bool operator<(const Range& range) const;
     bool operator==(const Range& range) const;
   };
 public:
@@ -248,7 +248,7 @@ public:
 
   // Clears filter and disables filter
   void clearFilter();
-  
+
   void enableFilter();
   void disableFilter();
   bool isFilterEnabled() const

+ 3 - 3
src/BtLeecherStateChoke.cc

@@ -150,7 +150,7 @@ void BtLeecherStateChoke::plannedOptimisticUnchoke
 {
   std::for_each(peerEntries.begin(), peerEntries.end(),
                 std::mem_fun_ref(&PeerEntry::disableOptUnchoking));
-  
+
   std::vector<PeerEntry>::iterator i =
     std::partition(peerEntries.begin(), peerEntries.end(),
                    PeerFilter(true, true));
@@ -168,7 +168,7 @@ void BtLeecherStateChoke::regularUnchoke(std::vector<PeerEntry>& peerEntries)
   std::vector<PeerEntry>::iterator rest =
     std::partition(peerEntries.begin(), peerEntries.end(),
                    std::mem_fun_ref(&PeerEntry::isRegularUnchoker));
-  
+
   std::sort(peerEntries.begin(), rest);
 
   // the number of regular unchokers
@@ -218,7 +218,7 @@ BtLeecherStateChoke::executeChoke
   peerEntries.erase(std::remove_if(peerEntries.begin(), peerEntries.end(),
                                    std::mem_fun_ref(&PeerEntry::isSnubbing)),
                     peerEntries.end());
-              
+
   std::for_each(peerEntries.begin(), peerEntries.end(),
                 std::mem_fun_ref(&PeerEntry::enableChokingRequired));
 

+ 1 - 1
src/BtRegistry.cc

@@ -72,7 +72,7 @@ BtRegistry::getDownloadContext(const std::string& infoHash) const
        infoHash) {
       return (*i).second->downloadContext;
     }
-  }      
+  }
   return getNull<DownloadContext>();
 }
 

+ 2 - 2
src/BtSeederStateChoke.cc

@@ -174,13 +174,13 @@ BtSeederStateChoke::executeChoke
 
   std::transform(peerSet.begin(), peerSet.end(),
                  std::back_inserter(peerEntries), GenPeerEntry());
-              
+
   peerEntries.erase(std::remove_if(peerEntries.begin(), peerEntries.end(),
                                    NotInterestedPeer()),
                     peerEntries.end());
 
   unchoke(peerEntries);
-  
+
   if(++round_ == 3) {
     round_ = 0;
   }

+ 1 - 1
src/BtSeederStateChoke.h

@@ -59,7 +59,7 @@ private:
     Timer lastAmUnchoking_;
     bool recentUnchoking_;
     int uploadSpeed_;
-    
+
     const static time_t TIME_FRAME = 20;
   public:
     PeerEntry(const SharedHandle<Peer>& peer);

+ 4 - 4
src/BtSetup.cc

@@ -114,7 +114,7 @@ void BtSetup::setup(std::vector<Command*>& commands,
     c->setPieceStorage(pieceStorage);
     c->setBtRuntime(btRuntime);
     c->setBtAnnounce(btAnnounce);
-    
+
     commands.push_back(c);
   }
   if(!metadataGetMode) {
@@ -122,7 +122,7 @@ void BtSetup::setup(std::vector<Command*>& commands,
       new PeerChokeCommand(e->newCUID(), e);
     c->setPeerStorage(peerStorage);
     c->setBtRuntime(btRuntime);
-    
+
     commands.push_back(c);
   }
   {
@@ -133,7 +133,7 @@ void BtSetup::setup(std::vector<Command*>& commands,
     c->setPieceStorage(pieceStorage);
     c->setPeerStorage(peerStorage);
     c->setBtAnnounce(btAnnounce);
-            
+
     commands.push_back(c);
   }
 
@@ -261,7 +261,7 @@ void BtSetup::setup(std::vector<Command*>& commands,
     if(btReg->getLpdMessageReceiver()) {
       const unsigned char* infoHash =
         bittorrent::getInfoHash(requestGroup->getDownloadContext());
-      A2_LOG_INFO("Initializing LpdMessageDispatcher.");      
+      A2_LOG_INFO("Initializing LpdMessageDispatcher.");
       SharedHandle<LpdMessageDispatcher> dispatcher
         (new LpdMessageDispatcher
          (std::string(&infoHash[0], &infoHash[INFO_HASH_LENGTH]),

+ 1 - 1
src/BtStopDownloadCommand.h

@@ -49,7 +49,7 @@ class BtRuntime;
 class BtStopDownloadCommand:public TimeBasedCommand {
 private:
   RequestGroup* requestGroup_;
-  
+
   time_t timeout_;
 
   Timer checkPoint_;

+ 1 - 1
src/Checksum.cc

@@ -59,7 +59,7 @@ void Checksum::setDigest(const std::string& digest)
 {
   digest_ = digest;
 }
-  
+
 void Checksum::setHashType(const std::string& hashType)
 {
   hashType_ = hashType;

+ 1 - 1
src/Checksum.h

@@ -58,7 +58,7 @@ public:
   {
     return digest_;
   }
-  
+
   void setHashType(const std::string& type);
   const std::string& getHashType() const
   {

+ 1 - 1
src/ChunkChecksum.h

@@ -65,7 +65,7 @@ public:
   size_t countPieceHash() const;
 
   const std::string& getPieceHash(size_t index) const;
-  
+
   void setPieceHashes(const std::vector<std::string>& pieceHashes);
   const std::vector<std::string>& getPieceHashes() const
   {

+ 1 - 1
src/ChunkedDecodingStreamFilter.h

@@ -57,7 +57,7 @@ public:
   (const SharedHandle<BinaryStream>& out,
    const SharedHandle<Segment>& segment,
    const unsigned char* inbuf, size_t inlen);
-  
+
   virtual bool finished();
 
   virtual void release();

+ 1 - 1
src/CookieStorage.cc

@@ -417,7 +417,7 @@ bool CookieStorage::saveNsFormat(const std::string& filename)
     if(fp.close() == EOF) {
       A2_LOG_ERROR(fmt("Failed to save cookies to %s", filename.c_str()));
       return false;
-    }  
+    }
   }
   if(File(tempfilename).renameTo(filename)) {
     return true;

+ 2 - 2
src/CookieStorage.h

@@ -157,7 +157,7 @@ public:
   // method returns true.  Otherwise, this method returns false.  now
   // is used as creation time and last access time.
   bool load(const std::string& filename, time_t now);
-  
+
   // Saves Cookies in Netspace format which is used in
   // Firefox1.2/Netscape/Mozilla.  If Cookies are successfully saved,
   // this method returns true, otherwise returns false.
@@ -165,7 +165,7 @@ public:
 
   // Returns the number of cookies this object stores.
   size_t size() const;
-  
+
   // Returns true if this object contains a cookie x where x == cookie
   // satisfies.
   bool contains(const Cookie& cookie) const;

+ 1 - 1
src/DHTAbstractMessage.h

@@ -83,7 +83,7 @@ public:
   }
 
   void setMessageDispatcher(DHTMessageDispatcher* dispatcher);
-  
+
   DHTMessageFactory* getMessageFactory() const
   {
     return factory_;

+ 5 - 5
src/DHTAbstractNodeLookupTask.h

@@ -68,9 +68,9 @@ private:
   unsigned char targetID_[DHT_ID_LENGTH];
 
   std::deque<SharedHandle<DHTNodeLookupEntry> > entries_;
-  
+
   size_t inFlightMessage_;
-  
+
   template<typename Container>
   void toEntries
   (Container& entries, const std::vector<SharedHandle<DHTNode> >& nodes) const
@@ -130,12 +130,12 @@ protected:
   virtual void getNodesFromMessage
   (std::vector<SharedHandle<DHTNode> >& nodes,
    const ResponseMessage* message) = 0;
-  
+
   virtual void onReceivedInternal
   (const ResponseMessage* message) {}
-  
+
   virtual bool needsAdditionalOutgoingMessage() { return true; }
-  
+
   virtual void onFinish() {}
 
   virtual SharedHandle<DHTMessage> createMessage

+ 2 - 2
src/DHTAbstractTask.h

@@ -51,7 +51,7 @@ class DHTTaskQueue;
 class DHTAbstractTask:public DHTTask {
 private:
   bool finished_;
-  
+
   SharedHandle<DHTNode> localNode_;
 
   DHTRoutingTable* routingTable_;
@@ -59,7 +59,7 @@ private:
   DHTMessageDispatcher* dispatcher_;
 
   DHTMessageFactory* factory_;
-  
+
   DHTTaskQueue* taskQueue_;
 protected:
   void setFinished(bool f)

+ 1 - 1
src/DHTAnnouncePeerMessage.h

@@ -70,7 +70,7 @@ public:
   virtual void doReceivedAction();
 
   virtual SharedHandle<Dict> getArgument();
-  
+
   virtual const std::string& getMessageType() const;
 
   virtual void validate() const;

+ 1 - 1
src/DHTAutoSaveCommand.h

@@ -49,7 +49,7 @@ private:
   int family_;
 
   SharedHandle<DHTNode> localNode_;
-  
+
   SharedHandle<DHTRoutingTable> routingTable_;
 
   void save();

+ 2 - 2
src/DHTBucket.cc

@@ -202,7 +202,7 @@ SharedHandle<DHTBucket> DHTBucket::split()
       assert(rBucket->addNode(*i));
     } else {
       lNodes.push_back(*i);
-    }      
+    }
   }
   nodes_ = lNodes;
   // TODO create toString() and use it.
@@ -220,7 +220,7 @@ SharedHandle<DHTBucket> DHTBucket::split()
 void DHTBucket::getGoodNodes
 (std::vector<SharedHandle<DHTNode> >& goodNodes) const
 {
-  goodNodes.insert(goodNodes.end(), nodes_.begin(), nodes_.end());  
+  goodNodes.insert(goodNodes.end(), nodes_.begin(), nodes_.end());
   goodNodes.erase(std::remove_if(goodNodes.begin(), goodNodes.end(),
                                  mem_fun_sh(&DHTNode::isBad)), goodNodes.end());
 }

+ 1 - 1
src/DHTBucket.h

@@ -97,7 +97,7 @@ public:
   void cacheNode(const SharedHandle<DHTNode>& node);
 
   bool splitAllowed() const;
-  
+
   size_t getPrefixLength() const
   {
     return prefixLength_;

+ 1 - 1
src/DHTConnectionImpl.h

@@ -61,7 +61,7 @@ public:
    * given, the socket is associated to the address.
    */
   bool bind(uint16_t& port, const std::string& addr, SegList<int>& sgl);
-  
+
   /**
    * Binds port. The port number specified by port is used to bind.
    * If successful, the binded port is assigned to port and returns

+ 2 - 2
src/DHTEntryPointNameResolveCommand.cc

@@ -128,7 +128,7 @@ bool DHTEntryPointNameResolveCommand::execute()
           try {
             std::vector<std::string> addrs;
             res.resolve(addrs, hostname);
-          
+
             std::pair<std::string, uint16_t> p(addrs.front(),
                                                entryPoints_.front().second);
             resolvedEntryPoints_.push_back(p);
@@ -156,7 +156,7 @@ void DHTEntryPointNameResolveCommand::addPingTask
   SharedHandle<DHTNode> entryNode(new DHTNode());
   entryNode->setIPAddress(addr.first);
   entryNode->setPort(addr.second);
-  
+
   taskQueue_->addPeriodicTask1(taskFactory_->createPingTask(entryNode, 10));
 }
 

+ 1 - 1
src/DHTFindNodeMessage.h

@@ -56,7 +56,7 @@ public:
   virtual void doReceivedAction();
 
   virtual SharedHandle<Dict> getArgument();
-  
+
   virtual const std::string& getMessageType() const;
 
   const unsigned char* getTargetNodeID() const

+ 3 - 3
src/DHTFindNodeReplyMessage.h

@@ -58,7 +58,7 @@ public:
   virtual void doReceivedAction();
 
   virtual SharedHandle<Dict> getResponse();
-  
+
   virtual const std::string& getMessageType() const;
 
   virtual void accept(DHTMessageCallback* callback);
@@ -72,9 +72,9 @@ public:
   (const std::vector<SharedHandle<DHTNode> >& closestKNodes);
 
   static const std::string FIND_NODE;
-  
+
   static const std::string NODES;
-  
+
   static const std::string NODES6;
 };
 

+ 1 - 1
src/DHTGetPeersMessage.h

@@ -64,7 +64,7 @@ public:
   virtual void doReceivedAction();
 
   virtual SharedHandle<Dict> getArgument();
-  
+
   virtual const std::string& getMessageType() const;
 
   const unsigned char* getInfoHash() const

+ 1 - 1
src/DHTGetPeersReplyMessage.h

@@ -93,7 +93,7 @@ public:
   {
     values_ = peers;
   }
-  
+
   const std::string& getToken() const
   {
     return token_;

+ 1 - 1
src/DHTMessage.h

@@ -86,7 +86,7 @@ public:
   virtual bool isReply() const = 0;
 
   virtual void validate() const {}
-  
+
   virtual const std::string& getMessageType() const = 0;
 
   virtual std::string toString() const = 0;

+ 1 - 1
src/DHTMessageFactoryImpl.h

@@ -157,7 +157,7 @@ public:
   void setConnection(DHTConnection* connection);
 
   void setMessageDispatcher(DHTMessageDispatcher* dispatcher);
-  
+
   void setPeerAnnounceStorage(DHTPeerAnnounceStorage* storage);
 
   void setTokenTracker(DHTTokenTracker* tokenTracker);

+ 1 - 1
src/DHTMessageReceiver.h

@@ -66,7 +66,7 @@ private:
   void onMessageReceived(const SharedHandle<DHTMessage>& message);
 public:
   DHTMessageReceiver(const SharedHandle<DHTMessageTracker>& tracker);
-  
+
   ~DHTMessageReceiver();
 
   SharedHandle<DHTMessage> receiveMessage();

+ 1 - 1
src/DHTMessageTracker.h

@@ -56,7 +56,7 @@ class DHTMessageTrackerEntry;
 class DHTMessageTracker {
 private:
   std::deque<SharedHandle<DHTMessageTrackerEntry> > entries_;
-  
+
   SharedHandle<DHTRoutingTable> routingTable_;
 
   SharedHandle<DHTMessageFactory> factory_;

+ 2 - 2
src/DHTMessageTrackerEntry.h

@@ -56,7 +56,7 @@ private:
   std::string transactionID_;
 
   std::string messageType_;
-  
+
   SharedHandle<DHTMessageCallback> callback_;
 
   Timer dispatchedTime_;
@@ -89,7 +89,7 @@ public:
   const SharedHandle<DHTMessageCallback>& getCallback() const
   {
     return callback_;
-  }  
+  }
 
   int64_t getElapsedMillis() const;
 };

+ 2 - 2
src/DHTNode.h

@@ -61,14 +61,14 @@ private:
   Timer lastContact_;
 public:
   DHTNode();
-  
+
   /**
    * id must be 20 bytes length
    */
   DHTNode(const unsigned char* id);
 
   ~DHTNode();
-  
+
   void generateID();
 
   const unsigned char* getID() const

+ 1 - 1
src/DHTPeerAnnounceEntry.h

@@ -72,7 +72,7 @@ public:
   }
 
   void removeStalePeerAddrEntry(time_t timeout);
-  
+
   bool empty() const;
 
   const Timer& getLastUpdated() const

+ 1 - 1
src/DHTPeerAnnounceStorage.cc

@@ -92,7 +92,7 @@ DHTPeerAnnounceStorage::addPeerAnnounce(const unsigned char* infoHash,
 bool DHTPeerAnnounceStorage::contains(const unsigned char* infoHash) const
 {
   SharedHandle<DHTPeerAnnounceEntry> entry(new DHTPeerAnnounceEntry(infoHash));
-  return 
+  return
     std::binary_search(entries_.begin(), entries_.end(), entry, InfoHashLess());
 }
 

+ 2 - 2
src/DHTPeerLookupTask.cc

@@ -69,7 +69,7 @@ DHTPeerLookupTask::getNodesFromMessage
     message->getClosestKNodes();
   nodes.insert(nodes.end(), knodes.begin(), knodes.end());
 }
-  
+
 void DHTPeerLookupTask::onReceivedInternal
 (const DHTGetPeersReplyMessage* message)
 {
@@ -80,7 +80,7 @@ void DHTPeerLookupTask::onReceivedInternal
   A2_LOG_INFO(fmt("Received %lu peers.",
                   static_cast<unsigned long>(message->getValues().size())));
 }
-  
+
 SharedHandle<DHTMessage> DHTPeerLookupTask::createMessage
 (const SharedHandle<DHTNode>& remoteNode)
 {

+ 2 - 2
src/DHTPeerLookupTask.h

@@ -60,9 +60,9 @@ public:
   virtual void getNodesFromMessage
   (std::vector<SharedHandle<DHTNode> >& nodes,
    const DHTGetPeersReplyMessage* message);
-  
+
   virtual void onReceivedInternal(const DHTGetPeersReplyMessage* message);
-  
+
   virtual SharedHandle<DHTMessage> createMessage
   (const SharedHandle<DHTNode>& remoteNode);
 

+ 1 - 1
src/DHTPingTask.h

@@ -64,7 +64,7 @@ public:
 
   void onReceived(const DHTPingReplyMessage* message);
 
-  void onTimeout(const SharedHandle<DHTNode>& node);  
+  void onTimeout(const SharedHandle<DHTNode>& node);
 
   void setTimeout(time_t timeout)
   {

+ 1 - 1
src/DHTQueryMessage.h

@@ -56,7 +56,7 @@ public:
   virtual void fillMessage(Dict* msgDict);
 
   virtual SharedHandle<Dict> getArgument() = 0;
-  
+
   virtual bool isReply() const;
 
   virtual std::string toString() const;

+ 1 - 1
src/DHTReplaceNodeTask.h

@@ -64,7 +64,7 @@ public:
 
   void onReceived(const DHTPingReplyMessage* message);
 
-  void onTimeout(const SharedHandle<DHTNode>& node);  
+  void onTimeout(const SharedHandle<DHTNode>& node);
 
   void setTimeout(time_t timeout)
   {

+ 1 - 1
src/DHTResponseMessage.h

@@ -58,7 +58,7 @@ public:
   virtual void fillMessage(Dict* msgDict);
 
   virtual SharedHandle<Dict> getResponse() = 0;
-  
+
   virtual bool isReply() const;
 
   virtual std::string toString() const;

+ 2 - 2
src/DHTRoutingTable.h

@@ -84,13 +84,13 @@ public:
   void moveBucketHead(const SharedHandle<DHTNode>& node);
 
   void moveBucketTail(const SharedHandle<DHTNode>& node);
-  
+
   SharedHandle<DHTBucket> getBucketFor(const unsigned char* nodeID) const;
 
   SharedHandle<DHTBucket> getBucketFor(const SharedHandle<DHTNode>& node) const;
 
   SharedHandle<DHTNode> getNode(const unsigned char* id, const std::string& ipaddr, uint16_t port) const;
-  
+
   void getBuckets(std::vector<SharedHandle<DHTBucket> >& buckets) const;
 
   void setTaskQueue(const SharedHandle<DHTTaskQueue>& taskQueue);

+ 2 - 2
src/DHTRoutingTableDeserializer.cc

@@ -125,7 +125,7 @@ void DHTRoutingTableDeserializer::deserialize(const std::string& filename)
            filename.c_str(),
            "bad header"));
   }
-  
+
   uint32_t temp32;
   uint64_t temp64;
   // time
@@ -138,7 +138,7 @@ void DHTRoutingTableDeserializer::deserialize(const std::string& filename)
     READ_CHECK(fp, &temp64, sizeof(temp64));
     serializedTime_.setTimeInSec(ntoh64(temp64));
   }
-  
+
   // localnode
   // 8bytes reserved
   readBytes(fp, buf, buf.size(), 8);

+ 1 - 1
src/DHTRoutingTableSerializer.cc

@@ -95,7 +95,7 @@ void DHTRoutingTableSerializer::serialize(const std::string& filename)
   // version
   header[6] = 0;
   header[7] = 0x03u;
-  
+
   char zero[18];
   memset(zero, 0, sizeof(zero));
 

+ 1 - 1
src/DHTTaskFactory.h

@@ -63,7 +63,7 @@ public:
   createPeerLookupTask(const SharedHandle<DownloadContext>& ctx,
                        uint16_t tcpPort,
                        const SharedHandle<PeerStorage>& peerStorage) = 0;
-  
+
   virtual SharedHandle<DHTTask>
   createPeerAnnounceTask(const unsigned char* infoHash) = 0;
 

+ 1 - 1
src/DHTTaskFactoryImpl.h

@@ -56,7 +56,7 @@ private:
   DHTMessageDispatcher* dispatcher_;
 
   DHTMessageFactory* factory_;
-  
+
   DHTTaskQueue* taskQueue_;
 
   time_t timeout_;

+ 2 - 2
src/DNSCache.h

@@ -88,7 +88,7 @@ private:
         if((*i).good_) {
           *out++ = (*i).addr_;
         }
-      }      
+      }
     }
 
     void markBad(const std::string& addr);
@@ -109,7 +109,7 @@ public:
   DNSCache& operator=(const DNSCache& c);
 
   const std::string& find(const std::string& hostname, uint16_t port) const;
-  
+
   template<typename OutputIterator>
   void findAll
   (OutputIterator out, const std::string& hostname, uint16_t port) const

+ 3 - 3
src/DefaultBtInteractive.cc

@@ -132,7 +132,7 @@ SharedHandle<BtMessage> DefaultBtInteractive::receiveHandshake(bool quickReply)
   }
 
   peer_->setPeerId(message->getPeerId());
-    
+
   if(message->isFastExtensionSupported()) {
     peer_->setFastExtensionEnabled(true);
     A2_LOG_INFO(fmt(MSG_FAST_EXTENSION_ENABLED, cuid_));
@@ -367,7 +367,7 @@ void DefaultBtInteractive::fillPiece(size_t maxMissingBlock) {
         btRequestFactory_->getTargetPieceIndexes(excludedIndexes);
         pieceStorage_->getMissingPiece
           (pieces, diffMissingBlock, peer_, excludedIndexes, cuid_);
-      } else {        
+      } else {
         pieces.reserve(diffMissingBlock);
         pieceStorage_->getMissingPiece(pieces, diffMissingBlock, peer_, cuid_);
       }
@@ -568,7 +568,7 @@ size_t DefaultBtInteractive::countPendingMessage()
 {
   return dispatcher_->countMessageInQueue();
 }
-  
+
 bool DefaultBtInteractive::isSendingMessageInProgress()
 {
   return dispatcher_->isSendingInProgress();

+ 2 - 2
src/DefaultBtInteractive.h

@@ -68,7 +68,7 @@ private:
   int keepAliveCount;
 public:
   FloodingStat():chokeUnchokeCount(0), keepAliveCount(0) {}
-  
+
   void incChokeUnchokeCount() {
     if(chokeUnchokeCount < INT_MAX) {
       chokeUnchokeCount++;
@@ -184,7 +184,7 @@ public:
   size_t receiveMessages();
 
   virtual size_t countPendingMessage();
-  
+
   virtual bool isSendingMessageInProgress();
 
   virtual size_t countReceivedMessageInIteration() const;

+ 2 - 2
src/DefaultBtMessageDispatcher.cc

@@ -201,7 +201,7 @@ public:
       peer_(peer),
       pieceStorage_(pieceStorage)
   {}
-  
+
   void operator()(const RequestSlot& slot) const
   {
     if(!peer_->isInPeerAllowedIndexSet(slot.getIndex())) {
@@ -225,7 +225,7 @@ private:
 public:
   FindChokedRequestSlot(const SharedHandle<Peer>& peer):
     peer_(peer) {}
-  
+
   bool operator()(const RequestSlot& slot) const
   {
     return !peer_->isInPeerAllowedIndexSet(slot.getIndex());

+ 2 - 2
src/DefaultBtProgressInfoFile.cc

@@ -206,7 +206,7 @@ void DefaultBtProgressInfoFile::save()
 // It is assumed that integers are saved as:
 // 1) host byte order if version == 0000
 // 2) network byte order if version == 0001
-void DefaultBtProgressInfoFile::load() 
+void DefaultBtProgressInfoFile::load()
 {
   A2_LOG_INFO(fmt(MSG_LOADING_SEGMENT_FILE, filename_.c_str()));
   BufferedFile fp(filename_.c_str(), BufferedFile::READ);
@@ -356,7 +356,7 @@ void DefaultBtProgressInfoFile::load()
       piece->setHashType(dctx_->getPieceHashType());
 
 #endif // ENABLE_MESSAGE_DIGEST
-        
+
       inFlightPieces.push_back(piece);
     }
     pieceStorage_->addInFlightPiece(inFlightPieces);

+ 1 - 1
src/DefaultPeerStorage.h

@@ -114,7 +114,7 @@ public:
   virtual void executeChoke();
 
   void deleteUnusedPeer(size_t delSize);
-  
+
   void onErasingPeer(const SharedHandle<Peer>& peer);
 
   void onReturningPeer(const SharedHandle<Peer>& peer);

+ 5 - 5
src/DefaultPieceStorage.h

@@ -122,7 +122,7 @@ public:
   // priority.
   DefaultPieceStorage(const SharedHandle<DownloadContext>& downloadContext,
                       const Option* option);
-                      
+
   virtual ~DefaultPieceStorage();
 
 #ifdef ENABLE_BITTORRENT
@@ -206,7 +206,7 @@ public:
   virtual void initStorage();
 
   virtual void setupFileFilter();
-  
+
   virtual void clearFileFilter();
 
   virtual bool downloadFinished();
@@ -215,7 +215,7 @@ public:
 
   virtual void setBitfield(const unsigned char* bitfield,
                            size_t bitfieldLength);
-  
+
   virtual size_t getBitfieldLength();
 
   virtual const unsigned char* getBitfield();
@@ -234,7 +234,7 @@ public:
   {
     return endGame_;
   }
-  
+
   virtual void enterEndGame()
   {
     endGame_ = true;
@@ -270,7 +270,7 @@ public:
 
   virtual void addPieceStats(const unsigned char* bitfield,
                              size_t bitfieldLength);
-  
+
   virtual void subtractPieceStats(const unsigned char* bitfield,
                                   size_t bitfieldLength);
 

+ 3 - 3
src/DownloadContext.h

@@ -76,7 +76,7 @@ private:
   bool knowsTotalLength_;
 
   RequestGroup* ownerRequestGroup_;
-  
+
   std::vector<SharedHandle<ContextAttribute> > attrs_;
 
   Timer downloadStartTime_;
@@ -99,7 +99,7 @@ public:
   ~DownloadContext();
 
   const std::string& getPieceHash(size_t index) const;
-  
+
   const std::vector<std::string>& getPieceHashes() const
   {
     return pieceHashes_;
@@ -219,7 +219,7 @@ public:
   }
 
   int64_t calculateSessionTime() const;
-  
+
   // Returns FileEntry at given offset. SharedHandle<FileEntry>() is
   // returned if no such FileEntry is found.
   SharedHandle<FileEntry> findFileEntryByOffset(int64_t offset) const;

+ 3 - 3
src/DownloadEngine.h

@@ -115,7 +115,7 @@ private:
 
   // key = IP address:port, value = SocketPoolEntry
   std::multimap<std::string, SocketPoolEntry> socketPool_;
- 
+
   Timer lastSocketPoolScan_;
 
   bool noWait_;
@@ -151,7 +151,7 @@ private:
   void onEndOfRun();
 
   void afterEachIteration();
-  
+
   void poolSocket(const std::string& key, const SocketPoolEntry& entry);
 
   std::multimap<std::string, SocketPoolEntry>::iterator
@@ -162,7 +162,7 @@ private:
   SharedHandle<FileAllocationMan> fileAllocationMan_;
   SharedHandle<CheckIntegrityMan> checkIntegrityMan_;
   Option* option_;
-public:  
+public:
   DownloadEngine(const SharedHandle<EventPoll>& eventPoll);
 
   ~DownloadEngine();

+ 1 - 1
src/EpollEventPoll.cc

@@ -159,7 +159,7 @@ int translateEvents(EventPoll::EventType events)
     newEvents |= EPOLLERR;
   }
   if(EventPoll::EVENT_HUP&events) {
-    newEvents |= EPOLLHUP;    
+    newEvents |= EPOLLHUP;
   }
   return newEvents;
 }

+ 12 - 12
src/Event.h

@@ -78,7 +78,7 @@ public:
   {
     return command_;
   }
-    
+
   void addEvents(int events)
   {
     events_ |= events;
@@ -86,14 +86,14 @@ public:
 
   void removeEvents(int events)
   {
-    events_ &= (~events); 
+    events_ &= (~events);
   }
 
   bool eventsEmpty() const
   {
     return events_ == 0;
   }
-        
+
   bool operator==(const CommandEvent& commandEvent) const
   {
     return command_ == commandEvent.command_;
@@ -134,7 +134,7 @@ public:
     socketEntry->removeCommandEvent(*this);
   }
 };
-  
+
 #ifdef ENABLE_ASYNC_DNS
 
 template<typename SocketEntry, typename EventPoll>
@@ -153,7 +153,7 @@ public:
   {
     return *resolver_ == *event.resolver_;
   }
-    
+
   virtual int getEvents() const
   {
     return events_;
@@ -198,11 +198,11 @@ template<typename CommandEvent, typename ADNSEvent>
 class SocketEntry {
 protected:
   sock_t socket_;
-    
+
   std::deque<CommandEvent> commandEvents_;
-    
+
 #ifdef ENABLE_ASYNC_DNS
-    
+
   std::deque<ADNSEvent> adnsEvents_;
 
 #endif // ENABLE_ASYNC_DNS
@@ -247,7 +247,7 @@ public:
   }
 
 #ifdef ENABLE_ASYNC_DNS
-    
+
   void addADNSEvent(const ADNSEvent& aev)
   {
     typename std::deque<ADNSEvent>::iterator i =
@@ -287,7 +287,7 @@ public:
     return commandEvents_.empty();
 #endif // !ENABLE_ASYNC_DNS)
   }
-    
+
   void processEvents(int events)
   {
     std::for_each(commandEvents_.begin(), commandEvents_.end(),
@@ -313,7 +313,7 @@ private:
   Command* command_;
 
   size_t socketsSize_;
-  
+
   sock_t sockets_[ARES_GETSOCK_MAXNUM];
 
 public:
@@ -358,7 +358,7 @@ public:
     }
     socketsSize_ = i;
   }
-    
+
   void removeSocketEvents(EventPoll* e)
   {
     for(size_t i = 0; i < socketsSize_; ++i) {

+ 1 - 1
src/Exception.h

@@ -47,7 +47,7 @@ namespace aria2 {
 class Exception:public std::exception {
 private:
   const char* file_;
-  
+
   int line_;
   // This is low-level system error code, typically errno in Linux.
   int errNum_;

+ 1 - 1
src/FatalException.cc

@@ -45,7 +45,7 @@ SharedHandle<Exception> FatalException::copy() const
 FatalException::FatalException
 (const char* file, int line, const std::string& msg):
   Exception(file, line, msg) {}
- 
+
 FatalException::FatalException
 (const char* file, int line, const std::string& msg,
  const Exception& cause):

+ 1 - 1
src/FeedbackURISelector.cc

@@ -77,7 +77,7 @@ std::string FeedbackURISelector::select
   if(uri.empty()) {
     A2_LOG_DEBUG("No URI returned from selectFaster()");
     uri = selectRarer(fileEntry->getRemainingUris(), usedHosts);
-  } 
+  }
   if(!uri.empty()) {
     std::deque<std::string>& uris = fileEntry->getRemainingUris();
     uris.erase(std::find(uris.begin(), uris.end(), uri));

+ 1 - 1
src/File.h

@@ -50,7 +50,7 @@ namespace aria2 {
 class File {
 private:
   std::string name_;
-  
+
   /**
    * Returns the return value of stat(...)
    */

+ 1 - 1
src/FileAllocationCommand.cc

@@ -73,7 +73,7 @@ bool FileAllocationCommand::executeInternal()
            static_cast<long int>(timer_.difference(global::wallclock())),
            getRequestGroup()->getTotalLength()));
     getDownloadEngine()->getFileAllocationMan()->dropPickedEntry();
-    
+
     std::vector<Command*>* commands = new std::vector<Command*>();
     auto_delete_container<std::vector<Command*> > commandsDel(commands);
     fileAllocationEntry_->prepareForNextAction(*commands, getDownloadEngine());

+ 1 - 1
src/FtpConnection.cc

@@ -333,7 +333,7 @@ FtpConnection::findEndOfResponse
 
 bool FtpConnection::bulkReceiveResponse(std::pair<int, std::string>& response)
 {
-  char buf[1024];  
+  char buf[1024];
   while(1) {
     size_t size = sizeof(buf);
     socket_->readData(buf, size);

+ 3 - 3
src/FtpInitiateConnectionCommand.cc

@@ -95,7 +95,7 @@ Command* FtpInitiateConnectionCommand::createNextCommand
                       getCuid(), addr.c_str(), port));
       createSocket();
       getSocket()->establishConnection(addr, port);
-      
+
       getRequest()->setConnectedAddrInfo(hostname, addr, port);
       if(proxyMethod == V_GET) {
         // Use GET for FTP via HTTP proxy.
@@ -104,7 +104,7 @@ Command* FtpInitiateConnectionCommand::createNextCommand
           (new SocketRecvBuffer(getSocket()));
         SharedHandle<HttpConnection> hc
           (new HttpConnection(getCuid(), getSocket(), socketRecvBuffer));
-        
+
         HttpRequestCommand* c =
           new HttpRequestCommand(getCuid(), getRequest(), getFileEntry(),
                                  getRequestGroup(), hc, getDownloadEngine(),
@@ -138,7 +138,7 @@ Command* FtpInitiateConnectionCommand::createNextCommand
           (new SocketRecvBuffer(pooledSocket));
         SharedHandle<HttpConnection> hc
           (new HttpConnection(getCuid(), pooledSocket, socketRecvBuffer));
-        
+
         HttpRequestCommand* c =
           new HttpRequestCommand(getCuid(), getRequest(), getFileEntry(),
                                  getRequestGroup(), hc, getDownloadEngine(),

+ 4 - 4
src/FtpNegotiationCommand.cc

@@ -273,7 +273,7 @@ bool FtpNegotiationCommand::recvPwd()
 
 bool FtpNegotiationCommand::sendCwdPrep()
 {
-  // Calling setReadCheckSocket() is needed when the socket is reused, 
+  // Calling setReadCheckSocket() is needed when the socket is reused,
   setReadCheckSocket(getSocket());
   cwdDirs_.push_front(ftp_->getBaseWorkingDir());
   util::split(getRequest()->getDir().begin(), getRequest()->getDir().end(),
@@ -354,7 +354,7 @@ bool FtpNegotiationCommand::recvMdtm()
                     getCuid()));
   }
   sequence_ = SEQ_SEND_SIZE;
-  return true;  
+  return true;
 }
 
 bool FtpNegotiationCommand::sendSize() {
@@ -702,7 +702,7 @@ bool FtpNegotiationCommand::resolveProxy()
   A2_LOG_INFO(fmt(MSG_CONNECTING_TO_SERVER,
                   getCuid(),
                   proxyAddr_.c_str(), proxyReq->getPort()));
-  dataSocket_.reset(new SocketCore());                  
+  dataSocket_.reset(new SocketCore());
   dataSocket_->establishConnection(proxyAddr_, proxyReq->getPort());
   disableReadCheckSocket();
   setWriteCheckSocket(dataSocket_);
@@ -742,7 +742,7 @@ bool FtpNegotiationCommand::sendTunnelRequest()
           return false;
         }
       }
-    }      
+    }
     SharedHandle<HttpRequest> httpRequest(new HttpRequest());
     httpRequest->setUserAgent(getOption()->get(PREF_USER_AGENT));
     SharedHandle<Request> req(new Request());

+ 1 - 1
src/GZipDecodingStreamFilter.h

@@ -72,7 +72,7 @@ public:
   {
     return bytesProcessed_;
   }
-  
+
   static const std::string NAME;
 };
 

+ 1 - 1
src/GrowSegment.h

@@ -62,7 +62,7 @@ public:
   {
     return 0;
   }
-  
+
   virtual int64_t getPositionToWrite() const
   {
     return writtenLength_;

+ 3 - 3
src/HttpRequest.cc

@@ -195,13 +195,13 @@ std::string HttpRequest::createRequest()
   if(!request_->isKeepAliveEnabled() && !request_->isPipeliningEnabled()) {
     builtinHds.push_back(std::make_pair("Connection:", "close"));
   }
-  if(segment_ && segment_->getLength() > 0 && 
+  if(segment_ && segment_->getLength() > 0 &&
      (request_->isPipeliningEnabled() || getStartByte() > 0)) {
     std::string rangeHeader(fmt("bytes=%" PRId64 "-", getStartByte()));
     if(request_->isPipeliningEnabled()) {
       rangeHeader += util::itos(getEndByte());
     } else if(getProtocol() != "ftp" && endOffsetOverride_ > 0) {
-      // FTP via http proxy does not support endbytes 
+      // FTP via http proxy does not support endbytes
       rangeHeader += util::itos(endOffsetOverride_-1);
     }
     builtinHds.push_back(std::make_pair("Range:", rangeHeader));
@@ -386,7 +386,7 @@ const std::string& HttpRequest::getCurrentURI() const
 {
   return request_->getCurrentUri();
 }
-  
+
 const std::string& HttpRequest::getDir() const
 {
   return request_->getDir();

+ 4 - 4
src/HttpRequest.h

@@ -56,7 +56,7 @@ class AuthConfig;
 
 class HttpRequest {
 private:
-  
+
   static const std::string USER_AGENT;
 
   SharedHandle<Request> request_;
@@ -117,7 +117,7 @@ public:
   const std::string& getProtocol() const;
 
   const std::string& getCurrentURI() const;
-  
+
   const std::string& getDir() const;
 
   const std::string& getFile() const;
@@ -165,7 +165,7 @@ public:
   void disableContentEncoding();
 
   void setUserAgent(const std::string& userAgent);
-  
+
   // accepts multiline headers, delimited by LF
   void addHeader(const std::string& headers);
 
@@ -193,7 +193,7 @@ public:
    * object.
    */
   void setProxyRequest(const SharedHandle<Request>& proxyRequest);
-  
+
   /*
    * Returns true if non-Null proxy request is set by setProxyRequest().
    * Otherwise, returns false.

+ 1 - 1
src/HttpResponse.h

@@ -60,7 +60,7 @@ private:
   SharedHandle<HttpHeader> httpHeader_;
 public:
   HttpResponse();
-  
+
   ~HttpResponse();
 
   void validateResponse() const;

+ 1 - 1
src/HttpResponseCommand.cc

@@ -558,7 +558,7 @@ HttpDownloadCommand* HttpResponseCommand::createHttpDownloadCommand
   command->installStreamFilter(filter);
   if(getRequestGroup()->isFileAllocationEnabled() &&
      !decideFileAllocation(filter)) {
-    getRequestGroup()->setFileAllocationEnabled(false);    
+    getRequestGroup()->setFileAllocationEnabled(false);
   }
   getRequestGroup()->getURISelector()->tuneDownloadCommand
     (getFileEntry()->getRemainingUris(), command);

+ 1 - 1
src/HttpServerResponseCommand.h

@@ -52,6 +52,6 @@ public:
   virtual ~HttpServerResponseCommand();
 };
 
-} // namespace aria2 
+} // namespace aria2
 
 #endif // D_HTTP_SERVER_RESPONSE_COMMAND_H

+ 1 - 1
src/HttpSkipResponseCommand.cc

@@ -105,7 +105,7 @@ bool HttpSkipResponseCommand::executeInternal()
     // If request method is HEAD or content-length header is present and
     // it's value is 0, then pool socket for reuse.
     // If content-length header is not present, then EOF is expected in the end.
-    // In this case, the content is thrown away and socket cannot be pooled. 
+    // In this case, the content is thrown away and socket cannot be pooled.
     if(getRequest()->getMethod() == Request::METHOD_HEAD ||
        httpResponse_->getHttpHeader()->defined(HttpHeader::CONTENT_LENGTH)) {
       poolConnection();

+ 1 - 1
src/InitiatorMSEHandshakeCommand.cc

@@ -84,7 +84,7 @@ InitiatorMSEHandshakeCommand::~InitiatorMSEHandshakeCommand()
 {
   requestGroup_->decreaseNumCommand();
   btRuntime_->decreaseConnections();
-  
+
   delete mseHandshake_;
 }
 

+ 1 - 1
src/LibgcryptMessageDigestImpl.h

@@ -63,7 +63,7 @@ public:
 
   static bool supports(const std::string& hashType);
   static size_t getDigestLength(const std::string& hashType);
-  
+
   size_t getDigestLength() const;
   void reset();
   void update(const void* data, size_t length);

+ 1 - 1
src/LibsslMessageDigestImpl.h

@@ -63,7 +63,7 @@ public:
 
   static bool supports(const std::string& hashType);
   static size_t getDigestLength(const std::string& hashType);
-  
+
   size_t getDigestLength() const;
   void reset();
   void update(const void* data, size_t length);

+ 2 - 2
src/MSEHandshake.cc

@@ -190,7 +190,7 @@ void MSEHandshake::initCipher(const unsigned char* infoHash)
   memcpy(s, initiator_?"keyA":"keyB", 4);
   memcpy(s+4, secret_, KEY_LENGTH);
   memcpy(s+4+KEY_LENGTH, infoHash, INFO_HASH_LENGTH);
-  
+
   unsigned char localCipherKey[20];
   sha1_->reset();
   message_digest::digest(localCipherKey, sizeof(localCipherKey),
@@ -252,7 +252,7 @@ void MSEHandshake::createReq23Hash(unsigned char* md, const unsigned char* infoH
   unsigned char yh[20];
   sha1_->reset();
   message_digest::digest(yh, sizeof(yh), sha1_, y, sizeof(y));
-  
+
   for(size_t i = 0; i < 20; ++i) {
     md[i] = xh[i]^yh[i];
   }

+ 1 - 1
src/MSEHandshake.h

@@ -126,7 +126,7 @@ public:
                const Option* op);
 
   ~MSEHandshake();
-  
+
   HANDSHAKE_TYPE identifyHandshakeType();
 
   void initEncryptionFacility(bool initiator);

+ 1 - 1
src/MetadataInfo.h

@@ -68,7 +68,7 @@ public:
   {
     return id_;
   }
-  
+
   static int64_t genId();
 };
 

+ 1 - 1
src/MetalinkEntry.h

@@ -91,7 +91,7 @@ public:
   void reorderResourcesByPriority();
 
   void reorderMetaurlsByPriority();
-  
+
   bool containsLanguage(const std::string& lang) const;
 
   bool containsOS(const std::string& os) const;

+ 1 - 1
src/MetalinkParserController.cc

@@ -368,7 +368,7 @@ void MetalinkParserController::addHashOfChunkChecksumV4(const std::string& md)
   } else {
     cancelChunkChecksumTransactionV4();
   }
-#endif // ENABLE_MESSAGE_DIGEST  
+#endif // ENABLE_MESSAGE_DIGEST
 }
 
 void MetalinkParserController::commitChunkChecksumTransactionV4()

+ 1 - 1
src/MetalinkParserState.h

@@ -56,7 +56,7 @@ public:
    const char* prefix,
    const char* nsUri,
    const std::vector<XmlAttr>& attrs) {}
-  
+
   virtual void endElement
   (MetalinkParserStateMachine* stm,
    const char* localname,

+ 1 - 1
src/MetalinkParserStateMachine.cc

@@ -519,7 +519,7 @@ void MetalinkParserStateMachine::beginElement
 {
   stateStack_.top()->beginElement(this, localname, prefix, nsUri, attrs);
 }
-  
+
 void MetalinkParserStateMachine::endElement
 (const char* localname,
  const char* prefix,

+ 2 - 2
src/MetalinkParserStateMachine.h

@@ -60,7 +60,7 @@ private:
 
   static MetalinkParserState* initialState_;
   static MetalinkParserState* skipTagState_;
-  
+
   // Metalink3
   static MetalinkParserState* metalinkState_;
   static MetalinkParserState* filesState_; // Metalink3Spec
@@ -126,7 +126,7 @@ public:
   void setVersionState();
 
   void setLanguageState();
-  
+
   void setOSState();
 
   void setVerificationState(); // Metalink3Spec

+ 5 - 5
src/MultiDiskAdaptor.cc

@@ -133,7 +133,7 @@ SharedHandle<DiskWriterEntry> createDiskWriterEntry
   SharedHandle<DiskWriterEntry> entry(new DiskWriterEntry(fileEntry));
   entry->needsFileAllocation(needsFileAllocation);
   return entry;
-} 
+}
 } // namespace
 
 void MultiDiskAdaptor::resetDiskWriterEntries()
@@ -243,11 +243,11 @@ void MultiDiskAdaptor::openIfNot
   if(!entry->isOpen()) {
     //     A2_LOG_DEBUG(fmt("DiskWriterEntry: Cache MISS. offset=%s",
     //            util::itos(entry->getFileEntry()->getOffset()).c_str()));
- 
+
     int numOpened = openedDiskWriterEntries_.size();
     (entry.get()->*open)();
     if(numOpened >= maxOpenFiles_) {
-      // Cache is full. 
+      // Cache is full.
       // Choose one DiskWriterEntry randomly and close it.
       size_t index =
         SimpleRandomizer::getInstance()->getRandomNumber(numOpened);
@@ -258,7 +258,7 @@ void MultiDiskAdaptor::openIfNot
       (*i) = entry;
     } else {
       openedDiskWriterEntries_.push_back(entry);
-    } 
+    }
   } else {
     //     A2_LOG_DEBUG(fmt("DiskWriterEntry: Cache HIT. offset=%s",
     //            util::itos(entry->getFileEntry()->getOffset()).c_str()));
@@ -360,7 +360,7 @@ void throwOnDiskWriterNotOpened(const SharedHandle<DiskWriterEntry>& e,
   throw DL_ABORT_EX
     (fmt("DiskWriter for offset=%" PRId64 ", filename=%s is not opened.",
          static_cast<int64_t>(offset),
-         e->getFilePath().c_str()));  
+         e->getFilePath().c_str()));
 }
 } // namespace
 

+ 1 - 1
src/MultiFileAllocationIterator.h

@@ -56,7 +56,7 @@ public:
   virtual ~MultiFileAllocationIterator();
 
   virtual void allocateChunk();
-  
+
   virtual bool finished();
 
   virtual int64_t getCurrentLength();

+ 1 - 1
src/Netrc.cc

@@ -205,7 +205,7 @@ void Netrc::parse(const std::string& path)
           skipMacdef(fp);
         }
         state = GET_TOKEN;
-      } 
+      }
     }
   }
   if(state != GET_TOKEN) {

+ 1 - 1
src/Option.h

@@ -66,7 +66,7 @@ public:
   int64_t getAsLLInt(const Pref* pref) const;
   bool getAsBool(const Pref* pref) const;
   double getAsDouble(const Pref* pref) const;
-  
+
   void remove(const Pref* pref);
 
   void clear();

+ 1 - 1
src/Peer.cc

@@ -152,7 +152,7 @@ void Peer::peerInterested(bool b)
   assert(res_);
   res_->peerInterested(b);
 }
-  
+
 // this peer should be choked
 bool Peer::chokingRequired() const
 {

+ 4 - 4
src/Peer.h

@@ -98,7 +98,7 @@ public:
   {
     return id_ == p.id_;
   }
-  
+
   bool operator!=(const Peer& p)
   {
     return !(*this == p);
@@ -201,7 +201,7 @@ public:
   bool peerInterested() const;
 
   void peerInterested(bool b);
-  
+
   // this peer should be choked
   bool chokingRequired() const;
 
@@ -240,7 +240,7 @@ public:
    * Returns the number of bytes downloaded from the remote host.
    */
   int64_t getSessionDownloadLength() const;
-  
+
   void setBitfield(const unsigned char* bitfield, size_t bitfieldLength);
 
   const unsigned char* getBitfield() const;
@@ -254,7 +254,7 @@ public:
    * operation = 0: set index-th bit to 0
    */
   void updateBitfield(size_t index, int operation);
-  
+
   void setFastExtensionEnabled(bool enabled);
 
   bool isFastExtensionEnabled() const;

+ 1 - 1
src/PeerAbstractCommand.cc

@@ -133,7 +133,7 @@ void PeerAbstractCommand::disableReadCheckSocket()
     e_->deleteSocketForReadCheck(readCheckTarget_, this);
     checkSocketIsReadable_ = false;
     readCheckTarget_.reset();
-  }  
+  }
 }
 
 void PeerAbstractCommand::setReadCheckSocket(const SharedHandle<SocketCore>& socket)

Niektoré súbory nie sú zobrazené, pretože je v týchto rozdielových dátach zmenené mnoho súborov