From c79fd9e72de4c2355ddb867bf269973bdd2cfd00 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Tue, 2 Jun 2009 19:14:46 +0100 Subject: Added new debug option --options This reports which options are in place before invoking a command, and where exactly each option value came from. --- src/global.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/global.h') 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 * 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); -- cgit v1.2.3