diff options
author | John Wiegley <johnw@newartisans.com> | 2008-09-17 21:09:15 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2008-09-17 21:09:15 -0400 |
commit | 1b083919c0ced1cbb64b46da58180b0c33123364 (patch) | |
tree | a39128321a9246d32598e21fff0cc020ba7f0760 /src/output.cc | |
parent | 24e64c202ea71ad73a860f16c6ba4b9288768fef (diff) | |
download | fork-ledger-1b083919c0ced1cbb64b46da58180b0c33123364.tar.gz fork-ledger-1b083919c0ced1cbb64b46da58180b0c33123364.tar.bz2 fork-ledger-1b083919c0ced1cbb64b46da58180b0c33123364.zip |
Restored the 'print' command.
Diffstat (limited to 'src/output.cc')
-rw-r--r-- | src/output.cc | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/output.cc b/src/output.cc index 582fb0cf..4ddcffb5 100644 --- a/src/output.cc +++ b/src/output.cc @@ -42,10 +42,18 @@ format_xacts::format_xacts(report_t& _report, const string& format) if (const char * p = std::strstr(f, "%/")) { first_line_format.parse(string(f, 0, p - f)); - next_lines_format.parse(string(p + 2)); + const char * n = p + 2; + if (const char * p = std::strstr(n, "%/")) { + next_lines_format.parse(string(n, 0, p - n)); + between_format.parse(string(p + 2)); + } else { + next_lines_format.parse(n); + between_format.parse("\n"); + } } else { first_line_format.parse(format); next_lines_format.parse(format); + between_format.parse("\n"); } } @@ -56,6 +64,8 @@ void format_xacts::operator()(xact_t& xact) if (! xact.has_xdata() || ! xact.xdata().has_flags(XACT_EXT_DISPLAYED)) { if (last_entry != xact.entry) { + if (last_entry) + between_format.format(out, *last_entry); first_line_format.format(out, xact); last_entry = xact.entry; } |