aboutsummaryrefslogtreecommitdiff
path: root/networking/wget.c
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2015-10-31 17:13:47 +0000
committerRon Yorston <rmy@pobox.com>2015-10-31 17:13:47 +0000
commit4432dbba6559d3d88e18ecf2c33d9e5a39e82074 (patch)
treef6db886523a04e0b45926336223ff8c32761dc43 /networking/wget.c
parentbc09f29f78547856e2152dc47051aeed548f28e8 (diff)
parent6bd3fff51aa74e2ee2d87887b12182a3b09792ef (diff)
downloadbusybox-w32-4432dbba6559d3d88e18ecf2c33d9e5a39e82074.tar.gz
busybox-w32-4432dbba6559d3d88e18ecf2c33d9e5a39e82074.tar.bz2
busybox-w32-4432dbba6559d3d88e18ecf2c33d9e5a39e82074.zip
Merge branch 'busybox' into merge
Diffstat (limited to 'networking/wget.c')
-rw-r--r--networking/wget.c47
1 files changed, 31 insertions, 16 deletions
diff --git a/networking/wget.c b/networking/wget.c
index 0082ced39..edf8fd8af 100644
--- a/networking/wget.c
+++ b/networking/wget.c
@@ -102,7 +102,8 @@
102//usage: "[-c|--continue] [-s|--spider] [-q|--quiet] [-O|--output-document FILE]\n" 102//usage: "[-c|--continue] [-s|--spider] [-q|--quiet] [-O|--output-document FILE]\n"
103//usage: " [--header 'header: value'] [-Y|--proxy on/off] [-P DIR]\n" 103//usage: " [--header 'header: value'] [-Y|--proxy on/off] [-P DIR]\n"
104/* Since we ignore these opts, we don't show them in --help */ 104/* Since we ignore these opts, we don't show them in --help */
105/* //usage: " [--no-check-certificate] [--no-cache]" */ 105/* //usage: " [--no-check-certificate] [--no-cache] [--passive-ftp] [-t TRIES]" */
106/* //usage: " [-nv] [-nc] [-nH] [-np]" */
106//usage: " [-U|--user-agent AGENT]" IF_FEATURE_WGET_TIMEOUT(" [-T SEC]") " URL..." 107//usage: " [-U|--user-agent AGENT]" IF_FEATURE_WGET_TIMEOUT(" [-T SEC]") " URL..."
107//usage: ) 108//usage: )
108//usage: IF_NOT_FEATURE_WGET_LONG_OPTIONS( 109//usage: IF_NOT_FEATURE_WGET_LONG_OPTIONS(
@@ -1225,19 +1226,22 @@ int wget_main(int argc UNUSED_PARAM, char **argv)
1225 "directory-prefix\0" Required_argument "P" 1226 "directory-prefix\0" Required_argument "P"
1226 "proxy\0" Required_argument "Y" 1227 "proxy\0" Required_argument "Y"
1227 "user-agent\0" Required_argument "U" 1228 "user-agent\0" Required_argument "U"
1228#if ENABLE_FEATURE_WGET_TIMEOUT 1229IF_FEATURE_WGET_TIMEOUT(
1229 "timeout\0" Required_argument "T" 1230 "timeout\0" Required_argument "T")
1230#endif
1231 /* Ignored: */ 1231 /* Ignored: */
1232 // "tries\0" Required_argument "t" 1232IF_DESKTOP( "tries\0" Required_argument "t")
1233 "header\0" Required_argument "\xff"
1234 "post-data\0" Required_argument "\xfe"
1233 /* Ignored (we always use PASV): */ 1235 /* Ignored (we always use PASV): */
1234 "passive-ftp\0" No_argument "\xff" 1236IF_DESKTOP( "passive-ftp\0" No_argument "\xf0")
1235 "header\0" Required_argument "\xfe"
1236 "post-data\0" Required_argument "\xfd"
1237 /* Ignored (we don't do ssl) */ 1237 /* Ignored (we don't do ssl) */
1238 "no-check-certificate\0" No_argument "\xfc" 1238IF_DESKTOP( "no-check-certificate\0" No_argument "\xf0")
1239 /* Ignored (we don't support caching) */ 1239 /* Ignored (we don't support caching) */
1240 "no-cache\0" No_argument "\xfb" 1240IF_DESKTOP( "no-cache\0" No_argument "\xf0")
1241IF_DESKTOP( "no-verbose\0" No_argument "\xf0")
1242IF_DESKTOP( "no-clobber\0" No_argument "\xf0")
1243IF_DESKTOP( "no-host-directories\0" No_argument "\xf0")
1244IF_DESKTOP( "no-parent\0" No_argument "\xf0")
1241 ; 1245 ;
1242#endif 1246#endif
1243 1247
@@ -1257,14 +1261,25 @@ int wget_main(int argc UNUSED_PARAM, char **argv)
1257#if ENABLE_FEATURE_WGET_LONG_OPTIONS 1261#if ENABLE_FEATURE_WGET_LONG_OPTIONS
1258 applet_long_options = wget_longopts; 1262 applet_long_options = wget_longopts;
1259#endif 1263#endif
1260 opt_complementary = "-1" 1264 opt_complementary = "-1" /* at least one URL */
1261 IF_FEATURE_WGET_TIMEOUT(":T+") 1265 IF_FEATURE_WGET_TIMEOUT(":T+") /* -T NUM */
1262 IF_FEATURE_WGET_LONG_OPTIONS(":\xfe::"); 1266 IF_FEATURE_WGET_LONG_OPTIONS(":\xff::"); /* --header is a list */
1263 getopt32(argv, "csqO:P:Y:U:T:" /*ignored:*/ "t:", 1267 getopt32(argv, "csqO:P:Y:U:T:"
1264 &G.fname_out, &G.dir_prefix, 1268 /*ignored:*/ "t:"
1269 /*ignored:*/ "n::"
1270 /* wget has exactly four -n<letter> opts, all of which we can ignore:
1271 * -nv --no-verbose: be moderately quiet (-q is full quiet)
1272 * -nc --no-clobber: abort if exists, neither download to FILE.n nor overwrite FILE
1273 * -nH --no-host-directories: wget -r http://host/ won't create host/
1274 * -np --no-parent
1275 * "n::" above says that we accept -n[ARG].
1276 * Specifying "n:" would be a bug: "-n ARG" would eat ARG!
1277 */
1278 , &G.fname_out, &G.dir_prefix,
1265 &G.proxy_flag, &G.user_agent, 1279 &G.proxy_flag, &G.user_agent,
1266 IF_FEATURE_WGET_TIMEOUT(&G.timeout_seconds) IF_NOT_FEATURE_WGET_TIMEOUT(NULL), 1280 IF_FEATURE_WGET_TIMEOUT(&G.timeout_seconds) IF_NOT_FEATURE_WGET_TIMEOUT(NULL),
1267 NULL /* -t RETRIES */ 1281 NULL, /* -t RETRIES */
1282 NULL /* -n[ARG] */
1268 IF_FEATURE_WGET_LONG_OPTIONS(, &headers_llist) 1283 IF_FEATURE_WGET_LONG_OPTIONS(, &headers_llist)
1269 IF_FEATURE_WGET_LONG_OPTIONS(, &G.post_data) 1284 IF_FEATURE_WGET_LONG_OPTIONS(, &G.post_data)
1270 ); 1285 );