]> sjero.net Git - wget/commitdiff
[svn] Remove the "lockable boolean" setting for passive_ftp.
authorhniksic <devnull@localhost>
Wed, 22 Jun 2005 01:56:02 +0000 (18:56 -0700)
committerhniksic <devnull@localhost>
Wed, 22 Jun 2005 01:56:02 +0000 (18:56 -0700)
NEWS
doc/ChangeLog
doc/wget.texi
src/ChangeLog
src/ftp.c
src/init.c

diff --git a/NEWS b/NEWS
index 8e9db74ff7fb82b2d553d40b5901239e135ff928..2d9af4f8272b49a0603c764dfa2a61f2f86762cd 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -5,6 +5,14 @@ See the end for copying conditions.
 
 Please send GNU Wget bug reports to <bug-wget@gnu.org>.
 \f
+* Changes in Wget 1.11.
+
+** The "lockable boolean" argument type is no longer supported.  It
+was only used by the passive_ftp .wgetrc setting.  If you're running
+broken scripts or Perl modules that unconditionally specify
+`--passive-ftp' and your firewall disallows it, you can override them
+by replacing wget with a script that execs wget "$@" --no-passive-ftp.
+\f
 * Changes in Wget 1.10.
 
 ** Downloading files larger than 2GB, sometimes referred to as "large
index 7f31596a3975b9e94f774745bd6b2c45217aaded..134417066fb44fb9590251bdee5a53ec648bb0bd 100644 (file)
@@ -1,3 +1,8 @@
+2005-06-22  Hrvoje Niksic  <hniksic@xemacs.org>
+
+       * wget.texi (Wgetrc Commands): Remove the "lockable boolean"
+       feature.
+
 2005-06-20  Hrvoje Niksic  <hniksic@xemacs.org>
 
        * ansi2knr.1: Removed.
index f3bf7965947ade3687685f434e611326707bc048..171e495ad91d6c90192da0767deb3719afa0b3f2 100644 (file)
@@ -2459,12 +2459,7 @@ reject =
 
 The complete set of commands is listed below.  Legal values are listed
 after the @samp{=}.  Simple Boolean values can be set or unset using
-@samp{on} and @samp{off} or @samp{1} and @samp{0}.  A fancier kind of
-Boolean allowed in some cases is the @dfn{lockable Boolean}, which may
-be set to @samp{on}, @samp{off}, @samp{always}, or @samp{never}.  If an
-option is set to @samp{always} or @samp{never}, that value will be
-locked in for the duration of the Wget invocation---command-line options
-will not override.
+@samp{on} and @samp{off} or @samp{1} and @samp{0}.
 
 Some commands take pseudo-arbitrary values.  @var{address} values can be
 hostnames or dotted-quad IP addresses.  @var{n} can be any positive
@@ -2717,12 +2712,9 @@ Set the output filename---the same as @samp{-O @var{file}}.
 Download all ancillary documents necessary for a single @sc{html} page to
 display properly---the same as @samp{-p}.
 
-@item passive_ftp = on/off/always/never
+@item passive_ftp = on/off
 Change setting of passive @sc{ftp}, equivalent to the
-@samp{--passive-ftp} option.  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 command-line.
+@samp{--passive-ftp} option.
 
 @itemx password = @var{string}
 Specify password @var{string} for both @sc{ftp} and @sc{http} file retrieval. 
index f6a844f612b4611c2f018a3cf6076eb5157e6c2c..084310f7b6e91975e083a571a898a9428b710e06 100644 (file)
@@ -1,3 +1,7 @@
+2005-06-22  Hrvoje Niksic  <hniksic@xemacs.org>
+
+       * init.c (cmd_lockable_boolean): Removed.
+
 2005-06-22  Hrvoje Niksic  <hniksic@xemacs.org>
 
        * cookies.c (struct cookie): Use 1-bit bitfields for booleans
index 82a6fe917f4c973fa21d05c9ad21e5537a492ab1..fed0597c319d5575c04dab6cbdd8f0e6fb416e13 100644 (file)
--- a/src/ftp.c
+++ b/src/ftp.c
@@ -618,7 +618,7 @@ Error in server response, closing control connection.\n"));
   /* If anything is to be retrieved, PORT (or PASV) must be sent.  */
   if (cmd & (DO_LIST | DO_RETR))
     {
-      if (opt.ftp_pasv > 0)
+      if (opt.ftp_pasv)
        {
          ip_address passive_addr;
          int        passive_port;
index bd2485ca3487507f491a5afd30243fceb3cf92e7..d3d0f9b3efba8c33a7e74fdcbeb00961fab58829 100644 (file)
@@ -68,7 +68,6 @@ CMD_DECLARE (cmd_bytes_large);
 CMD_DECLARE (cmd_cert_type);
 #endif
 CMD_DECLARE (cmd_directory_vector);
-CMD_DECLARE (cmd_lockable_boolean);
 CMD_DECLARE (cmd_number);
 CMD_DECLARE (cmd_number_inf);
 CMD_DECLARE (cmd_string);
@@ -183,7 +182,7 @@ static struct {
   { "numtries",                &opt.ntry,              cmd_number_inf },/* deprecated*/
   { "outputdocument",  &opt.output_document,   cmd_file },
   { "pagerequisites",  &opt.page_requisites,   cmd_boolean },
-  { "passiveftp",      &opt.ftp_pasv,          cmd_lockable_boolean },
+  { "passiveftp",      &opt.ftp_pasv,          cmd_boolean },
   { "passwd",          &opt.ftp_passwd,        cmd_string },/* deprecated*/
   { "password",                &opt.passwd,            cmd_string },
   { "postdata",                &opt.post_data,         cmd_string },
@@ -701,59 +700,6 @@ cmd_boolean (const char *com, const char *val, void *place)
   return 1;
 }
 
-/* Store the lockable_boolean {2, 1, 0, -1} value from VAL to PLACE.
-   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")
-
-   #### This hack is currently only used for passive FTP because a
-   contributor had broken scripts specify --passive-ftp where he
-   didn't want it.  It should be removed because the same can now be
-   achieved by replacing the wget executable with a script containing:
-
-       exec wget "$@" --no-passive-ftp
-*/
-
-static int
-cmd_lockable_boolean (const char *com, const char *val, void *place)
-{
-  int lockable_boolean_value;
-
-  int oldval = *(int *)place;
-
-  /*
-   * If a config file said "always" or "never", don't allow command line
-   * arguments to override the config file.
-   */
-  if (oldval == -1 || oldval == 2)
-    return 1;
-
-  if (CMP2 (val, 'o', 'n') || CMP3 (val, 'y', 'e', 's') || CMP1 (val, '1'))
-    lockable_boolean_value = 1;
-  else if (CMP3 (val, 'o', 'f', 'f') || CMP2 (val, 'n', 'o') || CMP1 (val, '0'))
-    lockable_boolean_value = 0;
-  else if (0 == strcasecmp (val, "always"))
-    lockable_boolean_value = 2;
-  else if (0 == strcasecmp (val, "never"))
-    lockable_boolean_value = -1;
-  else
-    {
-      fprintf (stderr,
-              _("%s: %s: Invalid extended boolean `%s';\n\
-use one of `on', `off', `always', or `never'.\n"),
-              exec_name, com, val);
-      return 0;
-    }
-
-  *(int *)place = lockable_boolean_value;
-  return 1;
-}
-
 /* Set the non-negative integer value from VAL to PLACE.  With
    incorrect specification, the number remains unchanged.  */
 static int