From 61bc7362ca974543c9b851f8fc81fe981569ad6c Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Mon, 27 Feb 2012 02:29:42 -0600 Subject: Added new account/payee/commodity directives Also added supporting options: --explicit, --permissive, --pedantic, as well as new behavior for --strict. --- src/session.cc | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/session.cc') diff --git a/src/session.cc b/src/session.cc index 72e29895..cc069efe 100644 --- a/src/session.cc +++ b/src/session.cc @@ -97,6 +97,16 @@ std::size_t session_t::read_data(const string& master_account) if (HANDLED(price_db_)) price_db_path = resolve_path(HANDLER(price_db_).str()); + if (HANDLED(explicit)) + journal->force_checking = true; + + if (HANDLED(permissive)) + journal->checking_style = journal_t::CHECK_PERMISSIVE; + else if (HANDLED(pedantic)) + journal->checking_style = journal_t::CHECK_ERROR; + else if (HANDLED(strict)) + journal->checking_style = journal_t::CHECK_WARNING; + #if defined(HAVE_BOOST_SERIALIZATION) optional cache; if (HANDLED(cache_) && master_account.empty()) @@ -251,6 +261,7 @@ option_t * session_t::lookup_option(const char * p) break; case 'l': OPT_ALT(price_exp_, leeway_); + else OPT(explicit); break; case 'm': OPT(master_account_); @@ -258,6 +269,8 @@ option_t * session_t::lookup_option(const char * p) case 'p': OPT(price_db_); else OPT(price_exp_); + else OPT(pedantic); + else OPT(permissive); break; case 's': OPT(strict); -- cgit v1.2.3