summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2006-02-25 13:40:14 +0000
committerJohn Wiegley <johnw@newartisans.com>2008-04-13 02:41:26 -0400
commite75bb1f71fca2f67446d0caa4a98bb0168e66119 (patch)
tree073a9253273a8fff38625cd690c483d4df7b760f
parentf819ba6c10df9ed007bf7484a6414cbff8817766 (diff)
downloadfork-ledger-e75bb1f71fca2f67446d0caa4a98bb0168e66119.tar.gz
fork-ledger-e75bb1f71fca2f67446d0caa4a98bb0168e66119.tar.bz2
fork-ledger-e75bb1f71fca2f67446d0caa4a98bb0168e66119.zip
*** empty log message ***
-rw-r--r--main.cc2
-rw-r--r--valexpr.cc4
2 files changed, 4 insertions, 2 deletions
diff --git a/main.cc b/main.cc
index 31836975..b727b23b 100644
--- a/main.cc
+++ b/main.cc
@@ -69,10 +69,8 @@ int parse_and_report(int argc, char * argv[], char * envp[])
config.process_option("file", p);
if (const char * p = std::getenv("LEDGER_INIT"))
config.process_option("init-file", p);
-#if 0
if (const char * p = std::getenv("PRICE_HIST"))
config.process_option("price-db", p);
-#endif
if (const char * p = std::getenv("PRICE_EXP"))
config.process_option("price-exp", p);
#endif
diff --git a/valexpr.cc b/valexpr.cc
index 013cfad7..00fce46f 100644
--- a/valexpr.cc
+++ b/valexpr.cc
@@ -348,6 +348,8 @@ void value_expr_t::compute(value_t& result, const details_t& details) const
if (right) {
assert(right->kind == O_ARG);
switch (right->left->kind) {
+ case F_NOW:
+ break; // already set to now
case DATE:
if (details.xact && transaction_has_xdata(*details.xact) &&
transaction_xdata_(*details.xact).date)
@@ -377,6 +379,8 @@ void value_expr_t::compute(value_t& result, const details_t& details) const
std::time_t moment = terminus;
if (right) {
switch (right->kind) {
+ case F_NOW:
+ break; // already set to now
case DATE:
if (details.xact && transaction_has_xdata(*details.xact) &&
transaction_xdata_(*details.xact).date)