diff options
author | John Wiegley <johnw@newartisans.com> | 2009-02-05 21:18:37 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2009-02-05 21:20:09 -0400 |
commit | 408b819c6e087593ba61e82b91dda2369ef32f62 (patch) | |
tree | 68456c86187e00355d47c5794008b8226bd000e2 /src/main.cc | |
parent | 7b24e8f8e33049fe533cce2d2d473c6122460954 (diff) | |
download | fork-ledger-408b819c6e087593ba61e82b91dda2369ef32f62.tar.gz fork-ledger-408b819c6e087593ba61e82b91dda2369ef32f62.tar.bz2 fork-ledger-408b819c6e087593ba61e82b91dda2369ef32f62.zip |
Greatly simplified the way option and command handlers are defined.
Diffstat (limited to 'src/main.cc')
-rw-r--r-- | src/main.cc | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/main.cc b/src/main.cc index c8192082..72d84421 100644 --- a/src/main.cc +++ b/src/main.cc @@ -90,14 +90,13 @@ int main(int argc, char * argv[], char * envp[]) args = read_command_arguments(bound_scope, args); - if (! global_scope->script_file.empty() && - exists(global_scope->script_file)) { + if (global_scope->HANDLED(script_)) { // Ledger is being invoked as a script command interpreter global_scope->read_journal_files(); status = 0; - ifstream in(global_scope->script_file); + ifstream in(global_scope->HANDLER(script_).str()); while (status == 0 && ! in.eof()) { char line[1024]; in.getline(line, 1023); |