diff options
author | John Wiegley <johnw@newartisans.com> | 2008-07-20 05:03:54 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2008-07-20 05:03:54 -0400 |
commit | 52fc9f2e4499e75d17e7f12d32a8391054d8634a (patch) | |
tree | 164b6b4cdb6717f2df7d154793499e90bdd3ae3e /emacs.cc | |
parent | 59f6ffb863b7121b8a49c13dd64f9943ddaf7ed0 (diff) | |
download | ledger-52fc9f2e4499e75d17e7f12d32a8391054d8634a.tar.gz ledger-52fc9f2e4499e75d17e7f12d32a8391054d8634a.tar.bz2 ledger-52fc9f2e4499e75d17e7f12d32a8391054d8634a.zip |
Brought in the final round of 3.0 code, although it does not compile yet:
report, session, parts of xpath, main, journal, option.
Diffstat (limited to 'emacs.cc')
-rw-r--r-- | emacs.cc | 10 |
1 files changed, 4 insertions, 6 deletions
@@ -20,10 +20,10 @@ void format_emacs_transactions::write_entry(entry_t& entry) out << "(" << (date / 65536) << " " << (date % 65536) << " 0) "; - if (entry.code.empty()) + if (! entry.code) out << "nil "; else - out << "\"" << entry.code << "\" "; + out << "\"" << *entry.code << "\" "; if (entry.payee.empty()) out << "nil"; @@ -67,10 +67,8 @@ void format_emacs_transactions::operator()(transaction_t& xact) if (xact.cost) out << " \"" << *xact.cost << "\""; - else if (! xact.note.empty()) - out << " nil"; - if (! xact.note.empty()) - out << " \"" << xact.note << "\""; + if (xact.note) + out << " \"" << *xact.note << "\""; out << ")"; last_entry = xact.entry; |