diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2008-11-16 08:06:56 +0000 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2008-11-16 08:06:56 +0000 |
| commit | 3c154144207cb5a403926872a2194eb5c61e18e6 (patch) | |
| tree | ac9e92bbb4a4da2199623d388deb2d59cc16b18b /src/option_processing.cc | |
| parent | adb4ef2168934c1f6223172768ba2218dc475765 (diff) | |
2008-11-16 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Added -V for the short form of --check-integrity option.
Now the argument of --check-integrity option is optional:
if it is omitted, it is evaluated as true.
* doc/aria2c.1.txt
* src/option_processing.cc
* src/usage_text.h
Diffstat (limited to 'src/option_processing.cc')
| -rw-r--r-- | src/option_processing.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/option_processing.cc b/src/option_processing.cc index 822a0b49..ce304ad3 100644 --- a/src/option_processing.cc +++ b/src/option_processing.cc @@ -140,7 +140,7 @@ Option* option_processing(int argc, char* const argv[]) { PREF_FILE_ALLOCATION.c_str(), required_argument, 0, 'a' }, { PREF_ALLOW_OVERWRITE.c_str(), required_argument, &lopt, 202 }, #ifdef ENABLE_MESSAGE_DIGEST - { PREF_CHECK_INTEGRITY.c_str(), required_argument, &lopt, 203 }, + { PREF_CHECK_INTEGRITY.c_str(), optional_argument, 0, 'V' }, { PREF_REALTIME_CHUNK_CHECKSUM.c_str(), required_argument, &lopt, 204 }, #endif // ENABLE_MESSAGE_DIGEST { PREF_CONTINUE.c_str(), no_argument, 0, 'c' }, @@ -229,7 +229,7 @@ Option* option_processing(int argc, char* const argv[]) { 0, 0, 0, 0 } }; c = getopt_long(argc, argv, - "Dd:o:l:s:pt:m:vh::ST:M:C:a:cU:ni:j:Z::P::q::R::", + "Dd:o:l:s:pt:m:vh::ST:M:C:a:cU:ni:j:Z::P::q::R::V::", longOpts, &optIndex); if(c == -1) { break; @@ -369,9 +369,6 @@ Option* option_processing(int argc, char* const argv[]) case 202: cmdstream << PREF_ALLOW_OVERWRITE << "=" << optarg << "\n"; break; - case 203: - cmdstream << PREF_CHECK_INTEGRITY << "=" << optarg << "\n"; - break; case 204: cmdstream << PREF_REALTIME_CHUNK_CHECKSUM << "=" << optarg << "\n"; break; @@ -541,6 +538,9 @@ Option* option_processing(int argc, char* const argv[]) case 'R': cmdstream << PREF_REMOTE_TIME << "=" << toBoolArg(optarg) << "\n"; break; + case 'V': + cmdstream << PREF_CHECK_INTEGRITY << "=" << toBoolArg(optarg) << "\n"; + break; case 'v': showVersion(); exit(EXIT_SUCCESS); |
