diff options
author | John Wiegley <johnw@newartisans.com> | 2009-02-04 18:23:18 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2009-02-04 19:55:08 -0400 |
commit | 73cf3b01fbd50c3a8a4fd96ff69643c28394d8fe (patch) | |
tree | 695fde78e03351750210715ea76ec686ff04fbfc /src/work.cc | |
parent | b9603a1512acdfeb5d304e5ae910c1da553b3337 (diff) | |
download | fork-ledger-73cf3b01fbd50c3a8a4fd96ff69643c28394d8fe.tar.gz fork-ledger-73cf3b01fbd50c3a8a4fd96ff69643c28394d8fe.tar.bz2 fork-ledger-73cf3b01fbd50c3a8a4fd96ff69643c28394d8fe.zip |
Added structural support in main() for using a REPL.
Diffstat (limited to 'src/work.cc')
-rw-r--r-- | src/work.cc | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/src/work.cc b/src/work.cc index a54b1352..9bd75c9c 100644 --- a/src/work.cc +++ b/src/work.cc @@ -97,22 +97,15 @@ void read_environment_settings(report_t& report, char * envp[]) TRACE_FINISH(environment, 1); } -strings_list -read_command_line_arguments(report_t& report, int argc, char * argv[]) +strings_list read_command_arguments(report_t& report, strings_list args) { TRACE_START(arguments, 1, "Processed command-line arguments"); - strings_list args; - process_arguments(argc - 1, argv + 1, report, args); - - if (args.empty()) { - help(std::cout); - throw int(1); - } + strings_list remaining = process_arguments(args, report); TRACE_FINISH(arguments, 1); - return args; + return remaining; } void normalize_session_options(session_t& session) |