1
0
mirror of https://github.com/moparisthebest/wget synced 2024-07-03 16:38:41 -04:00

[svn] Hrvoje didn't regenerate the .info files after changing wget.texi.

Got rid of newly-introduced nested-if warnings in ftp.c and http.c.  Fixed
apparently completely untested code in main.c that was trying to provide --wait
/ --waitretry backwards compatibility, but had multiple fundamental bugs.
This commit is contained in:
dan 2000-03-02 13:17:47 -08:00
parent a04bf0f734
commit d2e1d7fe9d
7 changed files with 121 additions and 94 deletions

View File

@ -26,8 +26,8 @@ notice identical to this one.
 
Indirect: Indirect:
wget.info-1: 961 wget.info-1: 961
wget.info-2: 50395 wget.info-2: 50388
wget.info-3: 89018 wget.info-3: 89138
 
Tag Table: Tag Table:
(Indirect) (Indirect)
@ -35,54 +35,54 @@ Node: Top961
Node: Overview1850 Node: Overview1850
Node: Invoking5024 Node: Invoking5024
Node: URL Format5833 Node: URL Format5833
Node: Option Syntax8164 Node: Option Syntax8163
Node: Basic Startup Options9588 Node: Basic Startup Options9587
Node: Logging and Input File Options10288 Node: Logging and Input File Options10287
Node: Download Options12682 Node: Download Options12681
Node: Directory Options18467 Node: Directory Options18466
Node: HTTP Options20945 Node: HTTP Options20944
Node: FTP Options24541 Node: FTP Options24540
Node: Recursive Retrieval Options25734 Node: Recursive Retrieval Options25733
Node: Recursive Accept/Reject Options27623 Node: Recursive Accept/Reject Options27622
Node: Recursive Retrieval29706 Node: Recursive Retrieval29705
Node: Following Links32002 Node: Following Links32003
Node: Relative Links33034 Node: Relative Links33035
Node: Host Checking33548 Node: Host Checking33549
Node: Domain Acceptance35581 Node: Domain Acceptance35574
Node: All Hosts37251 Node: All Hosts37244
Node: Types of Files37678 Node: Types of Files37671
Node: Directory-Based Limits40128 Node: Directory-Based Limits40121
Node: FTP Links42768 Node: FTP Links42761
Node: Time-Stamping43638 Node: Time-Stamping43631
Node: Time-Stamping Usage45275 Node: Time-Stamping Usage45268
Node: HTTP Time-Stamping Internals46844 Node: HTTP Time-Stamping Internals46837
Node: FTP Time-Stamping Internals48314 Node: FTP Time-Stamping Internals48307
Node: Startup File49522 Node: Startup File49515
Node: Wgetrc Location50395 Node: Wgetrc Location50388
Node: Wgetrc Syntax51210 Node: Wgetrc Syntax51203
Node: Wgetrc Commands51925 Node: Wgetrc Commands51918
Node: Sample Wgetrc58763 Node: Sample Wgetrc58756
Node: Examples63055 Node: Examples63048
Node: Simple Usage63662 Node: Simple Usage63655
Node: Advanced Usage66056 Node: Advanced Usage66049
Node: Guru Usage68807 Node: Guru Usage68800
Node: Various70469 Node: Various70462
Node: Proxies70993 Node: Proxies70986
Node: Distribution73758 Node: Distribution73751
Node: Mailing List74108 Node: Mailing List74102
Node: Reporting Bugs74807 Node: Reporting Bugs74801
Node: Portability76592 Node: Portability76586
Node: Signals77967 Node: Signals77961
Node: Appendices78621 Node: Appendices78615
Node: Robots79036 Node: Robots79030
Node: Introduction to RES80183 Node: Introduction to RES80177
Node: RES Format82076 Node: RES Format82070
Node: User-Agent Field83180 Node: User-Agent Field83174
Node: Disallow Field83944 Node: Disallow Field83938
Node: Norobots Examples84555 Node: Norobots Examples84549
Node: Security Considerations85509 Node: Security Considerations85503
Node: Contributors86505 Node: Contributors86499
Node: Copying89018 Node: Copying89138
Node: Concept Index108181 Node: Concept Index108301
 
End Tag Table End Tag Table

View File

@ -186,7 +186,7 @@ is an example:
ftp://host/directory/file;type=a ftp://host/directory/file;type=a
Two alternative variants of URL specification are also supported, Two alternative variants of URL specification are also supported,
because of historical (hysterical?) reasons and their wide-spreadedness. because of historical (hysterical?) reasons and their widespreaded use.
FTP-only syntax (supported by `NcFTP'): FTP-only syntax (supported by `NcFTP'):
host:/dir/file host:/dir/file
@ -811,7 +811,7 @@ through the network; all of this may hamper other users' work. The
same stands for the foreign server you are mirroring--the more requests same stands for the foreign server you are mirroring--the more requests
it gets in a rows, the greater is its load. it gets in a rows, the greater is its load.
Careless retrieving can also fill your file system unctrollably, Careless retrieving can also fill your file system uncontrollably,
which can grind the machine to a halt. which can grind the machine to a halt.
The load can be minimized by lowering the maximum recursion level The load can be minimized by lowering the maximum recursion level
@ -872,8 +872,7 @@ Host Checking
The drawback of following the relative links solely is that humans The drawback of following the relative links solely is that humans
often tend to mix them with absolute links to the very same host, and often tend to mix them with absolute links to the very same host, and
the very same page. In this mode (which is the default mode for the very same page. In this mode (which is the default mode for
following links) all URLs the that refer to the same host will be following links) all URLs that refer to the same host will be retrieved.
retrieved.
The problem with this option are the aliases of the hosts and The problem with this option are the aliases of the hosts and
domains. Thus there is no way for Wget to know that `regoc.srce.hr' and domains. Thus there is no way for Wget to know that `regoc.srce.hr' and
@ -883,7 +882,7 @@ DNS-looked-up with `gethostbyname' to check whether we are maybe
dealing with the same hosts. Although the results of `gethostbyname' dealing with the same hosts. Although the results of `gethostbyname'
are cached, it is still a great slowdown, e.g. when dealing with large are cached, it is still a great slowdown, e.g. when dealing with large
indices of home pages on different hosts (because each of the hosts indices of home pages on different hosts (because each of the hosts
must be and DNS-resolved to see whether it just *might* an alias of the must be DNS-resolved to see whether it just *might* be an alias of the
starting host). starting host).
To avoid the overhead you may use `-nh', which will turn off To avoid the overhead you may use `-nh', which will turn off
@ -891,15 +890,15 @@ DNS-resolving and make Wget compare hosts literally. This will make
things run much faster, but also much less reliable (e.g. `www.srce.hr' things run much faster, but also much less reliable (e.g. `www.srce.hr'
and `regoc.srce.hr' will be flagged as different hosts). and `regoc.srce.hr' will be flagged as different hosts).
Note that modern HTTP servers allows one IP address to host several Note that modern HTTP servers allow one IP address to host several
"virtual servers", each having its own directory hieratchy. Such "virtual servers", each having its own directory hierarchy. Such
"servers" are distinguished by their hostnames (all of which point to "servers" are distinguished by their hostnames (all of which point to
the same IP address); for this to work, a client must send a `Host' the same IP address); for this to work, a client must send a `Host'
header, which is what Wget does. However, in that case Wget *must not* header, which is what Wget does. However, in that case Wget *must not*
try to divine a host's "real" address, nor try to use the same hostname try to divine a host's "real" address, nor try to use the same hostname
for each access, i.e. `-nh' must be turned on. for each access, i.e. `-nh' must be turned on.
In other words, the `-nh' option must be used to enabling the In other words, the `-nh' option must be used to enable the
retrieval from virtual servers distinguished by their hostnames. As the retrieval from virtual servers distinguished by their hostnames. As the
number of such server setups grow, the behavior of `-nh' may become the number of such server setups grow, the behavior of `-nh' may become the
default in the future. default in the future.
@ -963,8 +962,8 @@ Types of Files
When downloading material from the web, you will often want to When downloading material from the web, you will often want to
restrict the retrieval to only certain file types. For example, if you restrict the retrieval to only certain file types. For example, if you
are interested in downloading GIFS, you will not be overjoyed to get are interested in downloading GIFs, you will not be overjoyed to get
loads of Postscript documents, and vice versa. loads of PostScript documents, and vice versa.
Wget offers two options to deal with this problem. Each option Wget offers two options to deal with this problem. Each option
description lists a short name, a long name, and the equivalent command description lists a short name, a long name, and the equivalent command
@ -1005,7 +1004,7 @@ in `.wgetrc'.
The `-A' and `-R' options may be combined to achieve even better The `-A' and `-R' options may be combined to achieve even better
fine-tuning of which files to retrieve. E.g. `wget -A "*zelazny*" -R fine-tuning of which files to retrieve. E.g. `wget -A "*zelazny*" -R
.ps' will download all the files having `zelazny' as a part of their .ps' will download all the files having `zelazny' as a part of their
name, but *not* the postscript files. name, but *not* the PostScript files.
Note that these two options do not affect the downloading of HTML Note that these two options do not affect the downloading of HTML
files; Wget must load all the HTMLs to know where to go at files; Wget must load all the HTMLs to know where to go at
@ -1059,7 +1058,7 @@ equivalent command in `.wgetrc'.
`no_parent = on' `no_parent = on'
The simplest, and often very useful way of limiting directories is The simplest, and often very useful way of limiting directories is
disallowing retrieval of the links that refer to the hierarchy disallowing retrieval of the links that refer to the hierarchy
"upper" than the beginning directory, i.e. disallowing ascent to "above" than the beginning directory, i.e. disallowing ascent to
the parent directory/directories. the parent directory/directories.
The `--no-parent' option (short `-np') is useful in this case. The `--no-parent' option (short `-np') is useful in this case.

View File

@ -710,7 +710,7 @@ Distribution
Like all GNU utilities, the latest version of Wget can be found at Like all GNU utilities, the latest version of Wget can be found at
the master GNU archive site prep.ai.mit.edu, and its mirrors. For the master GNU archive site prep.ai.mit.edu, and its mirrors. For
example, Wget 1.5.3+dev can be found at example, Wget 1.5.3+dev can be found at
`ftp://prep.ai.mit.edu/pub/gnu/wget-1.5.3+dev.tar.gz' `ftp://prep.ai.mit.edu/gnu/wget/wget-1.5.3+dev.tar.gz'
 
File: wget.info, Node: Mailing List, Next: Reporting Bugs, Prev: Distribution, Up: Various File: wget.info, Node: Mailing List, Next: Reporting Bugs, Prev: Distribution, Up: Various
@ -860,7 +860,7 @@ robots `META' tag.
The description of the norobots standard was written, and is The description of the norobots standard was written, and is
maintained by Martijn Koster <m.koster@webcrawler.com>. With his maintained by Martijn Koster <m.koster@webcrawler.com>. With his
permission, I contribute a (slightly modified) texified version of the permission, I contribute a (slightly modified) TeXified version of the
RES. RES.
* Menu: * Menu:
@ -928,7 +928,7 @@ contains lines of the form:
The field name is case insensitive. The field name is case insensitive.
Comments can be included in file using UNIX bourne shell conventions: Comments can be included in file using UNIX Bourne shell conventions:
the `#' character is used to indicate that preceding space (if any) and the `#' character is used to indicate that preceding space (if any) and
the remainder of the line up to the line termination is discarded. the remainder of the line up to the line termination is discarded.
Lines containing only a comment are discarded completely, and therefore Lines containing only a comment are discarded completely, and therefore
@ -1065,7 +1065,7 @@ patches, or letters saying "Thanks!".
* Darko Budor--initial port to Windows. * Darko Budor--initial port to Windows.
* Antonio Rosella--help and suggestions, plust the Italian * Antonio Rosella--help and suggestions, plus the Italian
translation. translation.
* Tomislav Petrovic, Mario Mikocevic--many bug reports and * Tomislav Petrovic, Mario Mikocevic--many bug reports and
@ -1086,19 +1086,21 @@ suggestions, beta testing services, fan mail and all the other things
that make maintenance so much fun: that make maintenance so much fun:
Tim Adam, Martin Baehr, Dieter Baron, Roger Beeman and the Gurus at Tim Adam, Martin Baehr, Dieter Baron, Roger Beeman and the Gurus at
Cisco, Mark Boyns, John Burden, Wanderlei Cavassin, Gilles Cedoc, Tim Cisco, Dan Berger, Mark Boyns, John Burden, Wanderlei Cavassin, Gilles
Charron, Noel Cragg, Kristijan Conkas, Damir Dzeko, Andrew Davison, Cedoc, Tim Charron, Noel Cragg, Kristijan Conkas, Andrew Deryabin,
Ulrich Drepper, Marc Duponcheel, Aleksandar Erkalovic, Andy Eskilsson, Damir Dzeko, Andrew Davison, Ulrich Drepper, Marc Duponcheel,
Masashi Fujita, Howard Gayle, Marcel Gerrits, Hans Grobler, Mathieu Aleksandar Erkalovic, Andy Eskilsson, Masashi Fujita, Howard Gayle,
Guillaume, Karl Heuer, Gregor Hoffleit, Erik Magnus Hulthen, Richard Marcel Gerrits, Hans Grobler, Mathieu Guillaume, Dan Harkless, Heiko
Huveneers, Simon Josefsson, Mario Juric, Goran Kezunovic, Robert Kleine, Herold, Karl Heuer, HIROSE Masaaki, Gregor Hoffleit, Erik Magnus
Fila Kolodny, Alexander Kourakos, Martin Kraemer, Simos KSenitellis, Hulthen, Richard Huveneers, Simon Josefsson, Mario Juric, Goran
Tage Stabell-Kulo, Hrvoje Lacko, Dave Love, Jordan Mendelson, Lin Zhe Kezunovic, Robert Kleine, Fila Kolodny, Alexander Kourakos, Martin
Min, Charlie Negyesi, Andrew Pollock, Steve Pothier, Marin Purgar, Jan Kraemer, Simos KSenitellis, Hrvoje Lacko, Daniel S. Lewart, Dave Love,
Prikryl, Keith Refson, Tobias Ringstrom, Juan Jose Rodrigues, Heinz Jordan Mendelson, Lin Zhe Min, Charlie Negyesi, Andrew Pollock, Steve
Salzmann, Robert Schmidt, Toomas Soome, Sven Sternberger, Markus Pothier, Jan Prikryl, Marin Purgar, Keith Refson, Tobias Ringstrom,
Strasser, Szakacsits Szabolcs, Mike Thomas, Russell Vincent, Douglas E. Juan Jose Rodrigues, Edward J. Sabol, Heinz Salzmann, Robert Schmidt,
Wegscheid, Jasmin Zainul, Bojan Zdrnja, Kristijan Zimmer. Toomas Soome, Tage Stabell-Kulo, Sven Sternberger, Markus Strasser,
Szakacsits Szabolcs, Mike Thomas, Russell Vincent, Charles G Waldman,
Douglas E. Wegscheid, Jasmin Zainul, Bojan Zdrnja, Kristijan Zimmer.
Apologies to all who I accidentally left out, and many thanks to all Apologies to all who I accidentally left out, and many thanks to all
the subscribers of the Wget mailing list. the subscribers of the Wget mailing list.

View File

@ -1,3 +1,16 @@
2000-03-02 Dan Harkless <dan-wget@dilvish.speed.net>
* ftp.c (ftp_loop_internal): Heiko introduced "suggest explicit
braces to avoid ambiguous `else'" warnings. Eliminated them.
* http.c (http_loop): Heiko introduced "suggest explicit
braces to avoid ambiguous `else'" warnings. Eliminated them.
* main.c: Heiko's --wait / --waitretry backwards compatibility
code looks to have been totally untested -- automatic variable
'wr' was used without being initialized, and a long int was passed
into setval()'s char* val parameter.
1999-08-25 Heiko Herold <Heiko.Herold@previnet.it> 1999-08-25 Heiko Herold <Heiko.Herold@previnet.it>
* ftp.c: Respect new option waitretry. * ftp.c: Respect new option waitretry.

View File

@ -855,13 +855,17 @@ ftp_loop_internal (struct urlinfo *u, struct fileinfo *f, ccon *con)
retrieval). retrieval).
Check if we are retrying or not, wait accordingly - HEH */ Check if we are retrying or not, wait accordingly - HEH */
if (!first_retrieval && (opt.wait || (count && opt.waitretry))) if (!first_retrieval && (opt.wait || (count && opt.waitretry)))
if (count) {
if (count<opt.waitretry) if (count)
sleep(count); {
if (count<opt.waitretry)
sleep(count);
else
sleep(opt.waitretry);
}
else else
sleep(opt.waitretry); sleep (opt.wait);
else }
sleep (opt.wait);
if (first_retrieval) if (first_retrieval)
first_retrieval = 0; first_retrieval = 0;
if (con->st & ON_YOUR_OWN) if (con->st & ON_YOUR_OWN)

View File

@ -961,13 +961,17 @@ File `%s' already there, will not retrieve.\n"), u->local);
retrieval). retrieval).
Check if we are retrying or not, wait accordingly - HEH */ Check if we are retrying or not, wait accordingly - HEH */
if (!first_retrieval && (opt.wait || (count && opt.waitretry))) if (!first_retrieval && (opt.wait || (count && opt.waitretry)))
if (count) {
if (count<opt.waitretry) if (count)
sleep(count); {
if (count<opt.waitretry)
sleep(count);
else
sleep(opt.waitretry);
}
else else
sleep(opt.waitretry); sleep (opt.wait);
else }
sleep (opt.wait);
if (first_retrieval) if (first_retrieval)
first_retrieval = 0; first_retrieval = 0;
/* Get the current time string. */ /* Get the current time string. */

View File

@ -198,7 +198,7 @@ main (int argc, char *const *argv)
{ {
char **url, **t; char **url, **t;
int i, c, nurl, status, append_to_log; int i, c, nurl, status, append_to_log;
int wr; int wr = 0;
static struct option long_options[] = static struct option long_options[] =
{ {
@ -586,7 +586,12 @@ GNU General Public License for more details.\n"));
A simple check on the values is not enough, I could have set A simple check on the values is not enough, I could have set
wait to n>0 and waitretry to 0 - HEH */ wait to n>0 and waitretry to 0 - HEH */
if (opt.wait && !wr) if (opt.wait && !wr)
setval ("waitretry", opt.wait); {
char opt_wait_str[256]; /* bigger than needed buf to prevent overflow */
sprintf(opt_wait_str, "%ld", opt.wait);
setval ("waitretry", opt_wait_str);
}
/* Sanity checks. */ /* Sanity checks. */
if (opt.verbose && opt.quiet) if (opt.verbose && opt.quiet)