From 77e095300b63c668a08d6a7ea1a0f4aa4f56cf3a Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Mon, 22 Sep 2008 10:12:44 +0000 Subject: [PATCH] 2008-09-22 Tatsuhiro Tsujikawa Removed unused preferences: PREF_NO_PREALLOCATION PREF_STDOUT_LOG PREF_TRACKER_MAX_TRIES PREF_DIRECT_DOWNLOAD_TIMEOUT PREF_MIN_SEGMENT_SIZE * src/option_processing.cc * src/prefs.cc * src/prefs.h --- ChangeLog | 12 ++++++++++++ src/option_processing.cc | 8 -------- src/prefs.cc | 10 ---------- src/prefs.h | 10 ---------- 4 files changed, 12 insertions(+), 28 deletions(-) diff --git a/ChangeLog b/ChangeLog index 800b3699..069aa949 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2008-09-22 Tatsuhiro Tsujikawa + + Removed unused preferences: + PREF_NO_PREALLOCATION + PREF_STDOUT_LOG + PREF_TRACKER_MAX_TRIES + PREF_DIRECT_DOWNLOAD_TIMEOUT + PREF_MIN_SEGMENT_SIZE + * src/option_processing.cc + * src/prefs.cc + * src/prefs.h + 2008-09-22 Tatsuhiro Tsujikawa Integrated HelpItem into OptionParser to ease the workload for adding diff --git a/src/option_processing.cc b/src/option_processing.cc index 3a91d708..7045fd7b 100644 --- a/src/option_processing.cc +++ b/src/option_processing.cc @@ -116,7 +116,6 @@ Option* option_processing(int argc, char* const argv[]) { PREF_FTP_TYPE.c_str(), required_argument, &lopt, 11 }, { PREF_FTP_PASV.c_str(), no_argument, NULL, 'p' }, { PREF_FTP_VIA_HTTP_PROXY.c_str(), required_argument, &lopt, 12 }, - //{ PREF_MIN_SEGMENT_SIZE.c_str(), required_argument, &lopt, 13 }, { PREF_HTTP_PROXY_METHOD.c_str(), required_argument, &lopt, 14 }, { PREF_LOWEST_SPEED_LIMIT.c_str(), required_argument, &lopt, 200 }, { PREF_MAX_DOWNLOAD_LIMIT.c_str(), required_argument, &lopt, 201 }, @@ -168,7 +167,6 @@ Option* option_processing(int argc, char* const argv[]) { PREF_TORRENT_FILE.c_str(), required_argument, NULL, 'T' }, { PREF_LISTEN_PORT.c_str(), required_argument, &lopt, 15 }, { PREF_FOLLOW_TORRENT.c_str(), required_argument, &lopt, 16 }, - { PREF_NO_PREALLOCATION.c_str(), no_argument, &lopt, 18 }, { PREF_DIRECT_FILE_MAPPING.c_str(), required_argument, &lopt, 19 }, // TODO remove upload-limit. //{ "upload-limit".c_str(), required_argument, &lopt, 20 }, @@ -246,9 +244,6 @@ Option* option_processing(int argc, char* const argv[]) case 12: cmdstream << PREF_FTP_VIA_HTTP_PROXY << "=" << optarg << "\n"; break; - case 13: - cmdstream << PREF_MIN_SEGMENT_SIZE << "=" << optarg << "\n"; - break; case 14: cmdstream << PREF_HTTP_PROXY_METHOD << "=" << optarg << "\n"; break; @@ -258,9 +253,6 @@ Option* option_processing(int argc, char* const argv[]) case 16: cmdstream << PREF_FOLLOW_TORRENT << "=" << optarg << "\n"; break; - case 18: - cmdstream << PREF_NO_PREALLOCATION << "=" << V_TRUE << "\n"; - break; case 19: cmdstream << PREF_DIRECT_FILE_MAPPING << "=" << optarg << "\n"; break; diff --git a/src/prefs.cc b/src/prefs.cc index d20a025d..27d9c2be 100644 --- a/src/prefs.cc +++ b/src/prefs.cc @@ -58,11 +58,7 @@ const std::string PREF_CONNECT_TIMEOUT("connect-timeout"); // values: 1*digit const std::string PREF_MAX_TRIES("max-tries"); // values: 1*digit -const std::string PREF_MIN_SEGMENT_SIZE("min-segment-size"); -// values: 1*digit const std::string PREF_AUTO_SAVE_INTERVAL("auto-save-interval"); -// values: true | false -const std::string PREF_STDOUT_LOG("stdout-log"); // values: a string that your file system recognizes as a file name. const std::string PREF_LOG("log"); // values: a string that your file system recognizes as a directory. @@ -106,8 +102,6 @@ const std::string PREF_MAX_DOWNLOADS("max-downloads"); const std::string PREF_INPUT_FILE("input-file"); // value: 1*digit const std::string PREF_MAX_CONCURRENT_DOWNLOADS("max-concurrent-downloads"); -// value: 1*digit -const std::string PREF_DIRECT_DOWNLOAD_TIMEOUT("direct-download-timeout"); // value: true | false const std::string PREF_FORCE_SEQUENTIAL("force-sequential"); // value: true | false @@ -220,8 +214,6 @@ const std::string PREF_BT_REQUEST_TIMEOUT("bt-request-timeout"); // values: true | false const std::string PREF_SHOW_FILES("show-files"); // values: true | false -const std::string PREF_NO_PREALLOCATION("no-preallocation"); -// values: true | false const std::string PREF_DIRECT_FILE_MAPPING("direct-file-mapping"); // values: 1*digit const std::string PREF_MAX_UPLOAD_LIMIT("max-upload-limit"); @@ -238,8 +230,6 @@ const std::string PREF_SEED_TIME("seed-time"); // values: 1*digit ['.' [ 1*digit ] ] const std::string PREF_SEED_RATIO("seed-ratio"); // values: 1*digit -const std::string PREF_TRACKER_MAX_TRIES("tracker-max-tries"); -// values: 1*digit const std::string PREF_BT_KEEP_ALIVE_INTERVAL("bt-keep-alive-interval"); // values: a string, less than or equals to 20 bytes length const std::string PREF_PEER_ID_PREFIX("peer-id-prefix"); diff --git a/src/prefs.h b/src/prefs.h index 22e8b3a7..af4bee9f 100644 --- a/src/prefs.h +++ b/src/prefs.h @@ -62,11 +62,7 @@ extern const std::string PREF_CONNECT_TIMEOUT; // values: 1*digit extern const std::string PREF_MAX_TRIES; // values: 1*digit -extern const std::string PREF_MIN_SEGMENT_SIZE; -// values: 1*digit extern const std::string PREF_AUTO_SAVE_INTERVAL; -// values: true | false -extern const std::string PREF_STDOUT_LOG; // values: a string that your file system recognizes as a file name. extern const std::string PREF_LOG; // values: a string that your file system recognizes as a directory. @@ -110,8 +106,6 @@ extern const std::string PREF_MAX_DOWNLOADS; extern const std::string PREF_INPUT_FILE; // value: 1*digit extern const std::string PREF_MAX_CONCURRENT_DOWNLOADS; -// value: 1*digit -extern const std::string PREF_DIRECT_DOWNLOAD_TIMEOUT; // value: true | false extern const std::string PREF_FORCE_SEQUENTIAL; // value: true | false @@ -224,8 +218,6 @@ extern const std::string PREF_BT_REQUEST_TIMEOUT; // values: true | false extern const std::string PREF_SHOW_FILES; // values: true | false -extern const std::string PREF_NO_PREALLOCATION; -// values: true | false extern const std::string PREF_DIRECT_FILE_MAPPING; // values: 1*digit extern const std::string PREF_MAX_UPLOAD_LIMIT; @@ -242,8 +234,6 @@ extern const std::string PREF_SEED_TIME; // values: 1*digit ['.' [ 1*digit ] ] extern const std::string PREF_SEED_RATIO; // values: 1*digit -extern const std::string PREF_TRACKER_MAX_TRIES; -// values: 1*digit extern const std::string PREF_BT_KEEP_ALIVE_INTERVAL; // values: a string, less than or equals to 20 bytes length extern const std::string PREF_PEER_ID_PREFIX;