parent
ceeff73819
commit
8071c02131
@ -1729,12 +1729,13 @@
|
|||||||
" 31 46 1365 /etc/passwd\n"
|
" 31 46 1365 /etc/passwd\n"
|
||||||
|
|
||||||
#define wget_trivial_usage \
|
#define wget_trivial_usage \
|
||||||
"[-c|--continue] [-q|--quiet] [-O|--output-document file] [--header 'header: value'] url"
|
"[-c|--continue] [-q|--quiet] [-O|--output-document file]\n\t[--header 'header: value'] [-P DIR] url"
|
||||||
#define wget_full_usage \
|
#define wget_full_usage \
|
||||||
"wget retrieves files via HTTP or FTP\n\n" \
|
"wget retrieves files via HTTP or FTP\n\n" \
|
||||||
"Options:\n" \
|
"Options:\n" \
|
||||||
"\t-c\tcontinue retrieval of aborted transfers\n" \
|
"\t-c\tcontinue retrieval of aborted transfers\n" \
|
||||||
"\t-q\tquiet mode - do not print\n" \
|
"\t-q\tquiet mode - do not print\n" \
|
||||||
|
"\t-P\tSet directory prefix to DIR\n" \
|
||||||
"\t-O\tsave to filename ('-' for stdout)"
|
"\t-O\tsave to filename ('-' for stdout)"
|
||||||
|
|
||||||
#define which_trivial_usage \
|
#define which_trivial_usage \
|
||||||
|
@ -1729,12 +1729,13 @@
|
|||||||
" 31 46 1365 /etc/passwd\n"
|
" 31 46 1365 /etc/passwd\n"
|
||||||
|
|
||||||
#define wget_trivial_usage \
|
#define wget_trivial_usage \
|
||||||
"[-c|--continue] [-q|--quiet] [-O|--output-document file] [--header 'header: value'] url"
|
"[-c|--continue] [-q|--quiet] [-O|--output-document file]\n\t[--header 'header: value'] [-P DIR] url"
|
||||||
#define wget_full_usage \
|
#define wget_full_usage \
|
||||||
"wget retrieves files via HTTP or FTP\n\n" \
|
"wget retrieves files via HTTP or FTP\n\n" \
|
||||||
"Options:\n" \
|
"Options:\n" \
|
||||||
"\t-c\tcontinue retrieval of aborted transfers\n" \
|
"\t-c\tcontinue retrieval of aborted transfers\n" \
|
||||||
"\t-q\tquiet mode - do not print\n" \
|
"\t-q\tquiet mode - do not print\n" \
|
||||||
|
"\t-P\tSet directory prefix to DIR\n" \
|
||||||
"\t-O\tsave to filename ('-' for stdout)"
|
"\t-O\tsave to filename ('-' for stdout)"
|
||||||
|
|
||||||
#define which_trivial_usage \
|
#define which_trivial_usage \
|
||||||
|
@ -160,6 +160,7 @@ int wget_main(int argc, char **argv)
|
|||||||
int n, try=5, status;
|
int n, try=5, status;
|
||||||
int port;
|
int port;
|
||||||
char *proxy;
|
char *proxy;
|
||||||
|
char *dir_prefix=NULL;
|
||||||
char *s, buf[512];
|
char *s, buf[512];
|
||||||
struct stat sbuf;
|
struct stat sbuf;
|
||||||
char extra_headers[1024];
|
char extra_headers[1024];
|
||||||
@ -188,11 +189,14 @@ int wget_main(int argc, char **argv)
|
|||||||
/*
|
/*
|
||||||
* Crack command line.
|
* Crack command line.
|
||||||
*/
|
*/
|
||||||
while ((n = getopt_long(argc, argv, "cqO:", long_options, &option_index)) != EOF) {
|
while ((n = getopt_long(argc, argv, "cqO:P:", long_options, &option_index)) != EOF) {
|
||||||
switch (n) {
|
switch (n) {
|
||||||
case 'c':
|
case 'c':
|
||||||
++do_continue;
|
++do_continue;
|
||||||
break;
|
break;
|
||||||
|
case 'P':
|
||||||
|
dir_prefix = optarg;
|
||||||
|
break;
|
||||||
case 'q':
|
case 'q':
|
||||||
quiet_flag = TRUE;
|
quiet_flag = TRUE;
|
||||||
break;
|
break;
|
||||||
@ -224,7 +228,6 @@ int wget_main(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fprintf(stderr, "extra_headers='%s'\n", extra_headers);
|
|
||||||
if (argc - optind != 1)
|
if (argc - optind != 1)
|
||||||
show_usage();
|
show_usage();
|
||||||
|
|
||||||
@ -269,6 +272,7 @@ int wget_main(int argc, char **argv)
|
|||||||
output = stdout;
|
output = stdout;
|
||||||
quiet_flag = TRUE;
|
quiet_flag = TRUE;
|
||||||
} else {
|
} else {
|
||||||
|
fname_out = concat_path_file(dir_prefix, fname_out);
|
||||||
output = xfopen(fname_out, (do_continue ? "a" : "w"));
|
output = xfopen(fname_out, (do_continue ? "a" : "w"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -812,7 +816,7 @@ progressmeter(int flag)
|
|||||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
* SUCH DAMAGE.
|
* SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
* $Id: wget.c,v 1.41 2001/05/16 15:40:48 kraai Exp $
|
* $Id: wget.c,v 1.42 2001/06/21 19:45:06 andersen Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
3
usage.h
3
usage.h
@ -1729,12 +1729,13 @@
|
|||||||
" 31 46 1365 /etc/passwd\n"
|
" 31 46 1365 /etc/passwd\n"
|
||||||
|
|
||||||
#define wget_trivial_usage \
|
#define wget_trivial_usage \
|
||||||
"[-c|--continue] [-q|--quiet] [-O|--output-document file] [--header 'header: value'] url"
|
"[-c|--continue] [-q|--quiet] [-O|--output-document file]\n\t[--header 'header: value'] [-P DIR] url"
|
||||||
#define wget_full_usage \
|
#define wget_full_usage \
|
||||||
"wget retrieves files via HTTP or FTP\n\n" \
|
"wget retrieves files via HTTP or FTP\n\n" \
|
||||||
"Options:\n" \
|
"Options:\n" \
|
||||||
"\t-c\tcontinue retrieval of aborted transfers\n" \
|
"\t-c\tcontinue retrieval of aborted transfers\n" \
|
||||||
"\t-q\tquiet mode - do not print\n" \
|
"\t-q\tquiet mode - do not print\n" \
|
||||||
|
"\t-P\tSet directory prefix to DIR\n" \
|
||||||
"\t-O\tsave to filename ('-' for stdout)"
|
"\t-O\tsave to filename ('-' for stdout)"
|
||||||
|
|
||||||
#define which_trivial_usage \
|
#define which_trivial_usage \
|
||||||
|
10
wget.c
10
wget.c
@ -160,6 +160,7 @@ int wget_main(int argc, char **argv)
|
|||||||
int n, try=5, status;
|
int n, try=5, status;
|
||||||
int port;
|
int port;
|
||||||
char *proxy;
|
char *proxy;
|
||||||
|
char *dir_prefix=NULL;
|
||||||
char *s, buf[512];
|
char *s, buf[512];
|
||||||
struct stat sbuf;
|
struct stat sbuf;
|
||||||
char extra_headers[1024];
|
char extra_headers[1024];
|
||||||
@ -188,11 +189,14 @@ int wget_main(int argc, char **argv)
|
|||||||
/*
|
/*
|
||||||
* Crack command line.
|
* Crack command line.
|
||||||
*/
|
*/
|
||||||
while ((n = getopt_long(argc, argv, "cqO:", long_options, &option_index)) != EOF) {
|
while ((n = getopt_long(argc, argv, "cqO:P:", long_options, &option_index)) != EOF) {
|
||||||
switch (n) {
|
switch (n) {
|
||||||
case 'c':
|
case 'c':
|
||||||
++do_continue;
|
++do_continue;
|
||||||
break;
|
break;
|
||||||
|
case 'P':
|
||||||
|
dir_prefix = optarg;
|
||||||
|
break;
|
||||||
case 'q':
|
case 'q':
|
||||||
quiet_flag = TRUE;
|
quiet_flag = TRUE;
|
||||||
break;
|
break;
|
||||||
@ -224,7 +228,6 @@ int wget_main(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fprintf(stderr, "extra_headers='%s'\n", extra_headers);
|
|
||||||
if (argc - optind != 1)
|
if (argc - optind != 1)
|
||||||
show_usage();
|
show_usage();
|
||||||
|
|
||||||
@ -269,6 +272,7 @@ int wget_main(int argc, char **argv)
|
|||||||
output = stdout;
|
output = stdout;
|
||||||
quiet_flag = TRUE;
|
quiet_flag = TRUE;
|
||||||
} else {
|
} else {
|
||||||
|
fname_out = concat_path_file(dir_prefix, fname_out);
|
||||||
output = xfopen(fname_out, (do_continue ? "a" : "w"));
|
output = xfopen(fname_out, (do_continue ? "a" : "w"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -812,7 +816,7 @@ progressmeter(int flag)
|
|||||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
* SUCH DAMAGE.
|
* SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
* $Id: wget.c,v 1.41 2001/05/16 15:40:48 kraai Exp $
|
* $Id: wget.c,v 1.42 2001/06/21 19:45:06 andersen Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user