From d110df6741d3732634beb287b94afd0dbff52b7b Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Fri, 24 Sep 2004 06:29:01 -0400 Subject: added a custom transaction formatter, format_entries, used by "print" --- main.cc | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'main.cc') diff --git a/main.cc b/main.cc index 8e827212..f1dbeff4 100644 --- a/main.cc +++ b/main.cc @@ -248,13 +248,14 @@ int parse_and_report(int argc, char * argv[], char * envp[]) item_handler * formatter; std::list *> 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); -- cgit v1.2.3