diff options
author | John Wiegley <johnw@newartisans.com> | 2010-05-12 04:32:02 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2010-05-12 04:32:02 -0400 |
commit | 5f1a858941adc17fcf714c7b6b176aeae727c436 (patch) | |
tree | 846efb794cb76fdc4c63fa4c6ab554b83af49f07 /src/report.cc | |
parent | 7ca8149ec5c7fa88d98df83e6260210372223036 (diff) | |
parent | cb047c013df0eaf1c5e9edd67bbb6b6fa537d2a0 (diff) | |
download | fork-ledger-5f1a858941adc17fcf714c7b6b176aeae727c436.tar.gz fork-ledger-5f1a858941adc17fcf714c7b6b176aeae727c436.tar.bz2 fork-ledger-5f1a858941adc17fcf714c7b6b176aeae727c436.zip |
Merge branch 'next'
Diffstat (limited to 'src/report.cc')
-rw-r--r-- | src/report.cc | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/report.cc b/src/report.cc index 2189812b..1180c019 100644 --- a/src/report.cc +++ b/src/report.cc @@ -443,6 +443,20 @@ value_t report_t::fn_trim(call_scope_t& args) } } +value_t report_t::fn_print(call_scope_t& args) +{ + std::ostream& out(output_stream); + bool first = true; + for (call_scope_t::iterator i = args.begin(); i != args.end(); i++) { + if (first) + first = false; + else + out << ' '; + (*i).print(out); + } + return true; +} + value_t report_t::scrub(value_t val) { value_t temp(val.strip_annotations(what_to_keep())); @@ -1117,6 +1131,8 @@ expr_t::ptr_op_t report_t::lookup(const symbol_t::kind_t kind, return MAKE_FUNCTOR(report_t::fn_percent); else if (is_eq(p, "price")) return MAKE_FUNCTOR(report_t::fn_price); + else if (is_eq(p, "print")) + return MAKE_FUNCTOR(report_t::fn_print); break; case 'q': |