diff options
author | John Wiegley <johnw@newartisans.com> | 2008-09-14 19:41:20 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2008-09-14 19:44:30 -0400 |
commit | 53c6e826f1e41f29c86f1c86f179f38838123d1d (patch) | |
tree | 99e9113d9089cda0b9978781681e4f2ba399ab7b /src/report.cc | |
parent | 6d020a9b0ba2f20054de529f0183d23afdf32972 (diff) | |
download | ledger-53c6e826f1e41f29c86f1c86f179f38838123d1d.tar.gz ledger-53c6e826f1e41f29c86f1c86f179f38838123d1d.tar.bz2 ledger-53c6e826f1e41f29c86f1c86f179f38838123d1d.zip |
Restored --format, --date-format (-y), and --input-date-format options.
Diffstat (limited to 'src/report.cc')
-rw-r--r-- | src/report.cc | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/src/report.cc b/src/report.cc index a894e036..db5dd04c 100644 --- a/src/report.cc +++ b/src/report.cc @@ -322,9 +322,9 @@ expr_t::ptr_op_t report_t::lookup(const string& name) case 'c': if (std::strcmp(p, "collapse") == 0) return MAKE_FUNCTOR(report_t::option_collapse); - else if (std::strcmp(p, "comm_as_payee") == 0) + else if (std::strcmp(p, "comm-as-payee") == 0) return MAKE_FUNCTOR(report_t::option_comm_as_payee); - else if (std::strcmp(p, "code_as_payee") == 0) + else if (std::strcmp(p, "code-as-payee") == 0) return MAKE_FUNCTOR(report_t::option_code_as_payee); break; @@ -333,6 +333,8 @@ expr_t::ptr_op_t report_t::lookup(const string& name) return MAKE_FUNCTOR(report_t::option_daily); else if (std::strcmp(p, "dow") == 0) return MAKE_FUNCTOR(report_t::option_dow); + else if (std::strcmp(p, "date-format_") == 0) + return MAKE_FUNCTOR(report_t::option_date_format_); break; case 'e': @@ -344,8 +346,7 @@ expr_t::ptr_op_t report_t::lookup(const string& name) break; case 'f': - if (std::strcmp(p, "F_") == 0 || - std::strcmp(p, "format_") == 0) + if (std::strcmp(p, "format_") == 0) return MAKE_FUNCTOR(report_t::option_format_); break; @@ -354,6 +355,11 @@ expr_t::ptr_op_t report_t::lookup(const string& name) return MAKE_FUNCTOR(report_t::option_head_); break; + case 'i': + if (std::strcmp(p, "input-date-format_") == 0) + return MAKE_FUNCTOR(report_t::option_input_date_format_); + break; + case 'j': if (! (*p + 1)) return MAKE_FUNCTOR(report_t::option_amount_data); @@ -430,6 +436,8 @@ expr_t::ptr_op_t report_t::lookup(const string& name) case 'y': if (std::strcmp(p, "yearly") == 0) return MAKE_FUNCTOR(report_t::option_yearly); + else if (std::strcmp(p, "y_") == 0) + return MAKE_FUNCTOR(report_t::option_date_format_); break; case 'E': @@ -437,6 +445,11 @@ expr_t::ptr_op_t report_t::lookup(const string& name) return MAKE_FUNCTOR(report_t::option_empty); break; + case 'F': + if (std::strcmp(p, "F_") == 0) + return MAKE_FUNCTOR(report_t::option_format_); + break; + case 'J': if (! (*p + 1)) return MAKE_FUNCTOR(report_t::option_total_data); |