diff options
author | John Wiegley <johnw@newartisans.com> | 2009-02-08 19:54:39 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2009-02-08 19:54:39 -0400 |
commit | 4f5799c216df4a1b57bc5c59f286a685b0f77448 (patch) | |
tree | da0f9ad92191808ed4dad1c0b566276e836470bc /src | |
parent | 455b6e27cbede32571af20f21d47817fdadfd330 (diff) | |
download | fork-ledger-4f5799c216df4a1b57bc5c59f286a685b0f77448.tar.gz fork-ledger-4f5799c216df4a1b57bc5c59f286a685b0f77448.tar.bz2 fork-ledger-4f5799c216df4a1b57bc5c59f286a685b0f77448.zip |
If a ledger file is specified in .ledgerrc, ignore the environment.
Diffstat (limited to 'src')
-rw-r--r-- | src/global.cc | 5 | ||||
-rw-r--r-- | src/main.cc | 2 | ||||
-rw-r--r-- | src/session.h | 2 |
3 files changed, 5 insertions, 4 deletions
diff --git a/src/global.cc b/src/global.cc index 33c8fcd8..939a51b2 100644 --- a/src/global.cc +++ b/src/global.cc @@ -60,8 +60,9 @@ global_scope_t::global_scope_t(char ** envp) // Before processing command-line options, we must notify the session object // that such options are beginning, since options like -f cause a complete // override of files found anywhere else. - session().now_at_command_line(false); + session().set_flush_on_next_data_file(true); read_environment_settings(envp); + session().set_flush_on_next_data_file(true); read_init(); } @@ -144,7 +145,7 @@ void global_scope_t::report_error(const std::exception& err) void global_scope_t::execute_command(strings_list args, bool at_repl) { - session().now_at_command_line(true); + session().set_flush_on_next_data_file(true); // Process the command verb, arguments and options args = read_command_arguments(report(), args); diff --git a/src/main.cc b/src/main.cc index 3b985ec6..30a54b3b 100644 --- a/src/main.cc +++ b/src/main.cc @@ -78,7 +78,7 @@ int main(int argc, char * argv[], char * envp[]) std::auto_ptr<global_scope_t> global_scope(new global_scope_t(envp)); try { - global_scope->session().now_at_command_line(true); + global_scope->session().set_flush_on_next_data_file(true); // Construct an STL-style argument list from the process command arguments strings_list args; diff --git a/src/session.h b/src/session.h index 179d2b75..6ee7af9d 100644 --- a/src/session.h +++ b/src/session.h @@ -75,7 +75,7 @@ public: TRACE_DTOR(session_t); } - void now_at_command_line(const bool truth) { + void set_flush_on_next_data_file(const bool truth) { flush_on_next_data_file = true; } |