mirror of
https://github.com/aria2/aria2.git
synced 2025-01-04 09:03:46 +00:00
2009-08-18 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Show exact file size along in -S option output. * src/Util.h * src/bittorrent_helper.cc * test/UtilTest.cc
This commit is contained in:
parent
c1f4af537a
commit
376e39a1f4
@ -1,3 +1,10 @@
|
||||
2009-08-18 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
|
||||
|
||||
Show exact file size along in -S option output.
|
||||
* src/Util.h
|
||||
* src/bittorrent_helper.cc
|
||||
* test/UtilTest.cc
|
||||
|
||||
2009-08-18 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
|
||||
|
||||
Avoided unnecessary memory allocation in
|
||||
|
@ -255,7 +255,8 @@ public:
|
||||
int32_t count = 1;
|
||||
for(; first != last; ++first, ++count) {
|
||||
os << std::setw(3) << count << "|" << (*first)->getPath() << "\n";
|
||||
os << " |" << Util::abbrevSize((*first)->getLength()) << "B" << "\n";
|
||||
os << " |" << Util::abbrevSize((*first)->getLength()) << "B ("
|
||||
<< Util::uitos((*first)->getLength(), true) << ")\n";
|
||||
os << "---+---------------------------------------------------------------------------" << "\n";
|
||||
}
|
||||
}
|
||||
|
@ -515,7 +515,8 @@ void print(std::ostream& o, const SharedHandle<DownloadContext>& dctx)
|
||||
o << "Info Hash: " << Util::toHex(torrentAttrs[INFO_HASH].s()) << "\n";
|
||||
o << "Piece Length: " << Util::abbrevSize(dctx->getPieceLength()) << "B\n";
|
||||
o << "The Number of Pieces: " << dctx->getNumPieces() << "\n";
|
||||
o << "Total Length: " << Util::abbrevSize(dctx->getTotalLength()) << "B\n";
|
||||
o << "Total Length: " << Util::abbrevSize(dctx->getTotalLength()) << "B ("
|
||||
<< Util::uitos(dctx->getTotalLength(), true) << ")\n";
|
||||
if(!torrentAttrs[URL_LIST].empty()) {
|
||||
const BDE& urlList = torrentAttrs[URL_LIST];
|
||||
o << "URL List: " << "\n";
|
||||
|
@ -397,10 +397,10 @@ void UtilTest::testToStream()
|
||||
"idx|path/length\n"
|
||||
"===+===========================================================================\n"
|
||||
" 1|aria2.tar.bz2\n"
|
||||
" |12.0KiB\n"
|
||||
" |12.0KiB (12,300)\n"
|
||||
"---+---------------------------------------------------------------------------\n"
|
||||
" 2|aria2.txt\n"
|
||||
" |556B\n"
|
||||
" |556B (556)\n"
|
||||
"---+---------------------------------------------------------------------------\n"),
|
||||
os.str());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user