summaryrefslogtreecommitdiff
path: root/src/report.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/report.h')
-rw-r--r--src/report.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/report.h b/src/report.h
index 38b2b07e..e27abbf9 100644
--- a/src/report.h
+++ b/src/report.h
@@ -143,6 +143,7 @@ public:
value_t fn_rounded(call_scope_t& scope);
value_t fn_unrounded(call_scope_t& scope);
value_t fn_truncated(call_scope_t& scope);
+ value_t fn_floor(call_scope_t& scope);
value_t fn_abs(call_scope_t& scope);
value_t fn_justify(call_scope_t& scope);
value_t fn_quoted(call_scope_t& scope);
@@ -172,6 +173,12 @@ public:
return option.str();
}
+ optional<string> maybe_format(option_t<report_t>& option) {
+ if (option)
+ return option.str();
+ return none;
+ }
+
value_t reload_command(call_scope_t&);
value_t echo_command(call_scope_t& scope);
@@ -183,8 +190,6 @@ public:
HANDLED(lots_actual));
}
- bool maybe_import(const string& module);
-
void report_options(std::ostream& out)
{
HANDLER(abbrev_len_).report(out);
@@ -254,6 +259,7 @@ public:
HANDLER(period_).report(out);
HANDLER(plot_amount_format_).report(out);
HANDLER(plot_total_format_).report(out);
+ HANDLER(prepend_format_).report(out);
HANDLER(price).report(out);
HANDLER(prices_format_).report(out);
HANDLER(pricesdb_format_).report(out);
@@ -695,6 +701,8 @@ public:
"%(format_date(date, \"%Y-%m-%d\")) %(quantity(scrub(display_total)))\n");
});
+ OPTION(report_t, prepend_format_);
+
OPTION_(report_t, price, DO() { // -I
parent->HANDLER(display_amount_)
.set_expr(string("--price"), "price(amount_expr)");