From aee621b3d40a270d827f5d3441dfccec66705ca9 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Thu, 2 May 2013 10:03:00 +0900 Subject: Don't exit on error in option_processing Still it exits when -v or -h is given. They are now guarded by standalone variable and only do so when it is true. --- src/Context.cc | 18 ++++++++++---- src/aria2api.cc | 7 +++++- src/option_processing.cc | 63 +++++++++++++++++++++++++----------------------- 3 files changed, 52 insertions(+), 36 deletions(-) diff --git a/src/Context.cc b/src/Context.cc index 7543a28f..81022e24 100644 --- a/src/Context.cc +++ b/src/Context.cc @@ -175,17 +175,25 @@ void showFiles } // namespace #endif // ENABLE_BITTORRENT || ENABLE_METALINK -extern void option_processing(Option& option, bool standalone, - std::vector& uris, - int argc, char** argv, const KeyVals& options); +extern error_code::Value option_processing(Option& option, bool standalone, + std::vector& uris, + int argc, char** argv, + const KeyVals& options); Context::Context(bool standalone, int argc, char** argv, const KeyVals& options) { std::vector args; SharedHandle