summaryrefslogtreecommitdiff
path: root/format.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2005-11-09 07:11:22 +0000
committerJohn Wiegley <johnw@newartisans.com>2008-04-13 02:41:21 -0400
commite1d0dbf220a5301f6125a1548a380492ad488515 (patch)
treedf7a5de60353d3558b00d21ee83cf01e8da56331 /format.cc
parent6f4957c8c31395bca44d078972690eb2b3258a8f (diff)
downloadfork-ledger-e1d0dbf220a5301f6125a1548a380492ad488515.tar.gz
fork-ledger-e1d0dbf220a5301f6125a1548a380492ad488515.tar.bz2
fork-ledger-e1d0dbf220a5301f6125a1548a380492ad488515.zip
Restructed the code that it can build and be used as a shared library.
The command-line version is still statically bound in the build process by default (for the sake of speed).
Diffstat (limited to 'format.cc')
-rw-r--r--format.cc10
1 files changed, 6 insertions, 4 deletions
diff --git a/format.cc b/format.cc
index a2c84ef2..f7a04fb2 100644
--- a/format.cc
+++ b/format.cc
@@ -474,7 +474,7 @@ void format_t::format(std::ostream& out_str, const details_t& details) const
if (details.xact) {
switch (details.xact->state) {
case transaction_t::CLEARED:
- out << "* ";
+ out << "* ";
break;
case transaction_t::PENDING:
out << "! ";
@@ -547,8 +547,8 @@ void format_t::format(std::ostream& out_str, const details_t& details) const
case element_t::ACCOUNT_FULLNAME:
if (details.account) {
name += (elem->type == element_t::ACCOUNT_FULLNAME ?
- details.account->fullname() :
- partial_account_name(*details.account));
+ details.account->fullname() :
+ partial_account_name(*details.account));
if (details.xact && details.xact->flags & TRANSACTION_VIRTUAL) {
if (elem->max_width > 2)
@@ -685,7 +685,9 @@ void print_entry(std::ostream& out, const entry_t& entry)
formatter);
formatter.flush();
- clear_all_xdata();
+ clear_transaction_xdata cleaner;
+ walk_transactions(const_cast<transactions_list&>(entry.transactions),
+ cleaner);
}
bool disp_subaccounts_p(const account_t& account,