diff options
-rw-r--r-- | src/global.cc | 2 | ||||
-rw-r--r-- | src/report.h | 36 | ||||
-rw-r--r-- | test/baseline/opt-wide.test | 6 |
3 files changed, 11 insertions, 33 deletions
diff --git a/src/global.cc b/src/global.cc index 2383dd84..0797ecdf 100644 --- a/src/global.cc +++ b/src/global.cc @@ -538,6 +538,8 @@ void global_scope_t::normalize_report_options(const string& verb) cols = rep.HANDLER(columns_).value.to_long(); else if (const char * columns = std::getenv("COLUMNS")) cols = lexical_cast<long>(columns); + else + cols = 80L; if (cols > 0) { DEBUG("auto.columns", "cols = " << cols); diff --git a/src/report.h b/src/report.h index a489ed48..08582075 100644 --- a/src/report.h +++ b/src/report.h @@ -869,16 +869,7 @@ public: }); OPTION_(report_t, wide, DO() { // -w - parent->HANDLER(date_width_).on_with(string("--wide"), 9L); - parent->HANDLER(date_width_).specified = true; - parent->HANDLER(payee_width_).on_with(string("--wide"), 35L); - parent->HANDLER(payee_width_).specified = true; - parent->HANDLER(account_width_).on_with(string("--wide"), 39L); - parent->HANDLER(account_width_).specified = true; - parent->HANDLER(amount_width_).on_with(string("--wide"), 22L); - parent->HANDLER(amount_width_).specified = true; - parent->HANDLER(total_width_).on_with(string("--wide"), 22L); - parent->HANDLER(total_width_).specified = true; + parent->HANDLER(columns_).on_with(string("--wide"), 132L); }); OPTION_(report_t, yearly, DO() { // -Y @@ -887,38 +878,23 @@ public: OPTION__(report_t, date_width_, bool specified; - CTOR(report_t, date_width_) { - on_with(none, 9L); - specified = false; - } + CTOR(report_t, date_width_) { specified = false; } DO_(args) { value = args[1].to_long(); specified = true; }); OPTION__(report_t, payee_width_, bool specified; - CTOR(report_t, payee_width_) { - on_with(none, 20L); - specified = false; - } + CTOR(report_t, payee_width_) { specified = false; } DO_(args) { value = args[1].to_long(); specified = true; }); OPTION__(report_t, account_width_, bool specified; - CTOR(report_t, account_width_) { - on_with(none, 23L); - specified = false; - } + CTOR(report_t, account_width_) { specified = false; } DO_(args) { value = args[1].to_long(); specified = true; }); OPTION__(report_t, amount_width_, bool specified; - CTOR(report_t, amount_width_) { - on_with(none, 12L); - specified = false; - } + CTOR(report_t, amount_width_) { specified = false; } DO_(args) { value = args[1].to_long(); specified = true; }); OPTION__(report_t, total_width_, bool specified; - CTOR(report_t, total_width_) { - on_with(none, 12L); - specified = false; - } + CTOR(report_t, total_width_) { specified = false; } DO_(args) { value = args[1].to_long(); specified = true; }); }; diff --git a/test/baseline/opt-wide.test b/test/baseline/opt-wide.test index d9f43c11..02b4284a 100644 --- a/test/baseline/opt-wide.test +++ b/test/baseline/opt-wide.test @@ -4,8 +4,8 @@ reg --wide Assets:Investments:Vanguard:VMMXX 0.350 VMMXX @ $1.00 Income:Dividends:Vanguard:VMMXX $-0.35 >>>1 -07-Feb-02 RD VMMXX Assets:Investments:Vanguard:VMMXX 0.350 VMMXX 0.350 VMMXX - Income:Dividends:Vanguard:VMMXX $-0.35 $-0.35 - 0.350 VMMXX +07-Feb-02 RD VMMXX Assets:Investments:Vanguard:VMMXX 0.350 VMMXX 0.350 VMMXX + Income:Dividends:Vanguard:VMMXX $-0.35 $-0.35 + 0.350 VMMXX >>>2 === 0 |