fixed some client_test formatting

This commit is contained in:
Arvid Norberg 2009-05-22 03:40:06 +00:00
parent 292c7f61a1
commit 77ee976f3c
1 changed files with 4 additions and 4 deletions

View File

@ -1429,7 +1429,7 @@ int main(int argc, char* argv[])
, bind(&cached_piece_info::piece, _1) == i->piece_index); , bind(&cached_piece_info::piece, _1) == i->piece_index);
if (cpi != pieces.end()) cp = &*cpi; if (cpi != pieces.end()) cp = &*cpi;
snprintf(str, sizeof(str), "%4d: [", i->piece_index); snprintf(str, sizeof(str), "%5d: [", i->piece_index);
out += str; out += str;
for (int j = 0; j < i->blocks_in_piece; ++j) for (int j = 0; j < i->blocks_in_piece; ++j)
{ {
@ -1471,7 +1471,7 @@ int main(int argc, char* argv[])
out += str; out += str;
if (cp) if (cp)
{ {
snprintf(str, sizeof(str), " %scache age: %f" snprintf(str, sizeof(str), " %scache age: %-.1f"
, i->piece_state > 0?"| ":"" , i->piece_state > 0?"| ":""
, total_milliseconds(time_now() - cp->last_use) / 1000.f); , total_milliseconds(time_now() - cp->last_use) / 1000.f);
out += str; out += str;
@ -1483,7 +1483,7 @@ int main(int argc, char* argv[])
, end(pieces.end()); i != end; ++i) , end(pieces.end()); i != end; ++i)
{ {
if (i->kind != cached_piece_info::read_cache) continue; if (i->kind != cached_piece_info::read_cache) continue;
snprintf(str, sizeof(str), "%4d: [", i->piece); snprintf(str, sizeof(str), "%5d: [", i->piece);
out += str; out += str;
for (std::vector<bool>::iterator k = i->blocks.begin() for (std::vector<bool>::iterator k = i->blocks.begin()
, end(i->blocks.end()); k != end; ++k) , end(i->blocks.end()); k != end; ++k)
@ -1501,7 +1501,7 @@ int main(int argc, char* argv[])
#ifdef ANSI_TERMINAL_COLORS #ifdef ANSI_TERMINAL_COLORS
out += esc("0"); out += esc("0");
#endif #endif
snprintf(str, sizeof(str), "] cache age: %f\n" snprintf(str, sizeof(str), "] cache age: %-.1f\n"
, total_milliseconds(time_now() - i->last_use) / 1000.f); , total_milliseconds(time_now() - i->last_use) / 1000.f);
out += str; out += str;
} }