aboutsummaryrefslogtreecommitdiff
path: root/networking
diff options
context:
space:
mode:
author"Vladimir N. Oleynik" <dzo@simtreas.ru>2005-10-14 09:56:52 +0000
committer"Vladimir N. Oleynik" <dzo@simtreas.ru>2005-10-14 09:56:52 +0000
commitf704b27b5bb8bd5acaed9464714db34ccef06cc8 (patch)
tree06f15d778a64ba361219d8227f87422173bf0da8 /networking
parent8c7a7e6e63c01d2d575bbaa43e1768ad2b97179b (diff)
downloadbusybox-f704b27b5bb8bd5acaed9464714db34ccef06cc8.tar.gz
- new bb_opt_complementally syntax, use [-:?] only - 'free' chars
- new bb_getopt_ulflags features: check max and min args, convert first argv to options special for ar and tar applets - use bb_default_error_retval for env applet
Diffstat (limited to 'networking')
-rw-r--r--networking/traceroute.c2
-rw-r--r--networking/wget.c28
2 files changed, 15 insertions, 15 deletions
diff --git a/networking/traceroute.c b/networking/traceroute.c
index d716f2f73..690e21f82 100644
--- a/networking/traceroute.c
+++ b/networking/traceroute.c
@@ -965,7 +965,7 @@ traceroute_main(int argc, char *argv[])
opterr = 0;
#ifdef CONFIG_FEATURE_TRACEROUTE_SOURCE_ROUTE
- bb_opt_complementally = "x-x:g*";
+ bb_opt_complementally = "x-x:g::";
#else
bb_opt_complementally = "x-x";
#endif
diff --git a/networking/wget.c b/networking/wget.c
index 0a4ccaddd..165af9a58 100644
--- a/networking/wget.c
+++ b/networking/wget.c
@@ -177,23 +177,25 @@ int wget_main(int argc, char **argv)
struct sockaddr_in s_in;
llist_t *headers_llist = NULL;
- FILE *sfp = NULL; /* socket to web/ftp server */
- FILE *dfp = NULL; /* socket to ftp server (data) */
- char *fname_out = NULL; /* where to direct output (-O) */
- int do_continue = 0; /* continue a prev transfer (-c) */
- long beg_range = 0L; /* range at which continue begins */
- int got_clen = 0; /* got content-length: from server */
- FILE *output; /* socket to web server */
- int quiet_flag = FALSE; /* Be verry, verry quiet... */
- int use_proxy = 1; /* Use proxies if env vars are set */
+ FILE *sfp = NULL; /* socket to web/ftp server */
+ FILE *dfp = NULL; /* socket to ftp server (data) */
+ char *fname_out = NULL; /* where to direct output (-O) */
+ int do_continue = 0; /* continue a prev transfer (-c) */
+ long beg_range = 0L; /* range at which continue begins */
+ int got_clen = 0; /* got content-length: from server */
+ FILE *output; /* socket to web server */
+ int quiet_flag = FALSE; /* Be verry, verry quiet... */
+ int use_proxy = 1; /* Use proxies if env vars are set */
char *proxy_flag = "on"; /* Use proxies if env vars are set */
/*
* Crack command line.
*/
- bb_opt_complementally = "\203*";
+ bb_opt_complementally = "-1:\203::";
bb_applet_long_options = wget_long_options;
- opt = bb_getopt_ulflags(argc, argv, "cq\213O:\203:P:Y:", &fname_out, &headers_llist, &dir_prefix, &proxy_flag);
+ opt = bb_getopt_ulflags(argc, argv, "cq\213O:\203:P:Y:",
+ &fname_out, &headers_llist,
+ &dir_prefix, &proxy_flag);
if (opt & WGET_OPT_CONTINUE) {
++do_continue;
}
@@ -218,9 +220,7 @@ int wget_main(int argc, char **argv)
headers_llist = headers_llist->link;
}
}
- if (argc - optind != 1)
- bb_show_usage();
-
+
parse_url(argv[optind], &target);
server.host = target.host;
server.port = target.port;