From: dan Date: Mon, 9 Oct 2000 22:43:11 +0000 (-0700) Subject: [svn] --retr-symlinks was not previously documented properly. Based on my newfound X-Git-Tag: v1.13~2450 X-Git-Url: http://sjero.net/git/?p=wget;a=commitdiff_plain;h=cbf018d0c041f0939f9b232ddc06b5dbf9e8c9a7 [svn] --retr-symlinks was not previously documented properly. Based on my newfound understanding of what its limitations are, added a TODO item. Also made a minor tweak in html.c to silence a warning. --- diff --git a/ChangeLog b/ChangeLog index 9f4f0bd1..ebc62d0e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2000-10-09 Dan Harkless + + * TODO: --retr-symlinks should cause wget to traverse links to dirs too. + 2000-09-25 Dan Harkless * TODO: Make wget return nonzero in situations like bad HTTP diff --git a/TODO b/TODO index 0606fb75..c60c88a1 100644 --- a/TODO +++ b/TODO @@ -6,6 +6,8 @@ Wget. Patches to implement any of these items would be gladly accepted. The items are not listed in any particular order. Not all of them represent user-visible changes. +* --retr-symlinks should cause wget to traverse links to directories too. + * Lots of noncompliant webservers issue HTTP redirects to relative URLs, and browsers follow them, so wget should too. diff --git a/doc/ChangeLog b/doc/ChangeLog index cfca5a71..68759773 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,7 @@ +2000-10-09 Dan Harkless + + * wget.texi (FTP Options): --retr-symlinks wasn't documented properly. + 2000-08-30 Dan Harkless * wget.texi (Recursive Retrieval Options): Documented new -p option. diff --git a/doc/wget.info b/doc/wget.info index dddc5b9c..87ff5b3c 100644 --- a/doc/wget.info +++ b/doc/wget.info @@ -26,8 +26,8 @@ notice identical to this one.  Indirect: wget.info-1: 961 -wget.info-2: 50095 -wget.info-3: 97019 +wget.info-2: 50884 +wget.info-3: 97808  Tag Table: (Indirect) @@ -42,47 +42,47 @@ Node: Download Options12812 Node: Directory Options20659 Node: HTTP Options23137 Node: FTP Options27042 -Node: Recursive Retrieval Options28235 -Node: Recursive Accept/Reject Options32947 -Node: Recursive Retrieval36173 -Node: Following Links38471 -Node: Relative Links39499 -Node: Host Checking40013 -Node: Domain Acceptance42038 -Node: All Hosts43708 -Node: Types of Files44135 -Node: Directory-Based Limits46585 -Node: FTP Links49225 -Node: Time-Stamping50095 -Node: Time-Stamping Usage51732 -Node: HTTP Time-Stamping Internals53301 -Node: FTP Time-Stamping Internals54771 -Node: Startup File55979 -Node: Wgetrc Location56852 -Node: Wgetrc Syntax57667 -Node: Wgetrc Commands58382 -Node: Sample Wgetrc65910 -Node: Examples70929 -Node: Simple Usage71536 -Node: Advanced Usage73930 -Node: Guru Usage76681 -Node: Various78343 -Node: Proxies78867 -Node: Distribution81632 -Node: Mailing List81983 -Node: Reporting Bugs82682 -Node: Portability84467 -Node: Signals85842 -Node: Appendices86496 -Node: Robots86911 -Node: Introduction to RES88058 -Node: RES Format89951 -Node: User-Agent Field91055 -Node: Disallow Field91819 -Node: Norobots Examples92430 -Node: Security Considerations93384 -Node: Contributors94380 -Node: Copying97019 -Node: Concept Index116182 +Node: Recursive Retrieval Options29024 +Node: Recursive Accept/Reject Options33736 +Node: Recursive Retrieval36962 +Node: Following Links39260 +Node: Relative Links40288 +Node: Host Checking40802 +Node: Domain Acceptance42827 +Node: All Hosts44497 +Node: Types of Files44924 +Node: Directory-Based Limits47374 +Node: FTP Links50014 +Node: Time-Stamping50884 +Node: Time-Stamping Usage52521 +Node: HTTP Time-Stamping Internals54090 +Node: FTP Time-Stamping Internals55560 +Node: Startup File56768 +Node: Wgetrc Location57641 +Node: Wgetrc Syntax58456 +Node: Wgetrc Commands59171 +Node: Sample Wgetrc66699 +Node: Examples71718 +Node: Simple Usage72325 +Node: Advanced Usage74719 +Node: Guru Usage77470 +Node: Various79132 +Node: Proxies79656 +Node: Distribution82421 +Node: Mailing List82772 +Node: Reporting Bugs83471 +Node: Portability85256 +Node: Signals86631 +Node: Appendices87285 +Node: Robots87700 +Node: Introduction to RES88847 +Node: RES Format90740 +Node: User-Agent Field91844 +Node: Disallow Field92608 +Node: Norobots Examples93219 +Node: Security Considerations94173 +Node: Contributors95169 +Node: Copying97808 +Node: Concept Index116971  End Tag Table diff --git a/doc/wget.info-1 b/doc/wget.info-1 index 884f2add..aa782849 100644 --- a/doc/wget.info-1 +++ b/doc/wget.info-1 @@ -681,8 +681,23 @@ FTP Options =========== `--retr-symlinks' - Retrieve symbolic links on FTP sites as if they were plain files, - i.e. don't just create links locally. + Usually, when retrieving FTP directories recursively and a symbolic + link is encountered, the linked-to file is not downloaded. + Instead, a matching symbolic link is created on the local + filesystem. The pointed-to file will not be downloaded unless + this recursive retrieval would have encountered it separately and + downloaded it anyway. + + When `--retr-symlinks' is specified, however, symbolic links are + traversed and the pointed-to files are retrieved. At this time, + this option does not cause wget to traverse symlinks to + directories and recurse through them, but in the future it should + be enhanced to do this. + + Note that when retrieving a file (not a directory) because it was + specified on the commandline, rather than because it was recursed + to, this option has no effect. Symbolic links are always + traversed in this case. `-g on/off' `--glob=on/off' diff --git a/doc/wget.info-3 b/doc/wget.info-3 index cad3e7b6..e73c05e5 100644 --- a/doc/wget.info-3 +++ b/doc/wget.info-3 @@ -479,8 +479,8 @@ Concept Index * pause: Download Options. * portability: Portability. * proxies: Proxies. -* proxy <1>: Download Options. -* proxy: HTTP Options. +* proxy <1>: HTTP Options. +* proxy: Download Options. * proxy authentication: HTTP Options. * proxy filling: Recursive Retrieval Options. * proxy password: HTTP Options. @@ -500,7 +500,6 @@ Concept Index * retries: Download Options. * retries, waiting between: Download Options. * retrieval tracing style: Download Options. -* retrieve symbolic links: FTP Options. * retrieving: Recursive Retrieval. * robots: Robots. * robots.txt: Robots. @@ -516,6 +515,7 @@ Concept Index * startup file: Startup File. * suffixes, accept: Types of Files. * suffixes, reject: Types of Files. +* symbolic links, retrieving: FTP Options. * syntax of options: Option Syntax. * syntax of wgetrc: Wgetrc Syntax. * tag-based recursive pruning: Recursive Accept/Reject Options. diff --git a/doc/wget.texi b/doc/wget.texi index b23b13e2..c61e0c7b 100644 --- a/doc/wget.texi +++ b/doc/wget.texi @@ -818,10 +818,24 @@ Wget as Mozilla. @section FTP Options @table @samp -@cindex retrieve symbolic links +@cindex symbolic links, retrieving @item --retr-symlinks -Retrieve symbolic links on @sc{ftp} sites as if they were plain files, -i.e. don't just create links locally. +Usually, when retrieving @sc{ftp} directories recursively and a symbolic +link is encountered, the linked-to file is not downloaded. Instead, a +matching symbolic link is created on the local filesystem. The +pointed-to file will not be downloaded unless this recursive retrieval +would have encountered it separately and downloaded it anyway. + +When @samp{--retr-symlinks} is specified, however, symbolic links are +traversed and the pointed-to files are retrieved. At this time, this +option does not cause wget to traverse symlinks to directories and +recurse through them, but in the future it should be enhanced to do +this. + +Note that when retrieving a file (not a directory) because it was +specified on the commandline, rather than because it was recursed to, +this option has no effect. Symbolic links are always traversed in this +case. @cindex globbing, toggle @item -g on/off diff --git a/po/cs.gmo b/po/cs.gmo index 65d031bd..7d4f9d32 100644 Binary files a/po/cs.gmo and b/po/cs.gmo differ diff --git a/po/cs.po b/po/cs.po index 51b643a4..acfd688a 100644 --- a/po/cs.po +++ b/po/cs.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: GNU wget 1.5.2-b1\n" -"POT-Creation-Date: 2000-08-30 03:32-0700\n" +"POT-Creation-Date: 2000-10-09 15:38-0700\n" "PO-Revision-Date: 1998-06-05 08:47\n" "Last-Translator: Jan Prikryl \n" "Language-Team: Czech \n" @@ -840,9 +840,11 @@ msgstr "" # , fuzzy #: src/main.c:172 +#, fuzzy msgid "" "FTP options:\n" -" --retr-symlinks retrieve FTP symbolic links.\n" +" --retr-symlinks when recursing, retrieve linked-to files (not " +"dirs).\n" " -g, --glob=on/off turn file name globbing on or off.\n" " --passive-ftp use the \"passive\" transfer mode.\n" "\n" diff --git a/po/de.gmo b/po/de.gmo index d7a899a1..10f1322f 100644 Binary files a/po/de.gmo and b/po/de.gmo differ diff --git a/po/de.po b/po/de.po index ec197fee..4bf4f24a 100644 --- a/po/de.po +++ b/po/de.po @@ -23,7 +23,7 @@ msgid "" msgstr "" "Project-Id-Version: wget 1.5.2-b4\n" -"POT-Creation-Date: 2000-08-30 03:32-0700\n" +"POT-Creation-Date: 2000-10-09 15:38-0700\n" "PO-Revision-Date: 1998-06-15 19:25+02:00\n" "Last-Translator: Karl Eichwalder \n" "Language-Team: German \n" @@ -788,9 +788,11 @@ msgstr "" "\n" #: src/main.c:172 +#, fuzzy msgid "" "FTP options:\n" -" --retr-symlinks retrieve FTP symbolic links.\n" +" --retr-symlinks when recursing, retrieve linked-to files (not " +"dirs).\n" " -g, --glob=on/off turn file name globbing on or off.\n" " --passive-ftp use the \"passive\" transfer mode.\n" "\n" diff --git a/po/hr.gmo b/po/hr.gmo index 672b81ee..7adb0d9c 100644 Binary files a/po/hr.gmo and b/po/hr.gmo differ diff --git a/po/hr.po b/po/hr.po index e3a28b3b..d7ccb1fb 100644 --- a/po/hr.po +++ b/po/hr.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: wget 1.5.2-b2\n" -"POT-Creation-Date: 2000-08-30 03:32-0700\n" +"POT-Creation-Date: 2000-10-09 15:38-0700\n" "PO-Revision-Date: 1998-02-29 21:05+01:00\n" "Last-Translator: Hrvoje Niksic \n" "Language-Team: Croatian \n" @@ -758,9 +758,11 @@ msgstr "" "\n" #: src/main.c:172 +#, fuzzy msgid "" "FTP options:\n" -" --retr-symlinks retrieve FTP symbolic links.\n" +" --retr-symlinks when recursing, retrieve linked-to files (not " +"dirs).\n" " -g, --glob=on/off turn file name globbing on or off.\n" " --passive-ftp use the \"passive\" transfer mode.\n" "\n" diff --git a/po/it.gmo b/po/it.gmo index 6d6c0d4b..ff73e1ec 100644 Binary files a/po/it.gmo and b/po/it.gmo differ diff --git a/po/it.po b/po/it.po index 6beef911..f6366b80 100644 --- a/po/it.po +++ b/po/it.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: wget 1.5.2-b1\n" -"POT-Creation-Date: 2000-08-30 03:32-0700\n" +"POT-Creation-Date: 2000-10-09 15:38-0700\n" "PO-Revision-Date: 1998-06-13 15:22+02:00\n" "Last-Translator: Giovanni Bortolozzo \n" "Language-Team: Italian \n" @@ -769,9 +769,11 @@ msgstr "" "\n" #: src/main.c:172 +#, fuzzy msgid "" "FTP options:\n" -" --retr-symlinks retrieve FTP symbolic links.\n" +" --retr-symlinks when recursing, retrieve linked-to files (not " +"dirs).\n" " -g, --glob=on/off turn file name globbing on or off.\n" " --passive-ftp use the \"passive\" transfer mode.\n" "\n" diff --git a/po/no.gmo b/po/no.gmo index e5ed1450..94ab87e1 100644 Binary files a/po/no.gmo and b/po/no.gmo differ diff --git a/po/no.po b/po/no.po index 1fb8c414..d764b20e 100644 --- a/po/no.po +++ b/po/no.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: wget 1.5.2-b1\n" -"POT-Creation-Date: 2000-08-30 03:32-0700\n" +"POT-Creation-Date: 2000-10-09 15:38-0700\n" "PO-Revision-Date: 1998-05-22 09:00+0100\n" "Last-Translator: Robert Schmidt \n" "Language-Team: Norwegian \n" @@ -759,9 +759,11 @@ msgstr "" "\n" #: src/main.c:172 +#, fuzzy msgid "" "FTP options:\n" -" --retr-symlinks retrieve FTP symbolic links.\n" +" --retr-symlinks when recursing, retrieve linked-to files (not " +"dirs).\n" " -g, --glob=on/off turn file name globbing on or off.\n" " --passive-ftp use the \"passive\" transfer mode.\n" "\n" diff --git a/po/pt_BR.gmo b/po/pt_BR.gmo index eb3c54c1..22f85b53 100644 Binary files a/po/pt_BR.gmo and b/po/pt_BR.gmo differ diff --git a/po/pt_BR.po b/po/pt_BR.po index b6f20a09..59a90f6c 100644 --- a/po/pt_BR.po +++ b/po/pt_BR.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: wget 1.5-b9\n" -"POT-Creation-Date: 2000-08-30 03:32-0700\n" +"POT-Creation-Date: 2000-10-09 15:38-0700\n" "PO-Revision-Date: 1998-04-06 22:09-0300\n" "Last-Translator: Wanderlei Antonio Cavasin \n" "Language-Team: Portuguese \n" @@ -828,9 +828,11 @@ msgstr "" # , fuzzy #: src/main.c:172 +#, fuzzy msgid "" "FTP options:\n" -" --retr-symlinks retrieve FTP symbolic links.\n" +" --retr-symlinks when recursing, retrieve linked-to files (not " +"dirs).\n" " -g, --glob=on/off turn file name globbing on or off.\n" " --passive-ftp use the \"passive\" transfer mode.\n" "\n" diff --git a/po/wget.pot b/po/wget.pot index c3590d1b..7bcea84c 100644 --- a/po/wget.pot +++ b/po/wget.pot @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2000-08-30 03:32-0700\n" +"POT-Creation-Date: 2000-10-09 15:38-0700\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -686,7 +686,8 @@ msgstr "" #: src/main.c:172 msgid "" "FTP options:\n" -" --retr-symlinks retrieve FTP symbolic links.\n" +" --retr-symlinks when recursing, retrieve linked-to files (not " +"dirs).\n" " -g, --glob=on/off turn file name globbing on or off.\n" " --passive-ftp use the \"passive\" transfer mode.\n" "\n" diff --git a/src/ChangeLog b/src/ChangeLog index 709174ef..b4129802 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2000-10-09 Dan Harkless + + * html.c (htmlfindurl): Added unneeded initialization to quiet warning. + + * main.c (print_help): Clarified what --retr-symlinks does. + 2000-08-30 Dan Harkless * ftp.c (ftp_retrieve_list): Use new INFINITE_RECURSION #define. diff --git a/src/html.c b/src/html.c index 426e7330..b5327ca3 100644 --- a/src/html.c +++ b/src/html.c @@ -145,7 +145,7 @@ htmlfindurl (const char *buf, int bufsize, int *size, int init, { const char* link_href = NULL; const char* link_rel = NULL; - int link_href_saved_size; + int link_href_saved_size = 0; /* init. just to shut up warning */ if (!bufsize) break; diff --git a/src/main.c b/src/main.c index 42d4047c..7937ff63 100644 --- a/src/main.c +++ b/src/main.c @@ -171,7 +171,7 @@ HTTP options:\n\ -U, --user-agent=AGENT identify as AGENT instead of Wget/VERSION.\n\ \n"), _("\ FTP options:\n\ - --retr-symlinks retrieve FTP symbolic links.\n\ + --retr-symlinks when recursing, retrieve linked-to files (not dirs).\n\ -g, --glob=on/off turn file name globbing on or off.\n\ --passive-ftp use the \"passive\" transfer mode.\n\ \n"), _("\