diff options
author | John Wiegley <johnw@newartisans.com> | 2006-02-27 23:52:31 +0000 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2008-04-13 02:41:27 -0400 |
commit | 7901598f1d1e419e19c860e81749805371298030 (patch) | |
tree | f3b4b42ad4217cd5a59eafb8cb8ffacea83b60ca /config.h | |
parent | 4507573d4fbc4ece6a4bb832b2e1fffae0885db8 (diff) | |
download | fork-ledger-7901598f1d1e419e19c860e81749805371298030.tar.gz fork-ledger-7901598f1d1e419e19c860e81749805371298030.tar.bz2 fork-ledger-7901598f1d1e419e19c860e81749805371298030.zip |
Checked in all major updates.
Diffstat (limited to 'config.h')
-rw-r--r-- | config.h | 22 |
1 files changed, 6 insertions, 16 deletions
@@ -42,7 +42,6 @@ class config_t std::string sort_string; std::string amount_expr; std::string total_expr; - std::string total_expr_template; std::string forecast_limit; std::string reconcile_balance; std::string reconcile_date; @@ -66,6 +65,7 @@ class config_t bool download_quotes; bool use_cache; bool cache_dirty; + bool debug_mode; config_t() { reset(); @@ -73,7 +73,6 @@ class config_t config_t(const config_t&) { assert(0); } - void reset(); void regexps_to_predicate(const std::string& command, @@ -100,24 +99,15 @@ class config_t std::list<item_handler<transaction_t> *>& ptrs); }; -extern std::list<option_t> config_options; +#define CONFIG_OPTIONS_SIZE 78 +extern option_t config_options[CONFIG_OPTIONS_SIZE]; void option_help(std::ostream& out); -struct declared_option_handler : public option_handler { - declared_option_handler(const std::string& label, - const std::string& opt_chars) { - add_option_handler(config_options, label, opt_chars, *this); - } -}; - -#define OPT_BEGIN(tag, chars) \ - static struct opt_ ## tag ## _handler \ - : public declared_option_handler { \ - opt_ ## tag ## _handler() : declared_option_handler(#tag, chars) {} \ - virtual void operator()(const char * optarg) +#define OPT_BEGIN(tag, chars) \ + void opt_ ## tag(const char * optarg) -#define OPT_END(tag) } opt_ ## tag ## _handler_obj +#define OPT_END(tag) } // namespace ledger |