mirror of
https://github.com/mirror/wget.git
synced 2024-12-29 14:30:48 +08:00
[svn] Applied John Daily <jdaily@cyberdude.com>'s patch for his "quad" commands (which
I renamed to "lockable_boolean") in the .wgetrc (currently just passive_ftp). Wrote documentation for his changes and added the missing "referer" to the .wgetrc section (making mention of the issue of "referrer" being the correct spelling).
This commit is contained in:
parent
da17e06a1e
commit
8cf52e0dd3
@ -1,7 +1,11 @@
|
|||||||
2000-10-19 Dan Harkless <dan-wget@dilvish.speed.net>
|
2000-10-19 Dan Harkless <dan-wget@dilvish.speed.net>
|
||||||
|
|
||||||
* wget.texi (HTTP Options): Documented my new -E / --html-extension.
|
* wget.texi (HTTP Options): Documented my new -E / --html-extension.
|
||||||
|
(Wgetrc Commands): Documented my new html_extension option and
|
||||||
|
John Daily's "quad" values (which I renamed to "lockable
|
||||||
|
Boolean"). When I documented Damir Dzeko's --referer, I forgot to
|
||||||
|
add the .wgetrc equivalent; mentioned the "referrer" spelling issue.
|
||||||
|
|
||||||
2000-10-09 Dan Harkless <dan-wget@dilvish.speed.net>
|
2000-10-09 Dan Harkless <dan-wget@dilvish.speed.net>
|
||||||
|
|
||||||
* wget.texi (FTP Options): --retr-symlinks wasn't documented properly.
|
* wget.texi (FTP Options): --retr-symlinks wasn't documented properly.
|
||||||
@ -9,7 +13,8 @@
|
|||||||
2000-08-30 Dan Harkless <dan-wget@dilvish.speed.net>
|
2000-08-30 Dan Harkless <dan-wget@dilvish.speed.net>
|
||||||
|
|
||||||
* wget.texi (Recursive Retrieval Options): Documented new -p option.
|
* wget.texi (Recursive Retrieval Options): Documented new -p option.
|
||||||
|
(Wgetrc Commands): Documented -p's equvialent, page_requisites.
|
||||||
|
|
||||||
2000-08-23 Dan Harkless <dan-wget@dilvish.speed.net>
|
2000-08-23 Dan Harkless <dan-wget@dilvish.speed.net>
|
||||||
|
|
||||||
* wget.texi (Download Options): Using -c on a file that's already fully
|
* wget.texi (Download Options): Using -c on a file that's already fully
|
||||||
@ -69,7 +74,7 @@
|
|||||||
|
|
||||||
* sample.wgetrc: Added entries for backup_converted and waitretry.
|
* sample.wgetrc: Added entries for backup_converted and waitretry.
|
||||||
|
|
||||||
* wget.texi (Download Options): Herold Heiko
|
* wget.texi (Download Options and Wgetrc Commands): Herold Heiko
|
||||||
<Heiko.Herold@previnet.it>'s new --waitretry option was
|
<Heiko.Herold@previnet.it>'s new --waitretry option was
|
||||||
undocumented until now. Reworded the suggested documentation he
|
undocumented until now. Reworded the suggested documentation he
|
||||||
sent to the list.
|
sent to the list.
|
||||||
@ -105,7 +110,9 @@
|
|||||||
|
|
||||||
2000-02-18 Dan Harkless <dan-wget@dilvish.speed.net>
|
2000-02-18 Dan Harkless <dan-wget@dilvish.speed.net>
|
||||||
|
|
||||||
* wget.texi (-K / --backup-converted): Documented this new option.
|
* wget.texi (Recursive Retrieval Options): Documented my new -K /
|
||||||
|
--backup-converted option.
|
||||||
|
(Wgetrc Commands): Documented backup_converted equivalent.
|
||||||
|
|
||||||
1998-09-10 Hrvoje Niksic <hniksic@srce.hr>
|
1998-09-10 Hrvoje Niksic <hniksic@srce.hr>
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@ notice identical to this one.
|
|||||||
Indirect:
|
Indirect:
|
||||||
wget.info-1: 961
|
wget.info-1: 961
|
||||||
wget.info-2: 48421
|
wget.info-2: 48421
|
||||||
wget.info-3: 96314
|
wget.info-3: 96945
|
||||||
|
|
||||||
Tag Table:
|
Tag Table:
|
||||||
(Indirect)
|
(Indirect)
|
||||||
@ -61,28 +61,28 @@ Node: Startup File57815
|
|||||||
Node: Wgetrc Location58688
|
Node: Wgetrc Location58688
|
||||||
Node: Wgetrc Syntax59503
|
Node: Wgetrc Syntax59503
|
||||||
Node: Wgetrc Commands60218
|
Node: Wgetrc Commands60218
|
||||||
Node: Sample Wgetrc67844
|
Node: Sample Wgetrc68475
|
||||||
Node: Examples72863
|
Node: Examples73494
|
||||||
Node: Simple Usage73470
|
Node: Simple Usage74101
|
||||||
Node: Advanced Usage75864
|
Node: Advanced Usage76495
|
||||||
Node: Guru Usage78615
|
Node: Guru Usage79246
|
||||||
Node: Various80277
|
Node: Various80908
|
||||||
Node: Proxies80801
|
Node: Proxies81432
|
||||||
Node: Distribution83566
|
Node: Distribution84197
|
||||||
Node: Mailing List83917
|
Node: Mailing List84548
|
||||||
Node: Reporting Bugs84616
|
Node: Reporting Bugs85247
|
||||||
Node: Portability86401
|
Node: Portability87032
|
||||||
Node: Signals87776
|
Node: Signals88407
|
||||||
Node: Appendices88430
|
Node: Appendices89061
|
||||||
Node: Robots88845
|
Node: Robots89476
|
||||||
Node: Introduction to RES89992
|
Node: Introduction to RES90623
|
||||||
Node: RES Format91885
|
Node: RES Format92516
|
||||||
Node: User-Agent Field92989
|
Node: User-Agent Field93620
|
||||||
Node: Disallow Field93753
|
Node: Disallow Field94384
|
||||||
Node: Norobots Examples94364
|
Node: Norobots Examples94995
|
||||||
Node: Security Considerations95318
|
Node: Security Considerations95949
|
||||||
Node: Contributors96314
|
Node: Contributors96945
|
||||||
Node: Copying98953
|
Node: Copying99584
|
||||||
Node: Concept Index118116
|
Node: Concept Index118747
|
||||||
|
|
||||||
End Tag Table
|
End Tag Table
|
||||||
|
@ -333,15 +333,20 @@ File: wget.info, Node: Wgetrc Commands, Next: Sample Wgetrc, Prev: Wgetrc Syn
|
|||||||
Wgetrc Commands
|
Wgetrc Commands
|
||||||
===============
|
===============
|
||||||
|
|
||||||
The complete set of commands is listed below, the letter after `='
|
The complete set of commands is listed below. Legal values are
|
||||||
denoting the value the command takes. It is `on/off' for `on' or `off'
|
listed after the `='. Simple Boolean values can be set or unset using
|
||||||
(which can also be `1' or `0'), STRING for any non-empty string or N
|
`on' and `off' or `1' and `0'. A fancier kind of Boolean allowed in
|
||||||
for a positive integer. For example, you may specify `use_proxy = off'
|
some cases is the "lockable" Boolean, which may be set to `on', `off',
|
||||||
to disable use of proxy servers by default. You may use `inf' for
|
`always', or `never'. If an option is set to `always' or `never', that
|
||||||
infinite values, where appropriate.
|
value will be locked in for the duration of the wget invocation -
|
||||||
|
commandline options will not override.
|
||||||
|
|
||||||
Most of the commands have their equivalent command-line option
|
Some commands take pseudo-arbitrary values. STRING values can be
|
||||||
(*Note Invoking::), except some more obscure or rarely used ones.
|
any non-empty string. N can be any positive integer, or `inf' for
|
||||||
|
infinity, where appropriate.
|
||||||
|
|
||||||
|
Most of these commands have commandline equivalents (*Note
|
||||||
|
Invoking::), though some of the more obscure or rarely used ones do not.
|
||||||
|
|
||||||
accept/reject = STRING
|
accept/reject = STRING
|
||||||
Same as `-A'/`-R' (*Note Types of Files::).
|
Same as `-A'/`-R' (*Note Types of Files::).
|
||||||
@ -501,8 +506,11 @@ page_requisites = on/off
|
|||||||
Download all ancillary documents necessary for a single HTML page
|
Download all ancillary documents necessary for a single HTML page
|
||||||
to display properly - the same as `-p'.
|
to display properly - the same as `-p'.
|
||||||
|
|
||||||
passive_ftp = on/off
|
passive_ftp = on/off/always/never
|
||||||
Set passive FTP - the same as `--passive-ftp'.
|
Set passive FTP - the same as `--passive-ftp'. Some scripts and
|
||||||
|
`.pm' (Perl module) files download files using `wget
|
||||||
|
--passive-ftp'. If your firewall does not allow this, you can set
|
||||||
|
`passive_ftp = never' to override the commandline.
|
||||||
|
|
||||||
passwd = STRING
|
passwd = STRING
|
||||||
Set your FTP password to PASSWORD. Without this setting, the
|
Set your FTP password to PASSWORD. Without this setting, the
|
||||||
@ -514,6 +522,11 @@ proxy_user = STRING
|
|||||||
proxy_passwd = STRING
|
proxy_passwd = STRING
|
||||||
Set proxy authentication password to STRING, like `--proxy-passwd'.
|
Set proxy authentication password to STRING, like `--proxy-passwd'.
|
||||||
|
|
||||||
|
referer = STRING
|
||||||
|
Set HTTP `Referer:' header just like `--referer'. (Note it was
|
||||||
|
the folks who wrote the HTTP spec who got the spelling of
|
||||||
|
"referrer" wrong.)
|
||||||
|
|
||||||
quiet = on/off
|
quiet = on/off
|
||||||
Quiet mode - the same as `-q'.
|
Quiet mode - the same as `-q'.
|
||||||
|
|
||||||
|
@ -1697,16 +1697,21 @@ reject =
|
|||||||
@section Wgetrc Commands
|
@section Wgetrc Commands
|
||||||
@cindex wgetrc commands
|
@cindex wgetrc commands
|
||||||
|
|
||||||
The complete set of commands is listed below, the letter after @samp{=}
|
The complete set of commands is listed below. Legal values are listed
|
||||||
denoting the value the command takes. It is @samp{on/off} for @samp{on}
|
after the @samp{=}. Simple Boolean values can be set or unset using
|
||||||
or @samp{off} (which can also be @samp{1} or @samp{0}), @var{string} for
|
@samp{on} and @samp{off} or @samp{1} and @samp{0}. A fancier kind of
|
||||||
any non-empty string or @var{n} for a positive integer. For example,
|
Boolean allowed in some cases is the "lockable" Boolean, which may be
|
||||||
you may specify @samp{use_proxy = off} to disable use of proxy servers
|
set to @samp{on}, @samp{off}, @samp{always}, or @samp{never}. If an
|
||||||
by default. You may use @samp{inf} for infinite values, where
|
option is set to @samp{always} or @samp{never}, that value will be
|
||||||
appropriate.
|
locked in for the duration of the wget invocation -- commandline options
|
||||||
|
will not override.
|
||||||
|
|
||||||
Most of the commands have their equivalent command-line option
|
Some commands take pseudo-arbitrary values. @var{string} values can be
|
||||||
(@xref{Invoking}), except some more obscure or rarely used ones.
|
any non-empty string. @var{n} can be any positive integer, or
|
||||||
|
@samp{inf} for infinity, where appropriate.
|
||||||
|
|
||||||
|
Most of these commands have commandline equivalents (@xref{Invoking}),
|
||||||
|
though some of the more obscure or rarely used ones do not.
|
||||||
|
|
||||||
@table @asis
|
@table @asis
|
||||||
@item accept/reject = @var{string}
|
@item accept/reject = @var{string}
|
||||||
@ -1872,20 +1877,26 @@ Set the output filename -- the same as @samp{-O}.
|
|||||||
Download all ancillary documents necessary for a single HTML page to
|
Download all ancillary documents necessary for a single HTML page to
|
||||||
display properly -- the same as @samp{-p}.
|
display properly -- the same as @samp{-p}.
|
||||||
|
|
||||||
@item passive_ftp = on/off
|
@item passive_ftp = on/off/always/never
|
||||||
Set passive @sc{ftp} -- the same as @samp{--passive-ftp}.
|
Set passive @sc{ftp} -- the same as @samp{--passive-ftp}. Some scripts
|
||||||
|
and @samp{.pm} (Perl module) files download files using @samp{wget
|
||||||
|
--passive-ftp}. If your firewall does not allow this, you can set
|
||||||
|
@samp{passive_ftp = never} to override the commandline.
|
||||||
|
|
||||||
@item passwd = @var{string}
|
@item passwd = @var{string}
|
||||||
Set your @sc{ftp} password to @var{password}. Without this setting, the
|
Set your @sc{ftp} password to @var{password}. Without this setting, the
|
||||||
password defaults to @samp{username@@hostname.domainname}.
|
password defaults to @samp{username@@hostname.domainname}.
|
||||||
|
|
||||||
@item proxy_user = @var{string}
|
@item proxy_user = @var{string}
|
||||||
Set proxy authentication user name to @var{string}, like
|
Set proxy authentication user name to @var{string}, like @samp{--proxy-user}.
|
||||||
@samp{--proxy-user}.
|
|
||||||
|
|
||||||
@item proxy_passwd = @var{string}
|
@item proxy_passwd = @var{string}
|
||||||
Set proxy authentication password to @var{string}, like
|
Set proxy authentication password to @var{string}, like @samp{--proxy-passwd}.
|
||||||
@samp{--proxy-passwd}.
|
|
||||||
|
@item referer = @var{string}
|
||||||
|
Set HTTP @samp{Referer:} header just like @samp{--referer}. (Note it
|
||||||
|
was the folks who wrote the @sc{http} spec who got the spelling of
|
||||||
|
"referrer" wrong.)
|
||||||
|
|
||||||
@item quiet = on/off
|
@item quiet = on/off
|
||||||
Quiet mode -- the same as @samp{-q}.
|
Quiet mode -- the same as @samp{-q}.
|
||||||
|
@ -8,6 +8,9 @@
|
|||||||
the case of gethttp() called xrealloc() on u->local.
|
the case of gethttp() called xrealloc() on u->local.
|
||||||
|
|
||||||
* init.c (commands): Added new "htmlextension" command.
|
* init.c (commands): Added new "htmlextension" command.
|
||||||
|
Also renamed John Daily's cmd_quad() to the more descriptive
|
||||||
|
cmd_lockable_boolean(), alpha-sorted the CMD_DECLARE()s and
|
||||||
|
removed duplicate cmd_boolean() declaration.
|
||||||
|
|
||||||
* main.c (print_help): Added my new -E / --html-extension option.
|
* main.c (print_help): Added my new -E / --html-extension option.
|
||||||
(main): Undocumented --email-address option previously used -E synonym.
|
(main): Undocumented --email-address option previously used -E synonym.
|
||||||
@ -30,6 +33,14 @@
|
|||||||
|
|
||||||
* main.c (print_help): Clarified what --retr-symlinks does.
|
* main.c (print_help): Clarified what --retr-symlinks does.
|
||||||
|
|
||||||
|
2000-09-15 John Daily <jdaily@cyberdude.com>
|
||||||
|
|
||||||
|
* init.c: Add support for "always" and "never" values to allow
|
||||||
|
.wgetrc to override commandline (useful e.g. with .pm files
|
||||||
|
calling `wget --passive-ftp' when your firewall doesn't allow that).
|
||||||
|
|
||||||
|
* ftp.c (getftp): passive_ftp is first option to support always/never.
|
||||||
|
|
||||||
2000-08-30 Dan Harkless <dan-wget@dilvish.speed.net>
|
2000-08-30 Dan Harkless <dan-wget@dilvish.speed.net>
|
||||||
|
|
||||||
* ftp.c (ftp_retrieve_list): Use new INFINITE_RECURSION #define.
|
* ftp.c (ftp_retrieve_list): Use new INFINITE_RECURSION #define.
|
||||||
|
@ -337,7 +337,7 @@ Error in server response, closing control connection.\n"));
|
|||||||
/* If anything is to be retrieved, PORT (or PASV) must be sent. */
|
/* If anything is to be retrieved, PORT (or PASV) must be sent. */
|
||||||
if (cmd & (DO_LIST | DO_RETR))
|
if (cmd & (DO_LIST | DO_RETR))
|
||||||
{
|
{
|
||||||
if (opt.ftp_pasv)
|
if (opt.ftp_pasv > 0)
|
||||||
{
|
{
|
||||||
char thost[256];
|
char thost[256];
|
||||||
unsigned short tport;
|
unsigned short tport;
|
||||||
|
55
src/init.c
55
src/init.c
@ -53,14 +53,14 @@ extern int errno;
|
|||||||
PARAMS ((const char *, const char *, void *))
|
PARAMS ((const char *, const char *, void *))
|
||||||
|
|
||||||
CMD_DECLARE (cmd_boolean);
|
CMD_DECLARE (cmd_boolean);
|
||||||
CMD_DECLARE (cmd_boolean);
|
CMD_DECLARE (cmd_bytes);
|
||||||
|
CMD_DECLARE (cmd_directory_vector);
|
||||||
|
CMD_DECLARE (cmd_lockable_boolean);
|
||||||
CMD_DECLARE (cmd_number);
|
CMD_DECLARE (cmd_number);
|
||||||
CMD_DECLARE (cmd_number_inf);
|
CMD_DECLARE (cmd_number_inf);
|
||||||
CMD_DECLARE (cmd_string);
|
CMD_DECLARE (cmd_string);
|
||||||
CMD_DECLARE (cmd_vector);
|
|
||||||
CMD_DECLARE (cmd_directory_vector);
|
|
||||||
CMD_DECLARE (cmd_bytes);
|
|
||||||
CMD_DECLARE (cmd_time);
|
CMD_DECLARE (cmd_time);
|
||||||
|
CMD_DECLARE (cmd_vector);
|
||||||
|
|
||||||
CMD_DECLARE (cmd_spec_dirstruct);
|
CMD_DECLARE (cmd_spec_dirstruct);
|
||||||
CMD_DECLARE (cmd_spec_dotstyle);
|
CMD_DECLARE (cmd_spec_dotstyle);
|
||||||
@ -131,7 +131,7 @@ static struct {
|
|||||||
{ "numtries", &opt.ntry, cmd_number_inf },/* deprecated*/
|
{ "numtries", &opt.ntry, cmd_number_inf },/* deprecated*/
|
||||||
{ "outputdocument", NULL, cmd_spec_outputdocument },
|
{ "outputdocument", NULL, cmd_spec_outputdocument },
|
||||||
{ "pagerequisites", &opt.page_requisites, cmd_boolean },
|
{ "pagerequisites", &opt.page_requisites, cmd_boolean },
|
||||||
{ "passiveftp", &opt.ftp_pasv, cmd_boolean },
|
{ "passiveftp", &opt.ftp_pasv, cmd_lockable_boolean },
|
||||||
{ "passwd", &opt.ftp_pass, cmd_string },
|
{ "passwd", &opt.ftp_pass, cmd_string },
|
||||||
{ "proxypasswd", &opt.proxy_passwd, cmd_string },
|
{ "proxypasswd", &opt.proxy_passwd, cmd_string },
|
||||||
{ "proxyuser", &opt.proxy_user, cmd_string },
|
{ "proxyuser", &opt.proxy_user, cmd_string },
|
||||||
@ -499,6 +499,51 @@ cmd_boolean (const char *com, const char *val, void *closure)
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Store the lockable_boolean {2, 1, 0, -1} value from VAL to CLOSURE. COM is
|
||||||
|
ignored, except for error messages. Values 2 and -1 indicate that once
|
||||||
|
defined, the value may not be changed by successive wgetrc files or
|
||||||
|
command-line arguments.
|
||||||
|
|
||||||
|
Values: 2 - Enable a particular option for good ("always")
|
||||||
|
1 - Enable an option ("on")
|
||||||
|
0 - Disable an option ("off")
|
||||||
|
-1 - Disable an option for good ("never") */
|
||||||
|
static int
|
||||||
|
cmd_lockable_boolean (const char *com, const char *val, void *closure)
|
||||||
|
{
|
||||||
|
int lockable_boolean_value;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* If a config file said "always" or "never", don't allow command line
|
||||||
|
* arguments to override the config file.
|
||||||
|
*/
|
||||||
|
if (*(int *)closure == -1 || *(int *)closure == 2)
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
if (!strcasecmp (val, "always")
|
||||||
|
|| (*val == '2' && !*(val + 1)))
|
||||||
|
lockable_boolean_value = 2;
|
||||||
|
else if (!strcasecmp (val, "on")
|
||||||
|
|| (*val == '1' && !*(val + 1)))
|
||||||
|
lockable_boolean_value = 1;
|
||||||
|
else if (!strcasecmp (val, "off")
|
||||||
|
|| (*val == '0' && !*(val + 1)))
|
||||||
|
lockable_boolean_value = 0;
|
||||||
|
else if (!strcasecmp (val, "never")
|
||||||
|
|| (*val == '-' && *(val + 1) == '1' && !*(val + 2)))
|
||||||
|
lockable_boolean_value = -1;
|
||||||
|
else
|
||||||
|
{
|
||||||
|
fprintf (stderr, _("%s: %s: Please specify always, on, off, "
|
||||||
|
"or never.\n"),
|
||||||
|
exec_name, com);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
*(int *)closure = lockable_boolean_value;
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
/* Set the non-negative integer value from VAL to CLOSURE. With
|
/* Set the non-negative integer value from VAL to CLOSURE. With
|
||||||
incorrect specification, the number remains unchanged. */
|
incorrect specification, the number remains unchanged. */
|
||||||
static int
|
static int
|
||||||
|
Loading…
Reference in New Issue
Block a user