diff --git a/cli/cli.cc b/cli/cli.cc index 72fcd44a5..a8cbf6445 100644 --- a/cli/cli.cc +++ b/cli/cli.cc @@ -20,6 +20,7 @@ * DEALINGS IN THE SOFTWARE. *****************************************************************************/ +#include #include /* fprintf () */ #include /* atoi () */ #include /* memcmp () */ @@ -63,8 +64,13 @@ ***/ #define LINEWIDTH 80 -#define MY_CONFIG_NAME "transmission" -#define MY_READABLE_NAME "transmission-cli" + +static char constexpr MyConfigName[] = "transmission"; +static char constexpr MyReadableName[] = "transmission-cli"; +static char constexpr Usage + [] = "A fast and easy BitTorrent client\n" + "\n" + "Usage: transmission-cli [options] "; static bool showVersion = false; static bool verify = false; @@ -73,38 +79,28 @@ static sig_atomic_t manualUpdate = false; static char const* torrentPath = nullptr; -static struct tr_option const options[] = { - { 'b', "blocklist", "Enable peer blocklists", "b", false, nullptr }, - { 'B', "no-blocklist", "Disable peer blocklists", "B", false, nullptr }, - { 'd', "downlimit", "Set max download speed in " SPEED_K_STR, "d", true, "" }, - { 'D', "no-downlimit", "Don't limit the download speed", "D", false, nullptr }, - { 910, "encryption-required", "Encrypt all peer connections", "er", false, nullptr }, - { 911, "encryption-preferred", "Prefer encrypted peer connections", "ep", false, nullptr }, - { 912, "encryption-tolerated", "Prefer unencrypted peer connections", "et", false, nullptr }, - { 'f', "finish", "Run a script when the torrent finishes", "f", true, "