diff options
Diffstat (limited to 'src/textual.cc')
-rw-r--r-- | src/textual.cc | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/src/textual.cc b/src/textual.cc index 5bcbf86b..26de6f9e 100644 --- a/src/textual.cc +++ b/src/textual.cc @@ -68,7 +68,9 @@ namespace { parse_context_t(journal_t& _journal, scope_t& _scope) : journal(_journal), scope(_scope), timelog(journal, scope), - strict(false), count(0), errors(0), sequence(1) {} + strict(false), count(0), errors(0), sequence(1) { + timelog.context_count = &count; + } bool front_is_account() { return state_stack.front().type() == typeid(account_t *); @@ -86,6 +88,10 @@ namespace { return boost::get<account_t *>(state); return NULL; } + + void close() { + timelog.close(); + } }; class instance_t : public noncopyable, public scope_t @@ -723,7 +729,11 @@ void instance_t::include_directive(char * line) mask_t glob; #if BOOST_VERSION >= 103700 path parent_path = filename.parent_path(); +#if BOOST_VERSION >= 104600 + glob.assign_glob('^' + filename.filename().string() + '$'); +#else glob.assign_glob('^' + filename.filename() + '$'); +#endif #else // BOOST_VERSION >= 103700 path parent_path = filename.branch_path(); glob.assign_glob('^' + filename.leaf() + '$'); @@ -742,7 +752,11 @@ void instance_t::include_directive(char * line) #endif { #if BOOST_VERSION >= 103700 +#if BOOST_VERSION >= 104600 + string base = (*iter).path().string(); +#else string base = (*iter).filename(); +#endif #else // BOOST_VERSION >= 103700 string base = (*iter).leaf(); #endif // BOOST_VERSION >= 103700 @@ -1136,7 +1150,7 @@ post_t * instance_t::parse_post(char * line, if (context.strict && ! post->account->has_flags(ACCOUNT_KNOWN)) { if (post->_state == item_t::UNCLEARED) warning_(_("\"%1\", line %2: Unknown account '%3'") - << pathname << linenum << post->account->fullname()); + << pathname.string() << linenum << post->account->fullname()); post->account->add_flags(ACCOUNT_KNOWN); } @@ -1171,7 +1185,7 @@ post_t * instance_t::parse_post(char * line, ! post->amount.commodity().has_flags(COMMODITY_KNOWN)) { if (post->_state == item_t::UNCLEARED) warning_(_("\"%1\", line %2: Unknown commodity '%3'") - << pathname << linenum << post->amount.commodity()); + << pathname.string() << linenum << post->amount.commodity()); post->amount.commodity().add_flags(COMMODITY_KNOWN); } |