summaryrefslogtreecommitdiff
path: root/format.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2008-08-03 21:38:53 -0400
committerJohn Wiegley <johnw@newartisans.com>2008-08-03 21:38:53 -0400
commitbbdab793029f156425180282e0e7a2a7090c1c4a (patch)
tree55ed87b2ed57b2da5ecf17ca0dd4ac53bd2988c4 /format.cc
parent3e4b01694070be141728d19f505926b277ac70b3 (diff)
downloadfork-ledger-bbdab793029f156425180282e0e7a2a7090c1c4a.tar.gz
fork-ledger-bbdab793029f156425180282e0e7a2a7090c1c4a.tar.bz2
fork-ledger-bbdab793029f156425180282e0e7a2a7090c1c4a.zip
Rearranged the code a bit, breaking walk.cc into several different files:
compare compare_items<T> handler item_handler<T> 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.
Diffstat (limited to 'format.cc')
-rw-r--r--format.cc13
1 files changed, 5 insertions, 8 deletions
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 <cstdlib>
+#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())