diff options
Diffstat (limited to 'src/textual.cc')
-rw-r--r-- | src/textual.cc | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/src/textual.cc b/src/textual.cc index a5ae2f68..b19ce79a 100644 --- a/src/textual.cc +++ b/src/textual.cc @@ -148,7 +148,7 @@ namespace { void account_value_directive(account_t * account, string expr_str); void account_default_directive(account_t * account); - void default_account_directive(char * line); + void default_account_directive(char * args); void alias_directive(char * line); void payee_directive(char * line); @@ -282,6 +282,10 @@ void instance_t::parse() } } +#if defined(TIMELOG_SUPPORT) + timelog.close(); +#endif // TIMELOG_SUPPORT + TRACE_STOP(instance_parse, 1); } @@ -397,7 +401,7 @@ void instance_t::read_next_directive(bool& error_flag) #endif // TIMELOG_SUPPORT case 'A': // a default account for unbalanced posts - default_account_directive(line); + default_account_directive(line + 1); break; case 'C': // a set of conversions price_conversion_directive(line); @@ -492,7 +496,7 @@ void instance_t::default_commodity_directive(char * line) void instance_t::default_account_directive(char * line) { - context.journal->bucket = top_account()->find_account(skip_ws(line + 1)); + context.journal->bucket = top_account()->find_account(skip_ws(line)); context.journal->bucket->add_flags(ACCOUNT_KNOWN); } @@ -532,9 +536,8 @@ void instance_t::option_directive(char * line) *p++ = '\0'; } - path abs_path(filesystem::absolute(context.pathname, - context.current_directory)); - if (! process_option(abs_path.string(), line + 2, *context.scope, p, line)) + if (! process_option(context.pathname.string(), line + 2, *context.scope, + p, line)) throw_(option_error, _f("Illegal option --%1%") % (line + 2)); } @@ -576,7 +579,7 @@ void instance_t::automated_xact_directive(char * line) item = ae.get(); // This is a trailing note, and possibly a metadata info tag - item->append_note(p + 1, *context.scope, true); + ae->append_note(p + 1, *context.scope, true); item->add_flags(ITEM_NOTE_ON_NEXT_LINE); item->pos->end_pos = context.curr_pos; item->pos->end_line++; |