diff options
author | John Wiegley <johnw@newartisans.com> | 2011-02-28 16:24:15 -0500 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2011-02-28 16:24:15 -0500 |
commit | 8388baafd3e2c6e4b2f76878215d503e8842da27 (patch) | |
tree | 246422575a6338acfc946ce501ae4e2df056ccf1 /src/textual.cc | |
parent | 021fc50842a85d8357ca70c13e35b169a4d91e29 (diff) | |
download | fork-ledger-8388baafd3e2c6e4b2f76878215d503e8842da27.tar.gz fork-ledger-8388baafd3e2c6e4b2f76878215d503e8842da27.tar.bz2 fork-ledger-8388baafd3e2c6e4b2f76878215d503e8842da27.zip |
Support Boost 1.46 and Boost.Filesystem v3
Diffstat (limited to 'src/textual.cc')
-rw-r--r-- | src/textual.cc | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/textual.cc b/src/textual.cc index 5bcbf86b..a1e5d50b 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 |