From bbdab793029f156425180282e0e7a2a7090c1c4a Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Sun, 3 Aug 2008 21:38:53 -0400 Subject: Rearranged the code a bit, breaking walk.cc into several different files: compare compare_items handler item_handler iterators used to iterators sets of journal objects filters derived from item_handler, they morph the result set output derived from item_handler, these do the printing Also, created a new 'help' files which contains just Ledger's help text. --- format.cc | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'format.cc') diff --git a/format.cc b/format.cc index 48cd7f7a..035f9268 100644 --- a/format.cc +++ b/format.cc @@ -30,10 +30,7 @@ */ #include "format.h" -#include "error.h" -#include "util.h" - -#include +#include "account.h" namespace ledger { @@ -70,15 +67,15 @@ void format_t::element_t::dump(std::ostream& out) const } namespace { - string partial_account_name(const account_t& account) + string partial_account_name(account_t& account) { string name; - for (const account_t * acct = &account; + for (account_t * acct = &account; acct && acct->parent; acct = acct->parent) { - if (account_has_xdata(*acct) && - account_xdata_(*acct).dflags & ACCOUNT_DISPLAYED) + if (acct->has_xdata() && + acct->xdata().has_flags(ACCOUNT_EXT_DISPLAYED)) break; if (name.empty()) -- cgit v1.2.3