diff options
author | John Wiegley <johnw@newartisans.com> | 2004-09-24 06:29:01 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2004-09-24 06:29:01 -0400 |
commit | d110df6741d3732634beb287b94afd0dbff52b7b (patch) | |
tree | ba98061a35baaafd2f90c52ccdc2b2aa9ba17559 /main.cc | |
parent | 2f16a8213264a9428b31228373a5aae7605f5575 (diff) | |
download | fork-ledger-d110df6741d3732634beb287b94afd0dbff52b7b.tar.gz fork-ledger-d110df6741d3732634beb287b94afd0dbff52b7b.tar.bz2 fork-ledger-d110df6741d3732634beb287b94afd0dbff52b7b.zip |
added a custom transaction formatter, format_entries, used by "print"
Diffstat (limited to 'main.cc')
-rw-r--r-- | main.cc | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -248,13 +248,14 @@ int parse_and_report(int argc, char * argv[], char * envp[]) item_handler<transaction_t> * formatter; std::list<item_handler<transaction_t> *> formatter_ptrs; - if (command == "b" || command == "E") { + if (command == "b" || command == "E") formatter = new set_account_value; - formatter = chain_formatters(command, formatter, formatter_ptrs); - } else { + else if (command == "p") + formatter = new format_entries(*out, *format); + else formatter = new format_transactions(*out, *format); - formatter = chain_formatters(command, formatter, formatter_ptrs); - } + + formatter = chain_formatters(command, formatter, formatter_ptrs); if (command == "e") walk_transactions(new_entry->transactions, *formatter); |