From d021582d2869961d21a11e722421fb1bae33e5c4 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Thu, 10 Nov 2005 12:06:41 +0000 Subject: [PATCH] (parse_and_report): Set ledger::terminus in main.cc, instead of relying on static initialization of valexpr.cc. --- main.cc | 4 ++++ valexpr.cc | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/main.cc b/main.cc index fb7d2d85..a0bd29c1 100644 --- a/main.cc +++ b/main.cc @@ -41,6 +41,10 @@ int parse_and_report(int argc, char * argv[], char * envp[]) std::auto_ptr journal(new journal_t); + // Configure the terminus for value expressions + + ledger::terminus = now; + // Parse command-line arguments, and those set in the environment std::list args; diff --git a/valexpr.cc b/valexpr.cc index 089b471b..27ab7401 100644 --- a/valexpr.cc +++ b/valexpr.cc @@ -13,7 +13,7 @@ namespace ledger { std::auto_ptr amount_expr; std::auto_ptr total_expr; -std::time_t terminus = now; +std::time_t terminus; details_t::details_t(const transaction_t& _xact) : entry(_xact.entry), xact(&_xact), account(xact_account(_xact))