summaryrefslogtreecommitdiff
path: root/src/global.h
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2009-06-02 19:14:46 +0100
committerJohn Wiegley <johnw@newartisans.com>2009-06-02 19:14:46 +0100
commitc79fd9e72de4c2355ddb867bf269973bdd2cfd00 (patch)
treed5dcc657961a3d1b6cfee3d49e7f5169b44fc13b /src/global.h
parente2092d07d85079215a0e068eb46c0d41bbd28a54 (diff)
downloadfork-ledger-c79fd9e72de4c2355ddb867bf269973bdd2cfd00.tar.gz
fork-ledger-c79fd9e72de4c2355ddb867bf269973bdd2cfd00.tar.bz2
fork-ledger-c79fd9e72de4c2355ddb867bf269973bdd2cfd00.zip
Added new debug option --options
This reports which options are in place before invoking a command, and where exactly each option value came from.
Diffstat (limited to 'src/global.h')
-rw-r--r--src/global.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/global.h b/src/global.h
index 2ef5a545..df9845d5 100644
--- a/src/global.h
+++ b/src/global.h
@@ -113,6 +113,8 @@ See LICENSE file included with the distribution for details and disclaimer.");
out << std::endl;
}
+ void report_options(report_t& report, std::ostream& out);
+
option_t<global_scope_t> * lookup_option(const char * p);
virtual expr_t::ptr_op_t lookup(const string& name);
@@ -133,11 +135,12 @@ See LICENSE file included with the distribution for details and disclaimer.");
CTOR(global_scope_t, init_file_) {
if (const char * home_var = std::getenv("HOME"))
- on((path(home_var) / ".ledgerrc").string());
+ on(none, (path(home_var) / ".ledgerrc").string());
else
- on(path("./.ledgerrc").string());
+ on(none, path("./.ledgerrc").string());
});
+ OPTION(global_scope_t, options);
OPTION(global_scope_t, script_);
OPTION(global_scope_t, trace_);
OPTION(global_scope_t, verbose);