Changeset 10782
- Timestamp:
- Jun 16, 2010, 2:05:18 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/daemon/daemon.c
r10659 r10782 69 69 { 'b', "blocklist", "Enable peer blocklists", "b", 0, NULL }, 70 70 { 'B', "no-blocklist", "Disable peer blocklists", "B", 0, NULL }, 71 { 'c', "watch-dir", " Directoryto watch for new .torrent files", "c", 1, "<directory>" },71 { 'c', "watch-dir", "Where to watch for new .torrent files", "c", 1, "<directory>" }, 72 72 { 'C', "no-watch-dir", "Disable the watch-dir", "C", 0, NULL }, 73 73 { 941, "incomplete-dir", "Where to store new torrents until they're complete", NULL, 1, "<directory>" }, … … 97 97 { 911, "encryption-preferred", "Prefer encrypted peer connections", "ep", 0, NULL }, 98 98 { 912, "encryption-tolerated", "Prefer unencrypted peer connections", "et", 0, NULL }, 99 { 'i', "bind-address-ipv4", "Where to listen for peer connections", "i", 1, "<ipv4 addr ess>" },100 { 'I', "bind-address-ipv6", "Where to listen for peer connections", "I", 1, "<ipv6 addr ess>" },101 { 'r', "rpc-bind-address", "Where to listen for RPC connections", "r", 1, "<ipv4 addr ess>" },99 { 'i', "bind-address-ipv4", "Where to listen for peer connections", "i", 1, "<ipv4 addr>" }, 100 { 'I', "bind-address-ipv6", "Where to listen for peer connections", "I", 1, "<ipv6 addr>" }, 101 { 'r', "rpc-bind-address", "Where to listen for RPC connections", "r", 1, "<ipv4 addr>" }, 102 102 { 953, "global-seedratio", "All torrents, unless overridden by a per-torrent setting, should seed until a specific ratio", "gsr", 1, "ratio" }, 103 103 { 954, "no-global-seedratio", "All torrents, unless overridden by a per-torrent setting, should seed regardless of ratio", "GSR", 0, NULL }, -
trunk/daemon/remote.c
r10719 r10782 222 222 { 'm', "portmap", "Enable portmapping via NAT-PMP or UPnP", "m", 0, NULL }, 223 223 { 'M', "no-portmap", "Disable portmapping", "M", 0, NULL }, 224 { 'n', "auth", "Set authentication info", "n", 1, "<user:pass>" },225 { 'N', "netrc", "Set authentication info from a .netrc file", "N", 1, "<file name>" },224 { 'n', "auth", "Set username and password", "n", 1, "<user:pw>" }, 225 { 'N', "netrc", "Set authentication info from a .netrc file", "N", 1, "<file>" }, 226 226 { 'o', "dht", "Enable distributed hash tables (DHT)", "o", 0, NULL }, 227 227 { 'O', "no-dht", "Disable distributed hash tables (DHT)", "O", 0, NULL }, … … 229 229 { 962, "port-test", "Port testing", "pt", 0, NULL }, 230 230 { 'P', "random-port", "Random port for incomping peers", "P", 0, NULL }, 231 { 900, "priority-high", "Try to download the specifiedfile(s) first", "ph", 1, "<files>" },232 { 901, "priority-normal", "Try to download the specifiedfile(s) normally", "pn", 1, "<files>" },233 { 902, "priority-low", "Try to download the specifiedfile(s) last", "pl", 1, "<files>" },231 { 900, "priority-high", "Try to download these file(s) first", "ph", 1, "<files>" }, 232 { 901, "priority-normal", "Try to download these file(s) normally", "pn", 1, "<files>" }, 233 { 902, "priority-low", "Try to download these file(s) last", "pl", 1, "<files>" }, 234 234 { 700, "bandwidth-high", "Give this torrent first chance at available bandwidth", "Bh", 0, NULL }, 235 { 701, "bandwidth-normal", "Give this torrent thebandwidth left over by high priority torrents", "Bn", 0, NULL },236 { 702, "bandwidth-low", "Give this torrent thebandwidth left over by high and normal priority torrents", "Bl", 0, NULL },235 { 701, "bandwidth-normal", "Give this torrent bandwidth left over by high priority torrents", "Bn", 0, NULL }, 236 { 702, "bandwidth-low", "Give this torrent bandwidth left over by high and normal priority torrents", "Bl", 0, NULL }, 237 237 { 'r', "remove", "Remove the current torrent(s)", "r", 0, NULL }, 238 238 { 930, "peers", "Set the maximum number of peers for the current torrent(s) or globally", "pr", 1, "<max>" }, 239 239 { 'R', "remove-and-delete", "Remove the current torrent(s) and delete local data", NULL, 0, NULL }, 240 { 800, "torrent-done-script", "Specify a script to run when a torrent finishes", NULL, 1, "<file name>" },241 { 801, "no-torrent-done-script", "Don't run a script when torr nets finish", NULL, 0, NULL },240 { 800, "torrent-done-script", "Specify a script to run when a torrent finishes", NULL, 1, "<file>" }, 241 { 801, "no-torrent-done-script", "Don't run a script when torrents finish", NULL, 0, NULL }, 242 242 { 950, "seedratio", "Let the current torrent(s) seed until a specific ratio", "sr", 1, "ratio" }, 243 243 { 951, "seedratio-default", "Let the current torrent(s) use the global seedratio settings", "srd", 0, NULL }, -
trunk/libtransmission/tr-getopt.c
r9868 r10782 11 11 */ 12 12 13 #include <ctype.h> /* isspace() */ 13 14 #include <stdio.h> 14 15 #include <stdlib.h> /* exit() */ … … 38 39 } 39 40 41 static int 42 get_next_line_len( const char * description, int maxlen ) 43 { 44 int end; 45 int len = strlen( description ); 46 47 if( len < maxlen ) 48 return len; 49 50 end = maxlen < len ? maxlen : len; 51 while( ( end > 0 ) && !isspace( description[end] ) ) 52 --end; 53 54 return end ? end : len; 55 } 56 40 57 static void 41 58 getopts_usage_line( const tr_option * opt, … … 44 61 int argWidth ) 45 62 { 63 int len; 46 64 const char * longName = opt->longName ? opt->longName : ""; 47 65 const char * shortName = opt->shortName ? opt->shortName : ""; 48 66 const char * arg = getArgName( opt ); 49 67 50 printf( " %s%-*s %s%-*s %-*s %s\n", 68 const int d_indent = shortWidth + longWidth + argWidth + 7; 69 const int d_width = 80 - d_indent; 70 const char * d = opt->description; 71 72 printf( " %s%-*s %s%-*s %-*s ", 51 73 (shortName && *shortName ? "-" : " "), shortWidth, shortName, 52 74 (longName && *longName ? "--" : " "), longWidth, longName, 53 argWidth, arg, 54 opt->description ); 75 argWidth, arg ); 76 len = get_next_line_len( d, d_width ); 77 printf( "%*.*s\n", len, len, d ); 78 79 d += len; 80 while( isspace( *d ) ) ++d; 81 82 while(( len = get_next_line_len( d, d_width ))) { 83 printf( "%*.*s%*.*s\n", d_indent, d_indent, "", len, len, d ); 84 d += len; 85 while( isspace( *d ) ) ++d; 86 } 55 87 } 56 88
Note: See TracChangeset
for help on using the changeset viewer.