浏览代码

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
Tatsuhiro Tsujikawa 17 年之前
父节点
当前提交
3c15414420
共有 6 个文件被更改,包括 45 次插入36 次删除
  1. 9 0
      ChangeLog
  2. 7 7
      doc/aria2c.1
  3. 9 9
      doc/aria2c.1.html
  4. 13 13
      doc/aria2c.1.txt
  5. 5 5
      src/option_processing.cc
  6. 2 2
      src/usage_text.h

+ 9 - 0
ChangeLog

@@ -1,3 +1,12 @@
+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
+
 2008-11-16  Tatsuhiro Tsujikawa  <t-tujikawa@users.sourceforge.net>
 
 	Made the default value of --ftp-pasv option set to true and it can take

+ 7 - 7
doc/aria2c.1

@@ -54,9 +54,9 @@ option\&. Default:
 \fI5\fR
 .RE
 .PP
-\fB\-\-check\-integrity\fR=\fItrue\fR|\fIfalse\fR
+\fB\-V\fR, \fB\-\-check\-integrity\fR[=\fItrue\fR|\fIfalse\fR]
 .RS 4
-Check file integrity by validating piece hash\&. This option only affects in BitTorrent downloads and Metalink downloads with chunk checksums\&. Use this option to re\-download a damaged portion of a file\&. Default:
+Check file integrity by validating piece hashes\&. This option has effect only in BitTorrent and Metalink downloads with chunk checksums\&. Use this option to re\-download a damaged portion of a file\&. Default:
 \fIfalse\fR
 .RE
 .PP
@@ -1310,12 +1310,12 @@ aria2c \-\-max\-download\-limit=100K file\&.metalink
 .nr an-no-space-flag 1
 .nr an-break-flag 1
 .br
-Repair a damaged download using --check-integrity option
+Repair a damaged download using -V option
 .RS
 .sp
 .RS 4
 .nf
-aria2c \-\-check\-integrity=true file\&.metalink
+aria2c \-V file\&.metalink
 .fi
 .RE
 .sp
@@ -1422,15 +1422,15 @@ aria2 uses a control file to keep track the progress of download\&. A control fi
 .sp
 Usually a control file is deleted once download completed\&. If aria2 decides that download cannot be resumed(for example, when downloading a file from a HTTP server which doesn\'t support resume), a control file is not created\&.
 .sp
-Normally if you lose a control file, you cannot resume download\&. But if you have a torrent or metalink with chunk checksums for the file, you can resume the download without a control file by giving \-\-check\-integrity=true option to aria2c in command\-line\&.
+Normally if you lose a control file, you cannot resume download\&. But if you have a torrent or metalink with chunk checksums for the file, you can resume the download without a control file by giving \-V option to aria2c in command\-line\&.
 .sp
 .SH "SEEDING DOWNLOADED FILE IN BITTORRENT"
-You can seed downloaded file using \-\-check\-integrity=true option\&.
+You can seed downloaded file using \-V option\&.
 .sp
 .sp
 .RS 4
 .nf
-aria2c \-\-check\-integrity=true file\&.torrent
+aria2c \-V file\&.torrent
 .fi
 .RE
 .SH "INPUT FILE"

+ 9 - 9
doc/aria2c.1.html

@@ -424,12 +424,12 @@ ARIA2C(1) Manual Page
 </p>
 </dd>
 <dt>
-<strong>--check-integrity</strong>=<em>true</em>|<em>false</em>
+<strong>-V</strong>, <strong>--check-integrity</strong>[=<em>true</em>|<em>false</em>]
 </dt>
 <dd>
 <p>
-  Check file integrity by validating piece hash.
-  This option only affects in BitTorrent downloads and Metalink downloads with
+  Check file integrity by validating piece hashes.
+  This option has effect only in BitTorrent and Metalink downloads with
   chunk checksums.
   Use this option to re-download a damaged portion of a file.
   Default: <em>false</em>
@@ -1732,10 +1732,10 @@ encrypted one is given is undefined.</td>
 <div class="content">
 <pre><tt>aria2c --max-download-limit=100K file.metalink</tt></pre>
 </div></div>
-<h4 id="_repair_a_damaged_download_using_check_integrity_option">Repair a damaged download using --check-integrity option</h4>
+<h4 id="_repair_a_damaged_download_using_v_option">Repair a damaged download using -V option</h4>
 <div class="listingblock">
 <div class="content">
-<pre><tt>aria2c --check-integrity=true file.metalink</tt></pre>
+<pre><tt>aria2c -V file.metalink</tt></pre>
 </div></div>
 <div class="admonitionblock">
 <table><tr>
@@ -1812,14 +1812,14 @@ not created.</p></div>
 <div class="para"><p>Normally if you lose a control file, you cannot resume download.
 But if you have a torrent or metalink with chunk checksums for the file,
 you can resume the download without a control file by giving
---check-integrity=true option to aria2c in command-line.</p></div>
+-V option to aria2c in command-line.</p></div>
 </div>
 <h2 id="_seeding_downloaded_file_in_bittorrent">SEEDING DOWNLOADED FILE IN BITTORRENT</h2>
 <div class="sectionbody">
-<div class="para"><p>You can seed downloaded file using --check-integrity=true option.</p></div>
+<div class="para"><p>You can seed downloaded file using -V option.</p></div>
 <div class="listingblock">
 <div class="content">
-<pre><tt>aria2c --check-integrity=true file.torrent</tt></pre>
+<pre><tt>aria2c -V file.torrent</tt></pre>
 </div></div>
 </div>
 <h2 id="_input_file">INPUT FILE</h2>
@@ -2021,7 +2021,7 @@ files in the program, then also delete it here.</p></div>
 </div>
 <div id="footer">
 <div id="footer-text">
-Last updated 2008-11-16 13:40:15 JST
+Last updated 2008-11-16 13:49:20 JST
 </div>
 </div>
 </body>

+ 13 - 13
doc/aria2c.1.txt

@@ -39,9 +39,9 @@ Basic Options
   torrent and metalink. See also *-s* and *-C* option.
   Default: '5'
 
-*--check-integrity*='true'|'false'::
-  Check file integrity by validating piece hash.
-  This option only affects in BitTorrent downloads and Metalink downloads with
+*-V*, *--check-integrity*[='true'|'false']::
+  Check file integrity by validating piece hashes.
+  This option has effect only in BitTorrent and Metalink downloads with
   chunk checksums.
   Use this option to re-download a damaged portion of a file.
   Default: 'false'
@@ -791,11 +791,11 @@ Throttle download speed
 aria2c --max-download-limit=100K file.metalink
 -------------------------------------------------
 
-Repair a damaged download using --check-integrity option
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-----------------------------------------------
-aria2c --check-integrity=true file.metalink
-----------------------------------------------
+Repair a damaged download using -V option
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+-----------------------
+aria2c -V file.metalink
+-----------------------
 [NOTE]
 This option is only available used with BitTorrent or metalink with chunk
 checksums.
@@ -867,14 +867,14 @@ not created.
 Normally if you lose a control file, you cannot resume download.
 But if you have a torrent or metalink with chunk checksums for the file,
 you can resume the download without a control file by giving
---check-integrity=true option to aria2c in command-line.
+-V option to aria2c in command-line.
 
 SEEDING DOWNLOADED FILE IN BITTORRENT
 -------------------------------------
-You can seed downloaded file using --check-integrity=true option.
----------------------------------------------
-aria2c --check-integrity=true file.torrent
----------------------------------------------
+You can seed downloaded file using -V option.
+----------------------
+aria2c -V file.torrent
+----------------------
 
 INPUT FILE
 ----------

+ 5 - 5
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);

+ 2 - 2
src/usage_text.h

@@ -156,8 +156,8 @@ _(" --enable-http-keep-alive[=true|false] Enable HTTP/1.1 persistent connection.
 #define TEXT_ENABLE_HTTP_PIPELINING \
 _(" --enable-http-pipelining[=true|false] Enable HTTP/1.1 pipelining.")
 #define TEXT_CHECK_INTEGRITY \
-_(" --check-integrity=true|false  Check file integrity by validating piece hash.\n"\
-  "                              This option only affects in BitTorrent downloads\n"\
+_(" -V, --check-integrity[=true|false] Check file integrity by validating piece\n"\
+  "                              hashes. This option has effect only in BitTorrent\n"\
   "                              and Metalink downloads with chunk checksums.\n"\
   "                              Use this option to re-download a damaged portion\n"\
   "                              of a file.")