diff options
author | John Wiegley <johnw@newartisans.com> | 2006-03-24 16:37:26 +0000 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2008-04-13 02:41:31 -0400 |
commit | a5aff9eee967adb8c71ce6fc25db0458d522836e (patch) | |
tree | 1ab913955246a1ba0afd19d1f2fc776797a046d7 /textual.cc | |
parent | 44561c1c1d233d9432de319a71b44a3e05275d49 (diff) | |
download | fork-ledger-a5aff9eee967adb8c71ce6fc25db0458d522836e.tar.gz fork-ledger-a5aff9eee967adb8c71ce6fc25db0458d522836e.tar.bz2 fork-ledger-a5aff9eee967adb8c71ce6fc25db0458d522836e.zip |
Several fixes to lot price handling.
Diffstat (limited to 'textual.cc')
-rw-r--r-- | textual.cc | 15 |
1 files changed, 9 insertions, 6 deletions
@@ -64,10 +64,11 @@ inline char * next_element(char * buf, bool variable = false) return NULL; } -value_expr parse_amount_expr(std::istream& in, amount_t& amount, - transaction_t * xact) +static value_expr parse_amount_expr(std::istream& in, amount_t& amount, + transaction_t * xact, + unsigned short flags = 0) { - value_expr expr(parse_value_expr(in, NULL, PARSE_VALEXPR_RELAXED | + value_expr expr(parse_value_expr(in, NULL, flags | PARSE_VALEXPR_RELAXED | PARSE_VALEXPR_PARTIAL)->acquire()); DEBUG_PRINT("ledger.textual.parse", "line " << linenum << ": " << @@ -213,8 +214,10 @@ transaction_t * parse_transaction(char * line, account_t * account, try { unsigned long beg = (long)in.tellg(); - if (parse_amount_expr(in, *xact->cost, xact.get())) - throw new parse_error("A transaction's cost must evalute to a constant value"); + if (parse_amount_expr(in, *xact->cost, xact.get(), + PARSE_VALEXPR_NO_MIGRATE)) + throw new parse_error + ("A transaction's cost must evalute to a constant value"); unsigned long end = (long)in.tellg(); @@ -700,7 +703,7 @@ unsigned int textual_parser_t::parse(std::istream& in, if (p) *p++ = '\0'; } - config.process_option(line + 2, p); + process_option(config_options, line + 2, p); break; } |