diff options
author | John Wiegley <johnw@newartisans.com> | 2012-02-27 02:29:42 -0600 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2012-02-27 02:31:09 -0600 |
commit | 61bc7362ca974543c9b851f8fc81fe981569ad6c (patch) | |
tree | f5a5420a6b4fa3cacc4ee3c2a9bddb2ebd6c632b /src/session.cc | |
parent | 30e8c0bc65a94819d8375c9359d6ce77d908dcfc (diff) | |
download | fork-ledger-61bc7362ca974543c9b851f8fc81fe981569ad6c.tar.gz fork-ledger-61bc7362ca974543c9b851f8fc81fe981569ad6c.tar.bz2 fork-ledger-61bc7362ca974543c9b851f8fc81fe981569ad6c.zip |
Added new account/payee/commodity directives
Also added supporting options: --explicit, --permissive, --pedantic, as
well as new behavior for --strict.
Diffstat (limited to 'src/session.cc')
-rw-r--r-- | src/session.cc | 13 |
1 files changed, 13 insertions, 0 deletions
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<archive_t> cache; if (HANDLED(cache_) && master_account.empty()) @@ -251,6 +261,7 @@ option_t<session_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> * 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); |