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
commitf691735c6ce89a19356769084449d3f5691ab030 (patch)
treedf7a5de60353d3558b00d21ee83cf01e8da56331 /format.cc
parent3a689c568a715e7c6604825eab537d66333ce291 (diff)
downloadfork-ledger-f691735c6ce89a19356769084449d3f5691ab030.tar.gz
fork-ledger-f691735c6ce89a19356769084449d3f5691ab030.tar.bz2
fork-ledger-f691735c6ce89a19356769084449d3f5691ab030.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,