summaryrefslogtreecommitdiff
path: root/src/output.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2008-08-14 04:14:48 -0400
committerJohn Wiegley <johnw@newartisans.com>2008-08-14 04:14:48 -0400
commit6432d7c594023fa5a4fbc9072c28bdd80b670c8a (patch)
tree56e9b2f88cb3ebf2968bb510c3f82662601d7373 /src/output.cc
parent2bff7565c1762202c7c01bf7cb50bd9ce351031a (diff)
downloadfork-ledger-6432d7c594023fa5a4fbc9072c28bdd80b670c8a.tar.gz
fork-ledger-6432d7c594023fa5a4fbc9072c28bdd80b670c8a.tar.bz2
fork-ledger-6432d7c594023fa5a4fbc9072c28bdd80b670c8a.zip
Added back a lot of hacktastic logic from 2.6.1 that made the "bal" command
somewhat smart about how it interpreted certain options. Beware, code, for your days are not long-lived.
Diffstat (limited to 'src/output.cc')
-rw-r--r--src/output.cc12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/output.cc b/src/output.cc
index e3b31df4..582fb0cf 100644
--- a/src/output.cc
+++ b/src/output.cc
@@ -171,7 +171,7 @@ bool format_accounts::disp_subaccounts_p(account_t& account,
{
bool display = false;
unsigned int counted = 0;
- bool matches = disp_pred(account);
+ bool matches = should_display(account);
bool computed = false;
value_t acct_total;
value_t result;
@@ -179,7 +179,7 @@ bool format_accounts::disp_subaccounts_p(account_t& account,
to_show = NULL;
foreach (accounts_map::value_type pair, account.accounts) {
- if (! disp_pred(*pair.second))
+ if (! should_display(*pair.second))
continue;
call_scope_t args(*pair.second);
@@ -219,13 +219,11 @@ bool format_accounts::display_account(account_t& account)
if (disp_subaccounts_p(account, account_to_show))
return true;
- return ! account_to_show && disp_pred(account);
+ return ! account_to_show && should_display(account);
}
-format_equity::format_equity(report_t& _report,
- const string& _format,
- const string& display_predicate)
- : format_accounts(_report, "", display_predicate)
+format_equity::format_equity(report_t& _report, const string& _format)
+ : format_accounts(_report)
{
const char * f = _format.c_str();