Browse Source

2007-08-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>

	Added parameterized URI support.
	* src/main.cc: -Z option added.
	* src/OptionHandlerFactory.cc
	* src/prefs.h: Added PREF_FORCE_SEQUENTIAL.
	* src/PStringDatum.h: New class.
	* src/PStringSegment.{h,cc}: New class.
	* src/PStringNumLoop.h: New class.
	* src/PStringSelect.h: New class.
	* src/NumberDecorator.h: New class.
	* src/FixedWidthNumberDecorator.h: New class.
	* src/AlphaNumberDecorator.h: New class.
	* src/PStringVisitor.h: New class.
	* src/PStringBuildVisitor.{h,cc}: New class.
	* src/ParameterizedStringParser.{h,cc}: New class.
	* src/Util.{h,cc}
	(isNumber): New function.
	(isLowercase): New function.
	(isUppercase): New function.
	(alphaToNum): New function.
	* test/ParameterizedStringParserTest.cc: New class.
	* test/AlphaNumberDecoratorTest.cc: New class.
	* test/PStringBuildVisitorTest.cc: New class.
	* test/UtilTest.cc
	(testIsNumber): New function.
	(testIsLowercase): New function.
	(testIsUppercase): New function.
	(testAlphaToNum): New function.
	
	Added '\n' after the error message
	* src/RequestInfo.h (printDownloadAbortMessage)
Tatsuhiro Tsujikawa 18 years ago
parent
commit
7fb4336d5e

+ 33 - 0
ChangeLog

@@ -1,3 +1,36 @@
+2007-08-28  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
+
+	Added parameterized URI support.
+	* src/main.cc: -Z option added.
+	* src/OptionHandlerFactory.cc
+	* src/prefs.h: Added PREF_FORCE_SEQUENTIAL.
+	* src/PStringDatum.h: New class.
+	* src/PStringSegment.{h,cc}: New class.
+	* src/PStringNumLoop.h: New class.
+	* src/PStringSelect.h: New class.
+	* src/NumberDecorator.h: New class.
+	* src/FixedWidthNumberDecorator.h: New class.
+	* src/AlphaNumberDecorator.h: New class.
+	* src/PStringVisitor.h: New class.
+	* src/PStringBuildVisitor.{h,cc}: New class.
+	* src/ParameterizedStringParser.{h,cc}: New class.
+	* src/Util.{h,cc}
+	(isNumber): New function.
+	(isLowercase): New function.
+	(isUppercase): New function.
+	(alphaToNum): New function.
+	* test/ParameterizedStringParserTest.cc: New class.
+	* test/AlphaNumberDecoratorTest.cc: New class.
+	* test/PStringBuildVisitorTest.cc: New class.
+	* test/UtilTest.cc
+	(testIsNumber): New function.
+	(testIsLowercase): New function.
+	(testIsUppercase): New function.
+	(testAlphaToNum): New function.
+	
+	Added '\n' after the error message
+	* src/RequestInfo.h (printDownloadAbortMessage)
+	
 2007-08-26  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
 	Merged Ross's patch: Removed setmode(). Use _CRT_fmode to enable binary

+ 3 - 3
TODO

@@ -38,8 +38,8 @@
 * time related headers and compatible macros and definition -> a2time.h
 * used globally -> common.h
 
-* Rewrite MetaFileUtil
-* Add parameterized URI support
 * Add pgp verification support. I have to use libgpgme??
-* Add outfile auto renaming
 * Disable segmented download in .metalink
+
+* Add outfile auto renaming
+* Rewrite MetaFileUtil

+ 93 - 77
po/aria2c.pot

@@ -8,7 +8,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: http://aria2.sourceforge.net/\n"
-"POT-Creation-Date: 2007-08-09 23:54+0900\n"
+"POT-Creation-Date: 2007-08-28 20:46+0900\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -794,11 +794,11 @@ msgstr ""
 msgid "Errors occurred while binding port.\n"
 msgstr ""
 
-#: src/main.cc:89
+#: src/main.cc:91
 msgid " version "
 msgstr ""
 
-#: src/main.cc:99
+#: src/main.cc:101
 msgid ""
 "This program is free software; you can redistribute it and/or modify\n"
 "it under the terms of the GNU General Public License as published by\n"
@@ -816,49 +816,49 @@ msgid ""
 "USA\n"
 msgstr ""
 
-#: src/main.cc:113
+#: src/main.cc:115
 msgid "Contact Info:"
 msgstr ""
 
-#: src/main.cc:120
+#: src/main.cc:122
 #, c-format
 msgid "Usage: %s [options] URL ...\n"
 msgstr ""
 
-#: src/main.cc:122
+#: src/main.cc:124
 #, c-format
 msgid "       %s [options] -T TORRENT_FILE FILE ...\n"
 msgstr ""
 
-#: src/main.cc:125
+#: src/main.cc:127
 #, c-format
 msgid "       %s [options] -M METALINK_FILE\n"
 msgstr ""
 
-#: src/main.cc:128
+#: src/main.cc:130
 msgid "Options:"
 msgstr ""
 
-#: src/main.cc:129
+#: src/main.cc:131
 msgid ""
 " -d, --dir=DIR                The directory to store the downloaded file."
 msgstr ""
 
-#: src/main.cc:130
+#: src/main.cc:132
 msgid " -o, --out=FILE               The file name of the downloaded file."
 msgstr ""
 
-#: src/main.cc:131
+#: src/main.cc:133
 msgid ""
 " -l, --log=LOG                The file name of the log file. If '-' is\n"
 "                              specified, log is written to stdout."
 msgstr ""
 
-#: src/main.cc:134
+#: src/main.cc:136
 msgid " -D, --daemon                 Run as daemon."
 msgstr ""
 
-#: src/main.cc:136
+#: src/main.cc:138
 msgid ""
 " -s, --split=N                Download a file using N connections. N must "
 "be\n"
@@ -869,7 +869,7 @@ msgid ""
 "                              Default: 1"
 msgstr ""
 
-#: src/main.cc:141
+#: src/main.cc:143
 msgid ""
 " --retry-wait=SEC             Set the seconds to wait to retry after an "
 "error\n"
@@ -878,47 +878,47 @@ msgid ""
 "                              Default: 5"
 msgstr ""
 
-#: src/main.cc:144
+#: src/main.cc:146
 msgid " -t, --timeout=SEC            Set timeout in seconds. Default: 60"
 msgstr ""
 
-#: src/main.cc:145
+#: src/main.cc:147
 msgid ""
 " -m, --max-tries=N            Set number of tries. 0 means unlimited.\n"
 "                              Default: 5"
 msgstr ""
 
-#: src/main.cc:153
+#: src/main.cc:155
 msgid ""
 " --http-proxy=HOST:PORT       Use HTTP proxy server. This affects all URLs."
 msgstr ""
 
-#: src/main.cc:154
+#: src/main.cc:156
 msgid " --http-user=USER             Set HTTP user. This affects all URLs."
 msgstr ""
 
-#: src/main.cc:155
+#: src/main.cc:157
 msgid " --http-passwd=PASSWD         Set HTTP password. This affects all URLs."
 msgstr ""
 
-#: src/main.cc:156
+#: src/main.cc:158
 msgid ""
 " --http-proxy-user=USER       Set HTTP proxy user. This affects all URLs."
 msgstr ""
 
-#: src/main.cc:157
+#: src/main.cc:159
 msgid ""
 " --http-proxy-passwd=PASSWD   Set HTTP proxy password. This affects all URLs."
 msgstr ""
 
-#: src/main.cc:158
+#: src/main.cc:160
 msgid ""
 " --http-proxy-method=METHOD   Set the method to use in proxy request.\n"
 "                              METHOD is either 'get' or 'tunnel'.\n"
 "                              Default: tunnel"
 msgstr ""
 
-#: src/main.cc:161
+#: src/main.cc:163
 msgid ""
 " --http-auth-scheme=SCHEME    Set HTTP authentication scheme. Currently, "
 "basic\n"
@@ -926,23 +926,23 @@ msgid ""
 "                              Default: basic"
 msgstr ""
 
-#: src/main.cc:164
+#: src/main.cc:166
 msgid " --referer=REFERER            Set Referer. This affects all URLs."
 msgstr ""
 
-#: src/main.cc:165
+#: src/main.cc:167
 msgid ""
 " --ftp-user=USER              Set FTP user. This affects all URLs.\n"
 "                              Default: anonymous"
 msgstr ""
 
-#: src/main.cc:167
+#: src/main.cc:169
 msgid ""
 " --ftp-passwd=PASSWD          Set FTP password. This affects all URLs.\n"
 "                              Default: ARIA2USER@"
 msgstr ""
 
-#: src/main.cc:169
+#: src/main.cc:171
 msgid ""
 " --ftp-type=TYPE              Set FTP transfer type. TYPE is either "
 "'binary'\n"
@@ -950,11 +950,11 @@ msgid ""
 "                              Default: binary"
 msgstr ""
 
-#: src/main.cc:172
+#: src/main.cc:174
 msgid " -p, --ftp-pasv               Use passive mode in FTP."
 msgstr ""
 
-#: src/main.cc:173
+#: src/main.cc:175
 msgid ""
 " --ftp-via-http-proxy=METHOD  Use HTTP proxy in FTP. METHOD is either 'get' "
 "or\n"
@@ -962,7 +962,7 @@ msgid ""
 "                              Default: tunnel"
 msgstr ""
 
-#: src/main.cc:176
+#: src/main.cc:178
 msgid ""
 " --lowest-speed-limit=SPEED   Close connection if download speed is lower "
 "than\n"
@@ -975,7 +975,7 @@ msgid ""
 "                              Default: 0"
 msgstr ""
 
-#: src/main.cc:183
+#: src/main.cc:185
 msgid ""
 " --max-download-limit=SPEED   Set max download speed in bytes per sec.\n"
 "                              0 means unrestricted.\n"
@@ -983,7 +983,7 @@ msgid ""
 "                              Default: 0"
 msgstr ""
 
-#: src/main.cc:187
+#: src/main.cc:189
 msgid ""
 " --file-allocation=METHOD     Specify file allocation method. METHOD is "
 "either\n"
@@ -997,7 +997,7 @@ msgid ""
 "                              Default: none"
 msgstr ""
 
-#: src/main.cc:193
+#: src/main.cc:195
 msgid ""
 " --allow-overwrite=true|false If false, aria2 doesn't download a file which\n"
 "                              already exists but the corresponding .aria2 "
@@ -1006,7 +1006,15 @@ msgid ""
 "                              Default: false"
 msgstr ""
 
-#: src/main.cc:198
+#: src/main.cc:199
+msgid ""
+" -Z, --force-sequential       Fetch URIs in the command-line sequentially "
+"and\n"
+"                              download each URI in a separate session, like\n"
+"                              the usual command-line download utilities."
+msgstr ""
+
+#: src/main.cc:204
 msgid ""
 " --check-integrity=true|false  Check file integrity by validating piece "
 "hash.\n"
@@ -1022,7 +1030,7 @@ msgid ""
 "                              Default: false"
 msgstr ""
 
-#: src/main.cc:206
+#: src/main.cc:212
 msgid ""
 " --realtime-chunk-checksum=true|false  Validate chunk checksum while\n"
 "                              downloading a file in Metalink mode. This "
@@ -1032,7 +1040,7 @@ msgid ""
 "                              Default: true"
 msgstr ""
 
-#: src/main.cc:211
+#: src/main.cc:217
 msgid ""
 " -c, --continue               Continue downloading a partially downloaded\n"
 "                              file. Use this option to resume a download\n"
@@ -1042,15 +1050,15 @@ msgid ""
 "                              applicable to http(s)/ftp downloads."
 msgstr ""
 
-#: src/main.cc:217
+#: src/main.cc:223
 msgid " -U, --user-agent=USER_AGENT  Set user agent for http(s) downloads."
 msgstr ""
 
-#: src/main.cc:218
+#: src/main.cc:224
 msgid " -n, --no-netrc               Disables netrc support."
 msgstr ""
 
-#: src/main.cc:219
+#: src/main.cc:225
 msgid ""
 " -i, --input-file=FILE        Downloads URIs found in FILE. You can specify\n"
 "                              multiple URIs for a single entity: separate\n"
@@ -1059,7 +1067,7 @@ msgid ""
 "                              Reads input from stdin when '-' is specified."
 msgstr ""
 
-#: src/main.cc:223
+#: src/main.cc:229
 msgid ""
 " -j, --max-concurrent-downloads=N Set maximum number of concurrent "
 "downloads.\n"
@@ -1067,20 +1075,20 @@ msgid ""
 "                              Default: 5"
 msgstr ""
 
-#: src/main.cc:226
+#: src/main.cc:232
 msgid ""
 " --load-cookies=FILE          Load cookies from FILE. The format of FILE is\n"
 "                              the same used by Netscape and Mozilla."
 msgstr ""
 
-#: src/main.cc:229
+#: src/main.cc:235
 msgid ""
 " -S, --show-files             Print file listing of .torrent or .metalink "
 "file\n"
 "                              and exit."
 msgstr ""
 
-#: src/main.cc:231
+#: src/main.cc:237
 msgid ""
 " --select-file=INDEX...       Set file to download by specifing its index.\n"
 "                              You can find the file index using the\n"
@@ -1094,11 +1102,11 @@ msgid ""
 "options)."
 msgstr ""
 
-#: src/main.cc:241
+#: src/main.cc:247
 msgid " -T, --torrent-file=TORRENT_FILE  The path to the .torrent file."
 msgstr ""
 
-#: src/main.cc:242
+#: src/main.cc:248
 msgid ""
 " --follow-torrent=true|false  Set to false to prevent aria2 from\n"
 "                              entering BitTorrent mode even if the filename "
@@ -1107,20 +1115,20 @@ msgid ""
 "                              Default: true"
 msgstr ""
 
-#: src/main.cc:246
+#: src/main.cc:252
 msgid ""
 " --direct-file-mapping=true|false Directly read from and write to each file\n"
 "                              mentioned in .torrent file.\n"
 "                              Default: true"
 msgstr ""
 
-#: src/main.cc:249
+#: src/main.cc:255
 msgid ""
 " --listen-port=PORT           Set TCP port number for BitTorrent downloads.\n"
 "                              Default: 6881-6999"
 msgstr ""
 
-#: src/main.cc:251
+#: src/main.cc:257
 msgid ""
 " --max-upload-limit=SPEED     Set max upload speed in bytes per sec.\n"
 "                              0 means unrestricted.\n"
@@ -1128,13 +1136,13 @@ msgid ""
 "                              Default: 0"
 msgstr ""
 
-#: src/main.cc:255
+#: src/main.cc:261
 msgid ""
 " --seed-time=MINUTES          Specify seeding time in minutes. Also see the\n"
 "                              --seed-ratio option."
 msgstr ""
 
-#: src/main.cc:257
+#: src/main.cc:263
 msgid ""
 " --seed-ratio=RATIO           Specify share ratio. Seed completed torrents\n"
 "                              until share ratio reaches RATIO. 1.0 is\n"
@@ -1144,7 +1152,7 @@ msgid ""
 "                              least one of the conditions is satisfied."
 msgstr ""
 
-#: src/main.cc:262
+#: src/main.cc:268
 msgid ""
 " --peer-id-prefix=PEERI_ID_PREFIX Specify the prefix of peer ID. The peer ID "
 "in\n"
@@ -1157,35 +1165,35 @@ msgid ""
 "                              Default: -aria2-"
 msgstr ""
 
-#: src/main.cc:271
+#: src/main.cc:277
 msgid " -M, --metalink-file=METALINK_FILE The file path to the .metalink file."
 msgstr ""
 
-#: src/main.cc:272
+#: src/main.cc:278
 msgid ""
 " -C, --metalink-servers=NUM_SERVERS The number of servers to connect to\n"
 "                              simultaneously.\n"
 "                              Default: 5"
 msgstr ""
 
-#: src/main.cc:275
+#: src/main.cc:281
 msgid " --metalink-version=VERSION   The version of the file to download."
 msgstr ""
 
-#: src/main.cc:276
+#: src/main.cc:282
 msgid " --metalink-language=LANGUAGE The language of the file to download."
 msgstr ""
 
-#: src/main.cc:277
+#: src/main.cc:283
 msgid ""
 " --metalink-os=OS             The operating system of the file to download."
 msgstr ""
 
-#: src/main.cc:278
+#: src/main.cc:284
 msgid " --metalink-location=LOCATION The location of the prefered server."
 msgstr ""
 
-#: src/main.cc:279
+#: src/main.cc:285
 msgid ""
 " --follow-metalink=true|false Set to false to prevent aria2 from\n"
 "                              entering Metalink mode even if the filename "
@@ -1194,85 +1202,93 @@ msgid ""
 "                              Default: true"
 msgstr ""
 
-#: src/main.cc:284
+#: src/main.cc:290
 msgid " -v, --version                Print the version number and exit."
 msgstr ""
 
-#: src/main.cc:285
+#: src/main.cc:291
 msgid " -h, --help                   Print this message and exit."
 msgstr ""
 
-#: src/main.cc:288
+#: src/main.cc:294
 msgid ""
 " You can specify multiple URLs. All URLs must point to the same file\n"
 " or downloading will fail."
 msgstr ""
 
-#: src/main.cc:293
+#: src/main.cc:299
 msgid ""
 " Specify files in multi-file torrent to download. Use in conjunction with "
 "the\n"
 " -T option. This argument is ignored if you specify the --select-file option."
 msgstr ""
 
-#: src/main.cc:297
+#: src/main.cc:303
 msgid "Examples:"
 msgstr ""
 
-#: src/main.cc:298
+#: src/main.cc:304
 msgid " Download a file using 1 connection:"
 msgstr ""
 
-#: src/main.cc:300
+#: src/main.cc:306
 msgid " Download a file using 2 connections:"
 msgstr ""
 
-#: src/main.cc:302
+#: src/main.cc:308
 msgid ""
 " Download a file using 2 connections, each connects to a different server:"
 msgstr ""
 
-#: src/main.cc:304
+#: src/main.cc:310
 msgid " You can mix up different protocols:"
 msgstr ""
 
-#: src/main.cc:308
+#: src/main.cc:312
+msgid " Parameterized URI:"
+msgstr ""
+
+#: src/main.cc:314
+msgid " Parameterized URI. -Z option must be specified:"
+msgstr ""
+
+#: src/main.cc:318
 msgid " Download a torrent:"
 msgstr ""
 
-#: src/main.cc:310
+#: src/main.cc:320
 msgid " Download a torrent using a local .torrent file:"
 msgstr ""
 
-#: src/main.cc:312 src/main.cc:325
+#: src/main.cc:322 src/main.cc:335
 msgid " Download only selected files:"
 msgstr ""
 
-#: src/main.cc:314
+#: src/main.cc:324
 msgid " Print file listing of .torrent file:"
 msgstr ""
 
-#: src/main.cc:319
+#: src/main.cc:329
 msgid " Metalink downloading:"
 msgstr ""
 
-#: src/main.cc:321
+#: src/main.cc:331
 msgid " Download a file using local .metalink file:"
 msgstr ""
 
-#: src/main.cc:323
+#: src/main.cc:333
 msgid " Metalink downloading with preferences:"
 msgstr ""
 
-#: src/main.cc:327
+#: src/main.cc:337
 msgid " Download only selected files using index:"
 msgstr ""
 
-#: src/main.cc:329
+#: src/main.cc:339
 msgid " Print file listing of .metalink file:"
 msgstr ""
 
-#: src/main.cc:333
+#: src/main.cc:343
 #, c-format
 msgid "Report bugs to %s"
 msgstr ""

BIN
po/de.gmo


+ 93 - 77
po/de.po

@@ -7,7 +7,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: de\n"
 "Report-Msgid-Bugs-To: http://aria2.sourceforge.net/\n"
-"POT-Creation-Date: 2007-08-09 23:54+0900\n"
+"POT-Creation-Date: 2007-08-28 20:46+0900\n"
 "PO-Revision-Date: 2006-05-05 19:44+0900\n"
 "Last-Translator: Hermann J. Beckers <hj.beckers@onlinehome.de>\n"
 "Language-Team: deutsch <de@li.org>\n"
@@ -818,11 +818,11 @@ msgstr ""
 msgid "Errors occurred while binding port.\n"
 msgstr "Fehler beim Binden an Port aufgetreten.\n"
 
-#: src/main.cc:89
+#: src/main.cc:91
 msgid " version "
 msgstr " Version "
 
-#: src/main.cc:99
+#: src/main.cc:101
 #, fuzzy
 msgid ""
 "This program is free software; you can redistribute it and/or modify\n"
@@ -854,31 +854,31 @@ msgstr ""
 "along with this program; if not, write to the Free Software\n"
 "Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\n"
 
-#: src/main.cc:113
+#: src/main.cc:115
 #, fuzzy
 msgid "Contact Info:"
 msgstr "Kontakt-Info: %s\n"
 
-#: src/main.cc:120
+#: src/main.cc:122
 #, c-format
 msgid "Usage: %s [options] URL ...\n"
 msgstr "Aufruf: %s [Optionen] URL ...\n"
 
-#: src/main.cc:122
+#: src/main.cc:124
 #, c-format
 msgid "       %s [options] -T TORRENT_FILE FILE ...\n"
 msgstr "       %s [Optionen] -T TORRENT_FILE FILE ...\n"
 
-#: src/main.cc:125
+#: src/main.cc:127
 #, fuzzy, c-format
 msgid "       %s [options] -M METALINK_FILE\n"
 msgstr "       %s [Optionen] -T TORRENT_FILE FILE ...\n"
 
-#: src/main.cc:128
+#: src/main.cc:130
 msgid "Options:"
 msgstr "Optionen:"
 
-#: src/main.cc:129
+#: src/main.cc:131
 #, fuzzy
 msgid ""
 " -d, --dir=DIR                The directory to store the downloaded file."
@@ -886,12 +886,12 @@ msgstr ""
 " -d, --dir=DIR                Verzeichnis zum Speichern der abgerufenen "
 "Datei."
 
-#: src/main.cc:130
+#: src/main.cc:132
 #, fuzzy
 msgid " -o, --out=FILE               The file name of the downloaded file."
 msgstr " -o, --out=FILE               Dateiname für die abgerufene Datei."
 
-#: src/main.cc:131
+#: src/main.cc:133
 #, fuzzy
 msgid ""
 " -l, --log=LOG                The file name of the log file. If '-' is\n"
@@ -902,11 +902,11 @@ msgstr ""
 "                              wird das Log auf die Standardausgabe "
 "geschrieben."
 
-#: src/main.cc:134
+#: src/main.cc:136
 msgid " -D, --daemon                 Run as daemon."
 msgstr " -D, --daemon                 Start als Daemon-Prozeß."
 
-#: src/main.cc:136
+#: src/main.cc:138
 #, fuzzy
 msgid ""
 " -s, --split=N                Download a file using N connections. N must "
@@ -924,7 +924,7 @@ msgstr ""
 "                              Daher verbindet sich aria2 zu jeder URL mit\n"
 "                              N Verbindungen."
 
-#: src/main.cc:141
+#: src/main.cc:143
 #, fuzzy
 msgid ""
 " --retry-wait=SEC             Set the seconds to wait to retry after an "
@@ -939,13 +939,13 @@ msgstr ""
 "und 60 an.\n"
 "                              Fehlwert: 5"
 
-#: src/main.cc:144
+#: src/main.cc:146
 #, fuzzy
 msgid " -t, --timeout=SEC            Set timeout in seconds. Default: 60"
 msgstr ""
 " -t, --timeout=SEC            Setzt Wartezeit in Sekunden. Fehlwert: 60"
 
-#: src/main.cc:145
+#: src/main.cc:147
 msgid ""
 " -m, --max-tries=N            Set number of tries. 0 means unlimited.\n"
 "                              Default: 5"
@@ -953,7 +953,7 @@ msgstr ""
 " -m, --max-tries=N            Anzahl Versuche. 0 bedeutet unbegrenzt.\n"
 "                              Fehlwert: 5"
 
-#: src/main.cc:153
+#: src/main.cc:155
 #, fuzzy
 msgid ""
 " --http-proxy=HOST:PORT       Use HTTP proxy server. This affects all URLs."
@@ -961,20 +961,20 @@ msgstr ""
 " --http-proxy-user=USER       HTTP-Proxy-Anwender setzen. Dies betrifft alle "
 "URLs."
 
-#: src/main.cc:154
+#: src/main.cc:156
 #, fuzzy
 msgid " --http-user=USER             Set HTTP user. This affects all URLs."
 msgstr ""
 " --http-user=USER             HTTP-Anwendername angeben. Dies betrifft alle "
 "URLs."
 
-#: src/main.cc:155
+#: src/main.cc:157
 #, fuzzy
 msgid " --http-passwd=PASSWD         Set HTTP password. This affects all URLs."
 msgstr ""
 " --http-passwd=PASSWD         HTTP-Passwort setzen. Dies betrifft alle URLs."
 
-#: src/main.cc:156
+#: src/main.cc:158
 #, fuzzy
 msgid ""
 " --http-proxy-user=USER       Set HTTP proxy user. This affects all URLs."
@@ -982,7 +982,7 @@ msgstr ""
 " --http-proxy-user=USER       HTTP-Proxy-Anwender setzen. Dies betrifft alle "
 "URLs."
 
-#: src/main.cc:157
+#: src/main.cc:159
 #, fuzzy
 msgid ""
 " --http-proxy-passwd=PASSWD   Set HTTP proxy password. This affects all URLs."
@@ -990,7 +990,7 @@ msgstr ""
 " --http-proxy-passwd=PASSWD   HTTP-Proxy-Passwort setzen. Dies betrifft alle "
 "URLs."
 
-#: src/main.cc:158
+#: src/main.cc:160
 msgid ""
 " --http-proxy-method=METHOD   Set the method to use in proxy request.\n"
 "                              METHOD is either 'get' or 'tunnel'.\n"
@@ -1001,7 +1001,7 @@ msgstr ""
 "                              METHOD ist entweder 'get' oder 'tunnel'.\n"
 "                              Fehlwert: tunnel"
 
-#: src/main.cc:161
+#: src/main.cc:163
 msgid ""
 " --http-auth-scheme=SCHEME    Set HTTP authentication scheme. Currently, "
 "basic\n"
@@ -1013,12 +1013,12 @@ msgstr ""
 "                              das einzig zulässige Schema.\n"
 "                              Fehlwert: basic"
 
-#: src/main.cc:164
+#: src/main.cc:166
 #, fuzzy
 msgid " --referer=REFERER            Set Referer. This affects all URLs."
 msgstr " --referer=REFERER            Referer setzen. Dies betrifft alle URLs."
 
-#: src/main.cc:165
+#: src/main.cc:167
 #, fuzzy
 msgid ""
 " --ftp-user=USER              Set FTP user. This affects all URLs.\n"
@@ -1027,7 +1027,7 @@ msgstr ""
 " --ftp-user=USER              FTP-Anwender setzen. Dies betrifft alle URLs.\n"
 "                              Fehlwert: anonymous"
 
-#: src/main.cc:167
+#: src/main.cc:169
 #, fuzzy
 msgid ""
 " --ftp-passwd=PASSWD          Set FTP password. This affects all URLs.\n"
@@ -1036,7 +1036,7 @@ msgstr ""
 " --ftp-passwd=PASSWD          FTP-Passwort setzen. Dies betrifft alle URLs.\n"
 "                              Fehlwert: ARIA2USER@"
 
-#: src/main.cc:169
+#: src/main.cc:171
 msgid ""
 " --ftp-type=TYPE              Set FTP transfer type. TYPE is either "
 "'binary'\n"
@@ -1048,11 +1048,11 @@ msgstr ""
 "                              oder 'ascii'.\n"
 "                              Fehlwert: binary"
 
-#: src/main.cc:172
+#: src/main.cc:174
 msgid " -p, --ftp-pasv               Use passive mode in FTP."
 msgstr " -p, --ftp-pasv               Passiv-Modus für FTP benutzen."
 
-#: src/main.cc:173
+#: src/main.cc:175
 msgid ""
 " --ftp-via-http-proxy=METHOD  Use HTTP proxy in FTP. METHOD is either 'get' "
 "or\n"
@@ -1064,7 +1064,7 @@ msgstr ""
 "                              'tunnel'.\n"
 "                              Fehlwert: tunnel"
 
-#: src/main.cc:176
+#: src/main.cc:178
 #, fuzzy
 msgid ""
 " --lowest-speed-limit=SPEED   Close connection if download speed is lower "
@@ -1083,7 +1083,7 @@ msgstr ""
 "und 60 an.\n"
 "                              Fehlwert: 5"
 
-#: src/main.cc:183
+#: src/main.cc:185
 #, fuzzy
 msgid ""
 " --max-download-limit=SPEED   Set max download speed in bytes per sec.\n"
@@ -1097,7 +1097,7 @@ msgstr ""
 "und 60 an.\n"
 "                              Fehlwert: 5"
 
-#: src/main.cc:187
+#: src/main.cc:189
 #, fuzzy
 msgid ""
 " --file-allocation=METHOD     Specify file allocation method. METHOD is "
@@ -1117,7 +1117,7 @@ msgstr ""
 "und 60 an.\n"
 "                              Fehlwert: 5"
 
-#: src/main.cc:193
+#: src/main.cc:195
 #, fuzzy
 msgid ""
 " --allow-overwrite=true|false If false, aria2 doesn't download a file which\n"
@@ -1133,7 +1133,15 @@ msgstr ""
 "                              auf .torrent endet.\n"
 "                              Fehlwert: true"
 
-#: src/main.cc:198
+#: src/main.cc:199
+msgid ""
+" -Z, --force-sequential       Fetch URIs in the command-line sequentially "
+"and\n"
+"                              download each URI in a separate session, like\n"
+"                              the usual command-line download utilities."
+msgstr ""
+
+#: src/main.cc:204
 #, fuzzy
 msgid ""
 " --check-integrity=true|false  Check file integrity by validating piece "
@@ -1155,7 +1163,7 @@ msgstr ""
 "und 60 an.\n"
 "                              Fehlwert: 5"
 
-#: src/main.cc:206
+#: src/main.cc:212
 #, fuzzy
 msgid ""
 " --realtime-chunk-checksum=true|false  Validate chunk checksum while\n"
@@ -1172,7 +1180,7 @@ msgstr ""
 "                              auf .torrent endet.\n"
 "                              Fehlwert: true"
 
-#: src/main.cc:211
+#: src/main.cc:217
 msgid ""
 " -c, --continue               Continue downloading a partially downloaded\n"
 "                              file. Use this option to resume a download\n"
@@ -1182,15 +1190,15 @@ msgid ""
 "                              applicable to http(s)/ftp downloads."
 msgstr ""
 
-#: src/main.cc:217
+#: src/main.cc:223
 msgid " -U, --user-agent=USER_AGENT  Set user agent for http(s) downloads."
 msgstr ""
 
-#: src/main.cc:218
+#: src/main.cc:224
 msgid " -n, --no-netrc               Disables netrc support."
 msgstr ""
 
-#: src/main.cc:219
+#: src/main.cc:225
 msgid ""
 " -i, --input-file=FILE        Downloads URIs found in FILE. You can specify\n"
 "                              multiple URIs for a single entity: separate\n"
@@ -1199,7 +1207,7 @@ msgid ""
 "                              Reads input from stdin when '-' is specified."
 msgstr ""
 
-#: src/main.cc:223
+#: src/main.cc:229
 #, fuzzy
 msgid ""
 " -j, --max-concurrent-downloads=N Set maximum number of concurrent "
@@ -1210,13 +1218,13 @@ msgstr ""
 " -m, --max-tries=N            Anzahl Versuche. 0 bedeutet unbegrenzt.\n"
 "                              Fehlwert: 5"
 
-#: src/main.cc:226
+#: src/main.cc:232
 msgid ""
 " --load-cookies=FILE          Load cookies from FILE. The format of FILE is\n"
 "                              the same used by Netscape and Mozilla."
 msgstr ""
 
-#: src/main.cc:229
+#: src/main.cc:235
 #, fuzzy
 msgid ""
 " -S, --show-files             Print file listing of .torrent or .metalink "
@@ -1226,7 +1234,7 @@ msgstr ""
 " -S, --show-files             Dateiliste der .torrent-Datei ausgeben und "
 "beenden."
 
-#: src/main.cc:231
+#: src/main.cc:237
 #, fuzzy
 msgid ""
 " --select-file=INDEX...       Set file to download by specifing its index.\n"
@@ -1249,12 +1257,12 @@ msgstr ""
 "                              Sie können auch '-' verwenden wie in \"1-5\".\n"
 "                              ',' und '-' können zusammen benutzt werden."
 
-#: src/main.cc:241
+#: src/main.cc:247
 #, fuzzy
 msgid " -T, --torrent-file=TORRENT_FILE  The path to the .torrent file."
 msgstr " -T, --torrent-file=TORRENT_FILE  Datenpfad zur torrent-Datei."
 
-#: src/main.cc:242
+#: src/main.cc:248
 #, fuzzy
 msgid ""
 " --follow-torrent=true|false  Set to false to prevent aria2 from\n"
@@ -1270,7 +1278,7 @@ msgstr ""
 "                              auf .torrent endet.\n"
 "                              Fehlwert: true"
 
-#: src/main.cc:246
+#: src/main.cc:252
 msgid ""
 " --direct-file-mapping=true|false Directly read from and write to each file\n"
 "                              mentioned in .torrent file.\n"
@@ -1280,7 +1288,7 @@ msgstr ""
 "                              .torrent-Datei erwähnten Datei.\n"
 "                              Fehlwert: true"
 
-#: src/main.cc:249
+#: src/main.cc:255
 #, fuzzy
 msgid ""
 " --listen-port=PORT           Set TCP port number for BitTorrent downloads.\n"
@@ -1289,7 +1297,7 @@ msgstr ""
 " --listen-port=PORT           Port-Nummer zum Lauschen auf Peer-Verbindungen "
 "setzen."
 
-#: src/main.cc:251
+#: src/main.cc:257
 #, fuzzy
 msgid ""
 " --max-upload-limit=SPEED     Set max upload speed in bytes per sec.\n"
@@ -1303,7 +1311,7 @@ msgstr ""
 "und 60 an.\n"
 "                              Fehlwert: 5"
 
-#: src/main.cc:255
+#: src/main.cc:261
 #, fuzzy
 msgid ""
 " --seed-time=MINUTES          Specify seeding time in minutes. Also see the\n"
@@ -1312,7 +1320,7 @@ msgstr ""
 " -m, --max-tries=N            Anzahl Versuche. 0 bedeutet unbegrenzt.\n"
 "                              Fehlwert: 5"
 
-#: src/main.cc:257
+#: src/main.cc:263
 #, fuzzy
 msgid ""
 " --seed-ratio=RATIO           Specify share ratio. Seed completed torrents\n"
@@ -1329,7 +1337,7 @@ msgstr ""
 "                              Daher verbindet sich aria2 zu jeder URL mit\n"
 "                              N Verbindungen."
 
-#: src/main.cc:262
+#: src/main.cc:268
 msgid ""
 " --peer-id-prefix=PEERI_ID_PREFIX Specify the prefix of peer ID. The peer ID "
 "in\n"
@@ -1342,12 +1350,12 @@ msgid ""
 "                              Default: -aria2-"
 msgstr ""
 
-#: src/main.cc:271
+#: src/main.cc:277
 #, fuzzy
 msgid " -M, --metalink-file=METALINK_FILE The file path to the .metalink file."
 msgstr " -T, --torrent-file=TORRENT_FILE  Datenpfad zur torrent-Datei."
 
-#: src/main.cc:272
+#: src/main.cc:278
 #, fuzzy
 msgid ""
 " -C, --metalink-servers=NUM_SERVERS The number of servers to connect to\n"
@@ -1361,24 +1369,24 @@ msgstr ""
 "                              auf .torrent endet.\n"
 "                              Fehlwert: true"
 
-#: src/main.cc:275
+#: src/main.cc:281
 msgid " --metalink-version=VERSION   The version of the file to download."
 msgstr ""
 
-#: src/main.cc:276
+#: src/main.cc:282
 msgid " --metalink-language=LANGUAGE The language of the file to download."
 msgstr ""
 
-#: src/main.cc:277
+#: src/main.cc:283
 msgid ""
 " --metalink-os=OS             The operating system of the file to download."
 msgstr ""
 
-#: src/main.cc:278
+#: src/main.cc:284
 msgid " --metalink-location=LOCATION The location of the prefered server."
 msgstr ""
 
-#: src/main.cc:279
+#: src/main.cc:285
 #, fuzzy
 msgid ""
 " --follow-metalink=true|false Set to false to prevent aria2 from\n"
@@ -1394,15 +1402,15 @@ msgstr ""
 "                              auf .torrent endet.\n"
 "                              Fehlwert: true"
 
-#: src/main.cc:284
+#: src/main.cc:290
 msgid " -v, --version                Print the version number and exit."
 msgstr " -v, --version                Versionsnummer ausgeben und beenden."
 
-#: src/main.cc:285
+#: src/main.cc:291
 msgid " -h, --help                   Print this message and exit."
 msgstr " -h, --help                   Diese Anzeige ausgeben und beenden."
 
-#: src/main.cc:288
+#: src/main.cc:294
 #, fuzzy
 msgid ""
 " You can specify multiple URLs. All URLs must point to the same file\n"
@@ -1412,7 +1420,7 @@ msgstr ""
 "verweisen\n"
 "oder der Abruf schlägt fehl."
 
-#: src/main.cc:293
+#: src/main.cc:299
 #, fuzzy
 msgid ""
 " Specify files in multi-file torrent to download. Use in conjunction with "
@@ -1424,21 +1432,21 @@ msgstr ""
 " -T-Option. Diese Argumente werden ignoriert, wenn sie die Option --select-"
 "file angeben."
 
-#: src/main.cc:297
+#: src/main.cc:303
 msgid "Examples:"
 msgstr "Beispiele:"
 
-#: src/main.cc:298
+#: src/main.cc:304
 #, fuzzy
 msgid " Download a file using 1 connection:"
 msgstr " Abruf einer Datei über 1 Verbindung:"
 
-#: src/main.cc:300
+#: src/main.cc:306
 #, fuzzy
 msgid " Download a file using 2 connections:"
 msgstr " Abruf einer Datei mit 2 Verbindungen:"
 
-#: src/main.cc:302
+#: src/main.cc:308
 #, fuzzy
 msgid ""
 " Download a file using 2 connections, each connects to a different server:"
@@ -1446,51 +1454,59 @@ msgstr ""
 " Abruf einer Datei über 2 Verbindungen, jede verbindet zu einem anderen "
 "Server:"
 
-#: src/main.cc:304
+#: src/main.cc:310
 msgid " You can mix up different protocols:"
 msgstr " Sie können verschiedene Protokolle mischen:"
 
-#: src/main.cc:308
+#: src/main.cc:312
+msgid " Parameterized URI:"
+msgstr ""
+
+#: src/main.cc:314
+msgid " Parameterized URI. -Z option must be specified:"
+msgstr ""
+
+#: src/main.cc:318
 msgid " Download a torrent:"
 msgstr " Einen torrent abrufen:"
 
-#: src/main.cc:310
+#: src/main.cc:320
 #, fuzzy
 msgid " Download a torrent using a local .torrent file:"
 msgstr " Einen torrent mit einer lokalen .torrent-Datei abrufen:"
 
-#: src/main.cc:312 src/main.cc:325
+#: src/main.cc:322 src/main.cc:335
 msgid " Download only selected files:"
 msgstr " Nur ausgewählte Dateien abrufen:"
 
-#: src/main.cc:314
+#: src/main.cc:324
 msgid " Print file listing of .torrent file:"
 msgstr " Dateiliste einer .torrent-Datei ausgeben:"
 
-#: src/main.cc:319
+#: src/main.cc:329
 msgid " Metalink downloading:"
 msgstr ""
 
-#: src/main.cc:321
+#: src/main.cc:331
 #, fuzzy
 msgid " Download a file using local .metalink file:"
 msgstr " Einen torrent mit einer lokalen .torrent-Datei abrufen:"
 
-#: src/main.cc:323
+#: src/main.cc:333
 msgid " Metalink downloading with preferences:"
 msgstr ""
 
-#: src/main.cc:327
+#: src/main.cc:337
 #, fuzzy
 msgid " Download only selected files using index:"
 msgstr " Nur ausgewählte Dateien abrufen:"
 
-#: src/main.cc:329
+#: src/main.cc:339
 #, fuzzy
 msgid " Print file listing of .metalink file:"
 msgstr " Dateiliste einer .torrent-Datei ausgeben:"
 
-#: src/main.cc:333
+#: src/main.cc:343
 #, c-format
 msgid "Report bugs to %s"
 msgstr "Fehler an %s melden"

BIN
po/fr.gmo


+ 93 - 77
po/fr.po

@@ -7,7 +7,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: aria2 0.11.2\n"
 "Report-Msgid-Bugs-To: http://aria2.sourceforge.net/\n"
-"POT-Creation-Date: 2007-08-09 23:54+0900\n"
+"POT-Creation-Date: 2007-08-28 20:46+0900\n"
 "PO-Revision-Date: 2007-08-16 01:11+0900\n"
 "Last-Translator: Charles <landemaine@gmail.com>\n"
 "Language-Team: Fran&ccedil;ais\n"
@@ -827,11 +827,11 @@ msgstr ""
 msgid "Errors occurred while binding port.\n"
 msgstr "La jonction du port a engendré des erreurs.\n"
 
-#: src/main.cc:89
+#: src/main.cc:91
 msgid " version "
 msgstr " version "
 
-#: src/main.cc:99
+#: src/main.cc:101
 msgid ""
 "This program is free software; you can redistribute it and/or modify\n"
 "it under the terms of the GNU General Public License as published by\n"
@@ -865,40 +865,40 @@ msgstr ""
 "Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  "
 "USA\n"
 
-#: src/main.cc:113
+#: src/main.cc:115
 msgid "Contact Info:"
 msgstr "Informations de Contact:"
 
-#: src/main.cc:120
+#: src/main.cc:122
 #, c-format
 msgid "Usage: %s [options] URL ...\n"
 msgstr "Utilisation: %s [options] URL ...\n"
 
-#: src/main.cc:122
+#: src/main.cc:124
 #, c-format
 msgid "       %s [options] -T TORRENT_FILE FILE ...\n"
 msgstr "       %s [options] -T FICHIER FICHIER_TORRENT...\n"
 
-#: src/main.cc:125
+#: src/main.cc:127
 #, c-format
 msgid "       %s [options] -M METALINK_FILE\n"
 msgstr "       %s [options] -M FICHIER_METALINK\n"
 
-#: src/main.cc:128
+#: src/main.cc:130
 msgid "Options:"
 msgstr "Options:"
 
-#: src/main.cc:129
+#: src/main.cc:131
 msgid ""
 " -d, --dir=DIR                The directory to store the downloaded file."
 msgstr " -d, --dir=DIR                Le dossier pour enregistrer le fichier."
 
-#: src/main.cc:130
+#: src/main.cc:132
 msgid " -o, --out=FILE               The file name of the downloaded file."
 msgstr ""
 " -o, --out=FILE               Le nom de fichier pour le fichier téléchargé."
 
-#: src/main.cc:131
+#: src/main.cc:133
 msgid ""
 " -l, --log=LOG                The file name of the log file. If '-' is\n"
 "                              specified, log is written to stdout."
@@ -907,11 +907,11 @@ msgstr ""
 "Si '-' est spécifié,\n"
 "                              le log est redirigé vers stdout."
 
-#: src/main.cc:134
+#: src/main.cc:136
 msgid " -D, --daemon                 Run as daemon."
 msgstr " -D, --daemon                 Exécuter en tant que service."
 
-#: src/main.cc:136
+#: src/main.cc:138
 msgid ""
 " -s, --split=N                Download a file using N connections. N must "
 "be\n"
@@ -930,7 +930,7 @@ msgstr ""
 "                              N connexions.\n"
 "                              Défaut: 1"
 
-#: src/main.cc:141
+#: src/main.cc:143
 msgid ""
 " --retry-wait=SEC             Set the seconds to wait to retry after an "
 "error\n"
@@ -943,13 +943,13 @@ msgstr ""
 "et 60.\n"
 "                              Défaut: 5"
 
-#: src/main.cc:144
+#: src/main.cc:146
 msgid " -t, --timeout=SEC            Set timeout in seconds. Default: 60"
 msgstr ""
 " -t, --timeout=SEC            Définir le délai d'expiration en secondes. "
 "Défaut: 60"
 
-#: src/main.cc:145
+#: src/main.cc:147
 msgid ""
 " -m, --max-tries=N            Set number of tries. 0 means unlimited.\n"
 "                              Default: 5"
@@ -958,7 +958,7 @@ msgstr ""
 "illimité.\n"
 "                              Défaut: 5"
 
-#: src/main.cc:153
+#: src/main.cc:155
 msgid ""
 " --http-proxy=HOST:PORT       Use HTTP proxy server. This affects all URLs."
 msgstr ""
@@ -966,33 +966,33 @@ msgstr ""
 "tous\n"
 "                              les URLs."
 
-#: src/main.cc:154
+#: src/main.cc:156
 msgid " --http-user=USER             Set HTTP user. This affects all URLs."
 msgstr ""
 " --http-user=USER             Définir un utilisateur HTTP. Ceci affecte tous "
 "les URLs."
 
-#: src/main.cc:155
+#: src/main.cc:157
 msgid " --http-passwd=PASSWD         Set HTTP password. This affects all URLs."
 msgstr ""
 " --http-passwd=PASSWD         Définir un mot de passe HTTP. Ceci affecte "
 "tous les URLs."
 
-#: src/main.cc:156
+#: src/main.cc:158
 msgid ""
 " --http-proxy-user=USER       Set HTTP proxy user. This affects all URLs."
 msgstr ""
 " --http-proxy-user=USER       Définir un utilisateur proxy HTTP. Ceci "
 "affecte tous les URLs"
 
-#: src/main.cc:157
+#: src/main.cc:159
 msgid ""
 " --http-proxy-passwd=PASSWD   Set HTTP proxy password. This affects all URLs."
 msgstr ""
 " --http-proxy-passwd=PASSWD   Définir un mot de passe HTTP. Ceci affecte "
 "tous les URLs."
 
-#: src/main.cc:158
+#: src/main.cc:160
 msgid ""
 " --http-proxy-method=METHOD   Set the method to use in proxy request.\n"
 "                              METHOD is either 'get' or 'tunnel'.\n"
@@ -1003,7 +1003,7 @@ msgstr ""
 "                              METHOD est soit 'get' ou 'tunnel'.\n"
 "                              Défaut: tunnel"
 
-#: src/main.cc:161
+#: src/main.cc:163
 msgid ""
 " --http-auth-scheme=SCHEME    Set HTTP authentication scheme. Currently, "
 "basic\n"
@@ -1015,13 +1015,13 @@ msgstr ""
 "                              est le seul type d'identification supporté.\n"
 "                              Défaut: basic"
 
-#: src/main.cc:164
+#: src/main.cc:166
 msgid " --referer=REFERER            Set Referer. This affects all URLs."
 msgstr ""
 " --referer=REFERER            Définir le Référant. Ceci affecte tous les "
 "URLs."
 
-#: src/main.cc:165
+#: src/main.cc:167
 msgid ""
 " --ftp-user=USER              Set FTP user. This affects all URLs.\n"
 "                              Default: anonymous"
@@ -1030,7 +1030,7 @@ msgstr ""
 "les URLs.\n"
 "                              Défaut: anonymous"
 
-#: src/main.cc:167
+#: src/main.cc:169
 msgid ""
 " --ftp-passwd=PASSWD          Set FTP password. This affects all URLs.\n"
 "                              Default: ARIA2USER@"
@@ -1039,7 +1039,7 @@ msgstr ""
 "les URLs.\n"
 "                              Default: ARIA2USER@"
 
-#: src/main.cc:169
+#: src/main.cc:171
 msgid ""
 " --ftp-type=TYPE              Set FTP transfer type. TYPE is either "
 "'binary'\n"
@@ -1051,11 +1051,11 @@ msgstr ""
 "                              ou 'ascii'.\n"
 "                              Défaut: binary"
 
-#: src/main.cc:172
+#: src/main.cc:174
 msgid " -p, --ftp-pasv               Use passive mode in FTP."
 msgstr " -p, --ftp-pasv               Utiliser le mode passif de FTP."
 
-#: src/main.cc:173
+#: src/main.cc:175
 msgid ""
 " --ftp-via-http-proxy=METHOD  Use HTTP proxy in FTP. METHOD is either 'get' "
 "or\n"
@@ -1067,7 +1067,7 @@ msgstr ""
 "                              'tunnel'.\n"
 "                              Défaut: tunnel"
 
-#: src/main.cc:176
+#: src/main.cc:178
 msgid ""
 " --lowest-speed-limit=SPEED   Close connection if download speed is lower "
 "than\n"
@@ -1090,7 +1090,7 @@ msgstr ""
 "BitTorrent .\n"
 "                              Default: 0"
 
-#: src/main.cc:183
+#: src/main.cc:185
 msgid ""
 " --max-download-limit=SPEED   Set max download speed in bytes per sec.\n"
 "                              0 means unrestricted.\n"
@@ -1104,7 +1104,7 @@ msgstr ""
 "1024K).\n"
 "                              Défaut: 0"
 
-#: src/main.cc:187
+#: src/main.cc:189
 msgid ""
 " --file-allocation=METHOD     Specify file allocation method. METHOD is "
 "either\n"
@@ -1128,7 +1128,7 @@ msgstr ""
 "fichier\n"
 "                              Défaut: none"
 
-#: src/main.cc:193
+#: src/main.cc:195
 msgid ""
 " --allow-overwrite=true|false If false, aria2 doesn't download a file which\n"
 "                              already exists but the corresponding .aria2 "
@@ -1142,7 +1142,15 @@ msgstr ""
 "                              l'ordinateur\n"
 "                              Défaut: false"
 
-#: src/main.cc:198
+#: src/main.cc:199
+msgid ""
+" -Z, --force-sequential       Fetch URIs in the command-line sequentially "
+"and\n"
+"                              download each URI in a separate session, like\n"
+"                              the usual command-line download utilities."
+msgstr ""
+
+#: src/main.cc:204
 msgid ""
 " --check-integrity=true|false  Check file integrity by validating piece "
 "hash.\n"
@@ -1169,7 +1177,7 @@ msgstr ""
 "                              si le fichier .aria2 n'existe pas.\n"
 "                              Défaut: false"
 
-#: src/main.cc:206
+#: src/main.cc:212
 msgid ""
 " --realtime-chunk-checksum=true|false  Validate chunk checksum while\n"
 "                              downloading a file in Metalink mode. This "
@@ -1185,7 +1193,7 @@ msgstr ""
 "                              Metalink avec vérification d'intégrité.\n"
 "                              Défaut: true"
 
-#: src/main.cc:211
+#: src/main.cc:217
 msgid ""
 " -c, --continue               Continue downloading a partially downloaded\n"
 "                              file. Use this option to resume a download\n"
@@ -1205,17 +1213,17 @@ msgstr ""
 "                              En ce moment cette option s'applique aux\n"
 "                              téléchargements http(s)/ftp."
 
-#: src/main.cc:217
+#: src/main.cc:223
 msgid " -U, --user-agent=USER_AGENT  Set user agent for http(s) downloads."
 msgstr ""
 " -U, --user-agent=USER_AGENT  Définit le nom du programme pour les "
 "téléchargements http(s)."
 
-#: src/main.cc:218
+#: src/main.cc:224
 msgid " -n, --no-netrc               Disables netrc support."
 msgstr " -n, --no-netrc               Désactiver le support netrc."
 
-#: src/main.cc:219
+#: src/main.cc:225
 msgid ""
 " -i, --input-file=FILE        Downloads URIs found in FILE. You can specify\n"
 "                              multiple URIs for a single entity: separate\n"
@@ -1230,7 +1238,7 @@ msgstr ""
 "                              URIs par des tabulations sur une seule ligne.\n"
 "                              Lit la sortie de stdin quand '-' est spécifié."
 
-#: src/main.cc:223
+#: src/main.cc:229
 msgid ""
 " -j, --max-concurrent-downloads=N Set maximum number of concurrent "
 "downloads.\n"
@@ -1242,7 +1250,7 @@ msgstr ""
 "                              Doit être utilisé avec l'option -i.\n"
 "                              Défaut: 5"
 
-#: src/main.cc:226
+#: src/main.cc:232
 msgid ""
 " --load-cookies=FILE          Load cookies from FILE. The format of FILE is\n"
 "                              the same used by Netscape and Mozilla."
@@ -1251,7 +1259,7 @@ msgstr ""
 "est\n"
 "                              celui utilisé par Netscape et Mozilla."
 
-#: src/main.cc:229
+#: src/main.cc:235
 msgid ""
 " -S, --show-files             Print file listing of .torrent or .metalink "
 "file\n"
@@ -1261,7 +1269,7 @@ msgstr ""
 "metalink\n"
 "                              et quitte."
 
-#: src/main.cc:231
+#: src/main.cc:237
 msgid ""
 " --select-file=INDEX...       Set file to download by specifing its index.\n"
 "                              You can find the file index using the\n"
@@ -1288,12 +1296,12 @@ msgstr ""
 "varier selon\n"
 "                              la requête (consultez l'option --metalink-*)."
 
-#: src/main.cc:241
+#: src/main.cc:247
 msgid " -T, --torrent-file=TORRENT_FILE  The path to the .torrent file."
 msgstr ""
 " -T, --torrent-file=TORRENT_FILE  Le chemin complet du fichier .torrent."
 
-#: src/main.cc:242
+#: src/main.cc:248
 msgid ""
 " --follow-torrent=true|false  Set to false to prevent aria2 from\n"
 "                              entering BitTorrent mode even if the filename "
@@ -1308,7 +1316,7 @@ msgstr ""
 "                              téléchargé termine pas l'extension .torrent.\n"
 "                              Défaut: true"
 
-#: src/main.cc:246
+#: src/main.cc:252
 msgid ""
 " --direct-file-mapping=true|false Directly read from and write to each file\n"
 "                              mentioned in .torrent file.\n"
@@ -1319,7 +1327,7 @@ msgstr ""
 "                              mentioné dans le fichier .torrent.\n"
 "                              Défaut: true"
 
-#: src/main.cc:249
+#: src/main.cc:255
 msgid ""
 " --listen-port=PORT           Set TCP port number for BitTorrent downloads.\n"
 "                              Default: 6881-6999"
@@ -1328,7 +1336,7 @@ msgstr ""
 "cas d'une connexion P2P.\n"
 "                              Default: 6881-6999"
 
-#: src/main.cc:251
+#: src/main.cc:257
 msgid ""
 " --max-upload-limit=SPEED     Set max upload speed in bytes per sec.\n"
 "                              0 means unrestricted.\n"
@@ -1342,7 +1350,7 @@ msgstr ""
 "1024K).\n"
 "                              Défaut: 0"
 
-#: src/main.cc:255
+#: src/main.cc:261
 msgid ""
 " --seed-time=MINUTES          Specify seeding time in minutes. Also see the\n"
 "                              --seed-ratio option."
@@ -1351,7 +1359,7 @@ msgstr ""
 "Consultez aussi\n"
 "                              l'option --seed-ratio."
 
-#: src/main.cc:257
+#: src/main.cc:263
 msgid ""
 " --seed-ratio=RATIO           Specify share ratio. Seed completed torrents\n"
 "                              until share ratio reaches RATIO. 1.0 is\n"
@@ -1370,7 +1378,7 @@ msgstr ""
 "conditions\n"
 "                              est satisfaite."
 
-#: src/main.cc:262
+#: src/main.cc:268
 msgid ""
 " --peer-id-prefix=PEERI_ID_PREFIX Specify the prefix of peer ID. The peer ID "
 "in\n"
@@ -1383,12 +1391,12 @@ msgid ""
 "                              Default: -aria2-"
 msgstr ""
 
-#: src/main.cc:271
+#: src/main.cc:277
 msgid " -M, --metalink-file=METALINK_FILE The file path to the .metalink file."
 msgstr ""
 " -M, --metalink-file=METALINK_FILE Le chemin vers le fichier .metalink."
 
-#: src/main.cc:272
+#: src/main.cc:278
 msgid ""
 " -C, --metalink-servers=NUM_SERVERS The number of servers to connect to\n"
 "                              simultaneously.\n"
@@ -1399,26 +1407,26 @@ msgstr ""
 "                              simultanément.\n"
 "                              Défaut: 5"
 
-#: src/main.cc:275
+#: src/main.cc:281
 msgid " --metalink-version=VERSION   The version of the file to download."
 msgstr " --metalink-version=VERSION   La version du fichier à télécharger."
 
-#: src/main.cc:276
+#: src/main.cc:282
 msgid " --metalink-language=LANGUAGE The language of the file to download."
 msgstr " --metalink-language=LANGUAGE La langua du fichier à télécharger."
 
-#: src/main.cc:277
+#: src/main.cc:283
 msgid ""
 " --metalink-os=OS             The operating system of the file to download."
 msgstr ""
 " --metalink-os=OS             Le système d'exploitation auquel est destiné "
 "le fichier."
 
-#: src/main.cc:278
+#: src/main.cc:284
 msgid " --metalink-location=LOCATION The location of the prefered server."
 msgstr " --metalink-location=LOCATION La localisation du serveur préféré."
 
-#: src/main.cc:279
+#: src/main.cc:285
 msgid ""
 " --follow-metalink=true|false Set to false to prevent aria2 from\n"
 "                              entering Metalink mode even if the filename "
@@ -1434,15 +1442,15 @@ msgstr ""
 "metalink.\n"
 "                              Défaut: true"
 
-#: src/main.cc:284
+#: src/main.cc:290
 msgid " -v, --version                Print the version number and exit."
 msgstr " -v, --version                Imprime le numéro de version et quitte."
 
-#: src/main.cc:285
+#: src/main.cc:291
 msgid " -h, --help                   Print this message and exit."
 msgstr " -h, --help                   Imprime ce message et quitte."
 
-#: src/main.cc:288
+#: src/main.cc:294
 msgid ""
 " You can specify multiple URLs. All URLs must point to the same file\n"
 " or downloading will fail."
@@ -1451,7 +1459,7 @@ msgstr ""
 "même fichier\n"
 " sinon le téléchargement échoue."
 
-#: src/main.cc:293
+#: src/main.cc:299
 msgid ""
 " Specify files in multi-file torrent to download. Use in conjunction with "
 "the\n"
@@ -1461,66 +1469,74 @@ msgstr ""
 "avec l'option\n"
 " -T. Ces arguments sont ignorés si vous spécifiez l'option --select-file."
 
-#: src/main.cc:297
+#: src/main.cc:303
 msgid "Examples:"
 msgstr "Exemples:"
 
-#: src/main.cc:298
+#: src/main.cc:304
 msgid " Download a file using 1 connection:"
 msgstr " Téléchargez un fichier avec 1 connexion:"
 
-#: src/main.cc:300
+#: src/main.cc:306
 msgid " Download a file using 2 connections:"
 msgstr " Téléchargez un fichier avec 2 connexion:"
 
-#: src/main.cc:302
+#: src/main.cc:308
 msgid ""
 " Download a file using 2 connections, each connects to a different server:"
 msgstr ""
 " Téléchargez un fichier avec 2 connexion, chacune se connectant à un serveur "
 "différent:"
 
-#: src/main.cc:304
+#: src/main.cc:310
 msgid " You can mix up different protocols:"
 msgstr " Vous pouvez mélanger différents protocoles:"
 
-#: src/main.cc:308
+#: src/main.cc:312
+msgid " Parameterized URI:"
+msgstr ""
+
+#: src/main.cc:314
+msgid " Parameterized URI. -Z option must be specified:"
+msgstr ""
+
+#: src/main.cc:318
 msgid " Download a torrent:"
 msgstr "Téléchargez un torrent:"
 
-#: src/main.cc:310
+#: src/main.cc:320
 msgid " Download a torrent using a local .torrent file:"
 msgstr "Téléchargez un torrent en utilisant un fichier local .torrent:"
 
-#: src/main.cc:312 src/main.cc:325
+#: src/main.cc:322 src/main.cc:335
 msgid " Download only selected files:"
 msgstr "Télécharger seulement les fichiers séléctionnés:"
 
-#: src/main.cc:314
+#: src/main.cc:324
 msgid " Print file listing of .torrent file:"
 msgstr "Imprimer la liste des fichiers .torrent:"
 
-#: src/main.cc:319
+#: src/main.cc:329
 msgid " Metalink downloading:"
 msgstr "Téléchargement Metalink:"
 
-#: src/main.cc:321
+#: src/main.cc:331
 msgid " Download a file using local .metalink file:"
 msgstr "Télécharger un fichier en utilisant un fichier local .metalink:"
 
-#: src/main.cc:323
+#: src/main.cc:333
 msgid " Metalink downloading with preferences:"
 msgstr "Téléchargement Metalink avec comme préférences:"
 
-#: src/main.cc:327
+#: src/main.cc:337
 msgid " Download only selected files using index:"
 msgstr "Télécharger seulement les fichiers sélectionnés en utilisant l'index:"
 
-#: src/main.cc:329
+#: src/main.cc:339
 msgid " Print file listing of .metalink file:"
 msgstr "Imprimer la liste de fichiers du fichier .metalink:"
 
-#: src/main.cc:333
+#: src/main.cc:343
 #, c-format
 msgid "Report bugs to %s"
 msgstr "Faire part des bugs à %s"

BIN
po/ja.gmo


+ 93 - 77
po/ja.po

@@ -7,7 +7,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: aria2c 0.2.1\n"
 "Report-Msgid-Bugs-To: http://aria2.sourceforge.net/\n"
-"POT-Creation-Date: 2007-08-09 23:54+0900\n"
+"POT-Creation-Date: 2007-08-28 20:46+0900\n"
 "PO-Revision-Date: 2007-08-10 00:08+0900\n"
 "Last-Translator: Tatsuhiro Tsujikawa <tujikawa@rednoah.com>\n"
 "Language-Team: Japanese <ja@li.org>\n"
@@ -844,11 +844,11 @@ msgstr ""
 msgid "Errors occurred while binding port.\n"
 msgstr "ポートをバインド中にエラーが発生しました.\n"
 
-#: src/main.cc:89
+#: src/main.cc:91
 msgid " version "
 msgstr " バージョン "
 
-#: src/main.cc:99
+#: src/main.cc:101
 msgid ""
 "This program is free software; you can redistribute it and/or modify\n"
 "it under the terms of the GNU General Public License as published by\n"
@@ -880,41 +880,41 @@ msgstr ""
 "Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  "
 "USA\n"
 
-#: src/main.cc:113
+#: src/main.cc:115
 msgid "Contact Info:"
 msgstr "連絡先:"
 
-#: src/main.cc:120
+#: src/main.cc:122
 #, c-format
 msgid "Usage: %s [options] URL ...\n"
 msgstr "使い方: %s [オプション] URL ...\n"
 
-#: src/main.cc:122
+#: src/main.cc:124
 #, c-format
 msgid "       %s [options] -T TORRENT_FILE FILE ...\n"
 msgstr "        %s [オプション] -T TORRENT_FILE FILE ...\n"
 
-#: src/main.cc:125
+#: src/main.cc:127
 #, c-format
 msgid "       %s [options] -M METALINK_FILE\n"
 msgstr "        %s [オプション] -M METALINK_FILE\n"
 
-#: src/main.cc:128
+#: src/main.cc:130
 msgid "Options:"
 msgstr "オプション:"
 
-#: src/main.cc:129
+#: src/main.cc:131
 msgid ""
 " -d, --dir=DIR                The directory to store the downloaded file."
 msgstr ""
 " -d, --dir=DIR                ダウンロードしたファイルを保存するディレクトリ."
 
-#: src/main.cc:130
+#: src/main.cc:132
 msgid " -o, --out=FILE               The file name of the downloaded file."
 msgstr ""
 " -o, --out=FILE               ダウンロードしたファイルの保存先ファイル名."
 
-#: src/main.cc:131
+#: src/main.cc:133
 msgid ""
 " -l, --log=LOG                The file name of the log file. If '-' is\n"
 "                              specified, log is written to stdout."
@@ -923,11 +923,11 @@ msgstr ""
 "力\n"
 "                              に出力します."
 
-#: src/main.cc:134
+#: src/main.cc:136
 msgid " -D, --daemon                 Run as daemon."
 msgstr " -D, --daemon                 デーモンとして起動します."
 
-#: src/main.cc:136
+#: src/main.cc:138
 msgid ""
 " -s, --split=N                Download a file using N connections. N must "
 "be\n"
@@ -948,7 +948,7 @@ msgstr ""
 "                              ンを確立します.\n"
 "                              デフォルト値: 1"
 
-#: src/main.cc:141
+#: src/main.cc:143
 msgid ""
 " --retry-wait=SEC             Set the seconds to wait to retry after an "
 "error\n"
@@ -961,13 +961,13 @@ msgstr ""
 "                              す. 0 - 60 の値を指定してください.\n"
 "                              デフォルト値: 5"
 
-#: src/main.cc:144
+#: src/main.cc:146
 msgid " -t, --timeout=SEC            Set timeout in seconds. Default: 60"
 msgstr ""
 " -t, --timeout=SEC            タイムアウトとなる時間を秒で指定します.\n"
 "                              デフォルト値: 60"
 
-#: src/main.cc:145
+#: src/main.cc:147
 msgid ""
 " -m, --max-tries=N            Set number of tries. 0 means unlimited.\n"
 "                              Default: 5"
@@ -976,28 +976,28 @@ msgstr ""
 "行\n"
 "                              します. デフォルト値: 5"
 
-#: src/main.cc:153
+#: src/main.cc:155
 msgid ""
 " --http-proxy=HOST:PORT       Use HTTP proxy server. This affects all URLs."
 msgstr ""
 " --http-proxy=HOST:PORT       HTTP プロキシ・サーバーを使用します.\n"
 "                              このオプションはすべての URL に影響します."
 
-#: src/main.cc:154
+#: src/main.cc:156
 msgid " --http-user=USER             Set HTTP user. This affects all URLs."
 msgstr ""
 " --http-user=USER             HTTP での認証ユーザーを指定します. このオプショ"
 "ン\n"
 "                              はすべての URL に影響します."
 
-#: src/main.cc:155
+#: src/main.cc:157
 msgid " --http-passwd=PASSWD         Set HTTP password. This affects all URLs."
 msgstr ""
 " --http-passwd=PASSWD         HTTP での認証パスワードを指定します. このオプ"
 "ショ\n"
 "                              ンはすべての URL に影響します."
 
-#: src/main.cc:156
+#: src/main.cc:158
 msgid ""
 " --http-proxy-user=USER       Set HTTP proxy user. This affects all URLs."
 msgstr ""
@@ -1007,7 +1007,7 @@ msgstr ""
 "ま\n"
 "                              す."
 
-#: src/main.cc:157
+#: src/main.cc:159
 msgid ""
 " --http-proxy-passwd=PASSWD   Set HTTP proxy password. This affects all URLs."
 msgstr ""
@@ -1017,7 +1017,7 @@ msgstr ""
 "し\n"
 "                              ます."
 
-#: src/main.cc:158
+#: src/main.cc:160
 msgid ""
 " --http-proxy-method=METHOD   Set the method to use in proxy request.\n"
 "                              METHOD is either 'get' or 'tunnel'.\n"
@@ -1028,7 +1028,7 @@ msgstr ""
 "                              す. 'get' または 'tunnel' を指定してください.\n"
 "                              デフォルト値: tunnel"
 
-#: src/main.cc:161
+#: src/main.cc:163
 msgid ""
 " --http-auth-scheme=SCHEME    Set HTTP authentication scheme. Currently, "
 "basic\n"
@@ -1040,14 +1040,14 @@ msgstr ""
 "                              いるのは basic です. \n"
 "                              デフォルト値: basic"
 
-#: src/main.cc:164
+#: src/main.cc:166
 msgid " --referer=REFERER            Set Referer. This affects all URLs."
 msgstr ""
 " --referer=REFERER            リファラーを指定します. このオプションはすべて"
 "の\n"
 "                               URL に影響します."
 
-#: src/main.cc:165
+#: src/main.cc:167
 msgid ""
 " --ftp-user=USER              Set FTP user. This affects all URLs.\n"
 "                              Default: anonymous"
@@ -1057,7 +1057,7 @@ msgstr ""
 "                              はすべての URL に影響します.\n"
 "                              デフォルト値: anonymous"
 
-#: src/main.cc:167
+#: src/main.cc:169
 msgid ""
 " --ftp-passwd=PASSWD          Set FTP password. This affects all URLs.\n"
 "                              Default: ARIA2USER@"
@@ -1067,7 +1067,7 @@ msgstr ""
 "                              ンはすべての URL に影響します.\n"
 "                              デフォルト値: ARIA2USER@"
 
-#: src/main.cc:169
+#: src/main.cc:171
 msgid ""
 " --ftp-type=TYPE              Set FTP transfer type. TYPE is either "
 "'binary'\n"
@@ -1078,11 +1078,11 @@ msgstr ""
 "                              'ascii' を指定してください. デフォルト値: "
 "binary"
 
-#: src/main.cc:172
+#: src/main.cc:174
 msgid " -p, --ftp-pasv               Use passive mode in FTP."
 msgstr " -p, --ftp-pasv               FTP で passive モードを使用します."
 
-#: src/main.cc:173
+#: src/main.cc:175
 msgid ""
 " --ftp-via-http-proxy=METHOD  Use HTTP proxy in FTP. METHOD is either 'get' "
 "or\n"
@@ -1095,7 +1095,7 @@ msgstr ""
 "く\n"
 "                              ださい. デフォルト値: tunnel"
 
-#: src/main.cc:176
+#: src/main.cc:178
 msgid ""
 " --lowest-speed-limit=SPEED   Close connection if download speed is lower "
 "than\n"
@@ -1118,7 +1118,7 @@ msgstr ""
 "                              ードには影響しません.\n"
 "                              デフォルト値: 0"
 
-#: src/main.cc:183
+#: src/main.cc:185
 msgid ""
 " --max-download-limit=SPEED   Set max download speed in bytes per sec.\n"
 "                              0 means unrestricted.\n"
@@ -1133,7 +1133,7 @@ msgstr ""
 "1024K).\n"
 "                              デフォルト値: 0"
 
-#: src/main.cc:187
+#: src/main.cc:189
 msgid ""
 " --file-allocation=METHOD     Specify file allocation method. METHOD is "
 "either\n"
@@ -1158,7 +1158,7 @@ msgstr ""
 "                              る場合があります.\n"
 "                              デフォルト値: none"
 
-#: src/main.cc:193
+#: src/main.cc:195
 msgid ""
 " --allow-overwrite=true|false If false, aria2 doesn't download a file which\n"
 "                              already exists but the corresponding .aria2 "
@@ -1175,7 +1175,15 @@ msgstr ""
 "                              中止します.\n"
 "                              デフォルト値: false"
 
-#: src/main.cc:198
+#: src/main.cc:199
+msgid ""
+" -Z, --force-sequential       Fetch URIs in the command-line sequentially "
+"and\n"
+"                              download each URI in a separate session, like\n"
+"                              the usual command-line download utilities."
+msgstr ""
+
+#: src/main.cc:204
 msgid ""
 " --check-integrity=true|false  Check file integrity by validating piece "
 "hash.\n"
@@ -1202,7 +1210,7 @@ msgstr ""
 "                              かもしれません.\n"
 "                              デフォルト値: false"
 
-#: src/main.cc:206
+#: src/main.cc:212
 msgid ""
 " --realtime-chunk-checksum=true|false  Validate chunk checksum while\n"
 "                              downloading a file in Metalink mode. This "
@@ -1218,7 +1226,7 @@ msgstr ""
 "                              Metalink でのみ使用できます.\n"
 "                              デフォルト値: true"
 
-#: src/main.cc:211
+#: src/main.cc:217
 msgid ""
 " -c, --continue               Continue downloading a partially downloaded\n"
 "                              file. Use this option to resume a download\n"
@@ -1237,15 +1245,15 @@ msgstr ""
 "用\n"
 "                              できます."
 
-#: src/main.cc:217
+#: src/main.cc:223
 msgid " -U, --user-agent=USER_AGENT  Set user agent for http(s) downloads."
 msgstr " -U, --user-agent=USER_AGENT  ユーザーエージェントを設定します."
 
-#: src/main.cc:218
+#: src/main.cc:224
 msgid " -n, --no-netrc               Disables netrc support."
 msgstr " -n, --no-netrc               netrc サポートを止めます."
 
-#: src/main.cc:219
+#: src/main.cc:225
 msgid ""
 " -i, --input-file=FILE        Downloads URIs found in FILE. You can specify\n"
 "                              multiple URIs for a single entity: separate\n"
@@ -1265,7 +1273,7 @@ msgstr ""
 "ま\n"
 "                              す."
 
-#: src/main.cc:223
+#: src/main.cc:229
 msgid ""
 " -j, --max-concurrent-downloads=N Set maximum number of concurrent "
 "downloads.\n"
@@ -1277,7 +1285,7 @@ msgstr ""
 "                              と共に使ってください.\n"
 "                              デフォルト値: 5"
 
-#: src/main.cc:226
+#: src/main.cc:232
 msgid ""
 " --load-cookies=FILE          Load cookies from FILE. The format of FILE is\n"
 "                              the same used by Netscape and Mozilla."
@@ -1287,7 +1295,7 @@ msgstr ""
 "                              トは, Netscape や Mozilla で使われているもので"
 "す."
 
-#: src/main.cc:229
+#: src/main.cc:235
 msgid ""
 " -S, --show-files             Print file listing of .torrent or .metalink "
 "file\n"
@@ -1296,7 +1304,7 @@ msgstr ""
 " -S, --show-files             .torrent/.metalink ファイルに含まれるファイル\n"
 "                              リストを出力し終了します."
 
-#: src/main.cc:231
+#: src/main.cc:237
 msgid ""
 " --select-file=INDEX...       Set file to download by specifing its index.\n"
 "                              You can find the file index using the\n"
@@ -1324,11 +1332,11 @@ msgstr ""
 "よっ\n"
 "                              てインデックスは変化する場合があります."
 
-#: src/main.cc:241
+#: src/main.cc:247
 msgid " -T, --torrent-file=TORRENT_FILE  The path to the .torrent file."
 msgstr " -T, --torrent-file=TORRENT_FILE  .torrent ファイルのパスを指定."
 
-#: src/main.cc:242
+#: src/main.cc:248
 msgid ""
 " --follow-torrent=true|false  Set to false to prevent aria2 from\n"
 "                              entering BitTorrent mode even if the filename "
@@ -1343,7 +1351,7 @@ msgstr ""
 "                              は, BitTorrent モードに入りません.\n"
 "                              デフォルト値: true"
 
-#: src/main.cc:246
+#: src/main.cc:252
 msgid ""
 " --direct-file-mapping=true|false Directly read from and write to each file\n"
 "                              mentioned in .torrent file.\n"
@@ -1354,7 +1362,7 @@ msgstr ""
 "                              します.\n"
 "                              デフォルト値: true"
 
-#: src/main.cc:249
+#: src/main.cc:255
 msgid ""
 " --listen-port=PORT           Set TCP port number for BitTorrent downloads.\n"
 "                              Default: 6881-6999"
@@ -1362,7 +1370,7 @@ msgstr ""
 " --listen-port=PORT           ピアからの接続を受け付けるポート番号を指定.\n"
 "                              デフォルト値: 6881-6999"
 
-#: src/main.cc:251
+#: src/main.cc:257
 msgid ""
 " --max-upload-limit=SPEED     Set max upload speed in bytes per sec.\n"
 "                              0 means unrestricted.\n"
@@ -1377,7 +1385,7 @@ msgstr ""
 "1024K).\n"
 "                              デフォルト値: 0"
 
-#: src/main.cc:255
+#: src/main.cc:261
 msgid ""
 " --seed-time=MINUTES          Specify seeding time in minutes. Also see the\n"
 "                              --seed-ratio option."
@@ -1385,7 +1393,7 @@ msgstr ""
 " --seed-time=MINUTES          シードを行う時間を分単位で指定します. \n"
 "                              --seed-ratio オプションも参照してください."
 
-#: src/main.cc:257
+#: src/main.cc:263
 msgid ""
 " --seed-ratio=RATIO           Specify share ratio. Seed completed torrents\n"
 "                              until share ratio reaches RATIO. 1.0 is\n"
@@ -1403,7 +1411,7 @@ msgstr ""
 "く\n"
 "                              とも一方の条件が成立するとシードを終了します."
 
-#: src/main.cc:262
+#: src/main.cc:268
 msgid ""
 " --peer-id-prefix=PEERI_ID_PREFIX Specify the prefix of peer ID. The peer ID "
 "in\n"
@@ -1427,11 +1435,11 @@ msgstr ""
 "す.\n"
 "                               デフォルト値: -aria2-"
 
-#: src/main.cc:271
+#: src/main.cc:277
 msgid " -M, --metalink-file=METALINK_FILE The file path to the .metalink file."
 msgstr " -M, --metalink-file=METALINK_FILE .metalink ファイルのパスを指定."
 
-#: src/main.cc:272
+#: src/main.cc:278
 msgid ""
 " -C, --metalink-servers=NUM_SERVERS The number of servers to connect to\n"
 "                              simultaneously.\n"
@@ -1440,15 +1448,15 @@ msgstr ""
 " -C, --metalink-servers=NUM_SERVERS 同時に接続するサーバの数を指定します.\n"
 "                              デフォルト値: 5"
 
-#: src/main.cc:275
+#: src/main.cc:281
 msgid " --metalink-version=VERSION   The version of the file to download."
 msgstr " --metalink-version=VERSION   ダウンロードするファイルのバージョン."
 
-#: src/main.cc:276
+#: src/main.cc:282
 msgid " --metalink-language=LANGUAGE The language of the file to download."
 msgstr " --metalink-language=LANGUAGE ダウンロードするファイルの言語."
 
-#: src/main.cc:277
+#: src/main.cc:283
 msgid ""
 " --metalink-os=OS             The operating system of the file to download."
 msgstr ""
@@ -1456,11 +1464,11 @@ msgstr ""
 "レー\n"
 "                              ティング・システム."
 
-#: src/main.cc:278
+#: src/main.cc:284
 msgid " --metalink-location=LOCATION The location of the prefered server."
 msgstr " --metalink-location=LOCATION 優先的にダウンロードするサーバーの場所."
 
-#: src/main.cc:279
+#: src/main.cc:285
 msgid ""
 " --follow-metalink=true|false Set to false to prevent aria2 from\n"
 "                              entering Metalink mode even if the filename "
@@ -1475,16 +1483,16 @@ msgstr ""
 "                              は, Metalink モードに入りません.\n"
 "                              デフォルト値: true"
 
-#: src/main.cc:284
+#: src/main.cc:290
 msgid " -v, --version                Print the version number and exit."
 msgstr " -v, --version                バージョン番号を表示し, 終了します."
 
-#: src/main.cc:285
+#: src/main.cc:291
 msgid " -h, --help                   Print this message and exit."
 msgstr ""
 " -h, --help                   このヘルプメッセージを表示し, 終了します."
 
-#: src/main.cc:288
+#: src/main.cc:294
 msgid ""
 " You can specify multiple URLs. All URLs must point to the same file\n"
 " or downloading will fail."
@@ -1493,7 +1501,7 @@ msgstr ""
 "れ\n"
 " ばなりません. さもなくばダウンロードは失敗します."
 
-#: src/main.cc:293
+#: src/main.cc:299
 msgid ""
 " Specify files in multi-file torrent to download. Use in conjunction with "
 "the\n"
@@ -1503,64 +1511,72 @@ msgstr ""
 "ン\n"
 " と共に使用します. --select-file オプションと併用はできません."
 
-#: src/main.cc:297
+#: src/main.cc:303
 msgid "Examples:"
 msgstr "例:"
 
-#: src/main.cc:298
+#: src/main.cc:304
 msgid " Download a file using 1 connection:"
 msgstr " 1 コネクションでのダウンロード:"
 
-#: src/main.cc:300
+#: src/main.cc:306
 msgid " Download a file using 2 connections:"
 msgstr " 2 コネクションでのダウンロード:"
 
-#: src/main.cc:302
+#: src/main.cc:308
 msgid ""
 " Download a file using 2 connections, each connects to a different server:"
 msgstr " 二つの異なるサーバーに接続してダウンロード:"
 
-#: src/main.cc:304
+#: src/main.cc:310
 msgid " You can mix up different protocols:"
 msgstr " 異なるプロトコルを混合させてダウンロード:"
 
-#: src/main.cc:308
+#: src/main.cc:312
+msgid " Parameterized URI:"
+msgstr ""
+
+#: src/main.cc:314
+msgid " Parameterized URI. -Z option must be specified:"
+msgstr ""
+
+#: src/main.cc:318
 msgid " Download a torrent:"
 msgstr " torrent をダウンロード:"
 
-#: src/main.cc:310
+#: src/main.cc:320
 msgid " Download a torrent using a local .torrent file:"
 msgstr " ローカル .torrent ファイルを使ってダウンロード:"
 
-#: src/main.cc:312 src/main.cc:325
+#: src/main.cc:322 src/main.cc:335
 msgid " Download only selected files:"
 msgstr " ファイルを指定してダウンロード:"
 
-#: src/main.cc:314
+#: src/main.cc:324
 msgid " Print file listing of .torrent file:"
 msgstr " この .torrent ファイルに含まれるファイルリストを表示:"
 
-#: src/main.cc:319
+#: src/main.cc:329
 msgid " Metalink downloading:"
 msgstr " Metalink でダウンロード:"
 
-#: src/main.cc:321
+#: src/main.cc:331
 msgid " Download a file using local .metalink file:"
 msgstr " ローカル .metalink ファイルを使ってダウンロード:"
 
-#: src/main.cc:323
+#: src/main.cc:333
 msgid " Metalink downloading with preferences:"
 msgstr " ユーザ設定による Metalink ダウンロード:"
 
-#: src/main.cc:327
+#: src/main.cc:337
 msgid " Download only selected files using index:"
 msgstr " ファイルのインデックスを指定してダウンロード:"
 
-#: src/main.cc:329
+#: src/main.cc:339
 msgid " Print file listing of .metalink file:"
 msgstr " この .metalink ファイルに含まれるファイルリストを表示:"
 
-#: src/main.cc:333
+#: src/main.cc:343
 #, c-format
 msgid "Report bugs to %s"
 msgstr "バグレポートはこちらへ: %s"

BIN
po/ru.gmo


+ 93 - 77
po/ru.po

@@ -10,7 +10,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: ru\n"
 "Report-Msgid-Bugs-To: http://aria2.sourceforge.net/\n"
-"POT-Creation-Date: 2007-08-09 23:54+0900\n"
+"POT-Creation-Date: 2007-08-28 20:46+0900\n"
 "PO-Revision-Date: 2006-07-28 18:04+0600\n"
 "Last-Translator: Azamat H. Hackimov <azamat.hackimov@gmail.com>\n"
 "Language-Team:  <ru@li.org>\n"
@@ -820,11 +820,11 @@ msgstr ""
 msgid "Errors occurred while binding port.\n"
 msgstr "Ошибка при открытии порта.\n"
 
-#: src/main.cc:89
+#: src/main.cc:91
 msgid " version "
 msgstr " версия "
 
-#: src/main.cc:99
+#: src/main.cc:101
 #, fuzzy
 msgid ""
 "This program is free software; you can redistribute it and/or modify\n"
@@ -856,42 +856,42 @@ msgstr ""
 "along with this program; if not, write to the Free Software\n"
 "Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\n"
 
-#: src/main.cc:113
+#: src/main.cc:115
 #, fuzzy
 msgid "Contact Info:"
 msgstr "Связь с автором: %s\n"
 
-#: src/main.cc:120
+#: src/main.cc:122
 #, c-format
 msgid "Usage: %s [options] URL ...\n"
 msgstr "Использование: %s [параметры] URL ...\n"
 
-#: src/main.cc:122
+#: src/main.cc:124
 #, c-format
 msgid "       %s [options] -T TORRENT_FILE FILE ...\n"
 msgstr "       %s [параметры] -T TORRENT_FILE FILE ...\n"
 
-#: src/main.cc:125
+#: src/main.cc:127
 #, c-format
 msgid "       %s [options] -M METALINK_FILE\n"
 msgstr "       %s [параметры] -M METALINK_FILE\n"
 
-#: src/main.cc:128
+#: src/main.cc:130
 msgid "Options:"
 msgstr "Параметры:"
 
-#: src/main.cc:129
+#: src/main.cc:131
 #, fuzzy
 msgid ""
 " -d, --dir=DIR                The directory to store the downloaded file."
 msgstr " -d, --dir=DIR                Каталог для сохранения скачанных файлов."
 
-#: src/main.cc:130
+#: src/main.cc:132
 #, fuzzy
 msgid " -o, --out=FILE               The file name of the downloaded file."
 msgstr " -o, --out=FILE               Имя файла для скачанного файла."
 
-#: src/main.cc:131
+#: src/main.cc:133
 #, fuzzy
 msgid ""
 " -l, --log=LOG                The file name of the log file. If '-' is\n"
@@ -900,11 +900,11 @@ msgstr ""
 " -l, --log=LOG                Имя файла для логов. Если указано \"-\",\n"
 "                              логи будут выведены в stdout."
 
-#: src/main.cc:134
+#: src/main.cc:136
 msgid " -D, --daemon                 Run as daemon."
 msgstr " -D, --daemon                 Запустить в качестве демона."
 
-#: src/main.cc:136
+#: src/main.cc:138
 #, fuzzy
 msgid ""
 " -s, --split=N                Download a file using N connections. N must "
@@ -922,7 +922,7 @@ msgstr ""
 "                              Следуя этому, aria2 соединяется к каждому URL\n"
 "                              используя N соединений."
 
-#: src/main.cc:141
+#: src/main.cc:143
 #, fuzzy
 msgid ""
 " --retry-wait=SEC             Set the seconds to wait to retry after an "
@@ -936,13 +936,13 @@ msgstr ""
 "60.\n"
 "                              По умолчанию: 5"
 
-#: src/main.cc:144
+#: src/main.cc:146
 #, fuzzy
 msgid " -t, --timeout=SEC            Set timeout in seconds. Default: 60"
 msgstr ""
 " -t, --timeout=SEC            Установить таймаут в секундах. По умолчанию: 60"
 
-#: src/main.cc:145
+#: src/main.cc:147
 msgid ""
 " -m, --max-tries=N            Set number of tries. 0 means unlimited.\n"
 "                              Default: 5"
@@ -950,7 +950,7 @@ msgstr ""
 " -m, --max-tries=N            Установить число попыток. 0 означает\n"
 "                              неограниченное число. По умолчанию: 5"
 
-#: src/main.cc:153
+#: src/main.cc:155
 #, fuzzy
 msgid ""
 " --http-proxy=HOST:PORT       Use HTTP proxy server. This affects all URLs."
@@ -958,21 +958,21 @@ msgstr ""
 " --http-proxy-user=USER       Установить пользователя для прокси HTTP. Это "
 "влияет на все URL."
 
-#: src/main.cc:154
+#: src/main.cc:156
 #, fuzzy
 msgid " --http-user=USER             Set HTTP user. This affects all URLs."
 msgstr ""
 " --http-user=USER             Установить пользователя для HTTP. Это влияет "
 "на все URL."
 
-#: src/main.cc:155
+#: src/main.cc:157
 #, fuzzy
 msgid " --http-passwd=PASSWD         Set HTTP password. This affects all URLs."
 msgstr ""
 " --http-passwd=PASSWD         Установить пароль для HTTP. Это влияет на все "
 "URL."
 
-#: src/main.cc:156
+#: src/main.cc:158
 #, fuzzy
 msgid ""
 " --http-proxy-user=USER       Set HTTP proxy user. This affects all URLs."
@@ -980,7 +980,7 @@ msgstr ""
 " --http-proxy-user=USER       Установить пользователя для прокси HTTP. Это "
 "влияет на все URL."
 
-#: src/main.cc:157
+#: src/main.cc:159
 #, fuzzy
 msgid ""
 " --http-proxy-passwd=PASSWD   Set HTTP proxy password. This affects all URLs."
@@ -988,7 +988,7 @@ msgstr ""
 " --http-proxy-passwd=PASSWD   Установить пароль для прокси HTTP. Это влияет "
 "на все URL."
 
-#: src/main.cc:158
+#: src/main.cc:160
 msgid ""
 " --http-proxy-method=METHOD   Set the method to use in proxy request.\n"
 "                              METHOD is either 'get' or 'tunnel'.\n"
@@ -1000,7 +1000,7 @@ msgstr ""
 "                              или \"tunnel\".\n"
 "                              По умолчанию: tunnel"
 
-#: src/main.cc:161
+#: src/main.cc:163
 msgid ""
 " --http-auth-scheme=SCHEME    Set HTTP authentication scheme. Currently, "
 "basic\n"
@@ -1011,13 +1011,13 @@ msgstr ""
 "                              момент доступна только схема \"basic\"\n"
 "                              По умолчанию: basic"
 
-#: src/main.cc:164
+#: src/main.cc:166
 #, fuzzy
 msgid " --referer=REFERER            Set Referer. This affects all URLs."
 msgstr ""
 " --referer=REFERER            Установить реферер. Это влияет на все URL."
 
-#: src/main.cc:165
+#: src/main.cc:167
 #, fuzzy
 msgid ""
 " --ftp-user=USER              Set FTP user. This affects all URLs.\n"
@@ -1027,7 +1027,7 @@ msgstr ""
 "URL.\n"
 "                              По умолчанию: anonymous"
 
-#: src/main.cc:167
+#: src/main.cc:169
 #, fuzzy
 msgid ""
 " --ftp-passwd=PASSWD          Set FTP password. This affects all URLs.\n"
@@ -1036,7 +1036,7 @@ msgstr ""
 " --ftp-passwd=PASSWD          Установить пароль FTP. Это влияет на все URL.\n"
 "                              По умолчанию: ARIA2USER@"
 
-#: src/main.cc:169
+#: src/main.cc:171
 msgid ""
 " --ftp-type=TYPE              Set FTP transfer type. TYPE is either "
 "'binary'\n"
@@ -1047,11 +1047,11 @@ msgstr ""
 "                              или \"binary\", или \"ascii\".\n"
 "                              По умолчанию: binary"
 
-#: src/main.cc:172
+#: src/main.cc:174
 msgid " -p, --ftp-pasv               Use passive mode in FTP."
 msgstr " -p, --ftp-pasv               Использовать пассивный режим для FTP."
 
-#: src/main.cc:173
+#: src/main.cc:175
 msgid ""
 " --ftp-via-http-proxy=METHOD  Use HTTP proxy in FTP. METHOD is either 'get' "
 "or\n"
@@ -1063,7 +1063,7 @@ msgstr ""
 "                              быть \"get\" или \"tunnel\".\n"
 "                              По умолчанию: tunnel"
 
-#: src/main.cc:176
+#: src/main.cc:178
 #, fuzzy
 msgid ""
 " --lowest-speed-limit=SPEED   Close connection if download speed is lower "
@@ -1081,7 +1081,7 @@ msgstr ""
 "60.\n"
 "                              По умолчанию: 5"
 
-#: src/main.cc:183
+#: src/main.cc:185
 #, fuzzy
 msgid ""
 " --max-download-limit=SPEED   Set max download speed in bytes per sec.\n"
@@ -1094,7 +1094,7 @@ msgstr ""
 "60.\n"
 "                              По умолчанию: 5"
 
-#: src/main.cc:187
+#: src/main.cc:189
 #, fuzzy
 msgid ""
 " --file-allocation=METHOD     Specify file allocation method. METHOD is "
@@ -1113,7 +1113,7 @@ msgstr ""
 "60.\n"
 "                              По умолчанию: 5"
 
-#: src/main.cc:193
+#: src/main.cc:195
 #, fuzzy
 msgid ""
 " --allow-overwrite=true|false If false, aria2 doesn't download a file which\n"
@@ -1128,7 +1128,15 @@ msgstr ""
 "                              файлы.\n"
 "                              По умолчанию: true"
 
-#: src/main.cc:198
+#: src/main.cc:199
+msgid ""
+" -Z, --force-sequential       Fetch URIs in the command-line sequentially "
+"and\n"
+"                              download each URI in a separate session, like\n"
+"                              the usual command-line download utilities."
+msgstr ""
+
+#: src/main.cc:204
 #, fuzzy
 msgid ""
 " --check-integrity=true|false  Check file integrity by validating piece "
@@ -1149,7 +1157,7 @@ msgstr ""
 "60.\n"
 "                              По умолчанию: 5"
 
-#: src/main.cc:206
+#: src/main.cc:212
 #, fuzzy
 msgid ""
 " --realtime-chunk-checksum=true|false  Validate chunk checksum while\n"
@@ -1165,7 +1173,7 @@ msgstr ""
 "                              файлы.\n"
 "                              По умолчанию: true"
 
-#: src/main.cc:211
+#: src/main.cc:217
 msgid ""
 " -c, --continue               Continue downloading a partially downloaded\n"
 "                              file. Use this option to resume a download\n"
@@ -1175,15 +1183,15 @@ msgid ""
 "                              applicable to http(s)/ftp downloads."
 msgstr ""
 
-#: src/main.cc:217
+#: src/main.cc:223
 msgid " -U, --user-agent=USER_AGENT  Set user agent for http(s) downloads."
 msgstr ""
 
-#: src/main.cc:218
+#: src/main.cc:224
 msgid " -n, --no-netrc               Disables netrc support."
 msgstr ""
 
-#: src/main.cc:219
+#: src/main.cc:225
 msgid ""
 " -i, --input-file=FILE        Downloads URIs found in FILE. You can specify\n"
 "                              multiple URIs for a single entity: separate\n"
@@ -1192,7 +1200,7 @@ msgid ""
 "                              Reads input from stdin when '-' is specified."
 msgstr ""
 
-#: src/main.cc:223
+#: src/main.cc:229
 #, fuzzy
 msgid ""
 " -j, --max-concurrent-downloads=N Set maximum number of concurrent "
@@ -1203,13 +1211,13 @@ msgstr ""
 " -m, --max-tries=N            Установить число попыток. 0 означает\n"
 "                              неограниченное число. По умолчанию: 5"
 
-#: src/main.cc:226
+#: src/main.cc:232
 msgid ""
 " --load-cookies=FILE          Load cookies from FILE. The format of FILE is\n"
 "                              the same used by Netscape and Mozilla."
 msgstr ""
 
-#: src/main.cc:229
+#: src/main.cc:235
 #, fuzzy
 msgid ""
 " -S, --show-files             Print file listing of .torrent or .metalink "
@@ -1218,7 +1226,7 @@ msgid ""
 msgstr ""
 " -S, --show-files             Вывести перечисленные .torrent файлы и выйти."
 
-#: src/main.cc:231
+#: src/main.cc:237
 #, fuzzy
 msgid ""
 " --select-file=INDEX...       Set file to download by specifing its index.\n"
@@ -1240,12 +1248,12 @@ msgstr ""
 "                              Также вы можете использовать тире (\"1-5\").\n"
 "                              \",\" и \"-\" могут быть использованы вместе."
 
-#: src/main.cc:241
+#: src/main.cc:247
 #, fuzzy
 msgid " -T, --torrent-file=TORRENT_FILE  The path to the .torrent file."
 msgstr " -T, --torrent-file=TORRENT_FILE  Путь до .torrent-файла."
 
-#: src/main.cc:242
+#: src/main.cc:248
 #, fuzzy
 msgid ""
 " --follow-torrent=true|false  Set to false to prevent aria2 from\n"
@@ -1260,7 +1268,7 @@ msgstr ""
 "                              файлы.\n"
 "                              По умолчанию: true"
 
-#: src/main.cc:246
+#: src/main.cc:252
 msgid ""
 " --direct-file-mapping=true|false Directly read from and write to each file\n"
 "                              mentioned in .torrent file.\n"
@@ -1270,7 +1278,7 @@ msgstr ""
 "                              описанный в .torrent-файл.\n"
 "                              По умолчанию: true"
 
-#: src/main.cc:249
+#: src/main.cc:255
 #, fuzzy
 msgid ""
 " --listen-port=PORT           Set TCP port number for BitTorrent downloads.\n"
@@ -1278,7 +1286,7 @@ msgid ""
 msgstr ""
 " --listen-port=PORT           Установить порт для прослушивания соединения."
 
-#: src/main.cc:251
+#: src/main.cc:257
 #, fuzzy
 msgid ""
 " --max-upload-limit=SPEED     Set max upload speed in bytes per sec.\n"
@@ -1291,7 +1299,7 @@ msgstr ""
 "60.\n"
 "                              По умолчанию: 5"
 
-#: src/main.cc:255
+#: src/main.cc:261
 #, fuzzy
 msgid ""
 " --seed-time=MINUTES          Specify seeding time in minutes. Also see the\n"
@@ -1300,7 +1308,7 @@ msgstr ""
 " -m, --max-tries=N            Установить число попыток. 0 означает\n"
 "                              неограниченное число. По умолчанию: 5"
 
-#: src/main.cc:257
+#: src/main.cc:263
 #, fuzzy
 msgid ""
 " --seed-ratio=RATIO           Specify share ratio. Seed completed torrents\n"
@@ -1317,7 +1325,7 @@ msgstr ""
 "                              Следуя этому, aria2 соединяется к каждому URL\n"
 "                              используя N соединений."
 
-#: src/main.cc:262
+#: src/main.cc:268
 msgid ""
 " --peer-id-prefix=PEERI_ID_PREFIX Specify the prefix of peer ID. The peer ID "
 "in\n"
@@ -1330,12 +1338,12 @@ msgid ""
 "                              Default: -aria2-"
 msgstr ""
 
-#: src/main.cc:271
+#: src/main.cc:277
 #, fuzzy
 msgid " -M, --metalink-file=METALINK_FILE The file path to the .metalink file."
 msgstr " -M, --metalink-file=METALINK_FILE Путь к .metalink-файлу."
 
-#: src/main.cc:272
+#: src/main.cc:278
 #, fuzzy
 msgid ""
 " -C, --metalink-servers=NUM_SERVERS The number of servers to connect to\n"
@@ -1348,27 +1356,27 @@ msgstr ""
 "параметр -s.\n"
 "                              По умолчанию: 15"
 
-#: src/main.cc:275
+#: src/main.cc:281
 #, fuzzy
 msgid " --metalink-version=VERSION   The version of the file to download."
 msgstr " --metalink-version=VERSION   Версия файла для скачивания."
 
-#: src/main.cc:276
+#: src/main.cc:282
 #, fuzzy
 msgid " --metalink-language=LANGUAGE The language of the file to download."
 msgstr " --metalink-language=LANGUAGE Язык файла для скачивания."
 
-#: src/main.cc:277
+#: src/main.cc:283
 #, fuzzy
 msgid ""
 " --metalink-os=OS             The operating system of the file to download."
 msgstr " --metalink-os=OS             Целевая операционная система файла."
 
-#: src/main.cc:278
+#: src/main.cc:284
 msgid " --metalink-location=LOCATION The location of the prefered server."
 msgstr ""
 
-#: src/main.cc:279
+#: src/main.cc:285
 #, fuzzy
 msgid ""
 " --follow-metalink=true|false Set to false to prevent aria2 from\n"
@@ -1383,15 +1391,15 @@ msgstr ""
 "                              файлы.\n"
 "                              По умолчанию: true"
 
-#: src/main.cc:284
+#: src/main.cc:290
 msgid " -v, --version                Print the version number and exit."
 msgstr " -v, --version                Вывести номер версии и выйти."
 
-#: src/main.cc:285
+#: src/main.cc:291
 msgid " -h, --help                   Print this message and exit."
 msgstr " -h, --help                   Вывести это сообщение и выйти."
 
-#: src/main.cc:288
+#: src/main.cc:294
 #, fuzzy
 msgid ""
 " You can specify multiple URLs. All URLs must point to the same file\n"
@@ -1400,7 +1408,7 @@ msgstr ""
 " Вы можете указать несколько URL. Все URL должны указывать на один и тот же\n"
 " файл, иначе скачивание завершится неудачей."
 
-#: src/main.cc:293
+#: src/main.cc:299
 #, fuzzy
 msgid ""
 " Specify files in multi-file torrent to download. Use in conjunction with "
@@ -1410,70 +1418,78 @@ msgstr ""
 " Указать файлы для скачивания при многофайловом torent. Используйте вместе\n"
 " с параметром -T. Этот параметр игнорируется при указании --select-file."
 
-#: src/main.cc:297
+#: src/main.cc:303
 msgid "Examples:"
 msgstr "Примеры:"
 
-#: src/main.cc:298
+#: src/main.cc:304
 #, fuzzy
 msgid " Download a file using 1 connection:"
 msgstr " Скачать файл с помощью 1 соединения:"
 
-#: src/main.cc:300
+#: src/main.cc:306
 #, fuzzy
 msgid " Download a file using 2 connections:"
 msgstr " Скачать файл с помощью 2 соединений:"
 
-#: src/main.cc:302
+#: src/main.cc:308
 #, fuzzy
 msgid ""
 " Download a file using 2 connections, each connects to a different server:"
 msgstr " Скачать файл с помощью 2 соединений к различным серверам:"
 
-#: src/main.cc:304
+#: src/main.cc:310
 msgid " You can mix up different protocols:"
 msgstr " Вы можете смешивать различные протоколы:"
 
-#: src/main.cc:308
+#: src/main.cc:312
+msgid " Parameterized URI:"
+msgstr ""
+
+#: src/main.cc:314
+msgid " Parameterized URI. -Z option must be specified:"
+msgstr ""
+
+#: src/main.cc:318
 msgid " Download a torrent:"
 msgstr " Скачать torrent:"
 
-#: src/main.cc:310
+#: src/main.cc:320
 #, fuzzy
 msgid " Download a torrent using a local .torrent file:"
 msgstr " Скачать torrent с помощью локального .torrent-файла:"
 
-#: src/main.cc:312 src/main.cc:325
+#: src/main.cc:322 src/main.cc:335
 msgid " Download only selected files:"
 msgstr " Скачать только выбранные файлы:"
 
-#: src/main.cc:314
+#: src/main.cc:324
 msgid " Print file listing of .torrent file:"
 msgstr " Вывести список фалов из .torrent"
 
-#: src/main.cc:319
+#: src/main.cc:329
 msgid " Metalink downloading:"
 msgstr " Скачать metalink:"
 
-#: src/main.cc:321
+#: src/main.cc:331
 msgid " Download a file using local .metalink file:"
 msgstr " Скачать файл с помощью локального .metalink-файла:"
 
-#: src/main.cc:323
+#: src/main.cc:333
 msgid " Metalink downloading with preferences:"
 msgstr " Скачивание metalink с настройками:"
 
-#: src/main.cc:327
+#: src/main.cc:337
 #, fuzzy
 msgid " Download only selected files using index:"
 msgstr " Скачать только выбранные файлы:"
 
-#: src/main.cc:329
+#: src/main.cc:339
 #, fuzzy
 msgid " Print file listing of .metalink file:"
 msgstr " Вывести список фалов из .torrent"
 
-#: src/main.cc:333
+#: src/main.cc:343
 #, c-format
 msgid "Report bugs to %s"
 msgstr "Сообщения об ошибках направляйте на адрес %s"

+ 84 - 0
src/AlphaNumberDecorator.h

@@ -0,0 +1,84 @@
+/* <!-- copyright */
+/*
+ * aria2 - The high speed download utility
+ *
+ * Copyright (C) 2006 Tatsuhiro Tsujikawa
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ * In addition, as a special exception, the copyright holders give
+ * permission to link the code of portions of this program with the
+ * OpenSSL library under certain conditions as described in each
+ * individual source file, and distribute linked combinations
+ * including the two.
+ * You must obey the GNU General Public License in all respects
+ * for all of the code used other than OpenSSL.  If you modify
+ * file(s) with this exception, you may extend this exception to your
+ * version of the file(s), but you are not obligated to do so.  If you
+ * do not wish to do so, delete this exception statement from your
+ * version.  If you delete this exception statement from all source
+ * files in the program, then also delete it here.
+ */
+/* copyright --> */
+#ifndef _D_ALPHA_NUMBER_DECORATOR_H_
+#define _D_ALPHA_NUMBER_DECORATOR_H_
+
+#include "NumberDecorator.h"
+#include "FatalException.h"
+
+class AlphaNumberDecorator : public NumberDecorator
+{
+private:
+
+  int32_t _width;
+
+  string _zero;
+
+  string widen(const string& s, int32_t width)
+  {
+    string t = s;
+    while(t.size() < (size_t)width) {
+      t.insert(0, _zero);
+    }
+    return t;
+  }
+
+public:
+  AlphaNumberDecorator(int32_t width, bool uppercase = false):
+    _width(width), _zero(uppercase?"A":"a") {}
+
+  virtual ~AlphaNumberDecorator() {}
+
+  virtual string decorate(int32_t number)
+  {
+    if(number < 0) {
+      throw new FatalException("The number must be greater than 0.");
+    }
+    if(number == 0) {
+      return widen(_zero, _width);
+    }
+    int32_t base = 26;
+    string x;
+    while(number > 0) {
+      int32_t r = number%base;
+      char alpha = _zero[0]+r;
+      x.insert(0, string(1, alpha));
+      number /= base;
+    }
+    return widen(x, _width);
+  }
+};
+
+#endif // _D_ALPHA_NUMBER_DECORATOR_H_

+ 60 - 0
src/FixedWidthNumberDecorator.h

@@ -0,0 +1,60 @@
+/* <!-- copyright */
+/*
+ * aria2 - The high speed download utility
+ *
+ * Copyright (C) 2006 Tatsuhiro Tsujikawa
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ * In addition, as a special exception, the copyright holders give
+ * permission to link the code of portions of this program with the
+ * OpenSSL library under certain conditions as described in each
+ * individual source file, and distribute linked combinations
+ * including the two.
+ * You must obey the GNU General Public License in all respects
+ * for all of the code used other than OpenSSL.  If you modify
+ * file(s) with this exception, you may extend this exception to your
+ * version of the file(s), but you are not obligated to do so.  If you
+ * do not wish to do so, delete this exception statement from your
+ * version.  If you delete this exception statement from all source
+ * files in the program, then also delete it here.
+ */
+/* copyright --> */
+#ifndef _D_FIXED_WIDTH_NUMBER_DECORATOR_H_
+#define _D_FIXED_WIDTH_NUMBER_DECORATOR_H_
+
+#include "NumberDecorator.h"
+#include "Util.h"
+
+class FixedWidthNumberDecorator : public NumberDecorator
+{
+private:
+  int32_t _width;
+public:
+  FixedWidthNumberDecorator(int32_t width):_width(width) {}
+
+  virtual ~FixedWidthNumberDecorator() {}
+
+  virtual string decorate(int32_t number)
+  {
+    string s = Util::itos(number);
+    while(s.size() < (size_t)_width) {
+      s.insert(0, "0");
+    }
+    return s;
+  }
+};
+
+#endif // _D_FIXED_WIDTH_NUMBER_DECORATOR_H_

+ 11 - 1
src/Makefile.am

@@ -98,7 +98,17 @@ SRCS =  Socket.h\
 	CookieBoxFactory.cc CookieBoxFactory.h\
 	HttpHeaderProcessor.cc HttpHeaderProcessor.h\
 	FileEntry.cc FileEntry.h\
-	Platform.cc Platform.h
+	Platform.cc Platform.h\
+	PStringDatum.h\
+	PStringSegment.cc PStringSegment.h\
+	PStringNumLoop.h\
+	PStringSelect.h\
+	PStringVisitor.h\
+	PStringBuildVisitor.cc PStringBuildVisitor.h\
+	ParameterizedStringParser.cc ParameterizedStringParser.h\
+	FixedWidthNumberDecorator.h\
+	NumberDecorator.h\
+	AlphaNumberDecorator.h
 #	debug_new.cpp
 
 if ENABLE_MESSAGE_DIGEST

+ 22 - 7
src/Makefile.in

@@ -256,8 +256,13 @@ am__libaria2c_a_SOURCES_DIST = Socket.h SocketCore.cc SocketCore.h \
 	CookieParser.cc CookieParser.h CookieBoxFactory.cc \
 	CookieBoxFactory.h HttpHeaderProcessor.cc \
 	HttpHeaderProcessor.h FileEntry.cc FileEntry.h Platform.cc \
-	Platform.h ChunkChecksumValidator.cc ChunkChecksumValidator.h \
-	IteratableChunkChecksumValidator.cc \
+	Platform.h PStringDatum.h PStringSegment.cc PStringSegment.h \
+	PStringNumLoop.h PStringSelect.h PStringVisitor.h \
+	PStringBuildVisitor.cc PStringBuildVisitor.h \
+	ParameterizedStringParser.cc ParameterizedStringParser.h \
+	FixedWidthNumberDecorator.h NumberDecorator.h \
+	AlphaNumberDecorator.h ChunkChecksumValidator.cc \
+	ChunkChecksumValidator.h IteratableChunkChecksumValidator.cc \
 	IteratableChunkChecksumValidator.h \
 	IteratableChecksumValidator.cc IteratableChecksumValidator.h \
 	ChecksumCommand.cc ChecksumCommand.h CheckIntegrityCommand.cc \
@@ -464,7 +469,9 @@ am__objects_12 = SocketCore.$(OBJEXT) Command.$(OBJEXT) \
 	RealtimeCommand.$(OBJEXT) RequestGroupEntry.$(OBJEXT) \
 	Cookie.$(OBJEXT) CookieParser.$(OBJEXT) \
 	CookieBoxFactory.$(OBJEXT) HttpHeaderProcessor.$(OBJEXT) \
-	FileEntry.$(OBJEXT) Platform.$(OBJEXT) $(am__objects_1) \
+	FileEntry.$(OBJEXT) Platform.$(OBJEXT) \
+	PStringSegment.$(OBJEXT) PStringBuildVisitor.$(OBJEXT) \
+	ParameterizedStringParser.$(OBJEXT) $(am__objects_1) \
 	$(am__objects_2) $(am__objects_3) $(am__objects_4) \
 	$(am__objects_5) $(am__objects_6) $(am__objects_7) \
 	$(am__objects_8) $(am__objects_9) $(am__objects_10) \
@@ -721,10 +728,15 @@ SRCS = Socket.h SocketCore.cc SocketCore.h Command.cc Command.h \
 	CookieParser.cc CookieParser.h CookieBoxFactory.cc \
 	CookieBoxFactory.h HttpHeaderProcessor.cc \
 	HttpHeaderProcessor.h FileEntry.cc FileEntry.h Platform.cc \
-	Platform.h $(am__append_1) $(am__append_2) $(am__append_3) \
-	$(am__append_4) $(am__append_5) $(am__append_6) \
-	$(am__append_7) $(am__append_8) $(am__append_9) \
-	$(am__append_10) $(am__append_11)
+	Platform.h PStringDatum.h PStringSegment.cc PStringSegment.h \
+	PStringNumLoop.h PStringSelect.h PStringVisitor.h \
+	PStringBuildVisitor.cc PStringBuildVisitor.h \
+	ParameterizedStringParser.cc ParameterizedStringParser.h \
+	FixedWidthNumberDecorator.h NumberDecorator.h \
+	AlphaNumberDecorator.h $(am__append_1) $(am__append_2) \
+	$(am__append_3) $(am__append_4) $(am__append_5) \
+	$(am__append_6) $(am__append_7) $(am__append_8) \
+	$(am__append_9) $(am__append_10) $(am__append_11)
 noinst_LIBRARIES = libaria2c.a
 libaria2c_a_SOURCES = $(SRCS)
 aria2c_LDADD = libaria2c.a @LIBINTL@ @ALLOCA@ @LIBGNUTLS_LIBS@\
@@ -927,6 +939,9 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Option.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/OptionHandlerFactory.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/OptionParser.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/PStringBuildVisitor.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/PStringSegment.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ParameterizedStringParser.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Peer.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/PeerAbstractCommand.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/PeerChokeCommand.Po@am__quote@

+ 49 - 0
src/NumberDecorator.h

@@ -0,0 +1,49 @@
+/* <!-- copyright */
+/*
+ * aria2 - The high speed download utility
+ *
+ * Copyright (C) 2006 Tatsuhiro Tsujikawa
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ * In addition, as a special exception, the copyright holders give
+ * permission to link the code of portions of this program with the
+ * OpenSSL library under certain conditions as described in each
+ * individual source file, and distribute linked combinations
+ * including the two.
+ * You must obey the GNU General Public License in all respects
+ * for all of the code used other than OpenSSL.  If you modify
+ * file(s) with this exception, you may extend this exception to your
+ * version of the file(s), but you are not obligated to do so.  If you
+ * do not wish to do so, delete this exception statement from your
+ * version.  If you delete this exception statement from all source
+ * files in the program, then also delete it here.
+ */
+/* copyright --> */
+#ifndef _D_NUMBER_DECORATOR_H_
+#define _D_NUMBER_DECORATOR_H_
+
+#include "common.h"
+
+class NumberDecorator {
+public:
+  virtual ~NumberDecorator() {}
+
+  virtual string decorate(int32_t number) = 0;
+};
+
+typedef SharedHandle<NumberDecorator> NumberDecoratorHandle;
+
+#endif // _D_NUMBER_DECORATOR_H_

+ 1 - 0
src/OptionHandlerFactory.cc

@@ -94,6 +94,7 @@ OptionHandlers OptionHandlerFactory::createOptionHandlers()
   handlers.push_back(new NumberOptionHandler(PREF_MAX_CONCURRENT_DOWNLOADS, 1, 45));
   handlers.push_back(new DefaultOptionHandler(PREF_LOAD_COOKIES));
   handlers.push_back(new DefaultOptionHandler(PREF_PEER_ID_PREFIX));
+  handlers.push_back(new BooleanOptionHandler(PREF_FORCE_SEQUENTIAL));  
 
   return handlers;
 }

+ 54 - 0
src/PStringBuildVisitor.cc

@@ -0,0 +1,54 @@
+/* <!-- copyright */
+/*
+ * aria2 - The high speed download utility
+ *
+ * Copyright (C) 2006 Tatsuhiro Tsujikawa
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ * In addition, as a special exception, the copyright holders give
+ * permission to link the code of portions of this program with the
+ * OpenSSL library under certain conditions as described in each
+ * individual source file, and distribute linked combinations
+ * including the two.
+ * You must obey the GNU General Public License in all respects
+ * for all of the code used other than OpenSSL.  If you modify
+ * file(s) with this exception, you may extend this exception to your
+ * version of the file(s), but you are not obligated to do so.  If you
+ * do not wish to do so, delete this exception statement from your
+ * version.  If you delete this exception statement from all source
+ * files in the program, then also delete it here.
+ */
+/* copyright --> */
+#include "PStringBuildVisitor.h"
+
+void PStringBuildVisitor::hello(PStringSegment* segment)
+{
+  string uri;
+  if(_buildQueue.empty()) {
+    uri += segment->getValue();
+  } else {
+    uri = _buildQueue.front()+segment->getValue();
+  }
+  _buildQueue.push_front(uri);
+  if(!segment->hasNext()) {
+    _uris.push_back(uri);
+  }
+}
+
+void PStringBuildVisitor::goodbye(PStringSegment* segment)
+{
+  _buildQueue.pop_front();
+}

+ 68 - 0
src/PStringBuildVisitor.h

@@ -0,0 +1,68 @@
+/* <!-- copyright */
+/*
+ * aria2 - The high speed download utility
+ *
+ * Copyright (C) 2006 Tatsuhiro Tsujikawa
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ * In addition, as a special exception, the copyright holders give
+ * permission to link the code of portions of this program with the
+ * OpenSSL library under certain conditions as described in each
+ * individual source file, and distribute linked combinations
+ * including the two.
+ * You must obey the GNU General Public License in all respects
+ * for all of the code used other than OpenSSL.  If you modify
+ * file(s) with this exception, you may extend this exception to your
+ * version of the file(s), but you are not obligated to do so.  If you
+ * do not wish to do so, delete this exception statement from your
+ * version.  If you delete this exception statement from all source
+ * files in the program, then also delete it here.
+ */
+/* copyright --> */
+#ifndef _D_P_STRING_BUILD_VISITOR_H_
+#define _D_P_STRING_BUILD_VISITOR_H_
+
+#include "PStringSegment.h"
+
+class PStringBuildVisitor : public PStringVisitor, public PStringSegmentVisitor
+{
+private:
+
+  Strings _buildQueue;
+
+  Strings _uris;
+
+public:
+  
+  virtual void hello(PStringSegment* segment);
+
+  virtual void goodbye(PStringSegment* segment);
+
+  const Strings& getURIs() const
+  {
+    return _uris;
+  }
+
+  void reset()
+  {
+    _buildQueue.clear();
+    _uris.clear();
+  }
+};
+
+typedef SharedHandle<PStringBuildVisitor> PStringBuildVisitorHandle;
+
+#endif // _D_P_STRING_BUILD_VISITOR_H_

+ 51 - 0
src/PStringDatum.h

@@ -0,0 +1,51 @@
+/* <!-- copyright */
+/*
+ * aria2 - The high speed download utility
+ *
+ * Copyright (C) 2006 Tatsuhiro Tsujikawa
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ * In addition, as a special exception, the copyright holders give
+ * permission to link the code of portions of this program with the
+ * OpenSSL library under certain conditions as described in each
+ * individual source file, and distribute linked combinations
+ * including the two.
+ * You must obey the GNU General Public License in all respects
+ * for all of the code used other than OpenSSL.  If you modify
+ * file(s) with this exception, you may extend this exception to your
+ * version of the file(s), but you are not obligated to do so.  If you
+ * do not wish to do so, delete this exception statement from your
+ * version.  If you delete this exception statement from all source
+ * files in the program, then also delete it here.
+ */
+/* copyright --> */
+#ifndef _D_P_STRING_DATUM_H_
+#define _D_P_STRING_DATUM_H_
+
+#include "common.h"
+#include "PStringVisitor.h"
+
+class PStringDatum {
+public:
+  virtual ~PStringDatum() {}
+
+  virtual void accept(const PStringVisitorHandle& visitor) = 0;
+};
+
+typedef SharedHandle<PStringDatum> PStringDatumHandle;
+typedef deque<PStringDatumHandle> PStringData;
+
+#endif // _D_P_STRING_DATUM_H_

+ 100 - 0
src/PStringNumLoop.h

@@ -0,0 +1,100 @@
+/* <!-- copyright */
+/*
+ * aria2 - The high speed download utility
+ *
+ * Copyright (C) 2006 Tatsuhiro Tsujikawa
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ * In addition, as a special exception, the copyright holders give
+ * permission to link the code of portions of this program with the
+ * OpenSSL library under certain conditions as described in each
+ * individual source file, and distribute linked combinations
+ * including the two.
+ * You must obey the GNU General Public License in all respects
+ * for all of the code used other than OpenSSL.  If you modify
+ * file(s) with this exception, you may extend this exception to your
+ * version of the file(s), but you are not obligated to do so.  If you
+ * do not wish to do so, delete this exception statement from your
+ * version.  If you delete this exception statement from all source
+ * files in the program, then also delete it here.
+ */
+/* copyright --> */
+#ifndef _D_P_STRING_NUM_LOOP_H_
+#define _D_P_STRING_NUM_LOOP_H_
+
+#include "PStringDatum.h"
+#include "Util.h"
+#include "PStringSegment.h"
+#include "NumberDecorator.h"
+
+class PStringNumLoop : public PStringDatum
+{
+private:
+  
+  int32_t _startValue;
+
+  int32_t _endValue;
+
+  int32_t _step;
+
+  NumberDecoratorHandle _numberDecorator;
+
+  PStringDatumHandle _next;
+
+public:
+  PStringNumLoop(int32_t startValue, int32_t endValue, int32_t step,
+		 const NumberDecoratorHandle& nd,
+		 const PStringDatumHandle& next = 0):
+    _startValue(startValue),
+    _endValue(endValue),
+    _step(step),
+    _numberDecorator(nd),
+    _next(next) {}
+
+  virtual ~PStringNumLoop() {}
+
+  virtual void accept(const PStringVisitorHandle& visitor)
+  {
+    for(int32_t i = _startValue; i <= _endValue; i += _step) {
+      PStringSegment(_numberDecorator->decorate(i), _next).accept(visitor);
+    }
+  }
+
+  PStringDatumHandle getNext() const
+  {
+    return _next;
+  }
+
+  int32_t getStartValue() const
+  {
+    return _startValue;
+  }
+
+  int32_t getEndValue() const
+  {
+    return _endValue;
+  }
+
+  int32_t getStep() const
+  {
+    return _step;
+  }
+
+};
+
+typedef SharedHandle<PStringNumLoop> PStringNumLoopHandle;
+
+#endif // _D_P_STRING_NUM_LOOP_H_

+ 49 - 0
src/PStringSegment.cc

@@ -0,0 +1,49 @@
+/* <!-- copyright */
+/*
+ * aria2 - The high speed download utility
+ *
+ * Copyright (C) 2006 Tatsuhiro Tsujikawa
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ * In addition, as a special exception, the copyright holders give
+ * permission to link the code of portions of this program with the
+ * OpenSSL library under certain conditions as described in each
+ * individual source file, and distribute linked combinations
+ * including the two.
+ * You must obey the GNU General Public License in all respects
+ * for all of the code used other than OpenSSL.  If you modify
+ * file(s) with this exception, you may extend this exception to your
+ * version of the file(s), but you are not obligated to do so.  If you
+ * do not wish to do so, delete this exception statement from your
+ * version.  If you delete this exception statement from all source
+ * files in the program, then also delete it here.
+ */
+/* copyright --> */
+#include "PStringSegment.h"
+#include "FatalException.h"
+
+void PStringSegment::accept(const PStringVisitorHandle& visitor)
+{
+  PStringSegmentVisitorHandle v = visitor;
+  if(v.isNull()) {
+    throw new FatalException("Class cast exception");
+  }
+  v->hello(this);
+  if(!_next.isNull()) {
+    _next->accept(visitor);
+  }
+  v->goodbye(this);
+}

+ 89 - 0
src/PStringSegment.h

@@ -0,0 +1,89 @@
+/* <!-- copyright */
+/*
+ * aria2 - The high speed download utility
+ *
+ * Copyright (C) 2006 Tatsuhiro Tsujikawa
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ * In addition, as a special exception, the copyright holders give
+ * permission to link the code of portions of this program with the
+ * OpenSSL library under certain conditions as described in each
+ * individual source file, and distribute linked combinations
+ * including the two.
+ * You must obey the GNU General Public License in all respects
+ * for all of the code used other than OpenSSL.  If you modify
+ * file(s) with this exception, you may extend this exception to your
+ * version of the file(s), but you are not obligated to do so.  If you
+ * do not wish to do so, delete this exception statement from your
+ * version.  If you delete this exception statement from all source
+ * files in the program, then also delete it here.
+ */
+/* copyright --> */
+#ifndef _D_P_STRING_SEGMENT_H_
+#define _D_P_STRING_SEGMENT_H_
+
+#include "PStringDatum.h"
+
+class PStringSegmentVisitor;
+
+typedef SharedHandle<PStringSegmentVisitor> PStringSegmentVisitorHandle;
+
+class PStringSegment : public PStringDatum
+{
+private:
+
+  string _value;
+
+  PStringDatumHandle _next;
+
+public:
+  PStringSegment(const string& value, const PStringDatumHandle& next = 0):
+    _value(value), _next(next) {}
+
+  virtual ~PStringSegment() {}
+
+  virtual void accept(const PStringVisitorHandle& visitor);
+
+  const string& getValue() const
+  {
+    return _value;
+  }
+
+  bool hasNext() const
+  {
+    return !_next.isNull();
+  }
+
+  PStringDatumHandle getNext() const
+  {
+    return _next;
+  }
+};
+
+typedef SharedHandle<PStringSegment> PStringSegmentHandle;
+
+class PStringSegmentVisitor {
+public:
+  virtual ~PStringSegmentVisitor() {}
+
+  virtual void hello(PStringSegment* s) = 0;
+  
+  virtual void goodbye(PStringSegment* s) = 0;
+};
+
+typedef SharedHandle<PStringSegmentVisitor> PStringSegmentVisitorHandle;
+
+#endif // _D_P_STRING_SEGMENT_H_

+ 76 - 0
src/PStringSelect.h

@@ -0,0 +1,76 @@
+/* <!-- copyright */
+/*
+ * aria2 - The high speed download utility
+ *
+ * Copyright (C) 2006 Tatsuhiro Tsujikawa
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ * In addition, as a special exception, the copyright holders give
+ * permission to link the code of portions of this program with the
+ * OpenSSL library under certain conditions as described in each
+ * individual source file, and distribute linked combinations
+ * including the two.
+ * You must obey the GNU General Public License in all respects
+ * for all of the code used other than OpenSSL.  If you modify
+ * file(s) with this exception, you may extend this exception to your
+ * version of the file(s), but you are not obligated to do so.  If you
+ * do not wish to do so, delete this exception statement from your
+ * version.  If you delete this exception statement from all source
+ * files in the program, then also delete it here.
+ */
+/* copyright --> */
+#ifndef _D_P_STRING_SELECT_H_
+#define _D_P_STRING_SELECT_H_
+
+#include "PStringDatum.h"
+#include "PStringSegment.h"
+
+class PStringSelect : public PStringDatum
+{
+private:
+  
+  Strings _values;
+
+  PStringDatumHandle _next;
+
+public:
+  PStringSelect(const Strings& values, const PStringDatumHandle& next = 0):
+    _values(values),
+    _next(next) {}
+
+  virtual ~PStringSelect() {}
+
+  virtual void accept(const PStringVisitorHandle& visitor)
+  {
+    for(Strings::iterator itr = _values.begin(); itr != _values.end(); ++itr) {
+      PStringSegment(*itr, _next).accept(visitor);
+    }
+  }
+
+  const Strings& getValues() const
+  {
+    return _values;
+  }
+
+  PStringDatumHandle getNext() const
+  {
+    return _next;
+  }
+};
+
+typedef SharedHandle<PStringSelect> PStringSelectHandle;
+
+#endif // _D_P_STRING_SELECT_H_

+ 47 - 0
src/PStringVisitor.h

@@ -0,0 +1,47 @@
+/* <!-- copyright */
+/*
+ * aria2 - The high speed download utility
+ *
+ * Copyright (C) 2006 Tatsuhiro Tsujikawa
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ * In addition, as a special exception, the copyright holders give
+ * permission to link the code of portions of this program with the
+ * OpenSSL library under certain conditions as described in each
+ * individual source file, and distribute linked combinations
+ * including the two.
+ * You must obey the GNU General Public License in all respects
+ * for all of the code used other than OpenSSL.  If you modify
+ * file(s) with this exception, you may extend this exception to your
+ * version of the file(s), but you are not obligated to do so.  If you
+ * do not wish to do so, delete this exception statement from your
+ * version.  If you delete this exception statement from all source
+ * files in the program, then also delete it here.
+ */
+/* copyright --> */
+#ifndef _D_P_STRING_VISITOR_H_
+#define _D_P_STRING_VISITOR_H_
+
+#include "common.h"
+
+class PStringVisitor {
+public:
+  virtual ~PStringVisitor() {}
+};
+
+typedef SharedHandle<PStringVisitor> PStringVisitorHandle;
+
+#endif // _D_P_STRING_VISITOR_H_

+ 145 - 0
src/ParameterizedStringParser.cc

@@ -0,0 +1,145 @@
+/* <!-- copyright */
+/*
+ * aria2 - The high speed download utility
+ *
+ * Copyright (C) 2006 Tatsuhiro Tsujikawa
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ * In addition, as a special exception, the copyright holders give
+ * permission to link the code of portions of this program with the
+ * OpenSSL library under certain conditions as described in each
+ * individual source file, and distribute linked combinations
+ * including the two.
+ * You must obey the GNU General Public License in all respects
+ * for all of the code used other than OpenSSL.  If you modify
+ * file(s) with this exception, you may extend this exception to your
+ * version of the file(s), but you are not obligated to do so.  If you
+ * do not wish to do so, delete this exception statement from your
+ * version.  If you delete this exception statement from all source
+ * files in the program, then also delete it here.
+ */
+/* copyright --> */
+#include "ParameterizedStringParser.h"
+#include "FatalException.h"
+#include "Util.h"
+#include "PStringSegment.h"
+#include "PStringSelect.h"
+#include "PStringNumLoop.h"
+#include "NumberDecorator.h"
+#include "FixedWidthNumberDecorator.h"
+#include "AlphaNumberDecorator.h"
+
+PStringDatumHandle ParameterizedStringParser::parse(const string& src)
+{
+  int32_t offset = 0;
+  return diggPString(src, offset);
+}
+
+PStringDatumHandle ParameterizedStringParser::diggPString(const string& src,
+							  int32_t& offset)
+{
+  if(src.size() == (size_t)offset) {
+    return 0;
+  }
+  switch(src[offset]) {
+  case '[':
+    return createLoop(src, offset);
+  case '{':
+    return createSelect(src, offset);
+  default:
+    return createSegment(src, offset);
+  } 
+}
+
+PStringDatumHandle ParameterizedStringParser::createSegment(const string& src,
+							    int32_t& offset)
+{
+  string::size_type nextDelimiterIndex = src.find_first_of("[{", offset);
+  if(nextDelimiterIndex == string::npos) {
+    nextDelimiterIndex = src.size();
+  }
+  string value = src.substr(offset, nextDelimiterIndex-offset);
+  offset = nextDelimiterIndex;
+  PStringDatumHandle next = diggPString(src, offset);
+  return new PStringSegment(value, next);
+}
+
+PStringDatumHandle ParameterizedStringParser::createSelect(const string& src,
+							   int32_t& offset)
+{
+  ++offset;
+  string::size_type rightParenIndex = src.find("}", offset);
+  if(rightParenIndex == string::npos) {
+    throw new FatalException("Missing '}' in the parameterized string.");
+  }
+  Strings values;
+  Util::slice(values, src.substr(offset, rightParenIndex-offset), ',', true);
+  if(values.empty()) {
+    throw new FatalException("Empty {} is not allowed.");
+  }
+  offset = rightParenIndex+1;
+  PStringDatumHandle next = diggPString(src, offset);
+  return new PStringSelect(values, next);
+}
+
+PStringDatumHandle ParameterizedStringParser::createLoop(const string& src,
+							 int32_t& offset)
+{
+  ++offset;
+  string::size_type rightParenIndex = src.find("]", offset);
+  if(rightParenIndex == string::npos) {
+    throw new FatalException("Missing ']' in the parameterized string.");
+  }
+  string loopStr = src.substr(offset, rightParenIndex-offset);
+  offset = rightParenIndex+1;
+
+  int32_t step = 1;
+  string::size_type colonIndex = loopStr.find(":");
+  if(colonIndex != string::npos) {
+    string stepStr = loopStr.substr(colonIndex+1);
+    if(Util::isNumber(stepStr)) {
+      step = strtol(stepStr.c_str(), 0, 10);
+    } else {
+      throw new FatalException("A step count must be a number.");
+    }
+    loopStr.erase(colonIndex);
+  }
+  pair<string, string> range = Util::split(loopStr, "-");
+  if(range.first == "" || range.second == "") {
+    throw new FatalException("Loop range missing.");
+  }
+  NumberDecoratorHandle nd = 0;
+  int32_t start;
+  int32_t end;
+  if(Util::isNumber(range.first) && Util::isNumber(range.second)) {
+    nd = new FixedWidthNumberDecorator(range.first.size());
+    start = strtol(range.first.c_str(), 0, 10);
+    end = strtol(range.second.c_str(), 0, 10);
+  } else if(Util::isLowercase(range.first) && Util::isLowercase(range.second)) {
+    nd = new AlphaNumberDecorator(range.first.size());
+    start = Util::alphaToNum(range.first);
+    end = Util::alphaToNum(range.second);
+  } else if(Util::isUppercase(range.first) && Util::isUppercase(range.second)) {
+    nd = new AlphaNumberDecorator(range.first.size(), true);
+    start = Util::alphaToNum(range.first);
+    end = Util::alphaToNum(range.second);
+  } else {
+    throw new FatalException("Invalid loop range.");
+  }
+
+  PStringDatumHandle next = diggPString(src, offset);
+  return new PStringNumLoop(start, end, step, nd, next);
+}

+ 56 - 0
src/ParameterizedStringParser.h

@@ -0,0 +1,56 @@
+/* <!-- copyright */
+/*
+ * aria2 - The high speed download utility
+ *
+ * Copyright (C) 2006 Tatsuhiro Tsujikawa
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ * In addition, as a special exception, the copyright holders give
+ * permission to link the code of portions of this program with the
+ * OpenSSL library under certain conditions as described in each
+ * individual source file, and distribute linked combinations
+ * including the two.
+ * You must obey the GNU General Public License in all respects
+ * for all of the code used other than OpenSSL.  If you modify
+ * file(s) with this exception, you may extend this exception to your
+ * version of the file(s), but you are not obligated to do so.  If you
+ * do not wish to do so, delete this exception statement from your
+ * version.  If you delete this exception statement from all source
+ * files in the program, then also delete it here.
+ */
+/* copyright --> */
+#ifndef _D_PARAMETERIZED_STRING_PARSER_H_
+#define _D_PARAMETERIZED_STRING_PARSER_H_
+
+#include "common.h"
+#include "PStringDatum.h"
+
+class ParameterizedStringParser {
+private:
+  PStringDatumHandle diggPString(const string& src, int32_t& offset);
+
+  PStringDatumHandle createSegment(const string& src, int32_t& offset);
+
+  PStringDatumHandle createLoop(const string& src, int32_t& offset);
+
+  PStringDatumHandle createSelect(const string& src, int32_t& offset);
+
+
+public:
+  PStringDatumHandle parse(const string& parameterizedUri);
+};
+
+#endif // _D_PARAMETERIZED_STRING_PARSER_H_

+ 1 - 0
src/RequestInfo.h

@@ -62,6 +62,7 @@ protected:
     printf(_("\nSome downloads were not complete because of errors."
 	     " Check the log.\n"
 	     "aria2 will resume download if the transfer is restarted."));
+    printf("\n");
   }
 public:
   RequestInfo(Option* op):

+ 59 - 0
src/Util.cc

@@ -694,3 +694,62 @@ void Util::usleep(long microseconds) {
 	#error no usleep function is available (nanosleep?)
 #endif
 }
+
+bool Util::isNumber(const string& what)
+{
+  if(what.empty()) {
+    return false;
+  }
+  for(uint32_t i = 0; i < what.size(); ++i) {
+    if(!isdigit(what[i])) {
+      return false;
+    }
+  }
+  return true;
+}
+
+bool Util::isLowercase(const string& what)
+{
+  if(what.empty()) {
+    return false;
+  }
+  for(uint32_t i = 0; i < what.size(); ++i) {
+    if(!('a' <= what[i] && what[i] <= 'z')) {
+      return false;
+    }
+  }
+  return true;
+}
+
+bool Util::isUppercase(const string& what)
+{
+  if(what.empty()) {
+    return false;
+  }
+  for(uint32_t i = 0; i < what.size(); ++i) {
+    if(!('A' <= what[i] && what[i] <= 'Z')) {
+      return false;
+    }
+  }
+  return true;
+}
+
+int32_t Util::alphaToNum(const string& alphabets)
+{
+  if(alphabets.empty()) {
+    return 0;
+  }
+  char base;
+  if(islower(alphabets[0])) {
+    base = 'a';
+  } else {
+    base = 'A';
+  }
+  int32_t num = 0;
+  for(uint32_t i = 0; i < alphabets.size(); ++i) {
+    int32_t v = alphabets[i]-base;
+    num = num*26+v;
+  }
+  return num;
+}
+

+ 8 - 0
src/Util.h

@@ -135,6 +135,14 @@ public:
   static void sleep(long seconds);
 
   static void usleep(long microseconds);
+
+  static bool isNumber(const string& what);
+
+  static bool isLowercase(const string& what);
+
+  static bool isUppercase(const string& what);
+
+  static int32_t alphaToNum(const string& alphabets);
 };
 
 #endif // _D_UTIL_H_

+ 60 - 6
src/main.cc

@@ -57,6 +57,8 @@
 #include "a2time.h"
 #include "Platform.h"
 #include "prefs.h"
+#include "ParameterizedStringParser.h"
+#include "PStringBuildVisitor.h"
 #include <deque>
 #include <algorithm>
 #include <signal.h>
@@ -194,6 +196,10 @@ void showUsage() {
   		"                              already exists but the corresponding .aria2 file\n"
   		"                              doesn't exist.\n"
             "                              Default: false") << endl;
+  cout << _(" -Z, --force-sequential       Fetch URIs in the command-line sequentially and\n"
+	    "                              download each URI in a separate session, like\n"
+	    "                              the usual command-line download utilities.") << endl;
+
 #ifdef ENABLE_MESSAGE_DIGEST
   cout << _(" --check-integrity=true|false  Check file integrity by validating piece hash.\n"
 	    "                              This option only affects in BitTorrent downloads\n"
@@ -303,6 +309,10 @@ void showUsage() {
   cout << "  aria2c http://AAA.BBB.CCC/file.zip http://DDD.EEE.FFF/GGG/file.zip" << endl;
   cout << _(" You can mix up different protocols:") << endl;
   cout << "  aria2c http://AAA.BBB.CCC/file.zip ftp://DDD.EEE.FFF/GGG/file.zip" << endl;
+  cout << _(" Parameterized URI:") << endl;
+  cout << "  aria2c http://{server1,server2,server3}/file.iso" << endl;
+  cout << _(" Parameterized URI. -Z option must be specified:") << endl;
+  cout << "  aria2c -Z http://host/file[001-100].img" << endl;
 #ifdef ENABLE_BITTORRENT
   cout << endl;
   cout << _(" Download a torrent:") << endl;
@@ -334,6 +344,20 @@ void showUsage() {
   cout << endl;
 }
 
+Strings unfoldURI(const Strings& args)
+{
+  Strings nargs;
+  ParameterizedStringParser p;
+  PStringBuildVisitorHandle v = new PStringBuildVisitor();
+  for(Strings::const_iterator itr = args.begin(); itr != args.end();
+      ++itr) {
+    v->reset();
+    p.parse(*itr)->accept(v);
+    nargs.insert(nargs.end(), v->getURIs().begin(), v->getURIs().end()); 
+  }
+  return nargs;
+}
+
 int main(int argc, char* argv[]) {
 #ifdef HAVE_WINSOCK2_H
   Platform platform;
@@ -400,6 +424,7 @@ int main(int argc, char* argv[]) {
   op->put(PREF_NO_NETRC, V_FALSE);
   op->put(PREF_MAX_CONCURRENT_DOWNLOADS, "5");
   op->put(PREF_DIRECT_DOWNLOAD_TIMEOUT, "15");
+  op->put(PREF_FORCE_SEQUENTIAL, V_FALSE);
   while(1) {
     int optIndex = 0;
     int lopt;
@@ -432,6 +457,7 @@ int main(int argc, char* argv[]) {
       { "max-download-limit", required_argument, &lopt, 201 },
       { "file-allocation", required_argument, 0, 'a' },
       { "allow-overwrite", required_argument, &lopt, 202 },
+      { "force-sequential", no_argument, 0, 'Z' },
 #ifdef ENABLE_MESSAGE_DIGEST
       { "check-integrity", required_argument, &lopt, 203 },
       { "realtime-chunk-checksum", required_argument, &lopt, 204 },
@@ -472,7 +498,7 @@ int main(int argc, char* argv[]) {
       { "help", no_argument, NULL, 'h' },
       { 0, 0, 0, 0 }
     };
-    c = getopt_long(argc, argv, "Dd:o:l:s:pt:m:vhST:M:C:a:cU:ni:j:", longOpts, &optIndex);
+    c = getopt_long(argc, argv, "Dd:o:l:s:pt:m:vhST:M:C:a:cU:ni:j:Z", longOpts, &optIndex);
     if(c == -1) {
       break;
     }
@@ -639,6 +665,9 @@ int main(int argc, char* argv[]) {
     case 'j':
       cmdstream << PREF_MAX_CONCURRENT_DOWNLOADS << "=" << optarg << "\n";
       break;
+    case 'Z':
+      cmdstream << PREF_FORCE_SEQUENTIAL << "=" << V_TRUE << "\n";
+      break;
     case 'v':
       showVersion();
       exit(EXIT_SUCCESS);
@@ -800,7 +829,17 @@ int main(int argc, char* argv[]) {
 	  RequestGroups groups;
 	  while(flparser->hasNext()) {
 	    Strings uris = flparser->next();
-	    if(!uris.empty()) {
+	    if(uris.size() == 1) {
+	      Strings unfoldedURIs = unfoldURI(uris);
+	      for(Strings::const_iterator itr = unfoldedURIs.begin();
+		  itr != unfoldedURIs.end(); ++itr) {
+		Strings xuris;
+		ncopy(itr, itr+1, op->getAsInt(PREF_SPLIT),
+		    back_inserter(xuris));
+		RequestGroupHandle rg = new RequestGroup(xuris, op);
+		groups.push_back(rg);
+	      }
+	    } else if(uris.size() > 1) {
 	      Strings xuris;
 	      ncopy(uris.begin(), uris.end(), op->getAsInt(PREF_SPLIT),
 		    back_inserter(xuris));
@@ -812,10 +851,25 @@ int main(int argc, char* argv[]) {
 	}
 	else
 	  {
-	    Strings xargs;
-	    ncopy(args.begin(), args.end(), op->getAsInt(PREF_SPLIT),
-		  back_inserter(xargs));
-	    firstReqInfo = new MultiUrlRequestInfo(xargs, op);
+	    
+	    Strings nargs = unfoldURI(args);
+	    if(op->get(PREF_FORCE_SEQUENTIAL) == V_TRUE) {
+	      RequestGroups groups;
+	      for(Strings::const_iterator itr = nargs.begin();
+		  itr != nargs.end(); ++itr) {
+		Strings xuris;
+		ncopy(itr, itr+1, op->getAsInt(PREF_SPLIT),
+		    back_inserter(xuris));
+		RequestGroupHandle rg = new RequestGroup(xuris, op);
+		groups.push_back(rg);
+	      }
+	      firstReqInfo = new MultiUrlRequestInfo(groups, op);
+	    } else {
+	      Strings xargs;
+	      ncopy(nargs.begin(), nargs.end(), op->getAsInt(PREF_SPLIT),
+		    back_inserter(xargs));
+	      firstReqInfo = new MultiUrlRequestInfo(xargs, op);
+	    }
 	  }
 
     RequestInfos reqInfos;

+ 2 - 0
src/prefs.h

@@ -107,6 +107,8 @@
 #define PREF_MAX_CONCURRENT_DOWNLOADS "max-concurrent-downloads"
 // value: 1*digit
 #define PREF_DIRECT_DOWNLOAD_TIMEOUT "direct-download-timeout"
+// value:
+#define PREF_FORCE_SEQUENTIAL "force-sequential"
 
 /**
  * FTP related preferences

+ 52 - 0
test/AlphaNumberDecoratorTest.cc

@@ -0,0 +1,52 @@
+#include "AlphaNumberDecorator.h"
+#include <cppunit/extensions/HelperMacros.h>
+
+class AlphaNumberDecoratorTest:public CppUnit::TestFixture {
+
+  CPPUNIT_TEST_SUITE(AlphaNumberDecoratorTest);
+  CPPUNIT_TEST(testDecorate);
+  CPPUNIT_TEST(testDecorate_uppercase);
+  CPPUNIT_TEST(testDecorate_minus);
+  CPPUNIT_TEST_SUITE_END();
+private:
+
+public:
+  void setUp() {
+  }
+
+  void testDecorate();
+  void testDecorate_uppercase();
+  void testDecorate_minus();
+};
+
+
+CPPUNIT_TEST_SUITE_REGISTRATION( AlphaNumberDecoratorTest );
+
+void AlphaNumberDecoratorTest::testDecorate()
+{
+  CPPUNIT_ASSERT_EQUAL(string("a"), AlphaNumberDecorator(1).decorate(0));
+  CPPUNIT_ASSERT_EQUAL(string("z"), AlphaNumberDecorator(1).decorate(25));
+  CPPUNIT_ASSERT_EQUAL(string("zz"), AlphaNumberDecorator(1).decorate(675)); // 25*26+25
+  CPPUNIT_ASSERT_EQUAL(string("aab"), AlphaNumberDecorator(3).decorate(1));
+}
+
+void AlphaNumberDecoratorTest::testDecorate_uppercase()
+{
+  CPPUNIT_ASSERT_EQUAL(string("A"), AlphaNumberDecorator(1, true).decorate(0));
+  CPPUNIT_ASSERT_EQUAL(string("Z"), AlphaNumberDecorator(1, true).decorate(25));
+  CPPUNIT_ASSERT_EQUAL(string("ZZ"), AlphaNumberDecorator(1, true).decorate(675)); // 25*26+25
+  CPPUNIT_ASSERT_EQUAL(string("AAB"), AlphaNumberDecorator(3, true).decorate(1));
+}
+
+void AlphaNumberDecoratorTest::testDecorate_minus()
+{
+  try {
+    AlphaNumberDecorator(1, true).decorate(-1);
+    CPPUNIT_FAIL("exception must be thrown.");
+  } catch(FatalException* e) {
+    cerr << e->getMsg() << endl;
+    delete e;
+  } catch(...) {
+    CPPUNIT_FAIL("FatalException must be thrown.");
+  }
+}

+ 4 - 1
test/Makefile.am

@@ -1,10 +1,13 @@
 TESTS = aria2c
 check_PROGRAMS = $(TESTS)
 aria2c_SOURCES = AllTest.cc\
+	PStringBuildVisitorTest.cc\
+	ParameterizedStringParserTest.cc\
+	UtilTest.cc\
+	AlphaNumberDecoratorTest.cc\
 	FileUriListParserTest.cc\
 	StreamUriListParserTest.cc\
 	HttpHeaderProcessorTest.cc\
-	UtilTest.cc\
 	CookieBoxTest.cc\
 	RequestTest.cc\
 	CookieParserTest.cc\

+ 23 - 12
test/Makefile.in

@@ -110,10 +110,12 @@ mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
 am__EXEEXT_1 = aria2c$(EXEEXT)
-am__aria2c_SOURCES_DIST = AllTest.cc FileUriListParserTest.cc \
+am__aria2c_SOURCES_DIST = AllTest.cc PStringBuildVisitorTest.cc \
+	ParameterizedStringParserTest.cc UtilTest.cc \
+	AlphaNumberDecoratorTest.cc FileUriListParserTest.cc \
 	StreamUriListParserTest.cc HttpHeaderProcessorTest.cc \
-	UtilTest.cc CookieBoxTest.cc RequestTest.cc \
-	CookieParserTest.cc HttpRequestTest.cc CookieBoxFactoryTest.cc \
+	CookieBoxTest.cc RequestTest.cc CookieParserTest.cc \
+	HttpRequestTest.cc CookieBoxFactoryTest.cc \
 	RequestGroupManTest.cc RequestFactoryTest.cc \
 	NetrcAuthResolverTest.cc DefaultAuthResolverTest.cc \
 	OptionHandlerTest.cc SegmentManTest.cc BitfieldManTest.cc \
@@ -193,13 +195,17 @@ am__aria2c_SOURCES_DIST = AllTest.cc FileUriListParserTest.cc \
 @ENABLE_METALINK_TRUE@am__objects_3 = MetalinkerTest.$(OBJEXT) \
 @ENABLE_METALINK_TRUE@	MetalinkEntryTest.$(OBJEXT) \
 @ENABLE_METALINK_TRUE@	Xml2MetalinkProcessorTest.$(OBJEXT)
-am_aria2c_OBJECTS = AllTest.$(OBJEXT) FileUriListParserTest.$(OBJEXT) \
+am_aria2c_OBJECTS = AllTest.$(OBJEXT) \
+	PStringBuildVisitorTest.$(OBJEXT) \
+	ParameterizedStringParserTest.$(OBJEXT) UtilTest.$(OBJEXT) \
+	AlphaNumberDecoratorTest.$(OBJEXT) \
+	FileUriListParserTest.$(OBJEXT) \
 	StreamUriListParserTest.$(OBJEXT) \
-	HttpHeaderProcessorTest.$(OBJEXT) UtilTest.$(OBJEXT) \
-	CookieBoxTest.$(OBJEXT) RequestTest.$(OBJEXT) \
-	CookieParserTest.$(OBJEXT) HttpRequestTest.$(OBJEXT) \
-	CookieBoxFactoryTest.$(OBJEXT) RequestGroupManTest.$(OBJEXT) \
-	RequestFactoryTest.$(OBJEXT) NetrcAuthResolverTest.$(OBJEXT) \
+	HttpHeaderProcessorTest.$(OBJEXT) CookieBoxTest.$(OBJEXT) \
+	RequestTest.$(OBJEXT) CookieParserTest.$(OBJEXT) \
+	HttpRequestTest.$(OBJEXT) CookieBoxFactoryTest.$(OBJEXT) \
+	RequestGroupManTest.$(OBJEXT) RequestFactoryTest.$(OBJEXT) \
+	NetrcAuthResolverTest.$(OBJEXT) \
 	DefaultAuthResolverTest.$(OBJEXT) OptionHandlerTest.$(OBJEXT) \
 	SegmentManTest.$(OBJEXT) BitfieldManTest.$(OBJEXT) \
 	GlowFileAllocatorTest.$(OBJEXT) NetrcTest.$(OBJEXT) \
@@ -397,10 +403,12 @@ target_cpu = @target_cpu@
 target_os = @target_os@
 target_vendor = @target_vendor@
 TESTS = aria2c
-aria2c_SOURCES = AllTest.cc FileUriListParserTest.cc \
+aria2c_SOURCES = AllTest.cc PStringBuildVisitorTest.cc \
+	ParameterizedStringParserTest.cc UtilTest.cc \
+	AlphaNumberDecoratorTest.cc FileUriListParserTest.cc \
 	StreamUriListParserTest.cc HttpHeaderProcessorTest.cc \
-	UtilTest.cc CookieBoxTest.cc RequestTest.cc \
-	CookieParserTest.cc HttpRequestTest.cc CookieBoxFactoryTest.cc \
+	CookieBoxTest.cc RequestTest.cc CookieParserTest.cc \
+	HttpRequestTest.cc CookieBoxFactoryTest.cc \
 	RequestGroupManTest.cc RequestFactoryTest.cc \
 	NetrcAuthResolverTest.cc DefaultAuthResolverTest.cc \
 	OptionHandlerTest.cc SegmentManTest.cc BitfieldManTest.cc \
@@ -474,6 +482,7 @@ distclean-compile:
 	-rm -f *.tab.c
 
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/AllTest.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/AlphaNumberDecoratorTest.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/AnnounceListTest.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Base64Test.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/BitfieldManTest.Po@am__quote@
@@ -533,6 +542,8 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NetrcTest.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/OptionHandlerTest.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/OptionTest.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/PStringBuildVisitorTest.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ParameterizedStringParserTest.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/PeerMessageUtilTest.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/PeerTest.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/RequestFactoryTest.Po@am__quote@

+ 91 - 0
test/PStringBuildVisitorTest.cc

@@ -0,0 +1,91 @@
+#include "PStringBuildVisitor.h"
+#include "PStringSegment.h"
+#include "PStringNumLoop.h"
+#include "PStringSelect.h"
+#include "FixedWidthNumberDecorator.h"
+#include <cppunit/extensions/HelperMacros.h>
+
+class PStringBuildVisitorTest:public CppUnit::TestFixture {
+
+  CPPUNIT_TEST_SUITE(PStringBuildVisitorTest);
+  CPPUNIT_TEST(testVisit_select);
+  CPPUNIT_TEST(testVisit_numLoop);
+  CPPUNIT_TEST(testVisit_select_numLoop);
+  CPPUNIT_TEST_SUITE_END();
+private:
+
+public:
+  void setUp() {
+  }
+
+  void testVisit_select();
+  void testVisit_numLoop();
+  void testVisit_select_numLoop();
+};
+
+
+CPPUNIT_TEST_SUITE_REGISTRATION( PStringBuildVisitorTest );
+
+void PStringBuildVisitorTest::testVisit_select()
+{
+  PStringSegmentHandle segment1 = new PStringSegment("/tango");
+
+  char* select1data[] = { "alpha", "bravo", "charlie" };
+  
+  PStringSelectHandle select1 =
+    new PStringSelect(Strings(&select1data[0], &select1data[3]), segment1);
+
+  PStringBuildVisitorHandle v = new PStringBuildVisitor();
+
+  select1->accept(v);
+
+  CPPUNIT_ASSERT_EQUAL((size_t)3, v->getURIs().size());
+  CPPUNIT_ASSERT_EQUAL(string("alpha/tango"), v->getURIs()[0]);
+  CPPUNIT_ASSERT_EQUAL(string("bravo/tango"), v->getURIs()[1]);
+  CPPUNIT_ASSERT_EQUAL(string("charlie/tango"), v->getURIs()[2]);
+}
+
+void PStringBuildVisitorTest::testVisit_numLoop()
+{
+  PStringSegmentHandle segment1 = new PStringSegment("/tango");
+
+  PStringNumLoopHandle loop1 =
+    new PStringNumLoop(0, 5, 2, new FixedWidthNumberDecorator(2), segment1);
+
+  PStringBuildVisitorHandle v = new PStringBuildVisitor();
+
+  loop1->accept(v);
+
+  CPPUNIT_ASSERT_EQUAL((size_t)3, v->getURIs().size());
+  CPPUNIT_ASSERT_EQUAL(string("00/tango"), v->getURIs()[0]);
+  CPPUNIT_ASSERT_EQUAL(string("02/tango"), v->getURIs()[1]);
+  CPPUNIT_ASSERT_EQUAL(string("04/tango"), v->getURIs()[2]);
+}
+
+void PStringBuildVisitorTest::testVisit_select_numLoop()
+{
+  PStringSegmentHandle segment1 = new PStringSegment("/tango");
+
+  char* select1data[] = { "alpha", "bravo", "charlie" };
+  
+  PStringSelectHandle select1 =
+    new PStringSelect(Strings(&select1data[0], &select1data[3]), segment1);
+
+  PStringNumLoopHandle loop1 =
+    new PStringNumLoop(0, 5, 2, new FixedWidthNumberDecorator(2), select1);
+
+  PStringBuildVisitorHandle v = new PStringBuildVisitor();
+
+  loop1->accept(v);
+
+  CPPUNIT_ASSERT_EQUAL((size_t)9, v->getURIs().size());
+  CPPUNIT_ASSERT_EQUAL(string("00alpha/tango"), v->getURIs()[0]);
+  CPPUNIT_ASSERT_EQUAL(string("00bravo/tango"), v->getURIs()[1]);
+  CPPUNIT_ASSERT_EQUAL(string("00charlie/tango"), v->getURIs()[2]);
+  CPPUNIT_ASSERT_EQUAL(string("02alpha/tango"), v->getURIs()[3]);
+  CPPUNIT_ASSERT_EQUAL(string("02bravo/tango"), v->getURIs()[4]);
+  CPPUNIT_ASSERT_EQUAL(string("02charlie/tango"), v->getURIs()[5]);
+  CPPUNIT_ASSERT_EQUAL(string("04alpha/tango"), v->getURIs()[6]);
+  CPPUNIT_ASSERT_EQUAL(string("04bravo/tango"), v->getURIs()[7]);
+  CPPUNIT_ASSERT_EQUAL(string("04charlie/tango"), v->getURIs()[8]);
+}

+ 237 - 0
test/ParameterizedStringParserTest.cc

@@ -0,0 +1,237 @@
+#include "ParameterizedStringParser.h"
+#include "PStringSelect.h"
+#include "PStringSegment.h"
+#include "PStringNumLoop.h"
+#include "FatalException.h"
+#include <cppunit/extensions/HelperMacros.h>
+
+class ParameterizedStringParserTest:public CppUnit::TestFixture {
+
+  CPPUNIT_TEST_SUITE(ParameterizedStringParserTest);
+  CPPUNIT_TEST(testParse_select);
+  CPPUNIT_TEST(testParse_select_empty);
+  CPPUNIT_TEST(testParse_select_missingParen);
+  CPPUNIT_TEST(testParse_segment);
+  CPPUNIT_TEST(testParse_segment_select);
+  CPPUNIT_TEST(testParse_loop);
+  CPPUNIT_TEST(testParse_loop_empty);
+  CPPUNIT_TEST(testParse_loop_missingParen);
+  CPPUNIT_TEST(testParse_loop_missingStep);
+  CPPUNIT_TEST(testParse_loop_missingRange);
+  CPPUNIT_TEST(testParse_alphaLoop);
+  CPPUNIT_TEST(testParse_loop_mixedChar);
+  CPPUNIT_TEST(testParse_loop_mixedCase);
+  CPPUNIT_TEST(testParse_segment_loop);
+  CPPUNIT_TEST_SUITE_END();
+private:
+
+public:
+  void setUp() {
+  }
+
+  void testParse_select();
+  void testParse_select_empty();
+  void testParse_select_missingParen();
+  void testParse_segment();
+  void testParse_segment_select();
+  void testParse_loop();
+  void testParse_loop_empty();
+  void testParse_loop_missingParen();
+  void testParse_loop_missingStep();
+  void testParse_loop_missingRange();
+  void testParse_alphaLoop();
+  void testParse_loop_mixedChar();
+  void testParse_loop_mixedCase();
+  void testParse_segment_loop();
+};
+
+
+CPPUNIT_TEST_SUITE_REGISTRATION( ParameterizedStringParserTest );
+
+void ParameterizedStringParserTest::testParse_select()
+{
+  PStringDatumHandle ls = ParameterizedStringParser().parse("{alpha, bravo, charlie}");
+  PStringSelectHandle select = ls;
+  CPPUNIT_ASSERT(!select.isNull());
+
+  Strings values = select->getValues();
+  CPPUNIT_ASSERT_EQUAL((size_t)3, values.size());
+
+  CPPUNIT_ASSERT_EQUAL(string("alpha"), values[0]);
+  CPPUNIT_ASSERT_EQUAL(string("bravo"), values[1]);
+  CPPUNIT_ASSERT_EQUAL(string("charlie"), values[2]);
+}
+
+void ParameterizedStringParserTest::testParse_select_empty()
+{
+  try {
+    PStringDatumHandle ls = ParameterizedStringParser().parse("{}");
+    CPPUNIT_FAIL("exception must be thrown.");
+  } catch(FatalException* e) {
+    cerr << e->getMsg() << endl;
+    delete e;
+  } catch(...) {
+    CPPUNIT_FAIL("unexpected exception thrown.");
+  }
+}
+
+void ParameterizedStringParserTest::testParse_select_missingParen()
+{
+  try {
+    PStringDatumHandle ls = ParameterizedStringParser().parse("{alpha");
+    CPPUNIT_FAIL("exception must be thrown.");
+  } catch(FatalException* e) {
+    cerr << e->getMsg() << endl;
+    delete e;
+  } catch(...) {
+    CPPUNIT_FAIL("unexpected exception was thrown.");
+  }
+}
+
+void ParameterizedStringParserTest::testParse_segment()
+{
+  PStringDatumHandle ls = ParameterizedStringParser().parse("hello world");
+  PStringSegmentHandle segment = ls;
+  CPPUNIT_ASSERT(!segment.isNull());
+  CPPUNIT_ASSERT_EQUAL(string("hello world"), segment->getValue());
+}
+
+void ParameterizedStringParserTest::testParse_segment_select()
+{
+  PStringDatumHandle ls = ParameterizedStringParser().parse("file:///{alpha, bravo, charlie}/tango");
+
+  PStringSegmentHandle segment1 = ls;
+  CPPUNIT_ASSERT(!segment1.isNull());
+  CPPUNIT_ASSERT_EQUAL(string("file:///"), segment1->getValue());
+
+  PStringSelectHandle select1 = segment1->getNext();
+  CPPUNIT_ASSERT(!select1.isNull());
+  Strings selectValues = select1->getValues();
+  CPPUNIT_ASSERT_EQUAL((size_t)3, selectValues.size());
+  CPPUNIT_ASSERT_EQUAL(string("alpha"), selectValues[0]);
+  CPPUNIT_ASSERT_EQUAL(string("bravo"), selectValues[1]);
+  CPPUNIT_ASSERT_EQUAL(string("charlie"), selectValues[2]);
+
+  PStringSegmentHandle segment2 = select1->getNext();
+  CPPUNIT_ASSERT(!segment2.isNull());
+  CPPUNIT_ASSERT_EQUAL(string("/tango"), segment2->getValue());
+}
+
+void ParameterizedStringParserTest::testParse_loop()
+{
+  PStringDatumHandle ls = ParameterizedStringParser().parse("[1-10:2]");
+
+  PStringNumLoopHandle loop1 = ls;
+  CPPUNIT_ASSERT(!loop1.isNull());
+  CPPUNIT_ASSERT_EQUAL((int32_t)1, loop1->getStartValue());
+  CPPUNIT_ASSERT_EQUAL((int32_t)10, loop1->getEndValue());
+  CPPUNIT_ASSERT_EQUAL((int32_t)2, loop1->getStep());
+}
+
+void ParameterizedStringParserTest::testParse_loop_empty()
+{
+  try {
+    PStringDatumHandle ls = ParameterizedStringParser().parse("[]");
+    CPPUNIT_FAIL("exception must be thrown.");
+  } catch(FatalException* e) {
+    cerr << e->getMsg() << endl;
+    delete e;
+  } catch(...) {
+    CPPUNIT_FAIL("unexpected exception was thrown.");
+  }
+}
+
+void ParameterizedStringParserTest::testParse_loop_missingParen()
+{
+  try {
+    PStringDatumHandle ls = ParameterizedStringParser().parse("[");
+    CPPUNIT_FAIL("exception must be thrown.");
+  } catch(FatalException* e) {
+    cerr << e->getMsg() << endl;
+    delete e;
+  } catch(...) {
+    CPPUNIT_FAIL("unexpected exception was thrown.");
+  }
+}
+
+void ParameterizedStringParserTest::testParse_loop_missingStep()
+{
+  try {
+    PStringDatumHandle ls = ParameterizedStringParser().parse("[1-10:]");
+    CPPUNIT_FAIL("exception must be thrown.");
+  } catch(FatalException* e) {
+    cerr << e->getMsg() << endl;
+    delete e;
+  } catch(...) {
+    CPPUNIT_FAIL("unexpected exception was thrown.");
+  }
+}
+
+void ParameterizedStringParserTest::testParse_loop_missingRange()
+{
+  try {
+    PStringDatumHandle ls = ParameterizedStringParser().parse("[1-]");
+    CPPUNIT_FAIL("exception must be thrown.");
+  } catch(FatalException* e) {
+    cerr << e->getMsg() << endl;
+    delete e;
+  } catch(...) {
+    CPPUNIT_FAIL("unexpected exception was thrown.");
+  }
+}
+
+void ParameterizedStringParserTest::testParse_alphaLoop()
+{
+  PStringDatumHandle ls = ParameterizedStringParser().parse("[a-z:2]");
+
+  PStringNumLoopHandle loop1 = ls;
+  CPPUNIT_ASSERT(!loop1.isNull());
+  CPPUNIT_ASSERT_EQUAL((int32_t)0, loop1->getStartValue());
+  CPPUNIT_ASSERT_EQUAL((int32_t)25, loop1->getEndValue());
+  CPPUNIT_ASSERT_EQUAL((int32_t)2, loop1->getStep());
+}
+
+void ParameterizedStringParserTest::testParse_loop_mixedChar()
+{
+  try {
+    ParameterizedStringParser().parse("[1-z:2]");
+    CPPUNIT_FAIL("exception must be thrown.");
+  } catch(FatalException* e) {
+    cerr << e->getMsg() << endl;
+    delete e;
+  } catch(...) {
+    CPPUNIT_FAIL("FatalException must be thrown.");
+  }
+}
+
+void ParameterizedStringParserTest::testParse_loop_mixedCase()
+{
+  try {
+    ParameterizedStringParser().parse("[a-Z:2]");
+    CPPUNIT_FAIL("exception must be thrown.");
+  } catch(FatalException* e) {
+    cerr << e->getMsg() << endl;
+    delete e;
+  } catch(...) {
+    CPPUNIT_FAIL("FatalException must be thrown.");
+  }
+}
+
+void ParameterizedStringParserTest::testParse_segment_loop()
+{
+  PStringDatumHandle ls = ParameterizedStringParser().parse("http://server[1-3]/file");
+
+  PStringSegmentHandle segment1 = ls;
+  CPPUNIT_ASSERT(!segment1.isNull());
+  CPPUNIT_ASSERT_EQUAL(string("http://server"), segment1->getValue());
+
+  PStringNumLoopHandle loop1 = segment1->getNext();
+  CPPUNIT_ASSERT(!loop1.isNull());
+  CPPUNIT_ASSERT_EQUAL((int32_t)1, loop1->getStartValue());
+  CPPUNIT_ASSERT_EQUAL((int32_t)3, loop1->getEndValue());
+  CPPUNIT_ASSERT_EQUAL((int32_t)1, loop1->getStep());
+
+  PStringSegmentHandle segment2 = loop1->getNext();
+  CPPUNIT_ASSERT(!segment2.isNull());
+  CPPUNIT_ASSERT_EQUAL(string("/file"), segment2->getValue());
+}

+ 45 - 0
test/UtilTest.cc

@@ -23,6 +23,10 @@ class UtilTest:public CppUnit::TestFixture {
   CPPUNIT_TEST(testGetRealSize);
   CPPUNIT_TEST(testAbbrevSize);
   CPPUNIT_TEST(testToStream);
+  CPPUNIT_TEST(testIsNumber);
+  CPPUNIT_TEST(testIsLowercase);
+  CPPUNIT_TEST(testIsUppercase);
+  CPPUNIT_TEST(testAlphaToNum);
   CPPUNIT_TEST_SUITE_END();
 private:
 
@@ -46,6 +50,10 @@ public:
   void testGetRealSize();
   void testAbbrevSize();
   void testToStream();
+  void testIsNumber();
+  void testIsLowercase();
+  void testIsUppercase();
+  void testAlphaToNum();
 };
 
 
@@ -317,3 +325,40 @@ void UtilTest::testToStream()
 			      "---+---------------------------------------------------------------------------\n"),
 		       os.str());
 }
+
+void UtilTest::testIsNumber()
+{
+  CPPUNIT_ASSERT_EQUAL(true, Util::isNumber("000"));
+  CPPUNIT_ASSERT_EQUAL(false, Util::isNumber("a"));
+  CPPUNIT_ASSERT_EQUAL(false, Util::isNumber("0a"));
+  CPPUNIT_ASSERT_EQUAL(false, Util::isNumber(""));
+  CPPUNIT_ASSERT_EQUAL(false, Util::isNumber(" "));
+}
+
+void UtilTest::testIsLowercase()
+{
+  CPPUNIT_ASSERT_EQUAL(true, Util::isLowercase("alpha"));
+  CPPUNIT_ASSERT_EQUAL(false, Util::isLowercase("Alpha"));
+  CPPUNIT_ASSERT_EQUAL(false, Util::isLowercase("1alpha"));
+  CPPUNIT_ASSERT_EQUAL(false, Util::isLowercase(""));
+  CPPUNIT_ASSERT_EQUAL(false, Util::isLowercase(" "));
+}
+
+void UtilTest::testIsUppercase()
+{
+  CPPUNIT_ASSERT_EQUAL(true, Util::isUppercase("ALPHA"));
+  CPPUNIT_ASSERT_EQUAL(false, Util::isUppercase("Alpha"));
+  CPPUNIT_ASSERT_EQUAL(false, Util::isUppercase("1ALPHA"));
+  CPPUNIT_ASSERT_EQUAL(false, Util::isUppercase(""));
+  CPPUNIT_ASSERT_EQUAL(false, Util::isUppercase(" "));
+}
+
+void UtilTest::testAlphaToNum()
+{
+  CPPUNIT_ASSERT_EQUAL((int32_t)0, Util::alphaToNum("a"));
+  CPPUNIT_ASSERT_EQUAL((int32_t)0, Util::alphaToNum("aa"));
+  CPPUNIT_ASSERT_EQUAL((int32_t)1, Util::alphaToNum("b"));
+  CPPUNIT_ASSERT_EQUAL((int32_t)675, Util::alphaToNum("zz")); // 25*26+25
+  CPPUNIT_ASSERT_EQUAL((int32_t)675, Util::alphaToNum("ZZ")); // 25*26+25
+  CPPUNIT_ASSERT_EQUAL((int32_t)0, Util::alphaToNum(""));
+}