From 4f1636dbb21da7886116e92e0bc2d3587b38f687 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Fri, 28 Oct 2005 07:20:34 +0000 Subject: Added a `terminus' global, which if set marks the "current time" as seen by the value expression logic. This has the effect of changing valexprs that test against the current time, such as for calculating the market value of commodities. --- config.cc | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'config.cc') diff --git a/config.cc b/config.cc index a7afd152..d77472e5 100644 --- a/config.cc +++ b/config.cc @@ -3,6 +3,7 @@ #include "option.h" #include "datetime.h" #include "quotes.h" +#include "valexpr.h" #include "walk.h" #ifdef USE_BOOST_PYTHON #include "py_eval.h" @@ -647,6 +648,8 @@ OPT_BEGIN(end, "e:") { config.predicate += "d<["; config.predicate += buf; config.predicate += "]"; + + terminus = interval.end; } OPT_END(end); OPT_BEGIN(current, "c") { @@ -811,6 +814,8 @@ OPT_BEGIN(period, "p:") { config.predicate += "d<["; config.predicate += buf; config.predicate += "]"; + + terminus = interval.end; } } OPT_END(period); -- cgit v1.2.3