Restored the -j and -J options
This commit is contained in:
parent
b684783eff
commit
1f1a83c083
2 changed files with 14 additions and 10 deletions
|
|
@ -143,6 +143,11 @@ value_t report_t::fn_strip(call_scope_t& args)
|
|||
return args[0].strip_annotations(what_to_keep());
|
||||
}
|
||||
|
||||
value_t report_t::fn_quantity(call_scope_t& args)
|
||||
{
|
||||
return args[0].to_amount().number();
|
||||
}
|
||||
|
||||
value_t report_t::fn_truncate(call_scope_t& args)
|
||||
{
|
||||
var_t<long> width(args, 1);
|
||||
|
|
@ -602,6 +607,8 @@ expr_t::ptr_op_t report_t::lookup(const string& name)
|
|||
case 'q':
|
||||
if (is_eq(p, "quoted"))
|
||||
return MAKE_FUNCTOR(report_t::fn_quoted);
|
||||
else if (is_eq(p, "quantity"))
|
||||
return MAKE_FUNCTOR(report_t::fn_quantity);
|
||||
break;
|
||||
|
||||
case 's':
|
||||
|
|
|
|||
17
src/report.h
17
src/report.h
|
|
@ -134,6 +134,7 @@ public:
|
|||
value_t fn_display_total(call_scope_t& scope);
|
||||
value_t fn_market_value(call_scope_t& scope);
|
||||
value_t fn_strip(call_scope_t& scope);
|
||||
value_t fn_quantity(call_scope_t& scope);
|
||||
value_t fn_truncate(call_scope_t& scope);
|
||||
value_t fn_print(call_scope_t& scope);
|
||||
value_t fn_quoted(call_scope_t& scope);
|
||||
|
|
@ -204,11 +205,9 @@ public:
|
|||
set_expr(args[0].to_string());
|
||||
});
|
||||
|
||||
OPTION_(report_t, amount_data, DO() {
|
||||
#if 0
|
||||
format_string = session.plot_amount_format;
|
||||
#endif
|
||||
}); // -j
|
||||
OPTION_(report_t, amount_data, DO() { // -j
|
||||
parent->HANDLER(format_).on(parent->HANDLER(plot_amount_format_).str());
|
||||
});
|
||||
|
||||
OPTION(report_t, anon);
|
||||
OPTION(report_t, ansi);
|
||||
|
|
@ -536,11 +535,9 @@ public:
|
|||
set_expr(args[0].to_string());
|
||||
});
|
||||
|
||||
OPTION_(report_t, total_data, DO() {
|
||||
#if 0
|
||||
format_string = session.plot_total_format;
|
||||
#endif
|
||||
}); // -J
|
||||
OPTION_(report_t, total_data, DO() { // -J
|
||||
parent->HANDLER(format_).on(parent->HANDLER(plot_total_format_).str());
|
||||
});
|
||||
|
||||
OPTION(report_t, totals);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue