From 1bb29cdbb7fa63d2fd5312e3fc81bcc489aaab5d Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Tue, 29 Jul 2008 21:38:20 -0400 Subject: The register report has begun printing real data, although not all the pieces are in place yet and the formatting is still off. --- format.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'format.cc') diff --git a/format.cc b/format.cc index b1e5a8e2..1c919421 100644 --- a/format.cc +++ b/format.cc @@ -13,7 +13,7 @@ bool format_t::ansi_codes = false; bool format_t::ansi_invert = false; string format_t::truncate(const string& str, unsigned int width, - const bool is_account) + const bool is_account) { const unsigned int len = str.length(); if (len <= width) @@ -735,10 +735,12 @@ void format_t::format(std::ostream& out_str, scope_t& scope) const } break; +#endif case element_t::SPACER: out << " "; break; +#if 0 case element_t::DEPTH_SPACER: for (const account_t * acct = details.account; acct; @@ -761,7 +763,7 @@ void format_t::format(std::ostream& out_str, scope_t& scope) const string temp = out.str(); if (! ignore_max_width && elem->max_width > 0 && elem->max_width < temp.length()) - temp.erase(elem->max_width); + truncate(temp, elem->max_width); out_str << temp; } } -- cgit v1.2.3