summaryrefslogtreecommitdiff
path: root/src/session.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/session.h')
-rw-r--r--src/session.h31
1 files changed, 20 insertions, 11 deletions
diff --git a/src/session.h b/src/session.h
index 1d700d1b..5d6a12b9 100644
--- a/src/session.h
+++ b/src/session.h
@@ -101,11 +101,15 @@ public:
clean_accounts();
}
- value_t fn_now(call_scope_t&) {
- return CURRENT_TIME();
- }
- value_t fn_today(call_scope_t&) {
- return CURRENT_DATE();
+ void report_options(std::ostream& out)
+ {
+ HANDLER(account_).report(out);
+ HANDLER(download).report(out);
+ HANDLER(file_).report(out);
+ HANDLER(input_date_format_).report(out);
+ HANDLER(price_db_).report(out);
+ HANDLER(price_exp_).report(out);
+ HANDLER(strict).report(out);
}
option_t<session_t> * lookup_option(const char * p);
@@ -120,10 +124,10 @@ public:
OPTION(session_t, download); // -Q
OPTION__
- (session_t, leeway_,
- CTOR(session_t, leeway_) { value = 24L * 3600L; }
+ (session_t, price_exp_, // -Z
+ CTOR(session_t, price_exp_) { value = 24L * 3600L; }
DO_(args) {
- value = args[0].to_long() * 60L;
+ value = args[1].to_long() * 60L;
});
OPTION__
@@ -131,15 +135,20 @@ public:
std::list<path> data_files;
CTOR(session_t, file_) {}
DO_(args) {
- assert(args.size() == 1);
+ assert(args.size() == 2);
if (parent->flush_on_next_data_file) {
data_files.clear();
parent->flush_on_next_data_file = false;
}
- data_files.push_back(args[0].as_string());
+ data_files.push_back(args[1].as_string());
});
- OPTION(session_t, input_date_format_);
+ OPTION_(session_t, input_date_format_, DO_(args) {
+ // This changes the global variable inside times.h, which affects the
+ // basic date parser
+ input_date_format = args[1].as_string();
+ });
+
OPTION(session_t, price_db_);
OPTION(session_t, strict);
};