mirror of https://github.com/aria2/aria2
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.ccpull/1/head
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>
|
2009-08-18 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
|
||||||
|
|
||||||
Avoided unnecessary memory allocation in
|
Avoided unnecessary memory allocation in
|
||||||
|
|
|
@ -255,7 +255,8 @@ public:
|
||||||
int32_t count = 1;
|
int32_t count = 1;
|
||||||
for(; first != last; ++first, ++count) {
|
for(; first != last; ++first, ++count) {
|
||||||
os << std::setw(3) << count << "|" << (*first)->getPath() << "\n";
|
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";
|
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 << "Info Hash: " << Util::toHex(torrentAttrs[INFO_HASH].s()) << "\n";
|
||||||
o << "Piece Length: " << Util::abbrevSize(dctx->getPieceLength()) << "B\n";
|
o << "Piece Length: " << Util::abbrevSize(dctx->getPieceLength()) << "B\n";
|
||||||
o << "The Number of Pieces: " << dctx->getNumPieces() << "\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()) {
|
if(!torrentAttrs[URL_LIST].empty()) {
|
||||||
const BDE& urlList = torrentAttrs[URL_LIST];
|
const BDE& urlList = torrentAttrs[URL_LIST];
|
||||||
o << "URL List: " << "\n";
|
o << "URL List: " << "\n";
|
||||||
|
|
|
@ -397,10 +397,10 @@ void UtilTest::testToStream()
|
||||||
"idx|path/length\n"
|
"idx|path/length\n"
|
||||||
"===+===========================================================================\n"
|
"===+===========================================================================\n"
|
||||||
" 1|aria2.tar.bz2\n"
|
" 1|aria2.tar.bz2\n"
|
||||||
" |12.0KiB\n"
|
" |12.0KiB (12,300)\n"
|
||||||
"---+---------------------------------------------------------------------------\n"
|
"---+---------------------------------------------------------------------------\n"
|
||||||
" 2|aria2.txt\n"
|
" 2|aria2.txt\n"
|
||||||
" |556B\n"
|
" |556B (556)\n"
|
||||||
"---+---------------------------------------------------------------------------\n"),
|
"---+---------------------------------------------------------------------------\n"),
|
||||||
os.str());
|
os.str());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue