diff options
author | Craig Earls <enderw88@gmail.com> | 2011-10-06 22:07:01 -0700 |
---|---|---|
committer | Craig Earls <enderw88@gmail.com> | 2011-10-06 22:07:01 -0700 |
commit | b400d65be082165f44e769605aa6a78133cf6d9a (patch) | |
tree | 27b18ee35a5c4f60a10cf4f626e15ac30276040b /src/textual.cc | |
parent | e9ccb012c2c5ffe0e9f4916ee859bda95d9d4248 (diff) | |
parent | f0791bbd7297e737d9e13d0b0bb21473b173b2a7 (diff) | |
download | fork-ledger-b400d65be082165f44e769605aa6a78133cf6d9a.tar.gz fork-ledger-b400d65be082165f44e769605aa6a78133cf6d9a.tar.bz2 fork-ledger-b400d65be082165f44e769605aa6a78133cf6d9a.zip |
Merge remote branch 'upstream/next' into next
Diffstat (limited to 'src/textual.cc')
-rw-r--r-- | src/textual.cc | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/src/textual.cc b/src/textual.cc index 0e7f2aec..341271b6 100644 --- a/src/textual.cc +++ b/src/textual.cc @@ -129,7 +129,7 @@ namespace { (in.peek() == ' ' || in.peek() == '\t')); } - void read_next_directive(); + void read_next_directive(); #if defined(TIMELOG_SUPPORT) void clock_in_directive(char * line, bool capitalized); @@ -270,7 +270,7 @@ void instance_t::parse() string err_context = error_context(); if (! err_context.empty()) std::cerr << err_context << std::endl; - + if (! current_context.empty()) std::cerr << current_context << std::endl; @@ -442,7 +442,7 @@ void instance_t::clock_in_directive(char * line, bool /*capitalized*/) } void instance_t::clock_out_directive(char * line, bool /*capitalized*/) -{ +{ string datetime(line, 2, 19); char * p = skip_ws(line + 22); @@ -546,7 +546,7 @@ void instance_t::automated_xact_directive(char * line) try { query_t query; keep_details_t keeper(true, true, true); - expr_t::ptr_op_t expr = + expr_t::ptr_op_t expr = query.parse_args(string_value(skip_ws(line + 1)).to_sequence(), keeper, false, true); @@ -831,7 +831,7 @@ void instance_t::alias_directive(char * line) void instance_t::fixed_directive(char * line) { - if (optional<std::pair<commodity_t *, price_point_t> > price_point = + if (optional<std::pair<commodity_t *, price_point_t> > price_point = commodity_pool_t::current_pool->parse_price_directive(trim_ws(line), true)) { context.state_stack.push_front(fixed_rate_t(price_point->first, @@ -1165,11 +1165,7 @@ post_t * instance_t::parse_post(char * line, // Parse the optional amount - bool saw_amount = false; - if (next && *next && (*next != ';' && *next != '=')) { - saw_amount = true; - beg = next - line; ptristream stream(next, len - beg); @@ -1320,7 +1316,7 @@ post_t * instance_t::parse_post(char * line, amount_t& amt(*post->assigned_amount); value_t account_total - (post->account->amount(false).strip_annotations(keep_details_t())); + (post->account->amount().strip_annotations(keep_details_t())); DEBUG("post.assign", "line " << linenum << ": " "account balance = " << account_total); @@ -1569,6 +1565,7 @@ xact_t * instance_t::parse_xact(char * line, } } +#if 0 if (xact->_state == item_t::UNCLEARED) { item_t::state_t result = item_t::CLEARED; @@ -1582,6 +1579,7 @@ xact_t * instance_t::parse_xact(char * line, } } } +#endif xact->pos->end_pos = curr_pos; xact->pos->end_line = linenum; |