summaryrefslogtreecommitdiff
path: root/src/emacs.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2008-09-19 08:06:20 -0400
committerJohn Wiegley <johnw@newartisans.com>2008-09-19 08:06:20 -0400
commitfdc7a4e4c5423e79df4ad8905b5a67d45d2f85bc (patch)
treeb7aa301f7d884315f00c42903778ea549e7833d7 /src/emacs.cc
parent43ba0bb03807eea3fdcd4dd40fba10b00f823e24 (diff)
downloadfork-ledger-fdc7a4e4c5423e79df4ad8905b5a67d45d2f85bc.tar.gz
fork-ledger-fdc7a4e4c5423e79df4ad8905b5a67d45d2f85bc.tar.bz2
fork-ledger-fdc7a4e4c5423e79df4ad8905b5a67d45d2f85bc.zip
Factored common parts of entry_t and xact_t into new item_t
Diffstat (limited to 'src/emacs.cc')
-rw-r--r--src/emacs.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/emacs.cc b/src/emacs.cc
index cf787e75..dab9223f 100644
--- a/src/emacs.cc
+++ b/src/emacs.cc
@@ -45,7 +45,7 @@ void format_emacs_xacts::write_entry(entry_t& entry)
out << (static_cast<unsigned long>(entry.beg_line) + 1) << " ";
- tm when = gregorian::to_tm(entry.date());
+ tm when = gregorian::to_tm(*entry.date());
std::time_t date = std::mktime(&when); // jww (2008-04-20): Is this GMT or local?
out << "(" << (date / 65536) << " " << (date % 65536) << " 0) ";
@@ -83,11 +83,11 @@ void format_emacs_xacts::operator()(xact_t& xact)
out << "\"" << xact.reported_account()->fullname() << "\" \""
<< xact.amount << "\"";
- switch (xact.state) {
- case xact_t::CLEARED:
+ switch (xact.state()) {
+ case item_t::CLEARED:
out << " t";
break;
- case xact_t::PENDING:
+ case item_t::PENDING:
out << " pending";
break;
default: