summaryrefslogtreecommitdiff
path: root/format.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2008-07-29 21:38:20 -0400
committerJohn Wiegley <johnw@newartisans.com>2008-07-29 21:44:21 -0400
commit1bb29cdbb7fa63d2fd5312e3fc81bcc489aaab5d (patch)
treed5c7e3897763a8a9d4b05c438d1c1bcb8020ee04 /format.cc
parent42e1d725aa9deb41396ba4c73c8499c7c3798508 (diff)
downloadledger-1bb29cdbb7fa63d2fd5312e3fc81bcc489aaab5d.tar.gz
ledger-1bb29cdbb7fa63d2fd5312e3fc81bcc489aaab5d.tar.bz2
ledger-1bb29cdbb7fa63d2fd5312e3fc81bcc489aaab5d.zip
The register report has begun printing real data, although not all the pieces
are in place yet and the formatting is still off.
Diffstat (limited to 'format.cc')
-rw-r--r--format.cc6
1 files changed, 4 insertions, 2 deletions
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;
}
}