]> sjero.net Git - wget/blob - src/ChangeLog
Fix false "downloaded bytes" information from getftp.
[wget] / src / ChangeLog
1 2009-09-06  Micah Cowan  <micah@cowan.name>
2
3         * ftp.c (getftp, ftp_loop_internal): Separate "len" input/output
4         parameter (with different meanings for input and output), into two
5         separate parameters, one input (passed_expected_bytes) and one
6         output (qtyread). Fixes bug #26870.
7
8 2009-09-04  Micah Cowan  <micah@cowan.name>
9
10         * Makefile.am: Move build_info.c to wget_SOURCES from
11         nodist_wget_SOURCES, reduce dependencies, and invoke build_info.pl
12         in its new home, $(top_srcdir)/build-aux.
13
14 2009-09-03  Micah Cowan  <micah@cowan.name>
15
16         * ftp-ls.c (ftp_parse_vms_ls): Replace use of localtime_r with
17         localtime, as not all platforms have localtime_r.
18
19         * Makefile.am (wget_SOURCES): Rearranged some of the file order,
20         so .c files and .h files are apart. Added gettext.h, so that it
21         shows up in the dist.
22
23 2009-09-02  Micah Cowan  <micah@cowan.name>
24
25         * gettext.h: Refreshed from gettext 0.17.
26
27         * test.c: Added definition of program_name variable, required by
28         lib/error.c (libgnu.a). Doesn't cause problems until you try to
29         build on a non-GNU system...
30
31         * build_info.c.in: Removed useless "+gettext" feature ad.
32
33 2009-08-29  Steven Schubiger  <stsc@member.fsf.org>
34
35         * convert.c (local_quote_string): Percent-encode semicolons
36         in local file strings.
37
38 2009-08-27  Micah Cowan  <micah@cowan.name>
39
40         * wget.h (uerr_t): added new VERIFCERTERR code for SSL certificate
41         problems. Marked exit codes that are defined but never used (at
42         least, the ones I could find).
43
44         * retr.c, retr.h (retrieve_url): Added a new boolean argument to
45         determine whether an exit status should be recorded.
46         (retrieve_from_file): Adjust to new retrieve_url signature.
47
48         * res.c (res_retrieve_file): Don't have retrieve_url record an
49         exit status for robots.txt.
50
51         * recur.c (retrieve_tree): Adjust to new retrieve_url signature.
52
53         * main.c (main): Use the exit status stored by retrieve_url.
54
55         * http.c (gethttp): Distinguish certificate verification problems
56         from SSL connection issues.
57         (http_loop): Handle newly-created VERIFCERTERR error code.
58
59         * exits.c, exits.h: Newly added.
60         
61         * Makefile.am (wget_SOURCES): Add exits.c and exits.h.
62
63 2009-08-27  Micah Cowan  <micah@cowan.name>
64
65         * http.c (gethttp): Make sure Wget heeds cookies when they
66         are sent with a 401 response; or any other sort of response for
67         that matter (#26775).
68
69 2009-08-19  Micah Cowan  <micah@cowan.name>
70
71         * openssl.c (ssl_check_certificate): Only warn about an attack if
72         the hostname would otherwise have matched. Also some formatting
73         cleanup.
74
75 2009-08-19  Joao Ferreira  <joao@joaoff.com>
76
77         * openssl.c (ssl_check_certificate): Detect embedded NUL
78         characters in the SSL certificate common name.
79
80 2009-08-17  Tony Lewis  <tlewis@exelana.com>
81
82         * http.c (gethttp): Ensure that we parse Content-Length before we
83         attempt to refer to its value. Without this fix, NTLM support was
84         completely buggered. #27192
85
86 2009-08-09  Michael Baeuerle  <michael.baeuerle@gmx.net>
87
88         * ftp.c: #include <strings.h> for strcasecmp.
89
90 2009-07-28  Micah Cowan  <micah@cowan.name>
91
92         * main.c (option_data): Rename --html-extension to
93         --adjust-extension.
94         (print_help): Ditto.
95         
96         * options.h (struct option): Rename html_extension to
97         adjust_extension.
98         * http.c (gethttp): Ditto.
99         * convert.c (local_quote_string): Ditto.
100
101         * init.c (commands): Add "adjustextension", and reflect rename
102         change for opt.adjust_extension, for both "adjustextension" and
103         "htmlextension".
104
105 2009-07-27  Micah Cowan  <micah@cowan.name>
106
107         * options.h (struct options): Added restrict_files_nonascii
108         boolean field.
109
110         * url.c (FILE_CHAR_TEST): Add check for chars outside the ASCII
111         range.
112
113         * init.c (defaults): Add restrict_files_nonascii to initialization.
114         (cmd_spec_restrict_file_names): Allow parsing of "ascii" keyword.
115
116 2009-07-27  Marcel Telka  <marcel@telka.sk>
117
118         * iri.c (do_conversion): Typo: invalide -> invalid
119
120 2009-07-27  Petr Pisar  <petr.pisar@atlas.cz>
121
122         * main.c (print_help): Fixed a couple typos.
123
124 2009-07-26  Micah Cowan  <micah@cowan.name>
125
126         * main.c (option_data): Rename --locale option to --local-encoding
127         (print_help): Document --no-iri, --local-encoding, and
128         --remote-encoding, within usage message. Remove defunct
129         --preserve-permissions.
130
131 2009-07-23  Micah Cowan  <micah@cowan.name>
132
133         * progress.c (get_eta): Change "Translation note" in comment to
134         "TRANSLATORS", so it actually appears in wget.pot.
135
136 2009-07-06  Micah Cowan  <micah@cowan.name>
137
138         * main.c (print_help): Improve documentation of --base.
139
140 2009-07-05  Micah Cowan  <micah@cowan.name>
141
142         * html-url.c (tag_handle_meta): Handle meta name="robots"
143         properly: deal with whitespace, commas after...
144
145         * netrc.c (parse_netrc): Rename local-scope variable "quote" to
146         "qmark", to avoid conflict with the function name.
147
148 2009-07-05  Petr Pisar  <petr.pisar@atlas.cz>
149
150         * main.c (print_version): Mark initial line for translation, along
151         with (env), (user), and (system). Change copyright year to 2009.
152
153         * http.c (http_loop): Space after colon.
154
155         * gnutls.c (ssl_check_certificate): Use quote function, rather
156         than explicit quotes.
157
158 2009-07-05  Micah Cowan  <micah@cowan.name>
159
160         * Makefile.am (version.c): Add dependency on configure.ac.
161
162         * iri.c: Mark some strings for translation.
163
164 2009-07-04  Steven Schweda  <sms@antinode.info>
165
166         * wget.h (ORIG_SFX): Macro added, to supply an alternative "_orig"
167         suffix on VMS.
168         
169         * connect.c, host.c, host.h, main.c: Include "vms_ip.h" rather
170         than <netdb.h> on VMS systems.
171
172         * convert.c (write_backup_file): Use "_orig" rather than ".orig"
173         on VMS.
174
175         * ftp-basic.c (ftp_list): Don't use LIST -a on VMS servers.
176
177         * ftp.c [__VMS]: Include "vms.h"
178         * ftp.c (getftp): Disable some unhelpful "for VMS" code. Pass the
179         OS type to ftp_list.
180         (getftp) [__VMS]: Alter the filename as required, and invoke fopen
181         with extra optional arguments.
182         (ftp_retrieve_list): Set permissions before setting the times.
183
184         * ftp-ls.c [__VMS]: Various improvements.
185
186         * http.c (SET_USER_AGENT): Added. Include operating-system info in
187         the User-Agent header.
188         (gethttp): Use ORIG_SFX macro.
189         (gethttp) [__VMS]: invoke fopen with extra arguments to
190         communicate file type.
191         (http_loop): Add cast to time_t.
192
193         * init.c (wgetrc_user_file_name) [__VMS]: Adjustments for where to
194         find the .wgetrc.
195
196         * log.c: Adjustments to improve handling of log files on VMS.
197
198         * main.c [__VMS]: Added --ftp-stmlf option (and associated
199         documentation). Adjust description of backup-suffixes, as they now
200         differ for VMS.
201         (print_help, print_version): Include OS type in version
202         information.
203         (main) [__VMS]: Invoke fopen with extra options, to specify file
204         type information.
205
206         * netrc.c (search_netrc) [__VMS]: Fix .netrc-finding.
207
208         * openssl.c, openssl.h (ssl_connect_wget): Renamed from ssl_connect.
209
210         * options.h (struct options): Add ftp_stmlf field.
211
212         * retr.c (write_data) [__VMS]: Avoid fflush.
213
214         * url.c [__VMS]: Include vms.h.
215         * url.c (url_file_name) [__VMS]: Handle naming as required for VMS.
216
217         * utils.c [__VMS]: Include vms.h. Various added facilities for VMS
218         needs.
219
220 2009-07-04  Micah Cowan  <micah@cowan.name>
221
222         * main.c (print_version): Allow localization of the version-info
223         labels, eschew attempts at alignment (which is complicated when
224         handling translated strings), and avoid using printf() with
225         variable-stored format strings that lack conversion
226         specifications.
227         (format_and_print_line): For similar reasons, don't calculate
228         line-continuation tabulation based on the number of bytes in a
229         string.
230
231 2009-07-04  Steven Schubiger  <stsc@member.fsf.org>
232
233         * url.c (url_parse): If an URL scheme is invalid, distinguish
234         between an unsupported or missing scheme.
235
236         * url.c: Add a "missing scheme" entry to parse_errors.
237
238 2009-07-03  Micah Cowan  <micah@cowan.name>
239
240         * iri.h (iri_dup): Provide macro definition for when IRIs are
241         disabled.
242
243         * Makefile.am (LIBS): Added @LIBICONV@.
244         (wget_SOURCES): Added iri.h.
245         (EXTRA_wget_SOURCES): Added iri.c, so it gets packaged even if IRI
246         support was disabled.
247
248 2009-07-02  Micah Cowan  <micah@cowan.name>
249
250         * recur.c (url_enqueue): Quote enqueue/dequeue debug messages.
251
252         * html-url.c (append_url): Change "merge()" quoting style from
253         locale_quoting_style to escape_quoting_style.
254
255 2009-07-01  Micah Cowan  <micah@cowan.name>
256
257         * retr.c (retrieve_url): Use the existing "redirect" label,
258         instead of superfluous "second_try". Removed no-longer-accurate
259         debug statement. Use the "newloc" parameter to store the fallback
260         URL, when IRI version was rejected.
261
262         * recur.c (retrieve_tree): Always use the parsed URL for tracking
263         the Referer, since that's the one we actually requested (if
264         there's a difference in terms of percent-encodings and such).
265
266 2009-07-01  Steven Schubiger  <stsc@member.fsf.org>
267
268         * Makefile.am: Add a rule to generate build_info.c and list
269         the build_info.c.in file in EXTRA_DIST. Adjust elsewhere
270         where needed.
271         
272         * build_info.c: Remove this static source file.
273         
274         * build_info.c.in: Data for generation of build_info.c.
275
276 2009-06-29  Micah Cowan  <micah@cowan.name>
277
278         * html-url.c (append_url): Quote some more arguments that might
279         contain characters that are inappropriate to display for the
280         current locale.
281
282         * retr.c (retrieve_from_file): Be sure to pass iri information
283         when parsing an input-fle url, and be sure to hand a clean iri
284         struct, off to retrieve_tree and retrieve_url.
285
286         * iri.c, iri.h (iri_dup): Added.
287
288         * retr.c (retrieve_url): Re-parse for IRI fallback.
289
290         * main.c (main): Set up iri before the url_parse invocation (so we
291         can use it).
292
293 2009-06-20  Jay Krell  <jay.krell@cornell.edu>
294
295         * sysdep.h (_ALL_SOURCE): (small change) Define the _ALL_SOURCE
296         macro on INTERIX systems. (I switched the location from ftp.c to
297         sysdep.h --mjc)
298
299 2009-06-15  Micah Cowan  <micah@cowan.name>
300
301         * ftp.c (getftp): If we can't accept the connection, return
302         CONERROR, not whatever the contents of err happens to be. Fixes
303         bug #25015.
304
305         * retr.c (fd_read_body): Make both args to progress_create
306         consistent, resulting in an accurate progress display. Fixes bug
307         #24948.
308
309 2009-06-14  Micah Cowan  <micah@cowan.name>
310
311         * Makefile.am (wget_SOURCES): css-tokens.h needs to ship with
312         dist, too.
313
314 2009-06-13  Micah Cowan  <micah@cowan.name>
315
316         * init.c: Rename setval_internal_wrapper to setval_internal_tilde,
317         ensure we don't "replace" the tilde unless it's actually
318         present. Clean up some minor GNU style issues.
319
320 2009-06-13  Julien Pichon  <julienpichon7@gmail.com>
321
322         * init.c: Handle tilde-expansion in wgetrc commands, without
323         resorting to setting/unsetting globals to change behavior in one
324         call location.
325
326 2009-06-12  Micah Cowan  <micah@cowan.name>
327
328         * host.c: Include <sys/types.h> before <sys/socket.h>. Not
329         required by POSIX any more, but some older systems (such as
330         FreeBSD 4.1) still need it, and it doesn't seem like it could
331         hurt...
332
333         * build_info.c (library): Handle "https" as a feature in its own
334         right, apart from "gnutls" and "openssl".
335
336         * host.c: Declare h_errno if no declaration is provided. Idea
337         thanks to Maciej W. Rozycki.
338
339 2009-06-11  Xin Zou  <zouxin2008@gmail.com>     
340         
341         * http.c (gethttp): Fix some memory leaks.
342         
343 2009-06-11  Micah Cowan  <micah@cowan.name>
344
345         * http.c (http_atotm): Handle potential for setlocale's return
346         value to be static storage. Thanks to Benjamin Wolsey
347         <bwy@benjaminwolsey.de>.
348
349         * sysdep.h: Need NAMESPACE_TWEAKS on non-Linux glibc-based
350         systems, too. Thanks to Robert Millan.
351
352 2009-05-28  Steven Schubiger  <stsc@member.fsf.org>
353
354         * ftp.c (ftp_get_listing): Update the "listing file" 
355         string after calling ftp_loop_internal().
356
357 2009-05-27  Steven Schubiger  <stsc@member.fsf.org>
358
359         * ftp.c (ftp_get_listing): Duplicate the "listing file"
360         string to avoid memory corruption when FOPEN_EXCL_ERR is
361         encountered.
362
363 2009-05-17  Steven Schubiger  <stsc@member.fsf.org>
364
365         * progress.c (eta_to_human_short): Fix the remaining hours
366         to be displayed. Spotted by Tadeu Martins (#26411).
367
368 2009-04-24  Micah Cowan  <micah@cowan.name>
369
370         * hash.c: Change stdint.h inclusion to use HAVE_STDINT_H, not C99
371         check.
372
373         * connect.c: stdint.h inclusion added.
374
375         Thanks to Markus Duft <mduft@gentoo.org> for a similar patch.
376         
377 2009-04-20  Micah Cowan  <micah@cowan.name>
378
379         * Makefile.am (version.c): Fix unportable use of "echo -n".
380
381 2009-04-13  Steven Schubiger  <stsc@member.fsf.org>
382
383         * ftp.c (ftp_retrieve_list): Move the duplicated code that
384         determines the local file to a function.
385         
386         * http.c (http_loop): Likewise.
387
388         * retr.c (set_local_file): New function.
389
390 2009-04-11  Steven Schubiger  <stsc@member.fsf.org>
391
392         * init.c (initialize): Run a custom SYSTEM_WGETRC when 
393         provided as an environment variable.
394
395 2009-02-27  Gisle Vanem  <gvanem@broadpark.no>
396
397         * main.c (main): "freopen (NULL,.." causes an assertion in MSVC
398         debug-mode.  I.e. NULL isn't legal. But the "CONOUT$" device works
399         fine.
400
401 2009-02-27  Steven Schubiger  <stsc@member.fsf.org>
402
403         * ftp.c (ftp_loop_internal): Don't claim for FTP retrievals
404         when writing to standard output either that the document
405         has been saved. Addresses bug #20520 again.
406
407 2009-02-21  Steven Schubiger  <stsc@member.fsf.org>
408
409         * http.c (http_loop): When a document is written to 
410         standard output, don't claim it has been saved to a file.
411         Addresses bug #20520.
412
413 2009-02-18  Steven Schubiger  <stsc@members.fsf.org>
414
415         * recur.h: Remove the dangling declaration for recursive_cleanup().
416
417 2009-02-01  Gerardo E. Gidoni  <gerel@gnu.org>
418
419         * main.c, recur.c, recur.h, res.c, retr.c, retr.h: restructured code to
420         avoid multiple 'url_parse' calls.
421
422 2008-11-13  Micah Cowan  <micah@cowan.name>
423
424         * http.c (gethttp): Don't do anything when content-length >= our
425         requested range.
426
427 2008-11-27  Saint Xavier  <wget@sxav.eu>
428
429         * http.c (gethttp): Move authentication code before filename
430         allocation avoiding fallbacking on default filename because
431         "Content-Disposition" header wasn't present before authentcation
432         has been completed. Fixes bug #24862.
433
434 2008-11-16  Steven Schubiger  <stsc@members.fsf.org>
435
436         * main.c: Declare and initialize the numurls counter.
437
438         * ftp.c, http.c: Make the counter visible here and use it.
439         
440         * options.h: Remove old declaration from options struct.
441
442 2008-11-15  Steven Schubiger  <stsc@members.fsf.org>
443
444         * init.c (defaults): Set default waitretry value.
445
446 2008-11-14  Steven Schubiger  <stsc@members.fsf.org>
447
448         * main.c (format_and_print_line): Use a custom format 
449         string for printing leading spaces.
450
451 2008-11-12  Micah Cowan  <micah@cowan.name>
452
453         * ftp-ls.c (ftp_index): HTML-escape dir name in title, h1, a:href.
454
455 2008-11-12  Alexander Belopolsky  <alexander.belopolsky@gmail.com>
456
457         * url.c, url.h (url_escape_unsafe_and_reserved): Added.
458
459         * ftp-ls.c (ftp_index): URL-escape, rather than HTML-escape, the
460         filename appearing in the link.
461
462 2008-11-12  Steven Schubiger  <stsc@members.fsf.org>
463
464         * main.c (print_version): Hand the relevant
465         xstrdup/xfree calls back to format_and_print_line().
466
467 2008-11-11  Steven Schubiger  <stsc@members.fsf.org>
468
469         * main.c (format_and_print_line): Move both the memory
470         allocating and freeing bits upwards to print_version().
471
472 2008-11-10  Saint Xavier  <wget@sxav.eu>
473
474         * http.c: Make --auth-no-challenge works with user:pass@ in URLs.
475
476 2008-11-05  Micah Cowan  <micah@cowan.name>
477
478         * ftp.c (print_length): Should print humanized "size remaining"
479         only when it's at least 1k.
480
481 2008-10-31  Micah Cowan  <micah@cowan.name>
482
483         * main.c (print_version): Add information about the mailing list.
484
485 2008-10-31  Alexander Drozdov  <dzal_mail@mtu-net.ru>
486
487         * retr.c (fd_read_hunk): Make assert deal with maxsize == 0.
488
489         * ftp-ls.c (clean_line): Prevent underflow on empty lines.
490
491 2008-10-26  Gisle Vanem  <gvanem@broadpark.no>
492
493         * main.c (format_and_print_line): Put variables on top of
494         blocks (not all compilers are C99). Add an extra '\n' if
495         SYSTEM_WGETRC isn't defined and printed.
496
497 2008-09-09  Gisle Vanem  <gvanem@broadpark.no>
498
499         * url.c (url_error): Use aprintf, not asprintf.
500         
501 2008-09-09  Micah Cowan  <micah@cowan.name>
502
503         * init.c (home_dir): Save the calculated value for home,
504         to avoid duplicated work on repeated calls.
505         (wgetrc_file_name) [WINDOWS]: Define and initialize home var.
506
507         * build_info.c, main.c: Remove unnecessary extern vars
508         system_wgetrc and locale_dir.
509
510         * main.c: Define program_name for lib/error.c.
511
512 2008-09-02  Gisle Vanem  <gvanem@broadpark.no>
513
514         * mswindows.h: Must ensure <stdio.h> is included before
515         we redefine ?vsnprintf().
516
517 2008-08-08  Steven Schubiger  <stsc@members.fsf.org>
518
519         * main.c, utils.h: Removed some dead conditional DEBUG_MALLOC code.
520
521 2008-08-03  Micah Cowan  <micah@cowan.name>
522
523         * main.c (print_help): Added --default-page.
524
525 2008-08-01  Joao Ferreira  <joao@joaoff.com>
526
527         * init.c, main.c, options.h, url.c: Added option --default-page
528         to support alternative default names for index.html
529
530 2008-08-03  Micah Cowan  <micah@cowan.name>
531
532         * build_info.c, css-url.c: #include wget.h, not config.h.
533
534 2008-08-03  Steven Schubiger  <stsc@members.fsf.org>
535
536         * url.c, url.h (url_error): Better messages for unsupported
537         schemes, especially https.
538
539         * html-url.c, recur.c, retr.c: Adjust to new url_error
540         invocation, and free result.
541
542 2008-07-17  Steven Schubiger  <stsc@members.fsf.org>
543
544         * retr.c (retrieve_from_file): When given an URL as input file,
545         use it as baseref if none was specified and treat the input file
546         as HTML if its content type is text/html.
547
548         * init.c (cleanup): Free the memory associated with the base
549         option (when DEBUG_MALLOC is defined).
550
551 2008-07-02  Xavier Saint  <wget@sxav.eu>
552
553         * iri.c, iri.h  : New function idn_decode() to decode ASCII
554         encoded hostname to the locale.
555
556         * host.c : Show hostname to be resolved both in locale and
557         ASCII encoded.
558
559 2008-06-28  Steven Schubiger  <stsc@members.fsf.org>
560
561         * retr.c (retrieve_from_file): Allow for reading the links from
562         an external file (HTTP/FTP).
563
564 2008-06-26  Xavier Saint  <wget@sxav.eu>
565
566         * iri.c, iri.h : New functions locale_to_utf8() and
567         idn_encode() adding basic capabilities of IRI/IDN.
568
569         * url.c : Convert URLs from locale to UTF-8 allowing a basic
570         support of IRI/IDN
571
572 2008-06-25  Steven Schubiger  <stsc@members.fsf.org>
573
574         * ftp.c (getftp): When spidering a FTP URL, emit a diagnostic
575         message if the remote file exists.
576
577 2008-06-24  Steven Schubiger  <stsc@members.fsf.org>
578
579         * http.c (http_loop): Replace escnonprint() occurence with
580         a quotearg_style() call.
581
582 2008-06-24  Micah Cowan  <micah@cowan.name>
583
584         * ftp-ls.c (ftp_index): Don't assume time_t* is compatible with
585         long*. Fixes crash on Windows, and probably other systems.
586
587 2008-06-22  Steven Schubiger  <stsc@members.fsf.org>
588
589         * http.c: Explicitly initialize and deallocate the message
590         string used by the -nv --spider functionality.
591
592 2008-06-22  Steven Schubiger  <schubiger@gmail.com>
593
594         * http.c: Make -nv --spider include the file's name when it
595         exists.
596
597 2008-06-22  Micah Cowan  <micah@cowan.name>
598
599         * Makefile.am (version.c): Fixed version string invocation so it
600         once again can't result in unterminated strings, made all the
601         string vars pointers-to-const, and moved line lengths
602         below 80 (in Makefile.am, not in version.c).
603
604 2008-06-19  Xavier Saint  <wget@sxav.eu>
605
606         * iri.c, iri.h : New function check_encoding_name() as
607         a preliminary encoding name check.
608
609         * main.c, iri.c : Make use of check_encoding_name().
610
611 2008-06-19  Xavier Saint  <wget@sxav.eu>
612
613         * iri.c : Include missing stringprep.h file and add a
614         cast.
615
616         * init.c : set a default initial value for opt.enable_iri,
617         opt.locale and opt.encoding_remote.
618
619 2008-06-19  Xavier Saint  <wget@sxav.eu>
620
621         * iri.c, iri.h : Add a new function find_locale() to find
622         out the local system encoding.
623
624         * main.c : Make use of find_locale().
625
626 2008-06-19  Xavier Saint  <wget@sxav.eu>
627
628         * html-url.c : Add "content-type" meta tag parsing for
629         retrieving page encoding.
630
631         * iri.h : Make no-op version of parse_charset() return
632         NULL.
633
634 2008-06-16  Micah Cowan  <micah@cowan.name>
635
636         * http.c (http_loop): When hstat.len is higher than the
637         successfully completed content's length, but it's because we
638         _set_ it that way, don't abort.
639
640 2008-06-14  Xavier Saint  <wget@sxav.eu>
641
642         * iri.c, iri.h : New files.
643
644         * Makefile.am : Add files iri.h and conditional iri.c.
645
646         * build_info.c : Add compiled feature "iri".
647
648         * http.c : include iri.h and parse charset from Content-Type
649         header.
650
651         * init.c, main.c, options.h : if an options isn't supported
652         at compiled time, don't get rid off it and show a dummy
653         message instead if they are used.
654
655 2008-06-13  Micah Cowan  <micah@cowan.name>
656
657         * build_info.c: ENABLE_NTLM, not HAVE_NTLM; distinguish OpenSSL
658         from "ssl".
659
660 2008-06-13  Madhusudan Hosaagrahara <com.gmail.hrmadhu>
661
662         * Makefile.am, main.c, init.c, init.h, build_info.c: Adds build
663         information to the --version command line option. Fixes bug
664         #20636.
665
666 2008-06-01  Micah Cowan  <micah@cowan.name>
667
668         * main.c [WINDOWS]: Reopen stdout in binary mode, when -O - is
669         given.
670
671 2008-05-31 Micah Cowan  <micah@cowan.name>
672
673         * html-url.c, http.c: Avoid casts in a couple spots.
674
675 2008-05-30 Henri Häkkinen  <henux@users.sourceforge.net>
676
677         * cookies.c, ftp-basic.c, hash.c, html-url.c, http-ntlm.c, http.c,
678         init.c, log.c, main.c, progress.c, ptimer.c, spider.c, url.c,
679         utils.c: Minor changes to silence warnings when using -Wall.
680
681 2008-05-26  Steven Schubiger  <schubiger@gmail.com>
682
683         * ftp.c (getftp): Replace last remaining invocation of escnonprint
684         with gnulib quote.
685
686 2008-05-19  Micah Cowan  <micah@cowan.name>
687
688         * main.c (main): Password prompt should be done only once (not
689         once per argument), and should be done prior to the background
690         fork.
691
692 2008-05-17  Steven Schubiger  <schubiger@gmail.com>
693
694         * init.c (defaults): Set the preferred IP family to `none' by
695         default.
696
697 2008-05-17  Kenny Parnell  <k.parnell@gmail.com>
698
699         (cmd_spec_prefer_family): Initialize prefer_family to prefer_none.
700
701 2008-05-17  Micah Cowan  <micah@cowan.name>
702
703         * main.c (main): Handle Ctrl-D on command-line.
704
705 2008-05-15  Steven Schubiger  <schubiger@gmail.com>
706
707         * ftp.c (getftp): Verify that the file actually exists in FTP, by
708         checking it against the listing.
709
710 2008-05-15  Micah Cowan  <micah@cowan.name>
711
712         * main.c (prompt_for_password): Use the quote module.
713
714 2008-05-14  Micah Cowan  <micah@cowan.name>
715
716         * ftp.c (ftp_retrieve_list): Symlinks and other filenames
717         should be fully quoted.
718
719 2008-05-12  Micah Cowan  <micah@cowan.name>
720
721         * main.c (main): Downgrade "-N with -O" to a warning, and switch
722         it off to avoid confusing messages.
723
724 2008-04-30  Micah Cowan  <micah@cowan.name>
725
726         * progress.c (create_image): Fix glitch where too many spaces are
727         printed on lines that don't display the ETA, in multibyte
728         locales.
729
730 2008-04-30  Steven Schubiger  <stsc@members.fsf.org>
731
732         * main.c (main): New code that handles prompting for passwords
733         when specified explicitly via command-line option (using gnulib's
734         getpass-gnu module).
735         (main): Include the getpass header.
736
737         * init.c: Add "ask-password" to the list of recognized commands.
738
739         * options.h: Add an according boolean member to the options
740         struct.
741
742         * sysdep.h: Comment the defines __EXTENSIONS__ and _GNU_SOURCE
743         out, because they're now defined independently by config.h.
744
745 2008-04-27  Rabin Vincent  <rabin@rab.in>
746
747         * http.c (http_loop): Fix return for the case where we don't
748         download a file because of -nc.
749
750 2008-04-27  Micah Cowan  <micah@cowan.name>
751
752         * url.c (path_simplify): Go back to allowing leading ".." in
753         paths, but only for FTP URLs.
754         (test_path_simplify): Add scheme-specificness to tests, adapt for
755         mu_run_test.
756
757         * test.c (all_tests): Add test_path_simplify.
758
759         * main.c (main): Downgrade -r, -p with -O to a warning rather than
760         an error; elaborate just a bit more for other -O combination
761         cases.
762
763 2008-04-26  Micah Cowan  <micah@cowan.name>
764
765         * http.c (gethttp): Move proxy CONNECT handling to below the
766         retry_with_auth label, to deal with properly reconnecting to
767         proxies when we need to authenticate.
768
769 2008-04-25  Micah Cowan  <micah@cowan.name>
770
771         * Makefile.am: -I foo -> -Ifoo.
772
773 2008-04-24  Micah Cowan  <micah@cowan.name>
774
775         * main.c: Revised usage description of --convert-links to apply
776         to CSS as well as to HTML.
777
778 2008-04-23  Micah Cowan  <micah@cowan.name>
779
780         * utils.c (test_dir_matches_p): Added a test for the case
781         described in issue #20518.
782
783 2008-04-22  Micah Cowan  <micah@cowan.name>
784
785         * Makefile.am, css.lex, css.l: Renamed css.lex to css.l.
786         * recur.c (retrieve_tree): Fix typo to allow text/css files to
787         be parsed.
788
789 2008-04-22  Ted Mielczarek  <ted.mielczarek@gmail.com>
790
791         * css.lex, css-url.c, css-url.h: Added to implement support for
792         parsing CSS in Wget.
793         * convert.c: Convert links in CSS files, too.
794         * convert.h (convert_options): Added for options link_css_p,
795         link_expect_css.
796         * convert.h: Added prototype for new register_css function.
797         * html-parse.c: Added support for parsing element content, in
798         addition to tag starts and ends.
799         * html-parse.h (taginfo): Added delimiter fields for element
800         content.
801         * html-url.h: Added.
802         * html-url.c (append_url): No longer internal-linkage only. Now
803         takes position and size as explicit parameters.
804         * html-url.c: Use new html-url.h header, add support for
805         handling of "style" HTML attributes. Mark URIs obtained from
806         link tags with rel="stylesheet" with link_expect_css. Adapt
807         uses of append_url to supply the newly-added parameters for
808         position and size.
809         * http.c: Add detection for when the content-type is text/css;
810         and ensure that such files have the ".css" filename extension,
811         when --convert-links is active.
812         * recur.h: Remove declarations for functions found in
813         html-url.c (moved to html-url.h).
814         * recur.c: Add support for culling links from CSS files, too,
815         and tracking for when we're expecting the file to be CSS (even
816         when its content type isn't text/css).
817         * retr.c (retrieve_url): Add registration of CSS files.
818         * wget.h: Added TEXTCSS to dt flags enum.
819         * Makefile.am: Added css.lex, css-url.c, css-url.h, html-url.h
820         to wget_SOURCES.
821
822 2008-04-22  Jim Paris  <jim@jtan.com>
823
824         * openssl.c (ssl_init): Enable combined certificate/key in
825         single file (apparent regression from ~1.9). Resolves issue
826         #22767.
827
828 2008-04-22  Steven Schubiger  <schubiger@gmail.com>
829
830         * http.c (print_response_line): Changed to make responses always
831         be logged, even in --quiet mode, if --server-response was
832         specified. This is to bring http.c's handling of the situation
833         in line with ftp.c's.
834
835 2008-04-22  Pranab Shenoy  <pranab.loosinit.shenoy@gmail.com>
836
837         * init.c: Added test_commands_sorted unit test to check is
838         commands are sorted.  Fixes bug #21245.
839
840         * test.c: Added test_commands_sorted to the test suite.
841
842 2008-04-22  Rabin Vincent  <rabin@rab.in>
843
844         * ftp.c (ftp_get_listing): Only remove .listing if it has been
845         created. 
846
847 2008-04-22  Alain Guibert  <alguibert+bts@free.fr>
848
849         * test.h (mu_run_test): Move declaration before statements, for
850         C90 conformance. Fixes bug #22789.
851
852 2008-04-22  Mike Frysinger  <vapier@gentoo.org>
853
854         * Makefile.am: Move @LIBS@ after other libraries, for better
855         static-linking support. Fixes bug #22143.
856
857 2008-04-16  Steven Schubiger  <schubiger@gmail.com>
858
859         * ftp.c: Use Gnulib's quote function for printing filenames and
860         such.
861         * connect.c: Likewise.
862         * convert.c: Likewise.
863         * cookies.c: Likewise.
864         * ftp-opie.c: Likewise.
865         * gnutls.c: Likewise.
866         * init.c: Likewise.
867         * log.c: Likewise.
868         * mswindows.c: Likewise.
869         * openssl.c: Likewise.
870         * progress.c: Likewise.
871         * recur.c: Likewise.
872         * res.c: Likewise.
873         * utils.c: Likewise.
874
875 2008-04-16  Steven Schubiger  <schubiger@gmail.com>
876
877         * sysdep.h: Comment the defines __EXTENSIONS__ and _GNU_SOURCE 
878         out, because they're now defined independently by config.h.
879
880 2008-04-14  Steven Schubiger  <schubiger@gmail.com>
881
882         * http.c: Use Gnulib's quote function for printing filenames and
883         such.
884         * wget.h: #include "quote.h".
885
886 2008-04-12  Rabin Vincent  <rabin@rab.in>
887
888         * mswindows.c (fake_fork_child): Don't create a logfile for
889         --background when --quiet is used, but not --server-response.
890         Fixes bug #20917.
891
892         * utils.c (fork_to_background): Likewise.
893
894 2008-04-12  Micah Cowan  <micah@cowan.name>
895
896         * utils.c (aprintf): Minor formatting changes to Alex's code (80-
897         column limit, concatenated string literals, avoiding nesting
898         levels), and removed invocation of free (since we're aborting
899         anyway).
900
901 2008-04-11  Alexander Dergachev  <cy6erbr4in@gmail.com>
902
903         * utils.c (aprintf): Now we are setting limits (1 Mb) for text
904         buffer when we use non-C99 vsnprintf.
905         
906 2008-04-11  Micah Cowan  <micah@cowan.name>
907
908         * ftp.c (getftp, ftp_loop_internal): Don't append to an existing
909         .listing when --continue is used.  Fixes bug #22825. Thanks to
910         Rabin Vincent <rabin@rab.in> for pointing the way with a
911         suggested fix!
912
913 2008-04-10  Alexander Dergachev  <cy6erbr4in@gmail.com>
914
915         * xmalloc.c, xmalloc.h (memfatal): Now exported; accepts an
916         "unknown" value for the attempted allocation size.
917         * utils.c (aprintf): Now calls memfatal, instead of aborting.
918
919 2008-03-19  Micah Cowan  <micah@cowan.name>
920
921         * utils.c (test_dir_matches_p): More tests related for
922         dir_matches_p.
923
924 2008-03-17  Micah Cowan  <micah@cowan.name>
925
926         * connect.c: Include sys/time.h to support use of the select
927         function on older systems.
928
929 2008-02-11  Benno Schulenberg  <bensberg@justemail.net>
930
931         * http.c: More accurate and descriptive messages for when a file
932         won't be retrieved during spider-mode.
933
934 2008-02-10  Micah Cowan  <micah@cowan.name>
935
936         * http.c: Added existence_checked member to the http_stat
937         struct.
938         (gethttp): Mark hs->existence_checked when we've checked whether
939         a file-to-download exists; so we don't check it again if the
940         connection gets lost (and potentially pick a new "unique" name).
941         This fixes bug 22251.
942         * progress.c (create_image): Add space for an extra column in
943         the "eta" portion of the progress bar image; to deal with
944         too-long Czech translation.
945         * main.c, http.c, init.c: Added --auth-no-challenge option, to
946         bring back 1.10.2 unsafe auth behavior when needed. This fixes
947         bug #22242.
948
949 2008-02-07  Micah Cowan  <micah@cowan.name>
950
951         * progress.c (create_image): Remove assertion on exceeding
952         screen width, which given the less-than-robust code there, can
953         be broken by a number of factors (such as large file downloads).
954
955 2008-02-06  Micah Cowan  <micah@cowan.name>
956
957         * progress.c (countcols): Use strlen() when mbtowc or wcwidth
958         not available (or not using NLS).
959         * utils.c: Ensure we use single-byte separators when not doing
960         NLS progress-bars.
961         * wget.h: Determine whether to use NLS for progress-bars, based
962         on whether wcwidth and mbtowc are available.
963
964 2008-02-03  Micah Cowan  <micah@cowan.name>
965
966         * progress.c (create_image): Use number of characters/columns
967         consumed, rather than number of bytes, to determine how much of
968         a line we've used. Fixes assertion errors and field alignment
969         bugs (#22161, #20481)
970         (get_eta, count_cols): Added to support the changes for
971         create_image.
972         * http.c (http_loop): Put no-clobber logic back into http_loop,
973         before starting to fetch, for when we're not doing
974         content-disposition.
975
976 2008-01-31  Micah Cowan  <micah@cowan.name>
977
978         * http.c (gethttp): Don't derive hs->contlen from possibly
979         invalid/missing Content-Length; instead, get the appropriate
980         value from the Content-Range header values.
981         (parse_content_range): Handle '*' instance-length field.
982
983 2008-01-25  Micah Cowan  <micah@cowan.name>
984
985         * main.c: Added notes to translators regarding (C), diacritics
986         in names.
987         * Makefile.am, cmpt.c, connect.c, connect.h, convert.c,
988         cookies.c, cookies.h, ftp-basic.c, ftp-ls.c, ftp-opie.c, ftp.c,
989         ftp.h, gen-md5.c, gen-md5.h, gnutls.c, hash.c, hash.h, host.c,
990         host.h, html-parse.c, html-parse.h, html-url.c, http-ntlm.c,
991         http-ntlm.h, http.c, http.h, init.c, init.h, log.c, log.h,
992         main.c, mswindows.c, mswindows.h, netrc.c, netrc.h, openssl.c,
993         options.h, progress.c, progress.h, ptimer.c, ptimer.h, recur.c,
994         recur.h, res.c, res.h, retr.c, retr.h, spider.c, spider.h,
995         ssl.h, sysdep.h, test.c, test.h, url.c, url.h, utils.c,
996         utils.h, wget.h, xmalloc.c, xmalloc.h: Updated copyright year.
997
998 2007-12-10  Micah Cowan  <micah@cowan.name>
999
1000         * main.c: The option is --content-disposition, not
1001         --no-content-disposition (at the moment).
1002
1003 2007-12-08  Hrvoje Niksic  <hniksic@xemacs.org>
1004
1005         * ftp.c (ftp_retrieve_glob): Print both arguments of fnmatch in
1006         fnmatch error message.
1007         (ftp_retrieve_glob): Don't match with fnmatch if we're only
1008         supposed to get one file.
1009
1010 2007-12-07  Micah Cowan  <micah@cowan.name>
1011
1012         * Makefile.am: Plug in vars to include stuff from
1013         $(top_srcdir)/md5 when appropriate.
1014
1015 2007-12-05  Micah Cowan  <micah@cowan.name>
1016
1017         * utils.c (subdir_p): Handle the case where d1 is "".
1018         * convert.c (convert_all_links): Don't return without
1019         deallocating timer.
1020
1021 2007-11-28  Micah Cowan  <micah@cowan.name>
1022
1023         * Makefile.am, cmpt.c, connect.c, connect.h, convert.c,
1024         convert.h, cookies.c, cookies.h, ftp-basic.c, ftp-ls.c,
1025         ftp-opie.c, ftp.c, ftp.h, gen-md5.c, gen-md5.h, gnutls.c,
1026         hash.c, hash.h, host.c, host.h, html-parse.c, html-parse.h,
1027         html-url.c, http-ntlm.c, http-ntlm.h, http.c, http.h, init.c,
1028         init.h, log.c, log.h, main.c, mswindows.c, mswindows.h,
1029         netrc.c, netrc.h, openssl.c, options.h, progress.c, progress.h,
1030         ptimer.c, ptimer.h, recur.c, recur.h, res.c, res.h, retr.c,
1031         retr.h, safe-ctype.c, safe-ctype.h, spider.c, spider.h, ssl.h,
1032         sysdep.h, test.c, test.h, url.c, url.h, utils.c, utils.h,
1033         wget.h, xmalloc.c, xmalloc.h: Updated license exception for
1034         OpenSSL, per the SFLC.
1035
1036 2007-10-30  Micah Cowan  <micah@cowan.name>
1037
1038         * main.c (main): Declare argv parameter as char **argv, rather
1039         than char *const *argv. This fixes usage of getopt_long,
1040         regardless of whether getopt_long has a constified argv or not.
1041
1042 2007-10-22  Gisle Vanem  <gvanem@broadpark.no>
1043
1044         * mswindows.c: Move INHIBIT_WRAP macro definition up with wget.h
1045         inclusion.
1046
1047 2007-10-18  Steven Schweda  <sms@antinode.org>
1048
1049         * sysdep.h: #include <stdint.h> as well as <inttypes.h>, to work
1050         around a glitch on Tru64 systems.
1051
1052 2007-10-18  Micah Cowan  <micah@cowan.name>
1053
1054         * Makefile.am: version.c should not be distributed. Removed
1055         config-post.h. Add version.c dependency and gnulib include path
1056         for libunittest.a.
1057         * sysdep.h: Got contents of config-post.h
1058         * config-post.h: Removed.
1059         * wget.h: #include "config.h".
1060         * alloca.c, cmpt.c, connect.c, convert.c, cookies.c,
1061         ftp-basic.c, ftp-ls.c, ftp-opie.c, ftp.c, gen-md5.c, gnutls.c,
1062         hash.c, host.c, html-parse.c, html-url.c, http-ntlm.c, http.c,
1063         init.c, log.c, main.c, mswindows.c, netrc.c, openssl.c,
1064         progress.c, ptimer.c, recur.c, res.c, retr.c, spider.c, url.c,
1065         utils.c, xmalloc.c: Use wget.h at very top, and instead of
1066         config.h.
1067
1068 2007-10-15  Micah Cowan  <micah@cowan.name>
1069
1070         * Makefile.am: Remove intermediary hg-id file generation, make
1071         version.c-generation more portable.
1072
1073 2007-10-14  Micah Cowan  <micah@cowan.name>
1074
1075         * cmpt.c, cookies.c, ftp-basic.c, ftp-ls.c, ftp.c, hash.c,
1076         host.c, html-parse.c, html-url.c, http-ntlm.c, http.c, init.c,
1077         log.c, main.c, netrc.c, openssl.c, res.c, url.c, utils.c,
1078         wget.h: Replace uses of ISSPACE, etc with c_isspace, etc.
1079         * gnu-md5.c, gnu-md5.h: Removed, in deference to gnulib.
1080         * Makefile.am: Removed gnu-md5.h from wget_SOURCES.
1081         * gen-md5.c: Changed #inclusion of gnu-md5.h to md5.h (gnulib's).
1082         * recur.c (download_child_p): Print error if unlink of
1083         robots.txt fails.
1084         * main.c (main): --spider or --delete-after now implies
1085         --no-directories (thanks, Josh Williams).
1086
1087 2007-10-14  Joshua David Williams  <yurimxpxman@gmail.com>
1088
1089         * recur.c (download_child_p): Remove robots.txt if
1090         --delete-after or --spider is on.
1091
1092 2007-10-13  Micah Cowan  <micah@cowan.name>
1093
1094         * Makefile.am: Make version.c depend on Wget dependencies (source
1095         files, plus such things as LIBOBJS so we get things like
1096         http-ntlm.c). Removed getopt.[ch], as we're now using gnulib for
1097         these.
1098
1099 2007-10-10  Micah Cowan  <micah@cowan.name>
1100
1101         * http-ntlm.c: Include openssl/opensslv.h explicitly, instead of
1102         hoping it'll be included by accident in openssl/des.h.
1103
1104 2007-10-09  Gisle Vanem  <gvanem@broadpark.no>
1105
1106         * mswindows.c: 'argc' and 'argv' in 'windows_main()' are no longer
1107         needed.  Hence simply the prototype. Free 'exec_name' at exit.
1108
1109 2007-10-09  Micah Cowan  <micah@cowan.name>
1110
1111         * gettext.h: Imported from /usr/share/gettext, fuller handling
1112         of --disable-nls.
1113         * wget.h: Remove logic for handling lack of NLS (now in
1114         gettext.h).
1115         * main.c: Use gettext's ENABLE_NLS rather than HAVE_NLS.
1116         * Makefile.am: added @LIBINTL@ to LIBS (though it probably
1117         belongs in LDADD, along with everything else currently assigned
1118         to LIBS).
1119
1120 2007-10-08  Micah Cowan  <micah@cowan.name>
1121
1122         * http.c (http_loop): Add send_head_first conditional back
1123         around code that needs it, but not around the last-modified
1124         header-parsing stuff this time. Removed no-longer-useful (was it
1125         ever?) restart_loop boolean, continuing unconditionally at end
1126         of send_head_first conditional block (if we haven't jumped out).
1127
1128 2007-10-04  Micah Cowan  <micah@cowan.name>
1129
1130         * http.c (http_loop): We've got_name if content_disposition
1131         support isn't on; make sure we continue properly in that case,
1132         even though we're not sending HEAD.
1133         * Makefile.in: Removed, replaced by Makefile.am.
1134         * Makefile.am: Converted from Makefile.in.
1135
1136 2007-10-02  Gisle Vanem  <gvanem@broadpark.no>
1137         
1138         * ftp.c: Use "_listing" for MSDOS (".listing" is illegal).
1139
1140         * url.c: Update comment for 'filechr_not_windows'.
1141
1142         * utils.c: Include <process.h> for 'getpid()' on Watcom.
1143
1144 2007-10-02  Micah Cowan  <micah@cowan.name>
1145
1146         * ftp.c (getftp, ftp_loop_internal), http.c (http_loop), main
1147         (main): Use datetime_str instead of time_str, for those who have
1148         potentially long-running sessions. Based on suggestions by Saso
1149         Tomat <miskox@hotmail.com> and Steven M. Schweda
1150         <sms@antinode.org>.
1151         * http.c (gethttp): Warn about host lookup failures. Adjusted
1152         from Stephen Gildea's patch.
1153
1154 2007-10-02  Stephen Gildea  <stepheng+wget@gildea.com>
1155
1156         * connect.c (connect_to_host): Warn about host lookup failures.
1157
1158 2007-09-25  Micah Cowan  <micah@cowan.name>
1159
1160         * Makefile.in: Use EXEEXT instead of exeext.
1161
1162 2007-09-24  Gisle Vanem  <giva@bgnett.no>
1163
1164         * connect.c, init.c, main.c, openssl.c, options.h, sysdep.h,
1165         url.c, utils.c: Added support for building on MS-DOS.
1166
1167 2007-09-24  Jochen Roderburg  <roderburg@uni-koeln.de>
1168
1169         * http.c (http_zero): Remove no-longer-used local_size variable.
1170         Fixes bug #21057.
1171
1172 2007-09-12  Micah Cowan  <micah@cowan.name>
1173
1174         * http.c (http_loop): Remove send_head_first from condition for
1175         parsing timestamp.
1176
1177 2007-08-29  Micah Cowan  <micah@cowan.name>
1178
1179         * openssl.c (ssl_init): Re un-const-ified the meth local
1180         variable, to match current versions of openssl.
1181         * spider.c: Removed visited_url function, as it may be very
1182         inefficient.
1183         (print_broken_links): Removed traversal of referrers, until such
1184         time as a more efficient implementation can be written.
1185         * spider.h: Replaced declaration of visited_url with an
1186         empty-bodied, function-like macro.
1187
1188 2007-08-27  Gisle Vanem  <giva@bgnett.no>
1189
1190         * mswindows.c (run_with_timeout): Ensure that the correct
1191         conversion specification is used for the return result of
1192         the GetLastError function.
1193         * getopt.c: Fix missing (but, accidentally, legal) comment
1194         delimiter after licensing text.
1195         * recur.c (retrieve_tree): Inserted missing cast for strip_auth.
1196         Includes adjustment by Ralf Wildenhues.
1197         * openssl.c (ssl_init): const-ified the meth local variable.
1198         * main.c: Include all the static function definitions in the
1199         "#ifndef TESTING" clause, leaving just the definitions for
1200         exec_name (not set), and opt.
1201         * utils.c (run_with_timeout): Now returns bool, to align with
1202         declaration in utils.h.
1203
1204 2007-08-27  Micah Cowan  <micah@cowan.name>
1205
1206         * wget.h: Added macro replacement for ngettext, for environs
1207         that lack NLS.
1208
1209 2007-08-26  Micah Cowan  <micah@cowan.name>
1210
1211         * spider.c (print_broken_links): Fixed incorrect plurals msgid
1212         usage, switched to use ngettext function.
1213
1214 2007-08-24  Micah Cowan  <micah@cowan.name>
1215
1216         * http.c (http_loop): Introduced time_came_from_head boolean
1217         flag, to help avoid parsing the same Last-Modified header twice.
1218         Replaced spidering returns of RETRUNNEEDED for some situations,
1219         to RETROK, as otherwise it will be interpreted as an error.
1220         RETRUNNEEDED appears never to be referenced outside of
1221         http.c (and wget.h), and, when returned by gethttp, is
1222         translated by http_loop to RETROK.
1223         * url.c (are_urls_equal): Don't call getchar_from_escaped_string
1224         if u2 is shorter than u1.
1225         (getchar_from_escaped_string): Don't decode reserved characters.
1226         Handle illegally appearing '%'s as literal '%'s. Ensure hex
1227         digits before attempting to decode.
1228         (test_are_urls_equal): Added tests to handle u2 shorter than u1,
1229         and %2f not treated the same as /.
1230         * spider.c (in_url_list_p): Don't call are_urls_equal if one of
1231         them is NULL.
1232
1233 2007-08-23  Joshua David Williams  <yurimxpxman@gmail.com>
1234
1235         * spider.c (in_url_list_p): Removed the bool verbose argument
1236
1237 2007-08-22  Mauro Tortonesi  <mauro@ferrara.linux.it>
1238
1239         * http.c (http_loop): Fall back to GET if HEAD fails with a 500 or 501
1240         error code.
1241
1242 2007-08-21  Mauro Tortonesi  <mauro@ferrara.linux.it>
1243         
1244         * http.c (http_loop): Send preliminary HEAD request if -N is given and
1245         the destination file exists already.
1246
1247 2007-08-10  Mauro Tortonesi  <mauro@ferrara.linux.it>
1248
1249         * http.c (http_loop): Fixed HTTP HEAD requests logic when --spider is
1250         given.
1251
1252 2007-08-10  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1253
1254         * url.c (append_uri_pathel): Do not assume dest string to be
1255         zero-terminated.
1256         (test_append_uri_pathel): Terminate string to fix test failure.
1257
1258 2007-08-09  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1259
1260         * url.c (url_string): Use comparison, not assignment, in
1261         check for auth_mode == URL_AUTH_HIDE_PASSWD.
1262
1263 2007-08-09  Micah Cowan  <micah@cowan.name>
1264
1265         * http.c (http_loop): If we got a HEAD and then a GET, and the
1266         GET had a timestamp, use that one, not any we may have gotten
1267         from the HEAD.
1268
1269 2007-08-08  Micah Cowan  <micah@cowan.name>
1270
1271         * init.c (defaults): Content disposition will not be default,
1272         since it currently results in extra round-trips.
1273
1274 2007-07-31  Micah Cowan  <micah@cowan.name>
1275
1276         * http.c (gethttp): Set contlen = -1 when we encounter a
1277         negative-valued Content-Length header, so we don't consider it
1278         an internal error later on and call abort().
1279
1280 2007-07-29  Micah Cowan  <micah@cowan.name>
1281
1282         * url.h, url.c (url_string): Replaced bool arg of the url_string
1283         function with enum url_auth_mode, with added option to
1284         completely remove user/pass auth information.
1285         * http.c, ftp.c, url.c, recur.c: Adapted call to url_string
1286         function to fit new usage.
1287         * recur.c (retrieve_tree): Remove auth info from Referer header.
1288
1289 2007-07-28  Micah Cowan  <micah@cowan.name>
1290
1291         * options.h, init.c, retr.c, main.c: renamed opt maxredirect
1292         field to max_redirect, for improved consistency.
1293         * init.c: changed max_redirect parser from cmd_number_inf to
1294         cmd_number, as infinite redirects may not be appropriate.
1295         Alternatively, if cmd_number_inf should be used, then
1296         opt.max_redirect's value should be checked a bit differently in
1297         retr.c, to allow for the "infinite" meaning of zero.
1298
1299 2007-07-25  Micah Cowan  <micah@cowan.name>
1300
1301         * http.c (create_authorization_line)
1302         (basic_authentication_encode, known_authentication_scheme_p)
1303         (load_cookies): Moved declarations up.
1304         (basic_authed_hosts): Added. Tracks what hosts have issued Basic
1305         challenge and been given the global username, password.
1306         (maybe_send_basic_creds): Added. Sends Basic creds for hosts that
1307         have issued Basic challenges.
1308         (register_basic_auth_host): Added. Instantiates
1309         basic_authed_hosts if necessary, then registers the host that
1310         has issued a challenge.
1311         (gethttp) <auth>: Only send authentication credentials after
1312         we've received a challenge from that host. This is a stop-gap
1313         fix until a proper fix can be implemented; still isn't quite
1314         right, as we should only be sending credentials automatically
1315         for authenticated paths and below, and not for the entire host.
1316
1317 2007-07-16  Joshua David Williams  <yurimxpxman@gmail.com>
1318
1319         * options.h: added maxredirect to options struct
1320         * init.c: added maxredirect to list of variables
1321         * retr.c (retrieve_url): replaced MAX_REDIRECTIONS with opt.maxredirect
1322         * main.c: added option --max-redirect
1323
1324 2007-07-16  Joshua David Williams  <yurimxpxman@gmail.com>
1325
1326         * test.h: tests made more verbose; now displays the name
1327         of each test run.
1328
1329 2007-07-10  Mauro Tortonesi  <mauro@ferrara.linux.it>
1330
1331         * http.c (http_loop): Fixed the HTTP requests logic. Now it skips the 
1332         preliminary HEAD request if either -O or --no-content-disposition are 
1333         given, and neither --spider and -N are given.
1334
1335 2007-07-05  Micah Cowan  <micah@cowan.name>
1336
1337         * cmpt.c, connect.c, connect.h, convert.c, convert.h:
1338         * cookies.c, cookies.h, ftp-basic.c, ftp.c, ftp.h, ftp-ls.c:
1339         * ftp-opie.c, gen-md5.c, gen-md5.h, getopt.c, getopt.h, gnu-md5.c:
1340         * gnu-md5.h, gnutls.c, hash.c, hash.h, host.c, host.h:
1341         * html-parse.c, html-parse.h, html-url.c, http.c, http.h:
1342         * http-ntlm.c, http-ntlm.h, init.c, init.h, log.c, log.h, main.c:
1343         * Makefile.in, mswindows.c, mswindows.h, netrc.c, netrc.h:
1344         * openssl.c, options.h, progress.c, progress.h, ptimer.c:
1345         * ptimer.h, recur.c, recur.h, res.c, res.h, retr.c, retr.h:
1346         * safe-ctype.c, safe-ctype.h, spider.c, spider.h, ssl.h, sysdep.h:
1347         * test.c, test.h, url.c, url.h, utils.c, utils.h, wget.h:
1348         * xmalloc.c, xmalloc.h:
1349         Updated GPL reference to version 3 or later, removed FSF
1350         address.
1351
1352 2007-07-04  Mauro Tortonesi  <mauro@ferrara.linux.it>
1353
1354         * http.c (http_loop): Skip HEAD request and start immediately with GET
1355         if -O is given.
1356
1357 2007-02-02  Hrvoje Niksic  <hniksic@xemacs.org>
1358
1359         * http.c (print_server_response): Escape non-printable characters
1360         in server respone.
1361
1362 2007-02-02  Hrvoje Niksic  <hniksic@xemacs.org>
1363
1364         * netrc.c: Don't make netrc_list static, as it prevents
1365         compilation with DEBUG_MALLOC.
1366
1367         * utils.c (aprintf): Don't use vasprintf when DEBUG_MALLOC is
1368         requested because, in that case, we want the calls to malloc to be
1369         coming from us.
1370
1371 2007-01-23  Hrvoje Niksic  <hniksic@xemacs.org>
1372
1373         * cookies.c (parse_set_cookie): Would erroneously discard cookies
1374         with unparsable expiry time.
1375
1376 2007-01-23  Hrvoje Niksic  <hniksic@xemacs.org>
1377
1378         * progress.c (create_image): Check for ETA overflow.
1379         (print_row_stats): Ditto.
1380
1381 2007-01-09  Mauro Tortonesi  <mauro@ferrara.linux.it>
1382
1383         * init.c (cmd_spec_prefer_family): Small fix to get rid of a gcc
1384         warning about strict-aliasing violation.
1385
1386 2007-01-09  Steven M. Schweda  <sms@antinode.org>
1387
1388         * ftp-basic.c (ftp_syst): Fixed segfault if response text is missing.
1389
1390 2006-12-29  Gisle Vanem  <giva@bgnett.no>
1391
1392         * mswindows.c: Avoid a warning if 'ws_hangup()' is unused.
1393
1394 2006-12-27  Mauro Tortonesi  <mauro@ferrara.linux.it>
1395
1396         * http.c (parse_content_disposition): Consider directory prefix, if
1397         specified.
1398
1399 2006-11-21  Hrvoje Niksic  <hniksic@xemacs.org>
1400
1401         * retr.c (retrieve_from_file): Ditto.
1402         (url_uses_proxy): New function.
1403
1404         * main.c (main): Don't check for opt.use_proxy when deciding
1405         whether to call retrieve_url or retrieve_tree; check whether the
1406         proxy would be used for *this* URL.
1407
1408 2006-10-17  Mike Grant  <mggr@pml.ac.uk>
1409
1410         * ftp.c (ftp_loop_internal): Would incorrectly skip changing
1411         working directory when retrying after a failed FTP attempt.
1412         Originally reported by Nate Eldredge.
1413
1414 2006-10-12  Mauro Tortonesi  <mauro@ferrara.linux.it>
1415
1416         * convert.c (downloaded_file): Fixed bug which used to break -E -k -K 
1417         mode.
1418
1419 2006-08-28  Mauro Tortonesi  <mauro@ferrara.linux.it>
1420
1421         * http.c: #include'd spider.h to get rid of compiler warnings.
1422
1423         * main.c: Ditto.
1424
1425         * recur.c: Ditto.
1426
1427 2006-08-24  Mauro Tortonesi  <mauro@ferrara.linux.it>
1428
1429         * Makefile.in: Added spider.c to the list of files to compile and
1430         spider.h to the list of header files. Updated copyright information.
1431
1432         * http.c: Major changes to recursive spider mode. Now for every
1433         resource we are supposed to check, we send a HEAD request to find out
1434         if it exists. If the resource is a HTML file, we retrieve it and parse
1435         it to discover links to other resources.
1436
1437         * recur.c: Ditto.
1438
1439         * res.c (res_retrieve_file): Disable opt.timestamping and opt.spider
1440         when retrieving robots.txt. Updated copyright information.
1441
1442         * convert.c: Moved code tracking broken links to spider.c.
1443
1444         * convert.h: Ditto.
1445
1446         * spider.c: Created new file to keep track of visited URLs in spider
1447         mode.
1448
1449         * spider.h: Ditto.
1450
1451 2006-08-21  Mauro Tortonesi  <mauro@ferrara.linux.it>
1452
1453         * http.c: Fixed timestamping-related bug.
1454
1455 2006-08-16  Mauro Tortonesi  <mauro@ferrara.linux.it>
1456
1457         * http.c: Fixed bug which broke --continue feature. Now if -c is
1458         given, http_loop sends a HEAD request to find out the destination
1459         filename before resuming download.
1460
1461 2006-08-08  Hrvoje Niksic  <hniksic@xemacs.org>
1462
1463         * utils.c (datetime_str): Avoid code repetition with time_str.
1464
1465 2006-07-21  Hrvoje Niksic  <hniksic@xemacs.org>
1466
1467         * init.c (commands): Correctly place "contentdisposition".
1468
1469 2006-07-14  Mauro Tortonesi  <mauro@ferrara.linux.it>
1470         
1471         * sysdep.h: If intptr_t isn't defined, simply typedef it to long.
1472
1473         * http.c: Added explicit cast to int in logprintf call to remove
1474         compiler warnings on 64-bit platforms.
1475
1476         * connect.c: Added a few casts to intptr_t to remove compiler warnings
1477         on 64-bit platforms.
1478         
1479         * main.c: Disable -r, -p and -N when -O is used. Disable -k when -O is
1480         used and multiple URLs are given. Update maintainer information.
1481         
1482         * all: Update copyright information.
1483         
1484 2006-07-10  KJKHyperion  <hackbunny@reactos.com>
1485
1486         * url.c (filechr_table): Mark DEL (0x7f) as a control character
1487         and | as a character Windows can't handle.
1488
1489 2006-06-28  Mauro Tortonesi  <mauro@ferrara.linux.it>
1490
1491         * res.c: Implemented is_robots_txt_url function for detection of
1492         robots.txt URLs and related test routine.
1493
1494         * res.h: Ditto.
1495
1496         * url.c: Implemented are_urls_equal function for URL comparison and
1497         related testing routine.
1498
1499         * url.h: Ditto.
1500
1501         * convert.c: Fixes for recursive spider mode: don't consider
1502         non-existing robots.txt as a broken link, and use are_urls_equal
1503         instead of strcasecmp for referrer URLs comparison.
1504
1505         * test.c: Call tests routines for are_urls_equal and 
1506         is_robots_txt_url.
1507
1508 2006-06-26  Hrvoje Niksic  <hniksic@xemacs.org>
1509
1510         * wget.h (wgint): Typedef to any 64-bit (or larger) type we can
1511         find, not necessarily off_t or long.
1512
1513 2006-06-26  Hrvoje Niksic  <hniksic@xemacs.org>
1514
1515         * cmpt.c (strtoll): Check for overflow and underflow without
1516         relying on (technically) undefined behavior.  Don't assume that
1517         strtoll_type is 64 bits wide.
1518
1519 2006-06-21  Hrvoje Niksic  <hniksic@xemacs.org>
1520
1521         * utils.c (base64_encode): Cast void pointer to char * before
1522         doing arithmetic.
1523
1524 2006-06-20  Hrvoje Niksic  <hniksic@xemacs.org>
1525
1526         * utils.c (base64_encode): Made TBL const.
1527         (base64_decode): Made the base64_char_to_value table const.
1528
1529 2006-06-19  Hrvoje Niksic  <hniksic@xemacs.org>
1530
1531         * utils.c (base64_encode): Made the DATA pointer void * so the
1532         callers can pass it any kind of pointer (including both signed and
1533         unsigned char pointers).
1534         (base64_decode): Ditto for DEST.
1535
1536 2006-06-19  Hrvoje Niksic  <hniksic@xemacs.org>
1537
1538         * utils.c (base64_encode): Would read past end of STR.
1539         Reported by rick@eckle.org.
1540
1541 2006-06-13  Mauro Tortonesi  <mauro@ferrara.linux.it>
1542
1543         * options.h (struct options): Introduced member restrict_files_case to
1544         keep track of preferences on character case restrictions for
1545         filenames.
1546
1547         * init.c: Modified defaults and cmd_spec_restrict_file_names to
1548         support character case restrictions for filenames. Added
1549         test_cmd_spec_restrict_file_names unit test.
1550
1551         * url.c: Modified append_uri_pathel to support character case
1552         restrictions for filenames. Added test_append_uri_pathel unit test.
1553
1554         * test.c: Added test_cmd_spec_restrict_file_names and
1555         test_append_uri_pathel to the list of unit tests to run.
1556
1557 2006-06-12  Mauro Tortonesi  <mauro@ferrara.linux.it>
1558
1559         * retr.c (retrieve_from_file): Use retrieve_tree and automatically
1560         turn on opt.follow_ftp in case of recursive FTP retrieval through HTTP
1561         proxy.
1562
1563         * main.c: Automatically turn on opt.follow_ftp in case of recursive
1564         FTP retrieval through HTTP proxy.
1565
1566 2006-06-12  Tony Lewis  <tlewis@exelana.com>
1567
1568         * main.c: Improved CHEN Peng's patch by proposing a simpler logic.
1569
1570 2006-06-12  CHEN Peng  <chenpeng@alumni.nus.edu.sg>
1571
1572         * main.c: Use retrieve_tree in case of recursive FTP retrieval through
1573         HTTP proxy.
1574
1575 2006-05-25  Mauro Tortonesi  <mauro@ferrara.linux.it>
1576
1577         * convert.c: Added mechanisms to keep track broken links.
1578
1579         * convert.h: Ditto.
1580
1581         * wget.h: Reordered and enumerated uerr_t constants.
1582
1583         * recur.c: Fixes to support recursive spider mode.
1584
1585         * http.c: Ditto.
1586
1587         * main.c: Print broken links in case of recursive spider mode.
1588
1589         * retr.c: Changed interface of retrieve_url.
1590
1591         * retr.h: Ditto.
1592
1593         * ftp.c: Changed interface of ftp_loop.
1594
1595         * ftp.h: Ditto.
1596
1597         * res.c: Minor change to reflect changes in interface of retrieve_url.
1598
1599 2006-05-18  Lawrence Jones  <lawrence.jones@ugs.com>
1600
1601         * ftp-ls.c (ftp_parse_unix_ls): Correct size parsing, add size
1602         and filename debugging output.
1603
1604 2006-04-28  Mauro Tortonesi  <mauro@ferrara.linux.it>
1605
1606         * http.c: If Content-Disposition header is present, allow unique
1607         filename generation unless -nc is given. Permit to disable parsing of
1608         Content-Disposition header.
1609
1610         * options.h: Added option --no-content-disposition to disable parsing
1611         of HTTP Content-Disposition header.
1612
1613         * init.c: Ditto.
1614         
1615         * main.c: Ditto.
1616
1617 2006-04-11  Hrvoje Niksic  <hniksic@xemacs.org>
1618
1619         * hash.c (TOLOWER): Wrap macro arg in parentheses.
1620
1621 2006-04-08  Hrvoje Niksic  <hniksic@xemacs.org>
1622
1623         * http.c (parse_content_disposition): Doc fix.
1624
1625 2006-03-15  Mauro Tortonesi  <mauro@ferrara.linux.it>
1626
1627         * utils.c: Restricted operational semantics of frontcmp and proclist
1628         from generic strings to directory names and them to subdir_p and
1629         dir_matches_p respectively.  Applied George Ogata's one line patch to
1630         restrict algorithm of subdir_p to full directory name matching.  Added
1631         testcases for subdir_p and dir_matches_p.
1632
1633         * utils.h: Changed all frontcmp occurrences to subdir_p.
1634         
1635         * recur.c: Ditto.
1636         
1637         * test.c: Changed type returned by test functions from char * to const
1638         char *.  Added test_subdir_p and test_dir_matches_p to the list of
1639         tests to run.
1640
1641         * http.c (test_parse_content_disposition): Changed return type from
1642         char * to const char *. 
1643
1644 2006-03-14  Mauro Tortonesi  <mauro@ferrara.linux.it>
1645
1646         * recur.c (struct queue_element): Changed type of html_allowed member
1647         to bool.
1648         
1649 2006-03-09  Mauro Tortonesi  <mauro@ferrara.linux.it>
1650
1651         * ftp.c (ftp_list): Try `LIST -a' command first and revert to `LIST'
1652         in case of failure.
1653
1654 2006-03-06  Hrvoje Niksic  <hniksic@xemacs.org>
1655
1656         * hash.c (TOLOWER): Fix definition when STANDALONE.
1657         Reported by Beni Serfaty.
1658
1659 2006-03-02  Mauro Tortonesi  <mauro@ferrara.linux.it>
1660
1661         * http.c (http_loop): Fixed recursive HTTP retrieval.
1662
1663 2006-02-28  Hrvoje Niksic  <hniksic@xemacs.org>
1664
1665         * http.c (extract_param): Declare extern so it can be used from
1666         other files.
1667         (extract_param): Return error for empty name.
1668
1669 2006-02-28  Hrvoje Niksic  <hniksic@xemacs.org>
1670
1671         * url.c (find_last_char): Define in terms of memrchr.
1672
1673         * cmpt.c (memrchr): Define it on systems that don't have it.
1674
1675         * http.c (extract_param): New function for parsing header values
1676         with parameters.
1677         (parse_content_disposition): Use it.  Don't allow slashes and
1678         backslashes in the file name.
1679
1680 2006-02-27  Hrvoje Niksic  <hniksic@xemacs.org>
1681
1682         * url.c (path_simplify): Don't preserve ".." at beginning of path.
1683         Suggested by Frank McCown.
1684
1685 2006-02-25  Hrvoje Niksic  <hniksic@xemacs.org>
1686
1687         * http.c (gethttp): Only use FILE.N.html if FILE.html exists.
1688
1689 2006-02-09  Hrvoje Niksic  <hniksic@xemacs.org>
1690
1691         * mswindows.c (run_with_timeout): Made thread_hnd non-static.
1692
1693 2006-02-05  Hrvoje Niksic  <hniksic@xemacs.org>
1694
1695         * retr.c (sleep_between_retrievals): Sleep at a minimum of 1/2 of
1696         the specified wait period.
1697
1698 2006-02-03  Hrvoje Niksic  <hniksic@xemacs.org>
1699
1700         * utils.c (number_to_string): Don't use sprintf for printing
1701         WGINT_MIN; simply divide n by 10 and defer printing the last
1702         digit.
1703         (number_to_string): Removed the SPRINTF_WGINT macro.
1704
1705 2006-02-03  Mauro Tortonesi  <mauro@ferrara.linux.it>
1706
1707         * http.c: Fixed support for Content-Disposition header.
1708
1709         * test.c: Added test_parse_content_disposition to the list of unit
1710         tests to run.
1711
1712 2006-02-02  Hrvoje Niksic  <hniksic@xemacs.org>
1713
1714         * hash.c: Don't define countof if it's already defined.
1715
1716         * hash.c: Obtain the definition of uintptr_t when standalone.
1717
1718 2006-01-30  Mauro Tortonesi  <mauro@ferrara.linux.it>
1719
1720         * http.c: Changed output format. Removed excessively verbose debugging
1721         output.
1722
1723 2005-12-07  Mauro Tortonesi  <mauro@ferrara.linux.it>
1724
1725         * http.c: Fixed pre-download verbose output which was broken by 
1726         HTTP code refactoring.
1727
1728 2005-11-23  Mauro Tortonesi  <mauro@ferrara.linux.it>
1729
1730         * http.c: Refactored HTTP code.  If -O is not used, the new code
1731         delays the choice of the file name where the downloaded resource
1732         will be saved until the HTTP headers have been retrieved.
1733         Added support for Content-Disposition header. 
1734
1735 2005-11-19  Hrvoje Niksic  <hniksic@xemacs.org>
1736
1737         * hash.c (INVALID_PTR): Use uintptr_t instead of unsigned long.
1738         (hash_pointer): Don't assume a pointer fits in `unsigned long'.
1739
1740 2005-11-02  Mauro Tortonesi  <mauro@ferrara.linux.it>
1741
1742         * Makefile.in: Removed support for unit testing (now it is in
1743         tests/Makefile.in).
1744
1745 2005-10-27  Mauro Tortonesi  <mauro@ferrara.linux.it>
1746
1747         * Makefile.in: Added basic support for unit testing.
1748
1749         * test.c: Ditto.
1750         
1751         * test.h: Ditto.
1752         
1753 2005-10-13  Daniel Stenberg  <daniel@haxx.se>
1754
1755         * http-ntlm.c (ntlm_output): Fixed buffer overflow vulnerability.
1756
1757 2005-10-09  Russ Allbery  <rra@stanford.edu>
1758
1759         * snprintf.c: Remove round to round_int and pow10 to pow10_int, to
1760         avoid warnings from GCC 4.0.
1761
1762 2005-10-05  Mauro Tortonesi  <mauro@ferrara.linux.it>
1763
1764         * retr.c: Changed semantics of no_proxy_match.
1765
1766 2005-09-17  Hrvoje Niksic  <hniksic@xemacs.org>
1767
1768         * main.c (main): Don't print the summary if nothing has been downloaded.
1769
1770 2005-09-17  Hrvoje Niksic  <hniksic@xemacs.org>
1771
1772         * retr.c (retr_rate): Rename parameter from MSECS to SECS since it
1773         no longer holds milliseconds.
1774
1775 2005-09-01  Hrvoje Niksic  <hniksic@xemacs.org>
1776
1777         * progress.c: Introduce symbolic constants for "magic" values of
1778         0.2 and 0.9, REFRESH_INTERVAL and ETA_REFRESH_INTERVAL.
1779
1780 2005-08-27  Hrvoje Niksic  <hniksic@xemacs.org>
1781
1782         * cmpt.c (strtoll): Correctly handle strtoll("0x", ptr, 0) and
1783         strtoll("0x<nonhexchar>", ptr, 0) -- in both cases *ptr must be
1784         set to the position of 'x', not after it.
1785
1786 2005-08-27  Hrvoje Niksic  <hniksic@xemacs.org>
1787
1788         * hash.c (hash_table_map): Rename to hash_table_for_each and
1789         update callers.
1790         Document the meaning of the callback's return value.
1791         (hash_table_iterate): New function.
1792         (hash_table_iter_next): Likewise.
1793         Update most places that used hash_table_for_each to use the
1794         iteration, which doesn't require a temporary function with
1795         explicit state management.
1796
1797 2005-08-26  Albert Chin  <wget@mlists.thewrittenword.com>
1798
1799         * Makefile.in: Use @datadir@.  Define localedir as $(datadir)/locale.
1800
1801 2005-08-26  Jeremy Shapiro  <jnshapiro@gmail.com>
1802
1803         * openssl.c (ssl_init): Set SSL_MODE_AUTO_RETRY.
1804
1805 2005-08-23  Hrvoje Niksic  <hniksic@xemacs.org>
1806
1807         * host.c (address_list_from_ipv4_addresses): Use IP_INADDR_DATA.
1808
1809 2005-08-12  Hrvoje Niksic  <hniksic@xemacs.org>
1810
1811         * wget.h: Renamed strtoll_return to strtoll_type.
1812
1813 2005-08-11  Hrvoje Niksic  <hniksic@xemacs.org>
1814
1815         * progress.c (eta_to_human_short): Switch to days when printing
1816         more than 48h rather than 100h.  (It's not immediately apparent
1817         how many days there are in 83h.)
1818
1819 2005-08-11  Hrvoje Niksic  <hniksic@xemacs.org>
1820
1821         * cmpt.c (strtoll): Define it if missing on the system and if Wget
1822         needs it.
1823
1824         * mswindows.c (str_to_int64): Move to cmpt.c and rename to strtoll.
1825
1826 2005-08-10  Hrvoje Niksic  <hniksic@xemacs.org>
1827
1828         * host.c (print_address): Always use inet_ntop when IPv6 is
1829         enabled.
1830
1831         * host.h (ip_address): Simplify the data union.
1832
1833 2005-08-09  Hrvoje Niksic  <hniksic@xemacs.org>
1834
1835         * mswindows.c (inet_ntop): Also handle IPv4 addresses for
1836         completeness.
1837
1838 2005-08-09  Hrvoje Niksic  <hniksic@xemacs.org>
1839
1840         * http.c (gethttp): Don't read more than the amount of data
1841         specified by the content-length header.
1842
1843 2005-08-09  Vasil Dimov  <vd@datamax.bg>
1844
1845         * ftp.c (getftp): Don't free RESPLINE if ftp_response returns a
1846         status other than FTPOK.
1847
1848 2005-08-04  Giuseppe Bonacci  <g.bonacci@libero.it>
1849
1850         * ftp-ls.c (ftp_parse_unix_ls): Remember the position of the
1851         previous token instead of backtracking back to it.
1852
1853 2005-07-08  Gisle Vanem  <giva@bgnett.no>
1854
1855         * mswindows.h: Include process.h to get getpid() declaration.
1856
1857 2005-07-08  Hrvoje Niksic  <hniksic@xemacs.org>
1858
1859         * utils.c (aprintf): Use vasprintf where available.
1860
1861 2005-07-08  Hrvoje Niksic  <hniksic@xemacs.org>
1862
1863         * url.c (rewrite_shorthand_url): Simplify code using aprintf and
1864         strspn.
1865
1866 2005-07-07  Hrvoje Niksic  <hniksic@xemacs.org>
1867
1868         * gnutls.c (ssl_check_certificate): Check for the validity of the
1869         presented X509 certificate.
1870
1871 2005-07-07  Hrvoje Niksic  <hniksic@xemacs.org>
1872
1873         * openssl.c (ssl_check_certificate): Print custom error messages
1874         for frequent X509 certificate problems.
1875
1876 2005-07-07  Hrvoje Niksic  <hniksic@xemacs.org>
1877
1878         * mswindows.h: Define an alias for stat and fstat, as requested by
1879         config-compiler.h.
1880         (gai_strerror): Define to windows_strerror if NEED_GAI_STRERROR is
1881         defined.
1882
1883 2005-07-06  Hrvoje Niksic  <hniksic@xemacs.org>
1884
1885         * mswindows.h: Use strtoll where available.
1886
1887 2005-07-06  Hrvoje Niksic  <hniksic@xemacs.org>
1888
1889         * sysdep.h: Add a full declaration of fnmatch.h.
1890
1891 2005-07-06  Hrvoje Niksic  <hniksic@xemacs.org>
1892
1893         * utils.c: Unconditionally include <setjmp.h>.
1894
1895 2005-07-06  Hrvoje Niksic  <hniksic@xemacs.org>
1896
1897         * utils.c (fnmatch_nocase): New function.
1898         (proclist): Use it instead of fnmatch when opt.ignore_case is
1899         requested.
1900         (in_acclist): Respect opt.ignore_case.
1901         (frontcmp): Respect opt.ignore_case.
1902
1903         * options.h (struct options): New flag opt.ignore_case.
1904
1905 2005-07-06  Hrvoje Niksic  <hniksic@xemacs.org>
1906
1907         * ptimer.c: Measure time in seconds rather than milliseconds.
1908         Adjusted all callers.
1909
1910 2005-07-06  Hrvoje Niksic  <hniksic@xemacs.org>
1911
1912         * http.c (gethttp): When freeing MESSAGE, take into account that
1913         it can be NULL.
1914
1915 2005-07-05  Hrvoje Niksic  <hniksic@xemacs.org>
1916
1917         * cmpt.c (timegm): Handle years after 2099.
1918
1919 2005-07-05  Hrvoje Niksic  <hniksic@xemacs.org>
1920
1921         * cmpt.c (timegm): Remove unused variable.
1922
1923 2005-07-05  Hrvoje Niksic  <hniksic@xemacs.org>
1924
1925         * cmpt.c (timegm): Don't call mktime; simply count the seconds
1926         between 1970-01-01 and the specified date.
1927
1928 2005-07-05  Hrvoje Niksic  <hniksic@xemacs.org>
1929
1930         * wget.h (or): Define HAVE_SSL when either HAVE_OPENSSL or
1931         HAVE_GNUTLS are defined.
1932
1933         * gnutls.c: New file.
1934
1935 2005-07-05  Hrvoje Niksic  <hniksic@xemacs.org>
1936
1937         * http.c (gethttp): Don't print the request write error message
1938         twice.
1939
1940 2005-07-04  Hrvoje Niksic  <hniksic@xemacs.org>
1941
1942         * openssl.c (openssl_errstr): Instead of always using a large
1943         static buffer, only allocate the error string when there is an
1944         actual error.
1945
1946 2005-07-04  Hrvoje Niksic  <hniksic@xemacs.org>
1947
1948         * xmalloc.c (debugging_free): Prefix hex pointer value with "0x"
1949         when printing.
1950
1951 2005-07-04  Hrvoje Niksic  <hniksic@xemacs.org>
1952
1953         * utils.c (NEXT_BASE64_CHAR): Rename to NEXT_CHAR and simplify to
1954         get the next non-whitespace character.
1955
1956 2005-07-04  Hrvoje Niksic  <hniksic@xemacs.org>
1957
1958         * utils.c (base64_decode): Don't silently tolerate non-base64
1959         non-white-space characters in the base64 stream.
1960
1961 2005-07-04  Hrvoje Niksic  <hniksic@xemacs.org>
1962
1963         * connect.c (LAZY_RETRIEVE_INFO): Make last_tick unsigned to match
1964         transport_map_modified_tick.
1965
1966 2005-07-04  Hrvoje Niksic  <hniksic@xemacs.org>
1967
1968         * config-post.h (alloca): Updated declaration to not enumerate all
1969         Windows compilers.
1970
1971 2005-07-04  Hrvoje Niksic  <hniksic@xemacs.org>
1972
1973         * openssl.c (openssl_errstr): Separate error messages with "; ".
1974
1975 2005-07-03  Hrvoje Niksic  <hniksic@xemacs.org>
1976
1977         * ftp.c (getftp): Ditto.
1978
1979         * http.c (gethttp): Use fd_errstr.
1980
1981         * connect.c (fd_register_transport): Restructure parameters to
1982         include only a single structure that describes transport
1983         implementation.
1984
1985         * openssl.c (openssl_errstr): New function: dump SSL error strings
1986         into a static buffer and return a pointer to the buffer.
1987
1988         * connect.c (fd_errstr): New function; returns transport-specific
1989         error message, or strerror(errno) if transport doesn't supply one.
1990
1991 2005-07-03  Hrvoje Niksic  <hniksic@xemacs.org>
1992
1993         * mswindows.h: Also wrap accept() and listen().
1994
1995 2005-07-03  Hrvoje Niksic  <hniksic@xemacs.org>
1996
1997         * url.c (path_end): Skip separators appropriate for the scheme.
1998         (strpbrk_or_eos): Remove gcc-specific version, as the optimization
1999         it tried to perform no longer applies.
2000
2001 2005-07-02  Hrvoje Niksic  <hniksic@xemacs.org>
2002
2003         * host.c: Don't include "connect.h" now that we no longer have
2004         socket_has_inet6.
2005
2006 2005-07-02  Hrvoje Niksic  <hniksic@xemacs.org>
2007
2008         * host.c: Remove extraneous definition of netdb.h.
2009
2010 2005-07-02  Hrvoje Niksic  <hniksic@xemacs.org>
2011
2012         * http.c (gethttp): Skip error message body in the keep-alive
2013         case.
2014
2015 2005-07-02  Hrvoje Niksic  <hniksic@xemacs.org>
2016
2017         * url.c (url_parse): Would crash when parsing fragments.  Support
2018         fragments for FTP URLs too.
2019
2020 2005-07-02  Hrvoje Niksic  <hniksic@xemacs.org>
2021
2022         * version.c: Don't use "cvs" in version name, since we're not
2023         using CVS anymore.
2024
2025 2005-07-02  Hrvoje Niksic  <hniksic@xemacs.org>
2026
2027         * progress.c (create_image): Ditto.
2028
2029         * retr.c (retr_rate): Display smaller rate numbers with greater
2030         precision.
2031
2032 2005-07-02  Hrvoje Niksic  <hniksic@xemacs.org>
2033
2034         * http.c (response_head_terminator): Minor optimization.
2035
2036         * retr.c (fd_read_hunk): Call terminator with pointer to the start
2037         of the data and the pointer to the current data.  Changed all
2038         callers.
2039
2040 2005-07-01  Hrvoje Niksic  <hniksic@xemacs.org>
2041
2042         * url.c (url_parse): Make sure u->params is not initialized for
2043         http/https URLs.
2044         (url_parse): Don't crash on garbage following []-delimited IPv6
2045         addresses.
2046
2047 2005-07-01  Hrvoje Niksic  <hniksic@xemacs.org>
2048
2049         * main.c (print_help): Don't refer to the non-existent -nr in
2050         description of --mirror.
2051
2052 2005-06-30  Hrvoje Niksic  <hniksic@xemacs.org>
2053
2054         * host.c (pretty_print_address): Renamed to just print_address.
2055         Clarify documentation.
2056
2057 2005-06-30  Hrvoje Niksic  <hniksic@xemacs.org>
2058
2059         * http.c (gethttp): Explicitly document the different cases when
2060         generating the Host header.
2061
2062 2005-06-30  Hrvoje Niksic  <hniksic@xemacs.org>
2063
2064         * host.c (pretty_print_address): Handle error result from
2065         inet_ntop.
2066
2067 2005-06-30  Gisle Vanem  <giva@bgnett.no>
2068
2069         * mswindows.c (inet_ntop): New function.  Print IPv6 addresses
2070         using WSAAddressToString.
2071
2072 2005-06-27  Hrvoje Niksic  <hniksic@xemacs.org>
2073
2074         * progress.c (dot_update): Remove unused variable row_qty.
2075
2076 2005-06-29  Hrvoje Niksic  <hniksic@xemacs.org>
2077
2078         * main.c: Check for both SIGHUP and SIGUSR1 before using them.
2079
2080 2005-06-29  Hrvoje Niksic  <hniksic@xemacs.org>
2081
2082         * utils.c: Unconditionally include locale.h.
2083
2084 2005-06-29  Hrvoje Niksic  <hniksic@xemacs.org>
2085
2086         * ptimer.c: Include sys/time.h to get struct timeval.
2087
2088 2005-06-29  Hrvoje Niksic  <hniksic@xemacs.org>
2089
2090         * wget.h: Remove obsolete definition of with_thousand_seps_sum.
2091
2092 2005-06-29  Hrvoje Niksic  <hniksic@xemacs.org>
2093
2094         * gnu-md5.h: Unconditionally include limits.h.
2095
2096 2005-06-29  Hrvoje Niksic  <hniksic@xemacs.org>
2097
2098         * utils.c (random_number): Use lrand48 if available.
2099         (random_float): Use drand48 if available.
2100
2101 2005-06-29  Hrvoje Niksic  <hniksic@xemacs.org>
2102
2103         * main.c (secs_to_human_time): Use print_decimal when printing
2104         total download time in seconds.
2105
2106         * progress.c (print_row_stats): Use it to print total download
2107         time at the end of the download.
2108         (create_image): Ditto.
2109
2110         * utils.c (print_decimal): New function; print small decimal
2111         numbers with more precision than large ones.
2112
2113         * progress.c (print_row_stats): New function.  Print ETA after the
2114         download rate at the end of each row.
2115
2116 2005-06-28  Hrvoje Niksic  <hniksic@xemacs.org>
2117
2118         * init.c (parse_line): Check for alphanumerics.
2119
2120 2005-06-28  Hrvoje Niksic  <hniksic@xemacs.org>
2121
2122         * (dot_create): Remove unnecessary casts.
2123
2124 2005-06-28  Hrvoje Niksic  <hniksic@xemacs.org>
2125
2126         * ftp.c (getftp): Delete trailing newlines from LIST output so
2127         lines don't come out with trailing \015\012 with -S.
2128
2129 2005-06-27  Hrvoje Niksic  <hniksic@xemacs.org>
2130
2131         * mswindows.h: Remove superfluous includes.
2132
2133 2005-06-27  Hrvoje Niksic  <hniksic@xemacs.org>
2134
2135         * config-post.h (alloca): Amend alloca declaration to take care of
2136         all Win32 compilers, not just MSVC and MinGW.
2137
2138 2005-06-27  Hrvoje Niksic  <hniksic@xemacs.org>
2139
2140         * utils.c (get_grouping_data): Force separator to "." rather than
2141         " " when "," is taken.
2142
2143 2005-06-27  Hrvoje Niksic  <hniksic@xemacs.org>
2144
2145         * wget.h (PTR_FORMAT): Cast the result of sizeof to int before
2146         passing it to printf's %*.
2147
2148         * retr.h: Declare output_stream and output_stream_regular.
2149
2150         * ftp.h: Declare ftp_last_respline.
2151
2152         * convert.h: Declare dl_url_file_map.
2153
2154         * http.h: New file.
2155
2156 2005-06-27  Hrvoje Niksic  <hniksic@xemacs.org>
2157
2158         * cookies.c: Make cookies_now static.
2159
2160 2005-06-27  Hrvoje Niksic  <hniksic@xemacs.org>
2161
2162         * utils.c (human_readable): Remove intermediary cast to long; MSVC
2163         has problems casting *unsigned* __int64 to double.
2164
2165 2005-06-27  Hrvoje Niksic  <hniksic@xemacs.org>
2166
2167         * sysdep.h: Use the system-provided fnmatch by default.
2168
2169 2005-06-27  Hrvoje Niksic  <hniksic@xemacs.org>
2170
2171         * http.c (mktime_from_utc): Renamed to timegm and moved to cmpt.c.
2172         Don't compile it if GNU timegm is available.
2173         (http_atotm): Use timegm.
2174
2175 2005-06-27  Hrvoje Niksic  <hniksic@xemacs.org>
2176
2177         * http.c (http_atotm): Correctly query the old locale value.
2178
2179 2005-06-27  Hrvoje Niksic  <hniksic@xemacs.org>
2180
2181         * config-post.h (alloca): Don't #define alloca under MinGW32,
2182         which defines it in malloc.h, included from mswindows.h.
2183
2184 2005-06-27  Hrvoje Niksic  <hniksic@xemacs.org>
2185
2186         * utils.c (get_grouping_data): Force the use of separators in C
2187         locale.
2188
2189 2005-06-27  Hrvoje Niksic  <hniksic@xemacs.org>
2190
2191         * main.c (i18n_initialize): Set all locale categories.
2192
2193         * http.c (http_atotm): Temporarily set locale to "C".
2194
2195 2005-06-27  Hrvoje Niksic  <hniksic@xemacs.org>
2196
2197         * http.c (gethttp): Improve "POST data file missing" error
2198         message.
2199
2200 2005-06-27  Hrvoje Niksic  <hniksic@xemacs.org>
2201
2202         * progress.c (set_progress_implementation): Type COLON as const
2203         char *.
2204
2205 2005-06-27  Hrvoje Niksic  <hniksic@xemacs.org>
2206
2207         * utils.c (with_thousand_seps): Handle negative numbers.
2208
2209 2005-06-26  Hrvoje Niksic  <hniksic@xemacs.org>
2210
2211         * progress.c (create_image): Mark the "eta" string for translation.
2212
2213 2005-06-26  Hrvoje Niksic  <hniksic@xemacs.org>
2214
2215         * html-url.c (get_urls_file): Don't explicitly set entry->next to
2216         NULL since entry is already zeroed out.
2217
2218 2005-06-26  Gisle Vanem  <giva@bgnett.no>
2219
2220         * mswindows.h: Define gai_strerror under MinGW.
2221
2222 2005-06-26  Hrvoje Niksic  <hniksic@xemacs.org>
2223
2224         * utils.c (with_thousand_seps): Correctly implement thousand seps
2225         consisting of more than one character.
2226
2227 2005-06-26  Hrvoje Niksic  <hniksic@xemacs.org>
2228
2229         * main.c (secs_to_human_time): Ditto.
2230
2231         * progress.c (create_image): Print more exact duration of very
2232         short downloads.
2233
2234         * main.c (secs_to_human_time): Don't translate time suffixes "h",
2235         "m", and "s", which are not strictly SI, but are "accepted for use
2236         with SI".
2237         (secs_to_human_time): Print really small intervals as 0s, not
2238         0.00s.
2239
2240 2005-06-26  Hrvoje Niksic  <hniksic@xemacs.org>
2241
2242         * config-post.h: Replace the alloca declaration with the one from
2243         the latest Autoconf manual.  This should remove a warning with GCC
2244         on AIX.
2245
2246 2005-06-26  Hrvoje Niksic  <hniksic@xemacs.org>
2247
2248         * ftp.c (getftp): Always invoke SIZE, not only when continuing a
2249         download.
2250
2251         * main.c (main): Ditto here.
2252
2253         * progress.c (create_image): When the download is finished, print
2254         how long it took.
2255
2256 2005-06-26  Hrvoje Niksic  <hniksic@xemacs.org>
2257
2258         * main.c (main): Print the downloaded and quota amounts with the
2259         "human_readable" function.
2260
2261         * ftp.c (print_length): Ditto.
2262
2263         * http.c (gethttp): Don't display thousand separators.
2264
2265         * utils.c (with_thousand_seps): Rewritten to respect locale
2266         settings and to be type size agnostic.
2267
2268 2005-06-25  Hrvoje Niksic  <hniksic@xemacs.org>
2269
2270         * utils.c (human_readable): Divide with 1024 instead of shifting
2271         so the operation can work with non-integer N.
2272
2273 2005-06-25  Hrvoje Niksic  <hniksic@xemacs.org>
2274
2275         * progress.c (eta_to_human): New logic for more human-readable
2276         ETA.
2277
2278 2005-06-25  Hrvoje Niksic  <hniksic@xemacs.org>
2279
2280         * utils.c (with_thousand_seps_sum): Decrease buffer size so it
2281         cannot overrun add_thousand_seps's buffer.
2282
2283 2005-06-25  Hrvoje Niksic  <hniksic@xemacs.org>
2284
2285         * utils.c (SPRINTF_WGINT): The correct format is %I64d, not just
2286         %I64.
2287
2288 2005-06-25  Hrvoje Niksic  <hniksic@xemacs.org>
2289
2290         * http.c (http_loop): Don't warn about wildcards in HTTP URLs if
2291         globbing isn't requested in the first place.
2292
2293         * retr.c (retrieve_url): Temporarily turn off globbing when
2294         processing HTTP->FTP redirects.
2295
2296 2005-06-25  Hrvoje Niksic  <hniksic@xemacs.org>
2297
2298         * utils.c (with_thousand_seps_sum): Now defined only if
2299         SUM_SIZE_INT is double.
2300
2301         * wget.h (SUM_SIZE_INT): Instead of bothering with long, long
2302         long, __int64, and friends, simply either use wgint or double, end
2303         of story.  Since we know how to print either, we no longer need
2304         LARGE_INT_FMT.
2305
2306         * sysdeps.h (LARGE_INT): Renamed to SUM_SIZE_INT to better reflect
2307         its intent, and moved to wget.h.
2308
2309 2005-06-25  Hrvoje Niksic  <hniksic@xemacs.org>
2310
2311         * Makefile.in: No need to clean .libs.
2312
2313 2005-06-25  Hrvoje Niksic  <hniksic@xemacs.org>
2314
2315         * cookies.c (parse_set_cookies): Cast pointer subtraction to int
2316         before using it with %d; AIX compiler warns on this.
2317         Reported by Jens Schleusener.
2318
2319 2005-06-24  Hrvoje Niksic  <hniksic@xemacs.org>
2320
2321         * http.c (gethttp): Don't prepend / here.
2322
2323         * cookies.c (cookie_handle_set_cookie): Prepend / to PATH.
2324         (cookie_header): Ditto.
2325
2326 2005-06-24  Hrvoje Niksic  <hniksic@xemacs.org>
2327
2328         * init.c: opt.verbose must be declared as int.
2329
2330 2005-06-23  Hrvoje Niksic  <hniksic@xemacs.org>
2331
2332         * cmpt.c (strpbrk): Removed.
2333         (mktime): Removed.
2334         Include <time.h>.
2335
2336 2005-06-23  Hrvoje Niksic  <hniksic@xemacs.org>
2337
2338         * utils.c (read_file): Ditto.
2339
2340         * main.c (main): Use struct_fstat.
2341
2342         * mswindows.h (struct_fstat): Define a struct_fstat to deal with
2343         the fact that Borland 5.5 has 64-bit stat, but not 64-bit fstat!
2344
2345 2005-06-23  Hrvoje Niksic  <hniksic@xemacs.org>
2346
2347         * sysdep.h: Remove code that deals with Watcom.
2348
2349 2005-06-22  Hrvoje Niksic  <hniksic@xemacs.org>
2350
2351         * all: Use bool instead of int and false/true instead of 0/non-0
2352         for boolean variables and values.
2353
2354 2005-06-22  Hrvoje Niksic  <hniksic@xemacs.org>
2355
2356         * sysdep.h: Include the stdbool.h/_Bool/bool blurb from Autoconf.
2357
2358 2005-06-22  Hrvoje Niksic  <hniksic@xemacs.org>
2359
2360         * init.c (cmd_lockable_boolean): Removed.
2361
2362 2005-06-22  Hrvoje Niksic  <hniksic@xemacs.org>
2363
2364         * cookies.c (struct cookie): Use 1-bit bitfields for booleans
2365         which makes the structure takes less space at no cost in
2366         complexity.
2367
2368 2005-06-22  Hrvoje Niksic  <hniksic@xemacs.org>
2369
2370         * Makefile.in ($(OBJ)): Add the config.h dependency.
2371
2372 2005-06-22  Hrvoje Niksic  <hniksic@xemacs.org>
2373
2374         * openssl.c, connect.c, host.c: Replace instances of #ifdef
2375         ENABLE_DEBUG if (opt.debug) {...} #endif with IF_DEBUG {...}.
2376
2377         * main.c: Rename the IF_DEBUG defined here to WHEN_DEBUG.
2378
2379         * wget.h (IF_DEBUG): New macro.
2380         (DEBUGP): Define in terms of IF_DEBUG.
2381
2382 2005-06-22  Hrvoje Niksic  <hniksic@xemacs.org>
2383
2384         * http.c (gethttp): Only handle --set-cookies (and assert that
2385         cookie jar exists) if opt.cookies is true.  Failure to do so
2386         triggered the assert when --no-cookies was used and the server
2387         sent a Set-Cookie header.  Ouch!
2388
2389 2005-06-22  Hrvoje Niksic  <hniksic@xemacs.org>
2390
2391         * connect.c (select_fd): Expect select() to exist.
2392
2393         * utils.c (xsleep): Always use select() as sleep fallback on
2394         non-Windows platforms.
2395
2396         * ptimer.c: Delete the implementation of PTIMER_TIME.
2397
2398         * main.c: Assume existence of signal(), test for different signal
2399         names instead.
2400
2401         * cmpt.c: Better document reasons why certain functions are
2402         included.
2403
2404 2005-06-22  Hrvoje Niksic  <hniksic@xemacs.org>
2405
2406         * Makefile.in: Remove the manually maintained dependency list;
2407         make all object files depend on every header.
2408
2409 2005-06-20  Hrvoje Niksic  <hniksic@xemacs.org>
2410
2411         * hash.c: Rename "mapping" to "cell" to avoid confusion with the
2412         term "mapping" (or "map") sometimes being used for the entire hash
2413         table.  Also rename "non-empty" to "occupied" for easier reading
2414         of if (!NON_EMPTY (...)) ... .
2415
2416 2005-06-20  Hrvoje Niksic  <hniksic@xemacs.org>
2417
2418         * main.c, ptimer.c, sysdep.h, utils.c: Use #elif to simplify reading of
2419         chained if-else-else-else-... statements.
2420
2421 2005-06-20  Hrvoje Niksic  <hniksic@xemacs.org>
2422
2423         * all: Return type of signal handlers is `void'.  Include signal.h
2424         unconditionally.
2425
2426         * all: Don't explicitly cast values returned by malloc.  We no
2427         longer support ancient compilers that don't declare malloc, and we
2428         never supported C++ builds.
2429
2430 2005-06-19  Hrvoje Niksic  <hniksic@xemacs.org>
2431
2432         * all: Don't declare errno.  Include both time.h and sys/time.h,
2433         as long as sys/time.h exists.  Don't dereference function pointers
2434         when invoking the functions they point to.
2435
2436         * cmpt.c (memmove): Remove function mandated by C89.
2437         (strerror): Ditto.
2438         (strstr): Ditto.
2439
2440         * all: Undo the K&R-ization changes from 2005-05-03.
2441
2442         * all: Remove support for K&R compilers: use C89 function
2443         declarations, remove definition of PARAMS, remove support for
2444         varargs, and remove ansi2knr.  Assume the presence of time.h,
2445         string.h, and other headers mandated by C89.
2446
2447 2005-06-19  Hrvoje Niksic  <hniksic@xemacs.org>
2448
2449         * init.c (cmd_lockable_boolean): Don't recognize literal "2" and
2450         "-1" values; unlike 0 and 1, those should never be exposed to the
2451         user.  Update the error message to be more self-consistent, as
2452         proposed by Benno Schulenberg.
2453
2454 2005-06-18  Hrvoje Niksic  <hniksic@xemacs.org>
2455
2456         * http.c (gethttp): Don't free "head" before using it to save
2457         headers.
2458
2459 2005-06-18  Hrvoje Niksic  <hniksic@xemacs.org>
2460
2461         * http.c (gethttp): When -E is in use, check for file existence
2462         after appending ".html" to the name and modify the file name if
2463         necessary.
2464
2465 2005-06-17  Hrvoje Niksic  <hniksic@xemacs.org>
2466
2467         * connect.c (socket_has_inet6): Removed.
2468
2469         * host.c (lookup_host): Don't use the AI_ADDRCONFIG getaddrinfo
2470         hint.
2471
2472 2005-06-16  Hrvoje Niksic  <hniksic@xemacs.org>
2473
2474         * init.c (cmd_lockable_boolean): Improve the error message so it
2475         lists the more useful values first.
2476
2477 2005-06-15  Hrvoje Niksic  <hniksic@xemacs.org>
2478
2479         * http.c (gethttp): Also report the system error when the POST
2480         data file is missing.
2481
2482 2005-06-15  Benno Schulenberg  <benno@nietvergeten.nl>
2483
2484         * ftp.c, http.c, connect.c, cookies.c, html-url.c, init.c, res.c:
2485         Gettext-ize messages that were previously missed.
2486
2487 2005-06-15  Hrvoje Niksic  <hniksic@xemacs.org>
2488
2489         * host.h (ip_address): Remove the trailing comma from the type
2490         enum in the no-IPv6 case.
2491
2492         * main.c (struct cmdline_option): Remove the trailing comma from
2493         the enum.
2494
2495         Reported by Jens Schleusener.
2496
2497 2005-05-30  Hrvoje Niksic  <hniksic@xemacs.org>
2498
2499         * url.c (strpbrk_or_eos): Check for a recent GCC version before
2500         using the statement-as-expression extension.
2501
2502 2005-05-30  Hrvoje Niksic  <hniksic@xemacs.org>
2503
2504         * http.c (gethttp): Don't attempt to "skip short body" if we're
2505         issuing a HEAD request (in which case the response head is not
2506         followed by a body).
2507
2508 2005-05-30  Hrvoje Niksic  <hniksic@xemacs.org>
2509
2510         * init.c (cmd_spec_header): Don't split the string along the
2511         commas using cmd_vector; just append the new value using
2512         vec_append instead.
2513
2514         * utils.c (vec_append): New function.
2515
2516 2005-05-27  Andreas Beckmann  <debian@abeckmann.de>
2517
2518         * html-url.c (tag_handle_link): Mark the content from the <link
2519         src="..."> tag as expecting HTML.
2520
2521 2005-05-24  Hrvoje Niksic  <hniksic@xemacs.org>
2522
2523         * http.c (http_atotm): Document the origin of the "cookie date"
2524         format.
2525
2526 2005-05-21  Hrvoje Niksic  <hniksic@xemacs.org>
2527
2528         * init.c (setval_internal): Report exact command name alongside
2529         the "display name".
2530
2531 2005-05-18  Hrvoje Niksic  <hniksic@xemacs.org>
2532
2533         * cookies.c (update_cookie_field): Explicitly cast -1 to time_t to
2534         cope with systems where time_t is unsigned.
2535
2536         * cookies.c: Remove unnecessary casts to time_t from values
2537         already of that type.
2538
2539 2005-05-17  Hrvoje Niksic  <hniksic@xemacs.org>
2540
2541         * ftp.c (ftp_loop_internal): Same here.
2542
2543         * http.c (http_loop): Don't clobber the file when -c is specified
2544         and the first attempt to retrieve the file fails.
2545
2546 2005-05-16  Hrvoje Niksic  <hniksic@xemacs.org>
2547
2548         * openssl.c (ssl_check_certificate): Print all issues with a
2549         certificate.
2550
2551 2005-05-16  Hrvoje Niksic  <hniksic@xemacs.org>
2552
2553         * ftp-basic.c: Don't xfree() the line returned by ftp_response if
2554         the returned code is not FTPOK.
2555
2556 2005-05-16  Hrvoje Niksic  <hniksic@xemacs.org>
2557
2558         * init.c (cleanup): Don't free the non-existent opt.ftp_acc.  Free
2559         the SSL-related stuff.
2560
2561 2005-05-16  Hrvoje Niksic  <hniksic@xemacs.org>
2562
2563         * ftp.c (print_length): Consistently print \n at end of the
2564         "Length" line.
2565
2566 2005-05-14  Hrvoje Niksic  <hniksic@xemacs.org>
2567
2568         * openssl.c (ssl_connect): Announce the beginning and the end of
2569         the SSL handshake when in debug mode.
2570
2571         * wget.h (PTR_FORMAT): New macro for easier printing of pointer
2572         values.  Use %0*lx along with PTR_FORMAT instead of %p.
2573
2574 2005-05-14  Hrvoje Niksic  <hniksic@xemacs.org>
2575
2576         * http.c (gethttp): Would forget to close the connection when
2577         keep_alive was not used.
2578
2579 2005-05-13  Hrvoje Niksic  <hniksic@xemacs.org>
2580
2581         * openssl.c (pattern_match): Document the code that decides
2582         whether "*" matches ".".
2583
2584 2005-05-12  Hrvoje Niksic  <hniksic@xemacs.org>
2585
2586         * ftp-ls.c (ftp_index): Use %d to print the port number, which is
2587         now int.
2588         From Steven M. Schweda's VMS patches.
2589
2590 2005-05-12  Hrvoje Niksic  <hniksic@xemacs.org>
2591
2592         * url.c (rewrite_shorthand_url): Don't rewrite "https://host" to
2593         "ftp://https//host" when SSL is not used.
2594
2595 2005-05-11  Hrvoje Niksic  <hniksic@xemacs.org>
2596
2597         * openssl.c (ssl_check_server_identity): Renamed to
2598         ssl_check_certificate because it does more than just checking the
2599         server's identity.
2600         (ssl_check_certificate): Tell the user about
2601         --no-check-certificate.
2602
2603 2005-05-11  Hrvoje Niksic  <hniksic@xemacs.org>
2604
2605         * openssl.c (ssl_init): Always use SSL_VERIFY_NONE, so that the
2606         handshake finishes even if the certificate is invalid.  That way
2607         ssl_check_server_identity can provide better diagnostics on why
2608         the verification failed.
2609
2610 2005-05-11  Hrvoje Niksic  <hniksic@xemacs.org>
2611
2612         * openssl.c (pattern_match): New function.
2613         (ssl_check_server_identity): Treat peer certificate common name as
2614         wildcard.
2615
2616 2005-05-10  Hrvoje Niksic  <hniksic@xemacs.org>
2617
2618         * openssl.c (ssl_check_server_identity): Print certificate subject
2619         and issuer.
2620
2621 2005-05-10  Hrvoje Niksic  <hniksic@xemacs.org>
2622
2623         * res.c (res_register_specs): Correctly pass pointers to
2624         hash_table_get_pair.
2625
2626 2005-05-10  Hrvoje Niksic  <hniksic@xemacs.org>
2627
2628         * http.c (gethttp): Call ssl_check_server_identity.
2629
2630         * openssl.c (ssl_check_server_identity): New function, verifies
2631         that the host name in the certificate matches the actual host
2632         name.
2633         (verify_cert_callback): Removed, since it didn't do anything
2634         except returning the preverify_ok argument.
2635
2636         * connect.c (fd_transport_context): Allow retrieval of the context
2637         pointer registered with fd_register_transport.
2638
2639 2005-05-09  Hrvoje Niksic  <hniksic@xemacs.org>
2640
2641         * openssl.c (verify_cert_callback): Renamed from verify_callback.
2642         Always return the received "ok" value.  Print the X509 name in
2643         debug mode.
2644         (ssl_init): Enable partial writes in SSL context.
2645
2646 2005-05-08  Hrvoje Niksic  <hniksic@xemacs.org>
2647
2648         * http.c (http_loop): Check for wildcards in the URL path
2649         component, not in the whole URL.
2650
2651         * ftp.c (ftp_loop): Check for wildcards in URL path before
2652         unescaping, so the users can escape globbing metacharacters with %
2653         escapes.
2654
2655 2005-05-08  Hrvoje Niksic  <hniksic@xemacs.org>
2656
2657         * init.c (run_command): Correctly interpret the return value of
2658         parse_line.
2659         (commands): Re-alphabetize.
2660
2661 2005-05-08  Hrvoje Niksic  <hniksic@xemacs.org>
2662
2663         * netrc.c (parse_netrc): Explicitly check for assignment != NULL
2664         to silence warning from Borland C.
2665
2666         * url.c (sync_path): Don't unnecessarily increment p.
2667         (url_parse): Don't unnecessarily set url_encode to NULL just
2668         prior to return from the function.
2669
2670 2005-05-08  Hrvoje Niksic  <hniksic@xemacs.org>
2671
2672         * log.c (escnonprint_internal): Place variable declarations
2673         before other statements.
2674
2675 2005-05-08  Hrvoje Niksic  <hniksic@xemacs.org>
2676
2677         * html-url.c: Include recur.h.
2678
2679         * http.c (request_new): Define as accepting no args.
2680
2681 2005-05-07  Hrvoje Niksic  <hniksic@xemacs.org>
2682
2683         * url.c (strpbrk_or_eos): Made inline.  Use strchr(s, '\0') for
2684         finding the NUL char position.
2685
2686 2005-05-07  Hrvoje Niksic  <hniksic@xemacs.org>
2687
2688         * url.c (decide_copy_method): Renamed to char_needs_escaping.
2689         Since it now returns only two possible values, change it to return
2690         boolean (int).
2691
2692 2005-05-07  Hrvoje Niksic  <hniksic@xemacs.org>
2693
2694         * ftp-basic.c (ftp_request): Prevent newlines in VALUE causing
2695         inadvertent sending of multiple FTP commands.
2696
2697 2005-05-07  Hrvoje Niksic  <hniksic@xemacs.org>
2698
2699         * url.c (decide_copy_method): Never cause reencode_escapes to
2700         decode % escapes; it is too intrusive and breaks some servers.
2701
2702 2005-05-07  Hrvoje Niksic  <hniksic@xemacs.org>
2703
2704         * http.c (gethttp): When tunnelling SSL traffic over proxy with
2705         CONNECT, we're really talking to the remote server directly.
2706         Because of this, the request-line argument must be the URL path
2707         rather than the whole URL, as it would be when using regular
2708         proxies.
2709         Reported by Charles Lane.
2710
2711 2005-05-06  Hrvoje Niksic  <hniksic@xemacs.org>
2712
2713         * init.c (cmd_spec_useragent): Allow empty User-Agent.
2714
2715         * http.c (gethttp): Don't print "unknown authentication scheme"
2716         for failed Basic authentication.
2717         (SET_USER_AGENT): Don't set user-agent if opt.useragent is empty.
2718         (gethttp): Use alloca for allocation of www_authenticate.
2719
2720 2005-05-06  Hrvoje Niksic  <hniksic@xemacs.org>
2721
2722         * main.c (print_help): Fix wording of --secure-protocol help text.
2723
2724 2005-05-06  Hrvoje Niksic  <hniksic@xemacs.org>
2725
2726         * cmpt.c (strstr): Updated from glibc 2.3.5.
2727
2728 2005-05-05  Hrvoje Niksic  <hniksic@xemacs.org>
2729
2730         * http.c (http_atotm): Zero out the whole struct tm being passed
2731         to strptime.
2732
2733 2005-05-05  Hrvoje Niksic  <hniksic@xemacs.org>
2734
2735         * main.c (main): Propagate option name to setoptval.
2736
2737         * init.c (setoptval): Accept another argument, OPTNAME.  Propagate
2738         that argument as the option name independently of the actual
2739         command, determined by command_by_name(com).
2740
2741 2005-05-05  Hrvoje Niksic  <hniksic@xemacs.org>
2742
2743         * init.c (parse_line): Make the return value indicate whether
2744         there was a syntax error or a setter failed.
2745         (run_wgetrc): Return an indication on whether an error has been
2746         encountered.
2747         (initialize): Abort if there have been errors running either
2748         .wgetrc file.
2749
2750 2005-05-05  Hrvoje Niksic  <hniksic@xemacs.org>
2751
2752         * log.c (copy_and_escape): Slightly reduce code repetition between
2753         the two loops.
2754
2755 2005-05-05  Charles C.Fu  <ccwf@bacchus.com>
2756
2757         * utils.c (proclist): Strip leading slash when calling fnmatch
2758         too, otherwise wildcard comparisons always fail.
2759
2760 2005-05-05  Hrvoje Niksic  <hniksic@xemacs.org>
2761
2762         * utils.c (touch): Set access time to current time.
2763
2764 2005-05-05  Hrvoje Niksic  <hniksic@xemacs.org>
2765
2766         * url.c (url_unescape): Don't unescape %00, it effectively
2767         truncates the string.
2768
2769 2005-05-05  Hrvoje Niksic  <hniksic@xemacs.org>
2770
2771         * log.c (copy_and_escape): Replace the FOR_URI argument with a
2772         slightly more general mechanism for specifying different kinds of
2773         escape.
2774
2775 2005-05-05  Hrvoje Niksic  <hniksic@xemacs.org>
2776
2777         * ftp-basic.c (ftp_response): Fix printing FTP server response.
2778
2779 2005-05-05  Hrvoje Niksic  <hniksic@xemacs.org>
2780
2781         * retr.c (limit_bandwidth_reset): Reset sleep_adjust.
2782         (limit_bandwidth): Don't allow huge "adjustment" values that
2783         result from being suspended for a while.
2784
2785 2005-05-04  Hrvoje Niksic  <hniksic@xemacs.org>
2786
2787         * wget.h: If gettext was found but libtintl.h wasn't, declare
2788         gettext's return type to avoid type mismatches.
2789
2790 2005-05-03  Hrvoje Niksic  <hniksic@xemacs.org>
2791
2792         * url.c (url_parse): Rename label `error' to avoid conflict with
2793         identifier.
2794
2795         * retr.c (fd_read_body): Rename label `out' to avoid conflict with
2796         identifier.
2797         (fd_read_hunk): Use explicit double constant.
2798         (retrieve_from_file): Don't use string concatenation.
2799         (sleep_between_retrievals): Make sure xsleep is called with a
2800         `double' argument.
2801         (no_proxy_match): Define as static, like it is declared.
2802
2803         * progress.c (bar_create): Use 0.0 instead of 0 because K&R
2804         compilers can't automatically promote it.
2805
2806         * http-ntlm.c (ntlm_output): Replace \xHH sequences with \OOO for
2807         the sake of old compilers.
2808
2809         * ftp.c (ftp_loop_internal): Don't use string concatenation.
2810
2811         * http.c (request_send): Use explicit double constants when
2812         calling fd_read and fd_write.
2813         (post_file): Ditto.
2814         (gethttp): Ditto.
2815         (skip_short_body): Ditto.
2816
2817         * ftp-basic.c: When calling fd_write, specify the last argument as
2818         a `double' constant for the sake of K&R compilers which don't see
2819         the prototype and therefore can't promote it to double
2820         automatically.
2821
2822         * cookies.c (cookie_jar_load): Rename abort label to abort_cookie
2823         to avoid name conflict in K&R compilers.
2824
2825 2005-04-29  Hrvoje Niksic  <hniksic@xemacs.org>
2826
2827         * ptimer.c (posix_init): Since we allow _POSIX_MONOTONIC_CLOCK==0,
2828         it is not enough to check for _POSIX_MONOTONIC_CLOCK-0, we must
2829         also check for defined(_POSIX_MONOTONIC_CLOCK).
2830
2831 2005-04-28  Hrvoje Niksic  <hniksic@xemacs.org>
2832
2833         * ftp.c, hash.c, connect.c, host.c, http.c: Remove unreached code,
2834         such as "break" following return or abort.
2835
2836 2005-04-28  Hrvoje Niksic  <hniksic@xemacs.org>
2837
2838         * init.c (commands): Wrap the use of opt.random_file in #ifdef
2839         HAVE_SSL.
2840
2841 2005-04-28  Hrvoje Niksic  <hniksic@xemacs.org>
2842
2843         * http.c (gethttp): Correctly set the user agent.
2844
2845 2005-04-27  Hrvoje Niksic  <hniksic@xemacs.org>
2846
2847         * init.c (cmd_spec_useragent): Free the old value of
2848         opt.useragent before setting the new one.
2849
2850 2005-04-27  Mauro Tortonesi  <mauro@ferrara.linux.it>
2851
2852         * main.c: Map --ftp-password, --http-password and --proxy-password to
2853         the new ftppassword, httppassword and proxypassword commands
2854         respectively.  Document the --user and --password options in the help
2855         string.
2856         
2857 2005-04-27  Mauro Tortonesi  <mauro@ferrara.linux.it>
2858
2859         * ftp.c: Add support for --user and --password.
2860         
2861         * http.c: Add support for --user and --password.
2862         
2863         * init.c: Deprecated ftppasswd, httppasswd, login, passwd and
2864         proxypasswd commands.  Added ftppassword, ftpuser, httppassword,
2865         password, proxypassword and user commands.
2866
2867         * main.c: Renamed --ftp-passwd to --ftp-password.  Added --ftp-user,
2868         --http-password, --password, --proxy-password and --user.  Deprecated
2869         --http-passwd and --proxy-passwd.  Added documentation for new options
2870         and removed documentation for deprecated options in the help string.
2871         
2872         * options.h (struct options): Added user and passwd members to handle
2873         --user and --password respectively.  Renamed ftp_acc and ftp_pass
2874         members to ftp_user and ftp_passwd for consistency.
2875
2876 2005-04-27  Hrvoje Niksic  <hniksic@xemacs.org>
2877
2878         * main.c (print_help): Advertise "DER", not "ASN1".
2879
2880 2005-04-27  Hrvoje Niksic  <hniksic@xemacs.org>
2881
2882         * openssl.c (init_prng): Disable the weak random seed by default.
2883
2884         * http.c (gethttp): Simplify SSL initialization; disable SSL when
2885         anything goes wrong with the initialization.
2886
2887         * options.h (struct options): New option opt.random_file.
2888
2889 2005-04-27  Hrvoje Niksic  <hniksic@xemacs.org>
2890
2891         * init.c: Wrap private key commands in IF_SSL.
2892
2893 2005-04-27  Hrvoje Niksic  <hniksic@xemacs.org>
2894
2895         * openssl.c (ssl_init): Ditto.
2896
2897         * options.h (struct options): Allow separate specification of key
2898         type and certificate type.
2899
2900         * init.c (cmd_spec_cert_type): Provide a "der" synonym for "asn1"
2901         certificate encoding.
2902
2903 2005-04-26  Hrvoje Niksic  <hniksic@xemacs.org>
2904
2905         * openssl.c: Renamed "gen_sslfunc.c" to "openssl.c" and
2906         "gen_sslfunc.h" to "openssl.h".  This reflects the intent of
2907         openssl.c encapsulating the OpenSSL-specific code.
2908
2909 2005-04-26  Hrvoje Niksic  <hniksic@xemacs.org>
2910
2911         * init.c: Renamed "closure" (a synonym for context in some
2912         cultures) to "place", which more accurately reflects the usage.
2913
2914 2005-04-26  Hrvoje Niksic  <hniksic@xemacs.org>
2915
2916         * gen_sslfunc.c (ssl_init): Use default locations for loading the
2917         certificate bundles.
2918         (ssl_init_prng): Disable the cryptographically weak PRNG
2919         initialization fallback.
2920
2921         * init.c: Renamed SSL command-line arguments and wgetrc commands.
2922         (defaults): Check the server certificate by default.
2923
2924 2005-04-26  Hrvoje Niksic  <hniksic@xemacs.org>
2925
2926         * cookies.c (cookie_handle_set_cookie): Delete the part of the
2927         path after the trailing slash.
2928
2929         * http.c (gethttp): Call cookie_handle_set_cookie with path that
2930         begins with '/'.
2931
2932 2005-04-26  Hrvoje Niksic  <hniksic@xemacs.org>
2933
2934         * http.c (gethttp): Call skip_short_body only if keep_alive is in
2935         use.
2936         (gethttp): Send the User-Agent header with the CONNECT request as
2937         well.
2938
2939 2005-04-25  Hrvoje Niksic  <hniksic@xemacs.org>
2940
2941         * main.c (option_data): Removed support for the undocumented flag
2942         --use-proxy.
2943
2944 2005-04-25  Hrvoje Niksic  <hniksic@xemacs.org>
2945
2946         * main.c (option_data): Don't treat -Y as a boolean switch; treat
2947         it as a value switch instead, so "-Y off" continues to work.
2948
2949 2005-04-24  Hrvoje Niksic  <hniksic@xemacs.org>
2950
2951         * utils.c (aprintf): Delete unreachable statement.
2952
2953 2005-04-24  Hrvoje Niksic  <hniksic@xemacs.org>
2954
2955         * host.c (cmp_prefer_ipv4): New function.
2956         (cmp_prefer_ipv6): New function.
2957         (lookup_host): Use the appropriate comparator according to
2958         opt.prefer_family.
2959
2960         * init.c: New option prefer_family.
2961
2962         * host.c (is_valid_ipv6_address): Spell NS_* constants in lower
2963         case to avoid clash with system headers.
2964         (lookup_host): Reorder the addresses so that IPv4 ones come first.
2965
2966         * utils.c (stable_sort): New function.
2967
2968 2005-04-24  Hrvoje Niksic  <hniksic@xemacs.org>
2969
2970         * connect.c (retryable_socket_connect_error): Return 0 for
2971         ENETUNREACH and EHOSTUNREACH.
2972
2973 2005-04-23  Hrvoje Niksic  <hniksic@xemacs.org>
2974
2975         * cmpt.c: Reenable the memmove implementation for systems that
2976         lack it.
2977
2978         * http.c (gethttp): Store the "authorized" state of the persistent
2979         connection.
2980         (request_remove_header): New function.
2981         (gethttp): Don't send the "Basic" authentication if the connection
2982         is already authorized.
2983
2984 2005-04-23  Hrvoje Niksic  <hniksic@xemacs.org>
2985
2986         * utils.c (base64_encode): Treat input as unsigned chars.
2987         Required for correct encoding of binary stuff.
2988
2989 2005-04-23  Hrvoje Niksic  <hniksic@xemacs.org>
2990
2991         * http-ntlm.c: Format the function definitions in an
2992         ansi2knr-friendly fashion.
2993
2994 2005-04-22  Hrvoje Niksic  <hniksic@xemacs.org>
2995
2996         * http.c (gethttp): Handle multiple WWW-Authentication headers,
2997         only one of which is recognized.  Those are sent by IIS with NTLM
2998         authorization.
2999         (create_authorization_line): Propagate information whether
3000         authorization is finished.
3001         (gethttp): Only stop authorization when it's really finished, not
3002         after fixed two steps.
3003
3004 2005-04-21  Hrvoje Niksic  <hniksic@xemacs.org>
3005
3006         * gen_sslfunc.c (ssl_init): Fix warning message text; mark the
3007         message as translatable.
3008
3009 2005-04-21  Hrvoje Niksic  <hniksic@xemacs.org>
3010
3011         * main.c (print_help): Print the EGD option outside the cluster of
3012         SSL options.
3013
3014 2005-04-21  Hrvoje Niksic  <hniksic@xemacs.org>
3015
3016         * http-ntlm.c (ntlm_output): Fix setting the domain.
3017         Suggested by Sami Krank.
3018
3019 2005-04-20  Mauro Tortonesi  <mauro@ferrara.linux.it>
3020
3021         * connect.c: Set IPV6_V6ONLY socket option when -6 switch is used.
3022
3023 2005-04-20  FUJISHIMA Satsuki  <sf@FreeBSD.org>
3024
3025         * http.c (request_set_header): Fix the check whether a new header
3026         needs to be allocated.
3027
3028 2005-04-18  Hrvoje Niksic  <hniksic@xemacs.org>
3029
3030         * utils.c (base64_encode): Use the parameter order that makes more
3031         sense.  Return the length of the base64 written.  Updated all
3032         callers.
3033
3034 2005-04-17  Hrvoje Niksic  <hniksic@xemacs.org>
3035
3036         * http.c (request_set_header): Free NAME when VALUE is NULL and
3037         freeing the header name is requested.
3038
3039 2005-04-17  Hrvoje Niksic  <hniksic@xemacs.org>
3040
3041         * snprintf.c (fmtstr): Declare VALUE as const char *.
3042         Based on patch by Russ Allbery.
3043
3044 2005-04-17  Hrvoje Niksic  <hniksic@xemacs.org>
3045
3046         * snprintf.c (fmtfp): More correct handling of significant digit
3047         count with %g -- 0.002 has one significant digit, not three.
3048
3049 2005-04-16  Hrvoje Niksic  <hniksic@xemacs.org>
3050
3051         * retr.c (fd_read_body): Respect read timeout with non-interactive
3052         or no progress gauge -- treat ETIMEDOUT specially only when
3053         progress_interactive.
3054         Reported by FUJISHIMA Satsuki.
3055
3056 2005-04-16  FUJISHIMA Satsuki  <sf@FreeBSD.org>
3057
3058         * http.c (gethttp): Don't use HTTP/1.0 persistent connections over
3059         proxy.
3060
3061 2005-04-16  Hrvoje Niksic  <hniksic@xemacs.org>
3062
3063         * snprintf.c: Use the PARAMS macro to handle prototypes.  Write
3064         function definitions in the ansi2knr-friendly way.
3065         (fmtstr): If string precision is specified, don't read VALUE past
3066         it.
3067         (dopr): Actually print %g and %e formats.
3068         (fmtfp): Fix a bug that caused 0.01 to be printed as 0.1.
3069         (fmtfp): Use LLONG in floating point conversions to be able to
3070         convert more digits.
3071         (fmtfp): Interpret precision as number of significant digits with
3072         %g.
3073         (fmtfp): Omit trailing decimal zeros with %g.
3074
3075         * snprintf.c: Don't include <ctype.h> because none of it is used.
3076         Include strings.h/string.h, as per Autoconf.
3077
3078 2005-04-15  Hrvoje Niksic  <hniksic@xemacs.org>
3079
3080         * ptimer.c: Use _POSIX_TIMERS - 0 > 0, which handles the case when
3081         _POSIX_TIMERS is defined but empty, as well as the case when it is
3082         undefined.  Do the same with the check for _POSIX_MONOTONIC_CLOCK.
3083         Suggested by Larry Jones.
3084
3085 2005-04-15  Hrvoje Niksic  <hniksic@xemacs.org>
3086
3087         * ptimer.c: Check that _POSIX_TIMERS is defined as well as > 0.
3088         Problem reported by Steven M. Schweda.
3089
3090 2005-04-14  Hrvoje Niksic  <hniksic@xemacs.org>
3091
3092         * http.c (skip_short_body): Print the skipped body data in debug
3093         mode.
3094         (skip_short_body): Don't skip more than 4k of body data.
3095         (skip_short_body): Return whether the skipping was successful.
3096         (gethttp): If skip_short_body failed, invalidate the connection.
3097
3098 2005-04-12  Gisle Vanem  <giva@bgnett.no>
3099
3100         * ftp.c (getftp): Ditto.
3101
3102         * http.c (gethttp): Open the output file in binary mode.
3103
3104 2005-04-11  Hrvoje Niksic  <hniksic@xemacs.org>
3105
3106         * hash.c: Conditionalize including config.h on HAVE_CONFIG_H
3107         instead of on STANDALONE.
3108
3109 2005-04-11  Hrvoje Niksic  <hniksic@xemacs.org>
3110
3111         * gen_sslfunc.c (ssl_print_errors): Made static.
3112         (ssl_print_errors): Eliminate potentially dangerous fixed-size
3113         error buffer.  Passing NULL to ERR_error_string causes it to use
3114         its own static buffer, which is fine for our purposes.
3115
3116         * gen_sslfunc.c: Include gen_sslfunc.h.  Make the declarations of
3117         ssl_init and ssl_conect match the actual definitions.
3118         (ssl_connect): Simply return a boolean, the SSL context is no
3119         longer useful as a return value.
3120
3121         * retr.c: Don't include SSL headers; we don't need them.
3122
3123 2005-04-11  Hrvoje Niksic  <hniksic@xemacs.org>
3124
3125         * config-post.h: Don't define _VA_LIST under Solaris; it breaks
3126         compilation with GCC 3.4 under Solaris 10.  (It was defined to
3127         avoid a warning with previous versions of GCC.)
3128
3129 2005-04-11  Hrvoje Niksic  <hniksic@xemacs.org>
3130
3131         * xmalloc.c (register_ptr): Warn the user to increase SZ prior to
3132         aborting.
3133
3134 2005-04-11  Hrvoje Niksic  <hniksic@xemacs.org>
3135
3136         * convert.c (convert_cleanup): Free converted_files.
3137
3138 2005-04-10  Hrvoje Niksic  <hniksic@xemacs.org>
3139
3140         * wget.h (DEBUGP): Use __builtin_expect to give a hint to GCC that
3141         opt.debug is false in the vast majority of cases.
3142
3143 2005-04-10  Hrvoje Niksic  <hniksic@xemacs.org>
3144
3145         * config-post.h: Declare alloca as void *, not char *.
3146
3147 2005-04-09  Hrvoje Niksic  <hniksic@xemacs.org>
3148
3149         * recur.c (download_child_p): When -p is used, (temporarily)
3150         ignore accept/reject rules for HTMLs, even when they are at the
3151         maximum recursion depth.  That is because with -p we are, if
3152         necessary, overstepping the max. depth to get the requisites.
3153
3154 2004-06-12  Larry Jones <lawrence.jones@ugsplm.com>
3155
3156         * recur.c (download_child_p): Correct the logic in check number 6:
3157         test opt.reclevel (not DEPTH) against INFINITE_RECURSION.
3158
3159 2005-04-09  Hrvoje Niksic  <hniksic@xemacs.org>
3160
3161         * url.c: Use "static const" in preference to "const static".
3162         Sun's cc warns that "storage class after type is obsolescent".
3163
3164         * url.c (urlchr_table): Don't mark ~ as unsafe, too many broken
3165         web sites are confused when ~ is changed to %7E.  Their servers
3166         redirect /%7Efoo/ to /~foo/, which Wget again accesses using %7E,
3167         causing further redirections, therefore looping infinitely.  See
3168         Debian bug #301624 for an example.
3169
3170 2005-04-09  Hrvoje Niksic  <hniksic@xemacs.org>
3171
3172         * alloca.c: Include wget.h to be able to use xmalloc.  In addition
3173         to defining malloc to xmalloc, also define free to xfree.
3174
3175 2005-04-09  Hrvoje Niksic  <hniksic@xemacs.org>
3176
3177         * http-ntlm.c (ntlm_output): Use "char", not "unsigned char" for
3178         ntlmbuf.  Our base64 functions accept char anyway.
3179         (ntlm_output): Join up the format string, since we nominally
3180         support K&R compilers.
3181         (ntlm_output): Ditto.
3182
3183 2005-04-08  Hrvoje Niksic  <hniksic@xemacs.org>
3184
3185         * ptimer.c: Use Windows timers under Cygwin, whose POSIX timer
3186         implementation is incomplete.
3187
3188 2005-04-08  Hrvoje Niksic  <hniksic@xemacs.org>
3189
3190         * ptimer.c (struct ptimer): Remove the unused initialized field.
3191
3192         * ptimer.c: Renamed function parameters from WT (which used to
3193         stand for wget_timer or wtimer) to PT.
3194
3195 2005-04-08  Hrvoje Niksic  <hniksic@xemacs.org>
3196
3197         * ptimer.c (posix_init): Be smarter about choosing clocks.  In
3198         decreasing order of preference, use CLOCK_MONOTONIC,
3199         CLOCK_HIGHRES, and CLOCK_REALTIME.
3200         (ptimer_allocate): Removed.
3201
3202         * ptimer.c: Refactor the code by cleanly separating the
3203         architecture-dependent code from the architecture-independent
3204         code.
3205
3206 2005-04-08  Hrvoje Niksic  <hniksic@xemacs.org>
3207
3208         * ptimer.c (ptimer_init): Explicitly check that
3209         _POSIX_MONOTONIC_CLOCK is *both* defined and >=0.  (Undefined
3210         symbols are >=0.)
3211
3212 2005-04-08  Hrvoje Niksic  <hniksic@xemacs.org>
3213
3214         * ptimer.c (ptimer_diff): Fix typo affecting Windows build.
3215
3216 2005-04-08  Hrvoje Niksic  <hniksic@xemacs.org>
3217
3218         * ptimer.c (ptimer_init): In fact, _POSIX_MONOTONIC_CLOCK needs to
3219         be >= 0.
3220
3221         * ptimer.c (ptimer_init): Check whether _POSIX_MONOTONIC_CLOCK is
3222         defined instead of whether it's greater than 0.  glibc defines it
3223         to 0, but still makes it available via sysconf.
3224
3225 2005-04-08  Hrvoje Niksic  <hniksic@xemacs.org>
3226
3227         * mswindows.c (str_to_int64): Rename OVERFLOW and UNDERFLOW to
3228         INT64_OVERFLOW and INT64_UNDERFLOW, since those names are used.
3229
3230 2005-04-07  Hrvoje Niksic  <hniksic@xemacs.org>
3231
3232         * ptimer.c: New file.  Move the "wtimer" functions from utils.c to
3233         this file and rename them to ptimer_.
3234
3235 2005-04-07  Hrvoje Niksic  <hniksic@xemacs.org>
3236
3237         * host.c (NO_ADDRESS): Define NO_ADDRESS only after the system
3238         headers have been included.
3239
3240 2005-04-06  Hrvoje Niksic  <hniksic@xemacs.org>
3241
3242         * http.c (pconn): Include NTLM data, which is per-connection.
3243         (known_authentication_scheme_p): Recognize NTLM authorization.
3244         (create_authorization_line): Call ntlm_input and ntlm_output.
3245
3246         * http-ntlm.c: New file, donated by Daniel Stenberg and originally
3247         written for curl, heavily modified for Wget.
3248
3249         * utils.c (base64_encode): Relocated from http.c, since it is now
3250         used by http-ntlm.c, and will possibly be used elsewhere.
3251         (base64_decode): New function, originally based on code from GNU
3252         recode.
3253
3254 2005-04-02  Hrvoje Niksic  <hniksic@xemacs.org>
3255
3256         * ftp.c (ftp_loop): Ditto.
3257
3258         * ftp-basic.c (ftp_pasv): Use the xzero shorthand for memset(0).
3259         (ftp_lpsv): Ditto.
3260
3261 2005-04-05  Mauro Tortonesi  <mauro@ferrara.linux.it>
3262
3263         * Makefile.in: removed string_t.c from list of source files.
3264
3265 2005-04-04  Mauro Tortonesi  <mauro@ferrara.linux.it>
3266
3267         * string_t.c: Removed.
3268         
3269         * string_t.h: Removed.
3270
3271 2005-04-02  Hrvoje Niksic  <hniksic@xemacs.org>
3272
3273         * url.c (rewrite_shorthand_url): Only accept recognized schemes.
3274         That way "foo:80" will correctly be rewritten to "http://foo:80"
3275         instead of left unchanged and ultimately rejected because of
3276         "unsupported scheme foo".
3277
3278 2005-03-31  Hrvoje Niksic  <hniksic@xemacs.org>
3279
3280         * utils.c (number_to_string): Avoid explicit 64-bit constants;
3281         construct them by multiplication at compile-time.
3282
3283         * utils.c, elsewhere: Don't append "L" to 32-bit integer
3284         constants; we aren't really compilable on 16-bit systems anyway.
3285
3286         * hash.c (prime_size): Remove primes larger than 2^31, but include
3287         2^31-1, which is prime.
3288
3289 2005-03-30  Hrvoje Niksic  <hniksic@xemacs.org>
3290
3291         * utils.c (string_set_to_array): New function.
3292
3293         * convert.c: Replace the use of "slists" with sets/hash-tables,
3294         which in fact suit the intended purpose much better.
3295         downloaded_html_list is removed altogether.
3296
3297 2005-03-29  Hrvoje Niksic  <hniksic@xemacs.org>
3298
3299         * ftp.h (enum): Rename GLOBALL, GETALL, and GETONE to
3300         GLOB_GLOBALL, GLOB_GETALL, and GLOB_GETONE to avoid conflict with
3301         Linux headers.
3302
3303 2005-03-29  Hrvoje Niksic  <hniksic@xemacs.org>
3304
3305         * utils.c (numdigit): More correct handling of negative numbers.
3306
3307 2005-03-21  Hrvoje Niksic  <hniksic@xemacs.org>
3308
3309         * http.c (gethttp): Print the human-readable size.
3310
3311         * ftp.c (getftp): Print the human-readable size of the file to be
3312         downloaded.
3313
3314         * utils.c (human_readable): New function.
3315
3316         * utils.c: Renamed "legible" to "with_thousand_seps",
3317         "legible_large_int" to "with_thousand_seps_large", and "legible_1"
3318         to "add_thousand_seps".
3319
3320 2005-03-21  Hrvoje Niksic  <hniksic@xemacs.org>
3321
3322         * http.c (gethttp): Inhibit persistent connections when talking to
3323         proxies, as mandated by RFC 2068.
3324
3325 2005-03-20  Hrvoje Niksic  <hniksic@xemacs.org>
3326
3327         * url.c (unescape_single_char): New function.
3328         (url_escape_dir): Use it to unescape slashes in directory
3329         components.
3330         (url_string): Escape unsafe chars in host name, except for the ':'
3331         charaters, which can appear in IPv6 addresses.
3332
3333         * main.c (main): Don't access the cookie jar directly.
3334
3335         * log.c (escnonprint_internal): Correctly calculate the needed
3336         string size.  Don't forget the buffer's new size after having
3337         reallocated it.
3338         (log_cleanup): New function.  Free the escnonprint ring data.
3339
3340         * init.c (cleanup): Don't free the cookie jar explicitly, it is
3341         now done by http_cleanup.
3342         (cleanup): opt.user_headers is now a vector, free it with
3343         free_vec.
3344
3345         * http.c (gethttp): Make sure to free the request data, the status
3346         message, and the response data before returning from the function.
3347         (save_cookies): New function.
3348         (http_cleanup): Free the cookie jar here.
3349
3350         * hash.c: Renamed string_hash to hash_string and ptrhash to
3351         hash_pointer.  Exported hash_pointer.
3352
3353         * xmalloc.c: Organized malloc_table (previously malloc_debug) as a
3354         simple EQ hash table.  register_ptr and unregister_ptr are now of
3355         O(1) complexity.
3356
3357         * xmalloc.c: Renamed "*_debug" to debugging_* and "*_real" to
3358         checking_*.
3359
3360 2005-03-12  Hrvoje Niksic  <hniksic@xemacs.org>
3361
3362         * utils.c (debug_test_md5): Moved to gen-md5.c.
3363
3364         * mswindows.h: Don't declare inet_ntop, since we don't use it.
3365
3366         * mswindows.h: For consistency, also wrap closesocket, it being
3367         a Winsock call.
3368
3369         * mswindows.h: Don't declare sleep and usleep; we're defining
3370         xsleep now.
3371
3372         * mswindows.h (mkdir): Don't special-case Borland C, _mkdir
3373         works there as well.
3374
3375         * host.c: Don't include winsock header files; the correct ones
3376         are already included by mswindows.h.
3377
3378         * mswindows.c (xsleep): Round toward the nearest millisecond
3379         in an attempt to avoid average short sleeps.
3380
3381         * utils.c (wtimer_granularity): Report correct values for
3382         Windows timers and for high-resolution timers.
3383
3384         * utils.c (wtimer_initialize_once): New function, called to
3385         initialize the timer frequency.
3386
3387         * utils.c: Replace the use of GetSystemTime with high-resolution
3388         counters under Windows.  When high-resolution counters are
3389         unavailable, use GetTickCount().
3390
3391 2005-03-15  Hrvoje Niksic  <hniksic@xemacs.org>
3392
3393         * retr.c (fd_read_body): Undo the 2004-11-18 change.  Instead,
3394         always be "exact".
3395
3396 2005-03-17  Hrvoje Niksic  <hniksic@xemacs.org>
3397
3398         * ftp-basic.c (ftp_login): Don't free the string if ftp_response
3399         returned an error status because the line didn't get allocated in
3400         the first place.
3401
3402 2005-03-15  Hrvoje Niksic  <hniksic@xemacs.org>
3403
3404         * http.c (read_http_response_head): Limit the response size to 64k
3405         bytes.
3406
3407         * retr.c (fd_read_hunk): Accept a MAXSIZE argument that limits the
3408         number of bytes the function is allowed to allocate.
3409         (fd_read_line): Limit the line to 4096 bytes.
3410
3411 2005-03-12  Hrvoje Niksic  <hniksic@xemacs.org>
3412
3413         * wget.h: Include options.h after wgint has been defined.
3414
3415         * options.h (struct options): Declare options processed with
3416         cmd_bytes as wgint, not long.
3417
3418 2005-03-18  Hrvoje Niksic  <hniksic@xemacs.org>
3419
3420         * init.c (cmd_file): Use concat_strings.
3421
3422         * http.c (basic_authentication_encode): Use concat_strings.
3423
3424         * ftp-ls.c (ftp_index): Use concat_strings.
3425
3426         * ftp-basic.c (ftp_request): Use concat_strings.
3427
3428         * utils.c (concat_strings): New function.
3429
3430 2005-03-12  Hrvoje Niksic  <hniksic@xemacs.org>
3431
3432         * init.c (simple_atof): Handle negative numbers; skip whitespace
3433         before the number.
3434         (simple_atoi): Ditto.  Also, check for overflow and underflow.
3435         (cmd_number): Bail out on negative numbers.
3436         (parse_bytes_helper): Ditto.
3437
3438 2005-03-06  Hrvoje Niksic  <hniksic@xemacs.org>
3439
3440         * http.c (gethttp): Handle multiple Set-Cookie headers sent by
3441         remote server.
3442
3443 2005-03-06  Hrvoje Niksic  <hniksic@xemacs.org>
3444
3445         * init.c (defaults): Use passive FTP by default.
3446
3447 2005-03-06  Hrvoje Niksic  <hniksic@xemacs.org>
3448
3449         * mswindows.c: Provide wrappers to Winsock functions that set
3450         errno to WSAGetLastError() in case of failure.  Also provide a
3451         Windows-specific version of strerror.
3452
3453         * mswindows.h: Wrap calls to socket, bind, connect, recv, send,
3454         select, getsockname, getpeername, and setsockopt.
3455
3456 2005-03-06  Hrvoje Niksic  <hniksic@xemacs.org>
3457
3458         * url.c (url_parse): Reject port numbers larger than 65535.  We
3459         also check for overflow while parsing port numbers.
3460
3461 2005-03-06  Hrvoje Niksic  <hniksic@xemacs.org>
3462
3463         * utils.c (read_file): Don't use wgint for file size; LFS won't
3464         work since the file is mmap'ed as a whole.
3465
3466         * options.h: Don't include stdio.h.
3467
3468         * log.c: Ditto.
3469
3470         * init.c: Disambiguate assignment from non-zero test to avoid
3471         Borland C warning.
3472
3473         * http.c (response_new): Don't needlessly post-increment count.
3474
3475         * hash.c: Include stdio.h.
3476
3477         * gnu-md5.h: Don't include stdio.h.
3478
3479         * getopt.h (struct option): Always use const.
3480
3481         * ftp.c (getftp): Avoid unnecessary assignment to RES to avoid
3482         Borland C warning.
3483
3484         * ftp-ls.c: Disambiguate assignment from non-zero test to avoid
3485         Borland C warning.
3486
3487         * cmpt.c (strptime_internal): Don't initialize rp_backup when
3488         !_NL_CURRENT to avoid Borland C warning.
3489
3490 2005-03-06  Hrvoje Niksic  <hniksic@xemacs.org>
3491
3492         * utils.c (fopen_excl): Fix parse error when O_BINARY is
3493         available.
3494
3495 2005-03-05  Hrvoje Niksic  <hniksic@xemacs.org>
3496
3497         * url.c (url_file_name): Don't allow hosts named ".." to be
3498         appended as path elements.
3499
3500 2005-03-03  Hrvoje Niksic  <hniksic@xemacs.org>
3501
3502         * retr.c (retrieve_url): Escape location header.
3503
3504         * http.c (print_server_response_1): Escape server response when
3505         printing it.
3506         (gethttp): Escape host name, status message, location header, and
3507         content type.
3508         (http_loop): Escape error message from server.
3509
3510         * host.c (lookup_host): Escape host name when printing it.
3511
3512         * ftp.c (getftp): Escape user name when printing it.
3513         (getftp): Escape remote file and directory for printing.
3514         (getftp): Escape server listing when printing it.
3515         (ftp_retrieve_list): Escape link name and file name.
3516         (ftp_retrieve_glob): Escape file name.
3517
3518         * ftp-basic.c (ftp_response): Escape server response when printing
3519         it.
3520
3521         * cookies.c (parse_set_cookies): Escape the cookie field when
3522         printing it.
3523         (parse_set_cookies): Escape contents of remote header.
3524         (cookie_handle_set_cookie): Escape host name and cookie domain.
3525
3526         * connect.c (connect_to_ip): Escape the host name.
3527
3528         * log.c (escnonprint): New function, used for printing strings
3529         coming from the server that possibly contain non-ASCII characters.
3530         (escnonprint_uri): Ditto.
3531
3532 2005-02-24  Hrvoje Niksic  <hniksic@xemacs.org>
3533
3534         * ftp.c (getftp): Ditto.
3535
3536         * http.c (gethttp): When we're not supposed to overwrite files,
3537         use fopen_excl to open the file and recompute the file name.
3538
3539         * log.c (redirect_output): Use unique_create to avoid a race
3540         condition.
3541
3542         * mswindows.c (fake_fork_child): Use unique_create.
3543
3544         * utils.c (fopen_excl): New function that opens a stdio stream
3545         with the O_EXCL flag (where available).
3546         (unique_create): New function, like unique_name, but also creating
3547         the file and returning a file pointer.
3548         (fork_to_background): Use unique_create to create the file
3549         immediately to avoid race condition with multiple instances of
3550         wget -b.
3551
3552 2005-02-24  Hrvoje Niksic  <hniksic@xemacs.org>
3553
3554         * host.c (lookup_host): Test for AI_ADDRCONFIG directly, instead
3555         of checking for HAVE_GETADDRINFO_AI_ADDRCONFIG.
3556
3557 2005-02-23  Hrvoje Niksic  <hniksic@xemacs.org>
3558
3559         * host.c (is_valid_ipv6_address): Move here from url.c.
3560         (lookup_host): If the address is numeric, don't print the
3561         "resolving..." line, don't set up DNS timeouts, and set the
3562         AI_NUMERICHOST hint, where available.
3563
3564 2005-02-26  Gisle Vanem  <giva@bgnett.no>
3565
3566         * utils.c: Use the nnnLL syntax under GCC.  Define struct_stat to
3567         struct _stati64 under __MINGW32__ as well as under MS VC.
3568
3569 2005-02-26  Hrvoje Niksic  <hniksic@xemacs.org>
3570
3571         * utils.c: Use the nnnI64 syntax for __int64 constants under all
3572         Windows compilers.
3573         (SPRINTF_WGINT): Use "%I64" under all Windows compilers.
3574
3575         * mswindows.h (WGINT_MAX): Use the nnnI64 syntax for
3576         __int64 constants under all Windows compilers.
3577         (struct_stat): Use `struct stati64' under Borland C.
3578         (fstat): Don't redefine to _fstati64 under Borland.
3579
3580         * mswindows.c: Define str_to_int64 under Borland C as well as
3581         under (older) Visual C.
3582
3583 2005-02-25  Hrvoje Niksic  <hniksic@xemacs.org>
3584
3585         * ftp.c (getftp): Initialize err to suppress compiler warning.
3586
3587 2005-02-24  Hrvoje Niksic  <hniksic@xemacs.org>
3588
3589         * ftp.c (ftp_expected_bytes): Fix bug that caused infloop because
3590         of not correctly skipping the '(' character.
3591
3592 2005-02-24  Hrvoje Niksic  <hniksic@xemacs.org>
3593
3594         * mswindows.c (wget_ftello): Removed.
3595
3596         * mswindows.h: Remove bogus definition of stat.
3597         (wget_ftello): Remove the leftover ftello replacement.
3598
3599 2005-02-20  Hrvoje Niksic  <hniksic@xemacs.org>
3600
3601         * mswindows.c (wget_ftello): Wget's replacement for ftello.
3602
3603         * utils.c (file_size): Use ftello where available.
3604
3605         * ftp-ls.c (ftp_parse_unix_ls): Use str_to_wgint to parse the file
3606         size.
3607         (ftp_parse_winnt_ls): Ditto.
3608
3609         * ftp-basic.c (ftp_size): Use str_to_wgint to convert number to
3610         wgint; pass 10 instead of 0 as the BASE argument.
3611
3612         * ftp.c (ftp_expected_bytes): Use str_to_wgint to parse the file
3613         size.
3614
3615         * sysdep.h (LARGE_INT_FMT): Use __int64 as LARGE_INT on
3616         MSVC/Windows; print it with "%I64".
3617
3618         * wget.h: Define a `wgint' type, normally aliased to (the possibly
3619         64-bit variant of) off_t.
3620
3621         * all: Use `wgint' instead of `long' for numeric variables that
3622         can hold file sizes.
3623
3624         * utils.c (number_to_string): Support printing of `wgint'
3625         argument.
3626         (number_to_static_string): New function.
3627
3628         * all: Replace printf("%ld", long_value) with printf("%s",
3629         number_to_static_string(wgint_value)).
3630
3631 2005-02-18  Mauro Tortonesi <mauro@ferrara.linux.it>
3632
3633         * main.c: Added the --ftp-passwd command line option.
3634
3635         * init.c: Renamed command passwd to ftppasswd.
3636
3637 2005-02-11  Mauro Tortonesi <mauro@ferrara.linux.it>
3638         
3639         * string_t.c: Fixed a bug in do_escape and triggered escape of
3640         backslashes in string_escape to avoid ambiguities in the result
3641         string.
3642         
3643 2005-02-10  Mauro Tortonesi <mauro@ferrara.linux.it>
3644
3645         * string.h: Renamed to string_t.h to fix a compilation conflict 
3646         with the string.h header in the standard C library.
3647         
3648         * string.c: Renamed to string_t.c for consistency with string.h.
3649         
3650         * string_t.c: Ditto.
3651
3652         * string_t.h: Ditto.
3653         
3654 2004-12-31  Mauro Tortonesi <mauro@ferrara.linux.it>
3655
3656         * string.c: New file.
3657
3658         * string.h: New file.
3659
3660         * Makefile.in: Added string.c to the list of modules to compile.
3661
3662         * main.c: Updated copyright.
3663
3664 2004-11-18  Ulf Harnhammar <ulf.harnhammar.9485@student.uu.se>
3665
3666         * ftp-ls.c: Fixed a problem in ftp_parse_winnt_ls that could allow a
3667         malicious remote FTP server to crash wget.
3668
3669 2004-11-18  Hans-Andreas Engel <engel@node.ch>
3670
3671         * http.c: Enable --convert-links (-k) when a single page is downloaded
3672         via --output-document (-O).
3673
3674 2004-11-18  Mauro Tortonesi <mauro@deepspace6.net>
3675
3676         * connect.c: Minor correction to the comment in front of fd_peek.
3677
3678 2004-11-18  Leonid Petrov <nouser@lpetrov.net>
3679
3680         * retr.c: Fix a timeout problem in fd_read_body when using http_proxy.
3681
3682 2004-11-15  YAMAZAKI Makoto <Yamazaki.Makoto@fujixerox.co.jp>
3683
3684         * netrc.c: Fix termination by assertion bug in netrc parsing.
3685
3686 2004-05-09  David Fritz  <zeroxdf@att.net>
3687
3688         * mswindows.c (fake_fork): Pass entire command line to the child
3689         process.
3690
3691 2004-03-31  Hrvoje Niksic  <hniksic@xemacs.org>
3692
3693         * http.c (gethttp): Fix typo: SCHEME_SSL -> SCHEME_HTTPS.
3694
3695 2004-03-30  Hrvoje Niksic  <hniksic@xemacs.org>
3696
3697         * http.c (gethttp): Send the Proxy-Authorization header over
3698         non-SSL connections too.
3699
3700 2004-03-25  David Fritz  <zeroxdf@att.net>
3701
3702         * mswindows.c (fake_fork_child): Ignore error code when
3703         OpenFileMapping() fails; assume it failed because the object does
3704         not exist.
3705
3706 2004-03-24  David Fritz  <zeroxdf@att.net>
3707
3708         * mswindows.c (fake_fork): New function.
3709
3710         * mswindows.c (fork_to_background): Use it.
3711
3712 2004-03-19  David Fritz  <zeroxdf@att.net>
3713
3714         * mswindows.c (ws_hangup): Incorporate old fork_to_background()
3715         code.  Add event name argument.
3716         (fork_to_backgorund): Now a simple wrapper around ws_hangup().
3717         (ws_handler): Correctly handle the case when neither CTRLC_BACKGND
3718         nor CTRLBREAK_BACKGND are defined.  Don't bother handling close,
3719         logoff, or shutdown events.  Call ws_hangup() with the correct
3720         event name; don't assume it was CTRL+Break.
3721
3722 2004-03-19  Hrvoje Niksic  <hniksic@xemacs.org>
3723
3724         * url.c (url_parse): Decode %HH sequences in host name.
3725
3726 2004-03-04  Hrvoje Niksic  <hniksic@xemacs.org>
3727
3728         * convert.c (local_quote_string): Quote "#" as "%23" and "%" as
3729         "%25" when creating links to local files.
3730
3731 2004-03-02  David Fritz  <zeroxdf@att.net>
3732
3733         * mswindows.c (ws_percenttitle): Guard against future changes by
3734         doing nothing if the proper variables have not been initialized.
3735         Clamp percentage value.
3736
3737 2004-03-04  Gisle Vanem  <giva@bgnett.no>
3738
3739         * retr.c (fd_read_body): Don't change console title if quiet.
3740
3741 2004-02-25  David Fritz  <zeroxdf@att.net>
3742
3743         * mswindows.c (set_sleep_mode): Remove argument and return value.
3744         Call GetModuleHandle() instead of LoadLibrary()/FreeLibrary() for
3745         kernel32.dll.  Use typedef for function-pointer.  Don't cast
3746         l-value.  Don't use dereference operator when calling through
3747         function-pointer.
3748         (ws_startup): Update call to set_sleep_mode().
3749         (ws_cleanup): Remove call to set_sleep_mode().
3750
3751 2004-02-23  David Fritz  <zeroxdf@att.net>
3752
3753         * http.c (http_loop): Ditto.
3754
3755         * ftp.c (ftp_loop_internal): Update call to ws_changetitle().
3756
3757         * main.c (main): Don't bother calling ws_changetitle().
3758
3759         * mswindows.h (ws_changetitle): Update prototype.
3760
3761         * mswindows.c (ws_changetitle): Remove second argument.  Use
3762         xfree_null().
3763         (ws_percenttitle): Only update title when percentage has changed.
3764
3765 2004-02-23  David Fritz  <zeroxdf@att.net>
3766
3767         * mswindows.h: Ditto.
3768
3769         * mswindows.c: Misc. formatting/comment tweaks throughout.
3770
3771 2004-02-20  David Fritz  <zeroxdf@att.net>
3772
3773         * main.c (print_help): Remove call to ws_help().
3774
3775         * mswindows.c (ws_help): Remove.
3776
3777         * mswindows.h (ws_help): Remove.
3778
3779 2004-02-16  David Fritz  <zeroxdf@att.net>
3780
3781         * init.c (home_dir): Use aprintf() instead of xmalloc()/sprintf().
3782         Under Windows, if $HOME is not defined, use the directory that
3783         contains the Wget binary instead of hard-coded `C:\'.
3784         (wgetrc_file_name): Under Windows, look for $HOME/.wgetrc then, if
3785         not found, look for wget.ini in the directory of the Wget binary.
3786
3787         * mswindows.c (ws_mypath): Employ slightly more robust methodology.
3788         Strip trailing path separator.
3789
3790 2004-02-06  Hrvoje Niksic  <hniksic@xemacs.org>
3791
3792         * http.c (gethttp): Respect --ignore-length.
3793         (gethttp): Inhibit keep-alive if --ignore-length is specified.
3794
3795 2004-02-06  Hrvoje Niksic  <hniksic@xemacs.org>
3796
3797         * connect.c (sockaddr_set_data): Zero out
3798         sockaddr_in/sockaddr_in6.  Apparently BSD-derived stacks need this
3799         when binding a socket to local address.
3800
3801 2004-02-04  Hrvoje Niksic  <hniksic@xemacs.org>
3802
3803         * hash.c: Make the file compilable outside Wget source tree when
3804         -DSTANDALONE is used.
3805
3806 2004-01-29  Hrvoje Niksic  <hniksic@xemacs.org>
3807
3808         * utils.c (determine_screen_width): Return 0 if not running on
3809         Windows or on a TIOCGWINSZ-capable system.
3810
3811 2004-01-28  David Fritz  <zeroxdf@att.net>
3812
3813         * utils.c (determine_screen_width): Correctly determine console
3814         width under Windows.
3815
3816 2004-01-28  Christian Biere  <christianbiere@gmx.de>
3817
3818         * progress.c (bar_set_params): Fixed syntax error when HAVE_ISATTY
3819         was undefined.
3820
3821         * ftp.c (ftp_loop_internal): Allocate a larger buffer in case
3822         "try" gets translated to something large.  Ditto in http_loop in
3823         http.c.
3824
3825         * http.c (response_header_copy): Don't write to buf[BUFSIZE].
3826
3827         * ftp-opie.c (skey_response): Eliminate unnecessary string
3828         concatenation; just call gen_md5_update twice.
3829
3830 2004-01-25  Hrvoje Niksic  <hniksic@xemacs.org>
3831
3832         * utils.c (xsleep): Don't call usleep with values larger than
3833         1,000,000.
3834
3835 2003-12-16  Hrvoje Niksic  <hniksic@xemacs.org>
3836
3837         * http.c (gethttp): Fix generation of `Content-Length'.
3838
3839 2003-12-15  Gisle Vanem  <giva@bgnett.no>
3840
3841         * url.c (url_skip_credentials): Fixed return value; 'url' if no
3842         credentials.
3843
3844 2003-12-14  Hrvoje Niksic  <hniksic@xemacs.org>
3845
3846         * url.c (url_skip_credentials): Return a pointer directly.
3847
3848 2003-12-14  Hrvoje Niksic  <hniksic@xemacs.org>
3849
3850         * url.c (url_file_name): Ditto.
3851         (parse_errors): Ditto.
3852
3853         * retr.c (retr_rate): Ditto.
3854
3855         * progress.c (create_image): Ditto.
3856
3857         * netrc.c (parse_netrc): Ditto.
3858
3859         * main.c (struct cmdline_option): Ditto.
3860         (redirect_output_signal): Ditto.
3861
3862         * init.c (commands): Ditto.
3863
3864         * ftp-ls.c (ftp_index): Ditto.
3865
3866         * cookies.c (check_domain_match): Declare the pointer to a literal
3867         string as `const'.
3868
3869 2003-12-12  Hrvoje Niksic  <hniksic@xemacs.org>
3870
3871         * retr.c (fd_read_body): Pass total size to progress_create, not
3872         the remaining amount.
3873
3874 2003-12-12  Hrvoje Niksic  <hniksic@xemacs.org>
3875
3876         * retr.c (fd_read_body): Don't fiddle with "interactive timeout"
3877         if read timeout is unset.
3878
3879 2003-12-12  Hrvoje Niksic  <hniksic@xemacs.org>
3880
3881         * connect.c (bind_local): Don't set the IPV6_V6ONLY option on the
3882         socket.
3883
3884 2003-12-06  Hrvoje Niksic  <hniksic@xemacs.org>
3885
3886         * url.c (url_file_name): Respect the setting of
3887         opt.protocol_directories.
3888
3889         * main.c (main): Only check for ret=='?' when longindex is unset.
3890         (option_data): New option --protocol-directories.
3891
3892 2003-12-06  Hrvoje Niksic  <hniksic@xemacs.org>
3893
3894         * ftp.c (getftp): Ditto.
3895
3896         * http.c (gethttp): Correctly calculate bandwidth as total data
3897         read divided with download time.
3898
3899         * retr.c (fd_read_body): Separate the return values for data
3900         written and read.
3901
3902 2003-12-05  Hrvoje Niksic  <hniksic@xemacs.org>
3903
3904         * http.c (H_REDIRECTED): Respect the HTTP/1.1 "303 See Other"
3905         response code.
3906         Suggested by Dan Razzell.
3907
3908 2003-11-30  Hrvoje Niksic  <hniksic@xemacs.org>
3909
3910         * retr.c (fd_read_body): Report the amount of data *written* as
3911         amount_read.  This is not entirely logical, but that's what the
3912         callers expect, and it's not easy to change.
3913
3914         * ftp.c (ftp_loop_internal): Ditto.
3915
3916         * http.c (http_loop): Be smarter about assigning restval; if we're
3917         in the nth pass of a download, simply use the information we have
3918         about how much data has been retrieved as restval.
3919
3920         * ftp.c (getftp): Ditto for FTP "REST" command.
3921
3922         * http.c (gethttp): When the server doesn't respect range, skip
3923         the first RESTVAL bytes of the read body.  Never truncate the
3924         output file.
3925
3926         * retr.c (fd_read_body): Support skipping initial STARTPOS octets.
3927
3928 2003-11-30  Hrvoje Niksic  <hniksic@xemacs.org>
3929
3930         * http.c (skip_short_body): Renamed skip_body to skip_short_body;
3931         don't bother calling fd_read_body.
3932
3933 2003-11-30  Hrvoje Niksic  <hniksic@xemacs.org>
3934
3935         * retr.c (fd_read_body): Sanitize arguments and document them
3936         better.  Make sure the timer is created and updated only if
3937         necessary.  Updated callers.
3938
3939 2003-11-30  Hrvoje Niksic  <hniksic@xemacs.org>
3940
3941         * http.c (skip_body): New function.
3942         (gethttp): Use it to skip the body of the responses we don't care
3943         to download.  That allows us to reuse the connection.
3944         (gethttp): Trust that the HEAD requests will not generate body
3945         data.
3946
3947         * retr.c (fd_read_body): Don't write to OUT if it's NULL.
3948
3949 2003-11-29  Hrvoje Niksic  <hniksic@xemacs.org>
3950
3951         * http.c (gethttp): Initialize SSL only the first time when SSL
3952         URL is downloaded.
3953
3954 2003-11-29  Hrvoje Niksic  <hniksic@xemacs.org>
3955
3956         * cookies.c (cookie_header): Only generate the contents of the
3957         header, not the leading "Cookie: " or the trailing "\r\n".
3958
3959         * http.c (gethttp): When adding headers specified with `--header',
3960         allow them to override the headers generated by Wget.
3961
3962         * init.c (cmd_spec_header): Made opt.user_headers a vector.
3963
3964         * http.c (request_new): New function.  Returns a request structure
3965         which can be modified in various ways, most notably by adding HTTP
3966         headers to the request.
3967         (request_set_header): New function for adding the header to the
3968         request.  If the header is already available, it gets replaced.
3969         (request_send): Construct and send the request.
3970         (gethttp): Use the request_* functions to generate the request.
3971
3972 2003-11-28  Hrvoje Niksic  <hniksic@xemacs.org>
3973
3974         * http.c (gethttp): Don't include the Proxy-Authorization header
3975         in the request tunneled through proxy.
3976
3977 2003-11-28  Hrvoje Niksic  <hniksic@xemacs.org>
3978
3979         * http.c (gethttp): Use the CONNECT handle to establish SSL
3980         passthrough through non-SSL proxies.
3981
3982 2003-11-28  Hrvoje Niksic  <hniksic@xemacs.org>
3983
3984         * init.c: Don't #include netinet/Winsock stuff.
3985
3986 2003-11-28  Hrvoje Niksic  <hniksic@xemacs.org>
3987
3988         * http.c: Deleted the old functions header_process,
3989         header_extract_number, header_exists, header_strdup,
3990         http_process_range, http_process_none, http_process_type, and
3991         http_process_connection.
3992
3993         * http.c (response_new): New function.
3994         (response_header_bounds): Ditto.
3995         (response_header_copy): Ditto.
3996         (response_header_strdup): Ditto.
3997         (response_status): Ditto.
3998         (gethttp): Use the new response_* functions to parse the response.
3999         Support HTTP/0.9 responses.
4000
4001 2003-11-27  Hrvoje Niksic  <hniksic@xemacs.org>
4002
4003         * progress.c (create_image): Don't calculate ETA if nothing has
4004         been downloaded yet, because it causes division by zero.
4005
4006 2003-11-27  Hrvoje Niksic  <hniksic@xemacs.org>
4007
4008         * connect.c (bind_local): Rename sa_len to addrlen because IRIX
4009         headers define sa_len as a macro.
4010
4011 2003-11-26  Hrvoje Niksic  <hniksic@xemacs.org>
4012
4013         * html-parse.c (convert_and_copy): Remove embedded newlines when
4014         AP_TRIM_BLANKS is specified.
4015
4016 2003-11-26  Hrvoje Niksic  <hniksic@xemacs.org>
4017
4018         * ftp.c: Set con->csock to -1 where rbuf_uninitialize was
4019         previously used.
4020
4021 2003-11-26  Hrvoje Niksic  <hniksic@xemacs.org>
4022
4023         * Makefile.in (http$o): Added the trailing backslash that was
4024         missing.
4025
4026 2003-11-21  Hrvoje Niksic  <hniksic@xemacs.org>
4027
4028         * headers.c: Removed.  The file is no longer relevant, now that no
4029         special handling of headers is done by the rbuf code.  Moved
4030         portions to http.c.
4031
4032 2003-11-21  Hrvoje Niksic  <hniksic@xemacs.org>
4033
4034         * rbuf.c: Removed.
4035
4036         * ftp-basic.c (ftp_response): Use fd_read_line.  No longer use
4037         struct rbuf.  Updated all callers.
4038
4039         * http.c (gethttp): Use fd_read_head to read all the headers in
4040         one go.
4041         (next_header): New function.
4042
4043         * retr.c (fd_read_line): New function: reads a line from FD,
4044         leaving the rest of the data unread.
4045         (fd_read_head): New function.
4046
4047         * connect.c (fd_peek): New function, implements peeking.
4048         (poll_internal): New function.
4049         (fd_read): Use it.
4050         (fd_write): Ditto.
4051         (fd_peek): Ditto.
4052         (fd_register_transport): Allow registering a "peeker" callback.
4053
4054 2003-11-20  Hrvoje Niksic  <hniksic@xemacs.org>
4055
4056         * connect.c: Renamed xread/xwrite/xclose to
4057         fd_read/fd_write/fd_close.  The "x" prefix is not appropriate
4058         because the semantics have diverged from read/write/close too
4059         significantly.  Updated all callers.
4060
4061 2003-11-20  Hrvoje Niksic  <hniksic@xemacs.org>
4062
4063         * connect.c (sock_write): It's not necessary to initialize RES.
4064
4065 2003-11-19  Hrvoje Niksic  <hniksic@xemacs.org>
4066
4067         * main.c (main): Don't reference opt.ipv4_only and opt.ipv6_only
4068         if IPv6 is disabled.
4069
4070 2003-11-19  Hrvoje Niksic  <hniksic@xemacs.org>
4071
4072         * connect.c (socket_has_inet6): Only compile it if IPv6 is enabled
4073         and AI_ADDRCONFIG is missing.
4074
4075 2003-11-18  Hrvoje Niksic  <hniksic@xemacs.org>
4076
4077         * gen_sslfunc.c (ssl_init_prng): Warn the user when using a weak
4078         random seed.
4079
4080 2003-11-18  Hrvoje Niksic  <hniksic@xemacs.org>
4081
4082         * host.c (address_list_contains): Renamed address_list_find to
4083         address_list_contains because its result is boolean.
4084
4085 2003-11-18  Hrvoje Niksic  <hniksic@xemacs.org>
4086
4087         * connect.c (select_fd): Return 1 if select is not available.
4088
4089 2003-11-17  Hrvoje Niksic  <hniksic@xemacs.org>
4090
4091         * connect.c (connect_to_host): Don't reference address list after
4092         releasing it.
4093
4094 2003-11-17  Hrvoje Niksic  <hniksic@xemacs.org>
4095
4096         * main.c (print_help): Fix alignment of FTP options output.
4097
4098 2003-11-17  Hrvoje Niksic  <hniksic@xemacs.org>
4099
4100         * host.c (lookup_host): Check for the ability to create IPv6
4101         sockets here.
4102
4103         * init.c (defaults): Don't auto-set --inet4-only on IPv6-less
4104         systems.
4105
4106 2003-11-16  Hrvoje Niksic  <hniksic@xemacs.org>
4107
4108         * main.c (print_help): Fix typo in `-O' help message.  Fix docs of
4109         -Y/--proxy.  Fix docs of `--cookies' and `--glob'.  Improve docs
4110         of --convert-links.  Fix docs of SSL options.
4111
4112 2003-11-16  Hrvoje Niksic  <hniksic@xemacs.org>
4113
4114         * ftp-basic.c: Don't include <arpa/inet.h> and others because
4115         they're no longer needed.
4116
4117 2003-11-16  Hrvoje Niksic  <hniksic@xemacs.org>
4118
4119         * main.c (main): Don't allow setting of both opt.ipv4_only and
4120         opt.ipv6_only.
4121
4122         * init.c (defaults): Mark opt.ipv4_only specially when set
4123         automatically.
4124
4125 2003-11-15  Hrvoje Niksic  <hniksic@xemacs.org>
4126
4127         * host.c (lookup_host): Use AI_ADDRCONFIG only if the family is
4128         unspecified.  This ensures that specifying `--no-inet4' on systems
4129         where IPv6 resolves, but doesn't work behaves the same regardless
4130         of the availability of AI_ADDRCONFIG.
4131
4132 2003-11-15  Hrvoje Niksic  <hniksic@xemacs.org>
4133
4134         * host.c: Don't refer to the now-removed function
4135         forget_host_lookup in the documentation of lookup_host.
4136
4137 2003-11-15  Hrvoje Niksic  <hniksic@xemacs.org>
4138
4139         * http.c (persistent_available_p): Correctly specify the endpoint
4140         argument to socket_ip_address.
4141         (gethttp): When printing the "reusing connection to..." message,
4142         specify the host name of the reused connection, not the current
4143         host name.  That makes more sense because it provides a useful
4144         piece of information -- we know to which host we're supposed to
4145         connect anyway!
4146
4147 2003-11-15  Hrvoje Niksic  <hniksic@xemacs.org>
4148
4149         * init.c: Make sure the options are in alphabetic order!
4150
4151         * host.c (lookup_host): Merge lookup_host_passive and lookup_host
4152         after all -- having both would result in some code duplication.
4153         (lookup_host): Set hints.ai_family to AF_INET if ipv4_only is
4154         requested.  Likewise, set it to AF_INET6 for ipv6_only.  Specify
4155         AI_ADDRCONFIG where available.
4156         (lookup_host): New flag LH_REFRESH that specifies that a cached
4157         entry for HOST should be refreshed.
4158         (cache_query): New function.
4159         (cache_store): Ditto.
4160         (cache_remove): Ditto.
4161         (forget_host_lookup): No longer necessary, replaced with static
4162         function cache_remove.
4163
4164 2003-11-14  Hrvoje Niksic  <hniksic@xemacs.org>
4165
4166         * main.c: Enable -4 and -6 only if IPv6 is enabled.
4167
4168 2003-11-14  Hrvoje Niksic  <hniksic@xemacs.org>
4169
4170         * connect.c (register_transport): Renamed from register_extended.
4171         Explain the intended usage.
4172
4173 2003-11-14  Hrvoje Niksic  <hniksic@xemacs.org>
4174
4175         * url.c (uri_merge): Merging "foo" and "bar" should result in
4176         "bar", not in "foo/bar".
4177         (path_simplify): Don't remove empty path elements; don't
4178         special-case leading slash.
4179         (path_simplify): Don't swallow ".."'s at the beginning of string.
4180         E.g. simplify "foo/../../bar" as "../bar", not as "bar".
4181         (append_uri_pathel): Defang ".." path element upon encountering
4182         it.
4183
4184 2003-11-13  Hrvoje Niksic  <hniksic@xemacs.org>
4185
4186         * http.c (persistent_available_p): Don't attempt to talk to two
4187         different SSL sites over the same secure connection.
4188
4189 2003-11-13  Hrvoje Niksic  <hniksic@xemacs.org>
4190
4191         * http.c (gethttp): Ditto.
4192
4193         * ftp.c (getftp): Use retryable_socket_connect_error instead of
4194         CONNECT_ERROR.
4195
4196         * wget.h (CONNECT_ERROR): Removed.
4197
4198         * connect.c (retryable_socket_connect_error): New function instead
4199         of unsupported_socket_family_error.
4200
4201 2003-11-13  Hrvoje Niksic  <hniksic@xemacs.org>
4202
4203         * wget.h (CONNECT_ERROR): Use it.
4204
4205         * connect.c (unsupported_socket_family_error): New function.
4206
4207 2003-11-13  Hrvoje Niksic  <hniksic@xemacs.org>
4208
4209         * connect.c (bind_local): Renamed bindport to bind_local; return
4210         the socket directly.  Updated callers.
4211         (accept_connection): Renamed acceptport to accept_connection;
4212         return the created socket directly.  Updated callers.
4213
4214 2003-11-13  Hrvoje Niksic  <hniksic@xemacs.org>
4215
4216         * init.c (defaults): Turn on opt.ipv4_only if we're compiling with
4217         IPv6, and AI_ADDRINFO is not available, and AF_INET6 sockets can't
4218         be created.
4219
4220 2003-11-13  Hrvoje Niksic  <hniksic@xemacs.org>
4221
4222         * host.c (lookup_host): Document the fact that the addresses are
4223         returned in order.
4224
4225 2003-11-12  Hrvoje Niksic  <hniksic@xemacs.org>
4226
4227         * utils.c: Use limits.h only where available.
4228
4229         * hash.c: Use INVALID_PTR and INVALID_PTR_BYTE.  Include limits.h.
4230
4231 2003-11-11  Hrvoje Niksic  <hniksic@xemacs.org>
4232
4233         * main.c: Added options --inet4-only and --inet6-only.
4234
4235 2003-11-11  Hrvoje Niksic  <hniksic@xemacs.org>
4236
4237         * host.c (host_errstr): Use the more standard message "Unknown
4238         host".
4239
4240 2003-11-10  Hrvoje Niksic  <hniksic@xemacs.org>
4241
4242         * connect.c (connect_to_host): Use that flag to decide whether to
4243         re-resolve the host name.
4244
4245         * host.c (struct address_list): Added a flag that maintains
4246         whether the connection worked at some point.
4247
4248 2003-11-10  Hrvoje Niksic  <hniksic@xemacs.org>
4249
4250         * host.c (lookup_host): Special-case the numeric addresses only in
4251         the non-IPv6 case.
4252
4253 2003-11-10  Hrvoje Niksic  <hniksic@xemacs.org>
4254
4255         * connect.c (resolve_bind_address): Call lookup_host_passive.
4256         Make sure that opt.bind_address is resolved only once.
4257
4258         * host.c (lookup_host_passive): New function, handles "passive"
4259         lookups.
4260         (lookup_host): Remove the passive flags.  Remove the
4261         family-related flags -- use ip_default_family instead.
4262
4263 2003-11-09  Hrvoje Niksic  <hniksic@xemacs.org>
4264
4265         * html-url.c: Get URLs from <object data="...">.
4266
4267 2003-11-09  Hrvoje Niksic  <hniksic@xemacs.org>
4268
4269         * main.c (option_data): Specify the command to use for --mirror.
4270
4271 2003-11-08  Hrvoje Niksic  <hniksic@xemacs.org>
4272
4273         * cookies.c (cookie_handle_set_cookie): Specify exact match for
4274         unspecified domains.
4275
4276 2003-11-08  Hrvoje Niksic  <hniksic@xemacs.org>
4277
4278         * main.c (main): Removed one-letter options `-C', `-g', `-G', and
4279         `-s'.
4280
4281 2003-11-08  Hrvoje Niksic  <hniksic@xemacs.org>
4282
4283         * main.c (main): Add --dont-remove-listing for backward
4284         compatibility with previous versions.
4285         (print_help): Fix typo, spotted by Dennis Smit.
4286
4287 2003-11-08  Gisle Vanem  <giva@bgnett.no>
4288
4289         * ftp-basic.c: Support Windows-2000 ftp servers. Win-2000 *is*
4290         Win-NT 5.0 so calling it ST_WINNT is okay I guess.
4291
4292 2003-11-08  Hrvoje Niksic  <hniksic@xemacs.org>
4293
4294         * progress.c (update_speed_ring): Clear the speed ring when the
4295         download stalls.
4296
4297         * retr.c (get_contents): Specify 0.95s read timeout, so that the
4298         progress gauge can be updated even when data arrives very slowly
4299         or stalls.
4300
4301 2003-11-08  Hrvoje Niksic  <hniksic@xemacs.org>
4302
4303         * utils.c (wtimer_allocate): Bless the use of wtimer_read on a
4304         timer that has merely been allocated because get_contents() does
4305         that.
4306         (wtimer_update): Abort if the timer is not initialized.
4307
4308 2003-11-08  Hrvoje Niksic  <hniksic@xemacs.org>
4309
4310         * retr.c (get_contents): Pass the timer to limit_bandwidth().
4311
4312         * utils.c (wtimer_update): New function instead of wget_elapsed;
4313         just update the timer, but don't return anything.
4314         (wtimer_read): Read and return the last known value of the timer.
4315
4316 2003-11-08  Hrvoje Niksic  <hniksic@xemacs.org>
4317
4318         * http.c (persistent_available_p): Instead of matching all the
4319         addresses of HOST and last host, determine the peer's IP address
4320         with socket_ip_address and see if that address is one of those
4321         HOST resolves to.
4322
4323         * host.c (address_list_match_all): Removed.
4324         (address_list_find): New function, finds an IP address in the
4325         address list.
4326
4327         * ftp.c (ftp_do_pasv): Get the peer's address here, and pass it to
4328         ftp_epsv so it doesn't need to call getpeername.
4329
4330         * ftp-basic.c (ftp_port): Use socket_ip_address instead of
4331         getpeername.
4332         (ftp_lprt): Ditto.
4333
4334         * connect.c (socket_ip_address): Replaces conaddr, generalized to
4335         either get peer's or local address.
4336         (sockaddr_get_data): Made local to this file.
4337
4338 2003-11-08  Hrvoje Niksic  <hniksic@xemacs.org>
4339
4340         * hash.c (HASH_POSITION): Explicitly accept the hash function.
4341         (grow_hash_table): Extract ht->hash_function outside the loop.
4342         (hash_table_remove): Ditto.
4343         (hash_table_clear): Fill entries with 0xff to clear them.
4344         (hash_table_remove): Mark entries as deleted with the correct
4345         marker.
4346
4347 2003-11-08  Hrvoje Niksic  <hniksic@xemacs.org>
4348
4349         * http.c (persistent_available_p): No reason for the host lookup
4350         to be silent -- it's a lookup like any other.
4351
4352 2003-11-08  Hrvoje Niksic  <hniksic@xemacs.org>
4353
4354         * connect.c (register_extended): Check that fd >= 0.
4355
4356 2003-11-07  Hrvoje Niksic  <hniksic@xemacs.org>
4357
4358         * connect.c (LAZY_RETRIEVE_INFO): Set LAST_INFO.
4359
4360 2003-11-07  Hrvoje Niksic  <hniksic@xemacs.org>
4361
4362         * hash.c (NON_EMPTY): Use the all-bit-set value as the marker that
4363         the field is empty.  This allows NULL pointer and 0 value to be
4364         used as keys, which is necessary for the connect.c code to work
4365         when fd==0.
4366         (hash_table_new): Fill mappings with 0xff.
4367         (grow_hash_table): Ditto.
4368
4369 2003-11-07  Hrvoje Niksic  <hniksic@xemacs.org>
4370
4371         * url.c (url_parse): Allow empty ports.
4372
4373 2003-11-07  Hrvoje Niksic  <hniksic@xemacs.org>
4374
4375         * main.c (print_help): Break the help string into multiple chunks.
4376         (cmdline_option): New option handler OPT_FUNCALL.  Generalized
4377         HANDLE_CMD to generic DATA.
4378         (option_data): Use the new OPT_FUNCALL feature.
4379
4380 2003-11-06  Hrvoje Niksic  <hniksic@xemacs.org>
4381
4382         * log.h: Declare log_init, log_close, and
4383         log_request_redirect_output here.
4384
4385 2003-11-05  Dennis Smit  <ds@nerds-incorporated.org>
4386
4387         * main.c: (main): added --preserve-permissions option.
4388
4389         * ftp.c (ftp_retrieve_list): added support for
4390         --preserve-permissions option.
4391
4392         * init.c: added support for --preserve-permission option.
4393
4394         * option.h: added support for --preserve-permission option.
4395
4396 2003-11-06  Hrvoje Niksic  <hniksic@xemacs.org>
4397
4398         * main.c (init_switches): New function.  Convert option_data to
4399         long_options and short_options, which can be fed to getopt_long.
4400         (main): Execute command-line options by consulting option_data.
4401
4402 2003-11-06  Hrvoje Niksic  <hniksic@xemacs.org>
4403
4404         * gen_sslfunc.c (ssl_read): Implement a more correct check for
4405         EINTR.
4406         (ssl_write): Ditto.
4407         (init_ssl): Use a global SSL context.
4408
4409 2003-11-06  Hrvoje Niksic  <hniksic@xemacs.org>
4410
4411         * connect.c (xclose): Free INFO even if it doesn't provide a
4412         closer.
4413
4414 2003-11-06  Hrvoje Niksic  <hniksic@xemacs.org>
4415
4416         * connect.c: Updated all callers of
4417         iread/ssl_iread/iwrite/ssl_iwrite to use xread and xwrite instead.
4418
4419         * rbuf.h (struct rbuf): Removed the SSL member because SSL is
4420         handled automatically by xread.
4421
4422         * hash.c (ptrhash): Made private.
4423         (ptrcmp): Ditto.
4424         (inthash): Removed.
4425
4426         * connect.c (select_fd): Don't set errno, leave it to the caller.
4427
4428         * gen_sslfunc.c (connect_ssl): Use register_extended to register
4429         SSL callbacks for communication with SSL-enabled endpoints.
4430         (ssl_read): New function.
4431         (ssl_write): Ditto.
4432         (ssl_poll): Ditto.
4433         (ssl_close): Ditto.
4434
4435         * connect.c (register_extended): New function -- register
4436         callbacks for basic socket operations.
4437         (xread): Ditto.
4438         (xwrite): Ditto.
4439         (xclose): Ditto.
4440         (sock_read): New function, default implementation for reading.
4441         (sock_write): Ditto for writing.
4442         (sock_poll): Ditto for polling.
4443         (sock_close): Ditto for closing.
4444
4445 2003-11-05  Hrvoje Niksic  <hniksic@xemacs.org>
4446
4447         * connect.c (bindport): Fix compilation under pre-C99 compilers.
4448
4449 2003-11-05  Hrvoje Niksic  <hniksic@xemacs.org>
4450
4451         * connect.c (connect_to_ip): More compact error checking.
4452         (bindport): Don't treat failed setsockopt as a fatal error.
4453
4454 2003-11-05  Hrvoje Niksic  <hniksic@xemacs.org>
4455
4456         * connect.c (resolve_bind_address): Use a more accurate error
4457         message -- we're not binding to ANY, we're disabling bind
4458         altogether.
4459
4460 2003-11-05  Hrvoje Niksic  <hniksic@xemacs.org>
4461
4462         * cookies.c (save_cookies_mapper): Respect the setting of
4463         keep-session-cookies.
4464         (cookie_jar_load): Import session cookies.
4465         Based on code submitted by Nicolas Schodet.
4466
4467         * utils.c (datetime_str): Use information in TM when it's
4468         non-NULL.
4469
4470         * main.c (main): New option `--keep-session-cookies'.
4471
4472 2003-11-04  Hrvoje Niksic  <hniksic@xemacs.org>
4473
4474         * Makefile.in (realclean): Delete config.h.in.
4475
4476 2003-11-04  Hrvoje Niksic  <hniksic@xemacs.org>
4477
4478         * config-post.h: New file, included from now autogenerated
4479         config.h.in.
4480
4481 2003-11-04  Hrvoje Niksic  <hniksic@xemacs.org>
4482
4483         * progress.c (progress_handle_sigwinch): Don't call
4484         determine_screen_width() from the signal handler.  Instead, just
4485         set a volatile variable.
4486         (bar_create): Check whether SIGWINCH was received.
4487         (bar_update): Ditto.
4488
4489         * sysdep.h: Define SYSTEM_FNMATCH only if HAVE_FNMATCH_H is true.
4490
4491 2003-11-03  Hrvoje Niksic  <hniksic@xemacs.org>
4492
4493         * utils.c (xsleep): New function.  Uses nanosleep where available,
4494         resuming sleeps interrupted by signals.  Updated callers of sleep
4495         and usleep to use xsleep.
4496
4497 2003-11-03  Hrvoje Niksic  <hniksic@xemacs.org>
4498
4499         * ftp-basic.c (ftp_login): Remove shadowing (and bogus)
4500         declaration of SEED.
4501
4502 2003-11-03  Hrvoje Niksic  <hniksic@xemacs.org>
4503
4504         * log.c (logvprintf): Documented better.  Renamed to
4505         log_vprintf_internal to avoid confusion with the public API
4506         functions logprintf and logputs.
4507
4508 2003-11-03  Hrvoje Niksic  <hniksic@xemacs.org>
4509
4510         * wget.h (N_): Don't parenthesize argument.
4511
4512 2003-11-03  Hrvoje Niksic  <hniksic@xemacs.org>
4513
4514         * host.h (ADDRESS_IPV4_DATA): Don't take the address of in.s_addr
4515         because that doesn't work on machines that define it as bitfield.
4516
4517 2003-11-03  Hrvoje Niksic  <hniksic@xemacs.org>
4518
4519         * connect.c (select_fd): Generalize the third argument into WAIT,
4520         so that the caller can request waiting for both read and write.
4521         Updated callers.
4522
4523 2003-11-02  Hrvoje Niksic  <hniksic@xemacs.org>
4524
4525         * html-url.c (cleanup_html_url): Destroy the hash tables, don't
4526         just call free on them.
4527         (init_interesting): Use hash_table_put instead of string_set_add
4528         because we don't need the strdup that the latter function
4529         performs.
4530
4531         * init.c (cleanup): Don't pass NULL to cookie_jar_delete.
4532
4533         * xmalloc.c (xfree_real): Abort when passed a NULL pointer.
4534         (xfree_debug): Print at the file and line of the offending call to
4535         free.
4536
4537 2003-11-02  Hrvoje Niksic  <hniksic@xemacs.org>
4538
4539         * wget.h: Retired the `boolean' type.  Moved the DEFAULT_LOGFILE
4540         define to log.h.  Moved the INFINITE_RECURSION define to recur.h.
4541
4542         * xmalloc.h: Renamed FREE_MAYBE to xfree_null and moved the
4543         definition from wget.h to xmalloc.h.
4544
4545 2003-11-02  Hrvoje Niksic  <hniksic@xemacs.org>
4546
4547         * html-parse.c (decode_entity): New function; split the decoding
4548         of entities here.
4549         (convert_and_copy): Use it to decode entities.
4550         (decode_entity): Handle the &apos entity.
4551         (decode_entity): Don't decode Latin 1 numeric entities.  Don't
4552         decode &#0.
4553
4554 2003-11-01  Hrvoje Niksic  <hniksic@xemacs.org>
4555
4556         * ftp-opie.c (calculate_skey_response): Use uint32_t instead of
4557         `unsigned long' for the cheksum array.  Document the function.
4558
4559 2003-11-01  Hrvoje Niksic  <hniksic@xemacs.org>
4560
4561         * connect.c (acceptport): Don't call select_fd when timeout is not
4562         requested.
4563
4564 2003-11-01  Hrvoje Niksic  <hniksic@xemacs.org>
4565
4566         * host.c: Removed the ip_default_family global variable.
4567
4568         * host.c (lookup_host): Document the function.  Fixed declaration
4569         of VEC.
4570
4571 2003-10-31  Hrvoje Niksic  <hniksic@xemacs.org>
4572
4573         * various: Use new macros xnew, xnew0, xnew_array, and xnew0_array
4574         in various places.
4575
4576 2003-10-31  Hrvoje Niksic  <hniksic@xemacs.org>
4577
4578         * wget.h: Move declarations of malloc and logging code to
4579         xmalloc.h and log.h respectively to unclutter this file.
4580         (STRDUP_ALLOCA): Made it side-effect free.
4581
4582         * xmalloc.h: New files.  Define macros xnew, xnew0, xnew_array,
4583         and xnew0_array.
4584
4585         * xmalloc.c: New file.  Move the xmalloc routines here.
4586
4587 2003-10-31  Hrvoje Niksic  <hniksic@xemacs.org>
4588
4589         * connect.c (sockaddr_set_data): Remove the broken code that
4590         checked for NULL address.
4591
4592 2003-10-31  Hrvoje Niksic  <hniksic@xemacs.org>
4593
4594         * host.c (address_list_from_single): Removed.
4595         (address_list_from_ipv4_addresses): Renamed from
4596         address_list_from_vector.
4597
4598 2003-10-31  Hrvoje Niksic  <hniksic@xemacs.org>
4599
4600         * sysdep.h (CLOSE): Don't call close on file descriptors less than
4601         0, i.e. on uncreated sockets.
4602
4603         * connect.c (resolve_bind_address): Work on struct sockaddr
4604         directly.
4605         (connect_to_host): Replacement for connect_to_many.  Resolve HOST
4606         and connect to any of its addresses.  If we can't connect and the
4607         host name lookup was cached, try to resolve it again.  This should
4608         fix problems with hosts behind dynamic DNS.  Updated all callers.
4609         (connect_to_ip): Replacement for connect_to_one.  Removed SILENT;
4610         added the argument PRINT instead.  Updated all callers.
4611         (set_connection_host_name): Removed.
4612
4613         * host.c (address_list_address_at): New function instead of
4614         address_list_copy_one. It returns a pointer to ip_address *, so
4615         it's not necessary to copy the data.
4616         (address_list_cached_p): New function.
4617         (forget_host_lookup): Ditto.
4618
4619         * connect.c: Got rid of the MSOCK global variable.  Made bindport
4620         return the local socket it creates.  Added a new argument to
4621         acceptport, the socket to call accept on.  Updated callers.
4622         (closeport): Removed.
4623
4624         * connect.c: Moved the sockaddr code from host.c to this file,
4625         because most of that stuff is used for connecting, and has nothing
4626         to do with host names anyway.
4627         (sockaddr_set_data, sockaddr_get_data): New functions, replace the
4628         old sockaddr_set_address, sockaddr_set_port, sockaddr_get_address,
4629         and sockaddr_get_port.
4630
4631 2003-10-30  Hrvoje Niksic  <hniksic@xemacs.org>
4632
4633         * sysdep.h: Use `S >= 8' rather than `S == 8' when looking for
4634         large integers.
4635
4636 2003-10-30  Hrvoje Niksic  <hniksic@xemacs.org>
4637
4638         * url.c (append_uri_pathel): New argument ESCAPED_P that says
4639         whether [B, E) is to be treated as URL-escaped or not.  If
4640         ESCAPED_P is false, don't unescape the region.
4641         (url_file_name): u->file is not URL-escaped.
4642
4643 2003-10-30  Hrvoje Niksic  <hniksic@xemacs.org>
4644
4645         * retr.c (retrieve_from_file): Use retrieve_tree for
4646         page-requisites.
4647
4648         * main.c (main): Don't define opt.recursive when -p is used.
4649         Instead, make sure that recursion is used for HTTP in that case.
4650
4651 2003-10-29  Hrvoje Niksic  <hniksic@xemacs.org>
4652
4653         * host.h: Defined accessors for elements of ip_address.  Updated
4654         all callers.
4655         (address_list_match_all): Use memcmp in the non-IPv6 case.
4656
4657         * wget.h (CONNECT_ERROR): Don't retry connecting if connect()
4658         returned EAFNOSUPPORT.
4659
4660 2003-10-27  Mauro Tortonesi <mauro@deepspace6.net>
4661
4662         * connect.h: changed bindport prototype and added the related
4663         BIND_ON_IPV4_ONLY and BIND_ON_IPV6_ONLY flags.
4664
4665         * connect.c: changed bindport and resolve_bind_address to allow
4666         protocol-version specific DNS resolution. modified conaddr,
4667         acceptport and connect_to_one to make use of struct
4668         sockaddr_storage and of the new ip_address structure.
4669
4670         * ftp-basic.c: added LPRT/LPSV (RFC1639) support, refactored
4671         PORT/PASV (RFC959) and EPRT/EPSV (RFC2428) support code.
4672
4673         * ftp.c: added the ftp_do_port and ftp_do_pasv functions to
4674         handle FTP over IPv6.
4675
4676         * ftp.h: changed prototype of ftp_epsv and added prototypes for
4677         ftp_lpsv, ftp_lprt and ftp_eprt.
4678
4679         * host.c: renamed the
4680         wget_sockaddr_set_address and wget_sockaddr_get_addr, and
4681         wget_sockaddr_{s,g}et_port couples to sockaddr_{s,g}et_address and
4682         sockaddr_{g,s}et_port respectively.  changed
4683         address_list_match_all, address_list_from_addrinfo sockaddr_len,
4684         pretty_print_address, lookup_host, sockaddr_{s,g}et_address and
4685         sockaddr_{g,s}et_port to make use of struct sockaddr_storage and
4686         of the new ip_address structure.  removed map_ipv4_to_ip and
4687         map_ip_to_ipv4.
4688
4689         * host.h: redefined structure ip_address and removed structure
4690         wget_sockaddr.
4691
4692 2003-10-26  Hrvoje Niksic  <hniksic@xemacs.org>
4693
4694         * sysdep.h: Include inttypes.h where available.
4695
4696         * host.c: Switch from u_int32_t to uint32_t.
4697
4698 2003-10-26  Hrvoje Niksic  <hniksic@xemacs.org>
4699
4700         * netrc.c (parse_netrc): Reset the QUOTE flag after the closing
4701         quote.
4702
4703 2003-10-25  Hrvoje Niksic  <hniksic@xemacs.org>
4704
4705         * url.c (is_valid_ipv6_address): Reformat to GNU coding style.
4706         Use enums for NS_IN* constants.  Use ISXDIGIT.
4707
4708         * convert.c (construct_relative): Document better how the function
4709         works.
4710
4711 2003-10-23  Hrvoje Niksic  <hniksic@xemacs.org>
4712
4713         * config.h.in: Deploy preprocessor magic to avoid Ultrix's
4714         <netdb.h> include <bitypes.h> which defines its own u_int32_t.
4715         Reported by Bernhard Simon.
4716
4717 2003-10-23  Hrvoje Niksic  <hniksic@xemacs.org>
4718
4719         * version.c: Bump version.
4720
4721 2003-10-23  Hrvoje Niksic  <hniksic@xemacs.org>
4722
4723         * url.c: Ditto.
4724
4725         * html-parse.c (advance_declaration): Don't use trailing comma in
4726         enum because older compilers don't support it.
4727
4728         * utils.c: Don't redefine HAVE_SIGSETJMP.
4729
4730 2003-10-16  Hrvoje Niksic  <hniksic@xemacs.org>
4731
4732         * convert.c (construct_relative): Don't handle absolute files
4733         specially -- for example, -P/tmp/foo shouldn't imply that
4734         converted files must refer to "/tmp/foo/..."!
4735
4736 2003-10-15  Hrvoje Niksic  <hniksic@xemacs.org>
4737
4738         * http.c: Consider status 307 a valid redirect.
4739
4740 2003-10-15  Philip Stadermann  <philip.stadermann@credativ.de>
4741
4742         * ftp.c (ftp_retrieve_glob): Correctly loop through the list whose
4743         elements might have been deleted.
4744
4745 2003-10-13  Hrvoje Niksic  <hniksic@xemacs.org>
4746
4747         * html-url.c (tag_handle_meta): Set the Refresh link to expect
4748         HTML.
4749         (append_one_url): Renamed to append_url.
4750
4751 2003-10-13  Hrvoje Niksic  <hniksic@xemacs.org>
4752
4753         * sysdep.h: Only define u_int32_t.
4754
4755 2003-10-11  Hrvoje Niksic  <hniksic@xemacs.org>
4756
4757         * utils.c (large_int_to_string): Use snprintf() to print the
4758         number.  This will work even on systems where libc doesn't
4759         understand %lld, but the compiler does, because it will use our
4760         snprintf replacement.
4761
4762         * init.c (parse_bytes_helper): New function.
4763         (cmd_bytes): Use it to parse bytes, but cast the result to long.
4764         (cmd_bytes_large): Ditto, but store the result to LARGE_INT.  Used
4765         for --quota so that --quota=10G works even on machines without
4766         long long.
4767
4768         * options.h (struct options): Declare quota as LARGE_INT.
4769
4770         * retr.c (downloaded_exceeds_quota): Removed.
4771         (downloaded_increase): Ditto.
4772         (total_downloaded_bytes): New variable, replaces opt.downloaded,
4773         which was the wrong place for it anyway.  Updated callers of
4774         downloaded_exceeds_quota and downloaded_increase to check this
4775         variable directly.
4776
4777         * sysdep.h: Get rid of VERY_LONG_TYPE.  Use LARGE_INT for the same
4778         purpose, defined as `long', `long long' or `double', depending on
4779         size of long and whether long long is available.
4780
4781 2003-10-11  Hrvoje Niksic  <hniksic@xemacs.org>
4782
4783         * sysdep.h: Also check size of short for int32_t.
4784
4785 2003-10-11  Hrvoje Niksic  <hniksic@xemacs.org>
4786
4787         * host.c (lookup_host): Use u_int32_t to store the result of
4788         inet_addr().  That removes the need for offset fiddling, caring
4789         about endian-ness, etc.
4790
4791         * sysdep.h: Define int32_t and u_int32_t if not available.
4792
4793 2003-10-11  Hrvoje Niksic  <hniksic@xemacs.org>
4794
4795         * ftp-basic.c (ftp_epsv): Use socklen_t * as the third argument to
4796         getpeername.
4797
4798         * config.h.in: Define socklen_t stub.
4799
4800         * host.c (sockaddr_len): Return socklen_t.
4801
4802         * connect.c (conaddr): Use socklen_t as the third argument to
4803         accept, getsockname, and connect.
4804
4805 2003-10-10  Hrvoje Niksic  <hniksic@xemacs.org>
4806
4807         * recur.c (retrieve_tree): Don't descend into documents that are
4808         not expected to contain HTML, regardless of their content-type.
4809
4810         * html-url.c (tag_url_attributes): Record which attributes are
4811         supposed to yield HTML links that can be followed.
4812         (tag_find_urls): Propagate that information to the caller through
4813         struct urlpos.
4814
4815 2003-10-10  Hrvoje Niksic  <hniksic@xemacs.org>
4816
4817         * hash.c (find_mapping): Return the next available mapping when
4818         the key is not found, not NULL.
4819         (hash_table_put): Use find_mapping to find the storage for the new
4820         data.
4821         (hash_table_put): Grow the table before exceeding maximum
4822         fullness, not afterwards.
4823
4824 2003-10-10  Hrvoje Niksic  <hniksic@xemacs.org>
4825
4826         * hash.c (hash_table_new): Slightly change the meaning of the
4827         first parameter.  Instead of being the minimum initial size, it is
4828         now the minimum number of items that the hash table can take
4829         without needing to resize.
4830
4831 2003-10-09  Hrvoje Niksic  <hniksic@xemacs.org>
4832
4833         * html-url.c (init_interesting): Initialize interesting_tags and
4834         interesting_attributes as hash tables.  This simplifies the code
4835         immensely because hash tables handle allocation and remove
4836         duplicates automatically.
4837         (find_tag): Removed.
4838         (collect_tags_mapper): Instead of calling find_tag, simply get the
4839         entry from interesting_tags hash table, which is both simpler and
4840         faster.
4841
4842 2003-10-09  Hrvoje Niksic  <hniksic@xemacs.org>
4843
4844         * hash.c (hash_table_get): Declare hash-table argument as const.
4845         (find_mapping): Ditto.
4846         (hash_table_get_pair): Ditto.
4847         (hash_table_contains): Ditto.
4848         (hash_table_count): Ditto.
4849
4850 2003-10-08  Hrvoje Niksic  <hniksic@xemacs.org>
4851
4852         * html-url.c (get_urls_html): Parse the appropriate flags to
4853         html-parse.c.
4854
4855         * html-parse.c (map_html_tags): Accept FLAGS from the caller
4856         instead of examining OPT.
4857
4858 2003-10-08  Hrvoje Niksic  <hniksic@xemacs.org>
4859
4860         * html-url.c (find_tag): Switch to binary search.
4861
4862 2003-10-08  Hrvoje Niksic  <hniksic@xemacs.org>
4863
4864         * main.c (print_help): Fix typo; stured -> stored.
4865
4866 2003-10-08  Hrvoje Niksic  <hniksic@xemacs.org>
4867
4868         * getopt.c: Add definitions of getopt_long and getopt_long_only.
4869
4870 2003-10-08  Hrvoje Niksic  <hniksic@xemacs.org>
4871
4872         * config.h.in: Renamed DEBUG to ENABLE_DEBUG.  ENABLE_DEBUG is, I
4873         think, a better name, because it implies that debugging output is
4874         merely possible, not "on by default", as might be construed from
4875         just DEBUG.
4876
4877 2003-10-08  Hrvoje Niksic  <hniksic@xemacs.org>
4878
4879         * ftp.c (has_insecure_name_p): Define it here.
4880
4881         * utils.c (has_wildcards_p): Define it here.
4882
4883         * sysdep.h: Declare fnmatch-related macros here, if not using
4884         system fnmatch().  Update .c files to not declare fnmatch.h
4885         directly.
4886
4887         * cmpt.c (fnmatch): Moved here.  Use it only under non-GNU libc.
4888
4889 2003-10-08  Hrvoje Niksic  <hniksic@xemacs.org>
4890
4891         * getopt.c: Newer version, imported from Free libit.
4892
4893 2003-10-07  Hrvoje Niksic  <hniksic@xemacs.org>
4894
4895         * cookies.c (struct cookie): Remove unused backpointer to cookie
4896         jar.
4897
4898 2003-10-07  Hrvoje Niksic  <hniksic@xemacs.org>
4899
4900         * cmpt.c (memmove): Comment out, since it's no longer used.
4901
4902         * cookies.c (cookie_jar_generate_cookie_header): Allocate room for
4903         chains in one pass.
4904         (find_chains_of_host): Assume that the caller has allocated DEST
4905         to be sufficiently large to take all the data.
4906         (eliminate_dups): Run through the array and eliminate dups on the
4907         fly instead of using memmove.
4908         (cookie_jar_process_set_cookie): Free cookie->domain before
4909         re-setting it.
4910
4911 2003-10-05  Gisle Vanem  <giva@bgnett.no>
4912
4913         * mswindows.c (set_sleep_mode): Fix type of
4914         _SetThreadExecutionState.
4915
4916 2003-10-05  Hrvoje Niksic  <hniksic@xemacs.org>
4917
4918         * utils.c (file_size): Return -1 if fopen() returns NULL.  Prior
4919         to this patch, wget --post-file=nosuchfile dumped core.
4920
4921 2003-10-04  Gisle Vanem  <giva@bgnett.no>
4922
4923         * mswindows.c (run_with_timeout): Use WaitForSingleObject to wait
4924         for thread termination.
4925
4926 2003-10-04  Hrvoje Niksic  <hniksic@xemacs.org>
4927
4928         * log.c: Use `...' in function definitions; ansi2knr will convert
4929         them to va_dcl.  This allowed removal of the ugly VA_START_1 and
4930         VA_START_2 macros.
4931
4932 2003-10-03  Gisle Vanem  <giva@bgnett.no>
4933
4934         * connect.c: And don't include them here.
4935
4936         * mswindows.h: Include winsock headers here.
4937
4938 2003-10-03  Hrvoje Niksic  <hniksic@xemacs.org>
4939
4940         * html-parse.c (convert_and_copy): Move variable declarations
4941         before statements.
4942
4943 2003-10-02  Gisle Vanem  <giva@bgnett.no>
4944         
4945         * mswindows.c (run_with_timeout): For Windows: Run the 'fun' in a
4946         thread via a helper function. Continually query the thread's
4947         exit-code until finished or timed out.
4948
4949 2003-10-02  Hrvoje Niksic  <hniksic@xemacs.org>
4950
4951         * wget.h (XMALLOC_ARRAY): Removed.
4952         (ALLOCA_ARRAY): Ditto.
4953
4954         * html-parse.c: Renamed alloca_p to resized.
4955         (GROW_ARRAY): Renamed DO_REALLOC_FROM_ALLOCA to GROW_ARRAY and
4956         returned it to html-parse.c, since nothing else was using it.
4957
4958 2003-10-02  Hrvoje Niksic  <hniksic@xemacs.org>
4959
4960         * retr.c (retrieve_url): Initialize DUMMY storage for DT.  Caught
4961         by valgrind.
4962
4963 2003-10-02  Hrvoje Niksic  <hniksic@xemacs.org>
4964
4965         * html-parse.c (convert_and_copy): Handle numeric entities in
4966         hexadecimal, &#xHH.
4967         (convert_and_copy): Copy the contents directly to the pool without
4968         a stack-allocated intermediary.
4969
4970 2003-10-02  Hrvoje Niksic  <hniksic@xemacs.org>
4971
4972         * utils.c (alarm_set): New function; use either setitimer or alarm
4973         to set up the alarm.
4974         (alarm_cancel): New function; cancel the alarm set up by
4975         alarm_set.
4976         (run_with_timeout): Use them.
4977
4978 2003-10-01  Hrvoje Niksic  <hniksic@xemacs.org>
4979
4980         * url.c (url_parse): Don't leak memory when a reencoded URL turns
4981         out to be invalid.
4982
4983         * url.c (parse_errors): Mark error messages for translation.
4984         (url_error): Translate error messages returned to the caller.
4985
4986 2003-10-01  Hrvoje Niksic  <hniksic@xemacs.org>
4987
4988         * ftp.c (ftp_loop_internal): Initialize TMRATE to NULL to shut up
4989         the compiler.
4990
4991 2003-09-26  Gisle Vanem  <giva@bgnett.no>
4992
4993         * src/mswindows.c: Added ws_percenttitle() showing progress in the
4994         window titlebar. Called from retr.c. Secured ws_mypath().
4995
4996         * windows/config.h.ms: alloca() prototype not needed.  Removed
4997         "#undef ENABLE_NLS"; should be in Makefile IMHO. Moved
4998         WGET_USE_STDARG from mswindows.h to config.ms.h because of #ifdef
4999         in log.c. (MSVC's vararg.h and stdarg.h are incompatible).
5000
5001 2003-09-29  Aaron Hawley <Aaron.Hawley@uvm.edu>
5002
5003         * ftp.c (getftp): --spider option should now work with FTP
5004         downloads.
5005         (ftp_loop_internal): quiet reports and calculations of downloads
5006         when --spider option set, nor try deleting when --delete-after
5007         also set.
5008         (ftp_loop): --spider will skip HTML-ification of .listing file.
5009
5010 2003-09-26  Gisle Vanem  <giva@bgnett.no>
5011
5012         * mswindows.c (read_registry): Removed.
5013         (set_sleep_mode): New function.
5014         (windows_main_junk): Call it.
5015
5016 2003-09-26  Gisle Vanem  <giva@bgnett.no>
5017
5018         * mswindows.c (read_registry): Fix invocation of registry
5019         functions.
5020
5021         * mswindows.c (read_registry): Condition definitions of sleep and
5022         usleep with not HAVE_SLEEP and HAVE_USLEEP respectively.  Define
5023         HAVE_SLEEP and HAVE_USLEEP under __DMC__.
5024
5025 2003-09-24  Hrvoje Niksic  <hniksic@xemacs.org>
5026
5027         * url.c (url_escape_1): Revert unintentional change to lowercase
5028         xdigit escapes.
5029         (url_escape_dir): Document that this function depends on the
5030         output of url_escape_1.
5031
5032 2003-09-23  Hrvoje Niksic  <hniksic@xemacs.org>
5033
5034         * progress.c (create_image): Print the current ETA if we're done
5035         with the download.
5036         (create_image): Change '-' display char to '+' in the progress bar.
5037
5038         * Makefile.in (clean): Remove .libs.
5039
5040 2003-09-23  Hrvoje Niksic  <hniksic@xemacs.org>
5041
5042         * cookies.c (struct cookie): New flag domain_exact.
5043         (update_cookie_field): Skip leading dot in domain.
5044         (find_matching_chains): Match numeric addresses exactly; don't
5045         needlessly copy HOST to the stack.
5046         (matching_cookie): Added argument HOST.  If cookie->domain_exact
5047         is set, check that HOST is equal to cookie->domain.
5048         (cookie_jar_load): Only use TAB as delimiter.  Document the
5049         meaning of DOMAIN-FLAG.  Skip leading dot in domain.
5050         (cookie_jar_load): Don't ignore DOMAIN-FLAG -- instead, set
5051         domain_exact to true if DOMAIN-FLAG is false.
5052         (save_cookies_mapper): If domain_exact is false, prepend the
5053         domain with dot, like Mozilla does.
5054
5055 2003-09-22  Hrvoje Niksic  <hniksic@xemacs.org>
5056
5057         * progress.c (create_image): Print the initial part of the
5058         download with '-' characters, analogous to how dot progress prints
5059         the initial part with ','.
5060
5061         * hash.c (ptrhash): New function.
5062         (ptrcmp): Ditto.
5063         (hash_table_new): Default to identity hash table.
5064
5065 2003-09-22  Hrvoje Niksic  <hniksic@xemacs.org>
5066
5067         * safe-ctype.h (_sch_test): The cast of BIT to unsigned char was
5068         broken -- _sch_istable bitmasks are 16-bit, not 8-bit!  Cast BIT
5069         to unsigned short instead.
5070
5071 2003-09-22  Hrvoje Niksic  <hniksic@xemacs.org>
5072
5073         * url.c (path_simplify): Instead of calls to memmove, handle "./"
5074         and "../" by advancing pointers.
5075
5076 2003-09-22  Hrvoje Niksic  <hniksic@xemacs.org>
5077
5078         * retr.c (getproxy): Moved from url.c.
5079
5080         * convert.c: Split off link conversion from url.c into separate
5081         file.  Also included the book-keeping stuff from recur.c.
5082
5083 2003-09-21  Hrvoje Niksic  <hniksic@xemacs.org>
5084
5085         * init.c: Improved documentation of functions.
5086         (cmd_boolean): Attempt to make code that tries to avoid calling
5087         strcmp for "speed" a bit more readable.
5088
5089         * init.c (simple_atof): Report error on encountering non-digit,
5090         non-"." character.
5091         (simple_atoi): Replacement for myatoi(), calling interface
5092         compatible with simple_atof.  Updated myatoi's callers.
5093
5094 2003-09-21  Bertrand Demiddelaer  <bert@b3rt.org>
5095
5096         * url.c (path_simplify): Would read two bytes past the end of the
5097         string in the "./" case.
5098
5099 2003-09-21  Matthew J. Mellon  <mellon@tymenet.com>
5100
5101         * http.c (gethttp): Recognize content-type "application/xhtml+xml"
5102         as what Wget considers "text/html".
5103
5104 2003-09-21  Hrvoje Niksic  <hniksic@xemacs.org>
5105
5106         * connect.c (connect_with_timeout): Made timeout type double.
5107
5108         * options.h (struct options): New members read_timeout,
5109         dns_timeout, and connect_timeout.
5110         Use them.
5111
5112 2003-09-21  Hrvoje Niksic  <hniksic@xemacs.org>
5113
5114         * init.c (simple_atof): New function.
5115         (cmd_time): Use it.
5116         (cmd_bytes): Accept things like "1.5k" and such.  Use simple_atof
5117         to parse decimals.
5118
5119         * retr.c (limit_bandwidth): Adjust each sleep by the error of the
5120         previous one.
5121
5122 2003-09-21  Hrvoje Niksic  <hniksic@xemacs.org>
5123
5124         * main.c (main): Use setoptval() for setting the options.  Use
5125         run_command for `-e'.
5126
5127         * init.c (parse_line): Rewritten to return COMIND right away.
5128         Changed linkage to static.
5129         (run_wgetrc): Use the available comind when calling setval, so it
5130         doesn't have to be computed twice.
5131         (setval_internal): New function, runs the command's action without
5132         any error checking.
5133         (setoptval): New function, does what setval used to do, but exits
5134         in case of error.
5135         (run_command): New function.
5136
5137 2003-09-21  Hrvoje Niksic  <hniksic@xemacs.org>
5138
5139         * connect.c (select_fd): Change MAXTIME's type to double.  Handle
5140         its decimal part.
5141
5142         * retr.c (sleep_between_retrievals): In the random-wait case, use
5143         random_float() to wait between 0 and 2*opt.wait seconds.
5144
5145         * utils.c (run_with_timeout): Accept `double' timeouts.  Correctly
5146         handle timeout values in (0, 1) range.
5147         (random_float): New function.
5148
5149         * options.h (struct options): Change the types of wait, waitretry,
5150         and timeout to double.
5151
5152         * init.c (cmd_time): Accept floating point time.
5153
5154 2003-09-20  Hrvoje Niksic  <hniksic@xemacs.org>
5155
5156         * retr.c (get_contents): Cosmetic fixes.
5157
5158 2003-09-20  Hrvoje Niksic  <hniksic@xemacs.org>
5159
5160         * url.c (uri_merge): Get rid of uri_merge_1.
5161         (uri_merge): Merge "foo//", "bar" as "foo//bar", not "foo///bar",
5162         i.e. don't add an extra slash merely because BASE ends with two
5163         slashes.
5164         (parse_credentials): Renamed from parse_uname.  Rewrittern in
5165         standard [beg, end) calling style.
5166         (url_skip_credentials): Renamed from url_skip_uname.  Made static.
5167         (url_skip_credentials): Include # and ; as terminators.  Old code
5168         would mistakenly consider "http://foo.com#hniksic@iskon.hr" to
5169         contain a username.
5170         (url_skip_scheme): Removed because it was unused.
5171         (url_has_scheme): Require "scheme" to be at least one char long.
5172
5173 2003-09-19  Hrvoje Niksic  <hniksic@xemacs.org>
5174
5175         * url.c (url_file_name): Expect NULL dir_prefix.
5176
5177         * init.c (cmd_file): Use a macro to prevent multiple #ifdef
5178         WINDOWS.
5179         (defaults): Set dir_prefix to NULL by default.
5180
5181 2003-09-19  Hrvoje Niksic  <hniksic@xemacs.org>
5182
5183         * safe-ctype.h (_sch_test): Cast BIT to unsigned char, like latest
5184         gcc does.
5185
5186 2003-09-19  Hrvoje Niksic  <hniksic@xemacs.org>
5187
5188         * wget.h (BOUNDED_TO_ALLOCA): Evaluate PLACE only once.
5189         (ARRAY_SIZE): Renamed to countof.  All callers updated.
5190
5191 2003-09-19  Hrvoje Niksic  <hniksic@xemacs.org>
5192
5193         * main.c (main): New option --strict-comments.
5194
5195         * html-parse.c (find_comment_end): New function: simple BM search
5196         for "-->".
5197         (map_html_tags): Use it if looking at a comment and not in strict
5198         comments mode.
5199
5200 2003-09-17  Aurelien Marchand  <artaxerxes@users.sf.net>
5201
5202         * ftp.h: Added OS400 system in enum
5203         * ftp-basic.c: recognize OS400 systems
5204         * ftp.c: don't prepend the CWD if talking to OS400, since it
5205         breaks the change in library
5206
5207 2003-09-18  Hrvoje Niksic  <hniksic@xemacs.org>
5208
5209         * retr.c (get_contents): Pass the correct argument to ssl_iread.
5210
5211 2003-09-18  Hrvoje Niksic  <hniksic@xemacs.org>
5212
5213         * safe-ctype.h: Don't #define ctype.h macros to errors because
5214         that loses when someone #include's ctype.h after safe-ctype.h.
5215
5216 2003-09-17  Hrvoje Niksic  <hniksic@xemacs.org>
5217
5218         * url.c: Undef U, W, C after use.
5219
5220 2003-09-17  Hrvoje Niksic  <hniksic@xemacs.org>
5221
5222         * init.c (cmd_spec_restrict_file_names): Allow the OS setting to
5223         be augmented by ",nocontrol" which means don't escape the control
5224         characters, but otherwise keep OS settings.
5225
5226         * url.c (file_unsafe_char): Deleted.
5227         (append_uri_pathel): Query filechr_table directly.
5228         (filechr_table): Separated Unix, Windows, and control-unsafe
5229         characters.
5230
5231 2003-09-17  Hrvoje Niksic  <hniksic@xemacs.org>
5232
5233         * url.c (url_escape_1): New function.
5234         (url_escape): Use it.
5235         (sync_path): Handle pathological cases where u->file and u->dir
5236         contain really strange characters.
5237         (ENCODE): Deleted.
5238         (REENCODE): Deleted.
5239
5240 2003-09-16  Hrvoje Niksic  <hniksic@xemacs.org>
5241
5242         * url.c (url_file_name): Don't reallocate FNAME if the file
5243         doesn't exist, as is usually the case.
5244
5245         * utils.c (unique_name): New flag allow_passthrough.
5246
5247 2003-09-16  Hrvoje Niksic  <hniksic@xemacs.org>
5248
5249         * utils.c (wtimer_sys_diff): Convert the time difference to signed
5250         __int64, then to double.  This works around MS VC++ 6 which can't
5251         convert unsigned __int64 to double directly.
5252
5253 2003-09-16  Hrvoje Niksic  <hniksic@xemacs.org>
5254
5255         * Makefile.in (clean): Also remove the core.<number> files
5256         produced by recent Linux systems.
5257
5258 2003-09-16  Hrvoje Niksic  <hniksic@xemacs.org>
5259
5260         * http.c (post_file): Don't pad the file if it's not large
5261         enough.  Bail out instead.
5262
5263 2003-09-15  Hrvoje Niksic  <hniksic@xemacs.org>
5264
5265         * retr.c (get_contents): Reduce the buffer size to the amount of
5266         data that may pass through for one second.  This prevents long
5267         sleeps when limiting bandwidth.
5268
5269         * connect.c (connect_to_one): Reduce the socket's RCVBUF when
5270         bandwidth limitation to small values is requested.
5271
5272 2003-09-15  Hrvoje Niksic  <hniksic@xemacs.org>
5273
5274         * progress.c (update_speed_ring): Moved the speed ring update to a
5275         separate function and documented it better.
5276
5277         * progress.c: Use `double' for most timers to support granularity
5278         smaller than 1ms.
5279
5280 2003-09-15  Hrvoje Niksic  <hniksic@xemacs.org>
5281
5282         * wget.h (XDIGIT_TO_XCHAR): Implement as index into a literal
5283         string.
5284         (XDIGIT_TO_xchar): Ditto.
5285
5286 2003-09-15  Hrvoje Niksic  <hniksic@xemacs.org>
5287
5288         * utils.c: Change the type of timer-related functions from long to
5289         double, for better precision.  On machines supporting gettimeofday
5290         the timers now work with granularity of less than one millisecond.
5291
5292 2003-09-15  Hrvoje Niksic  <hniksic@xemacs.org>
5293
5294         * cookies.c (parse_set_cookies): Fixed the parser to handle more
5295         edge conditions.
5296         (test_cookies): New function, contains a test suite for
5297         parse_set_cookies.
5298
5299 2003-09-15  Hrvoje Niksic  <hniksic@xemacs.org>
5300
5301         * url.c (strpbrk_or_eos): Implement as a macro under Gcc.
5302
5303 2003-09-15  Hrvoje Niksic  <hniksic@xemacs.org>
5304
5305         * cookies.c (parse_set_cookies): Allow trailing space in
5306         set-cookies header.  Also, allow any amount of whitespace, not
5307         only one character.  Allow empty set-cookies header without
5308         spewing an error.
5309
5310 2003-09-14  Hrvoje Niksic  <hniksic@xemacs.org>
5311
5312         * url.c (append_uri_pathel): Use opt.restrict_file_names when
5313         calling file_unsafe_char.
5314
5315         * init.c: New command restrict_file_names.
5316
5317         * main.c (main): New option --restrict-file-names[=windows,unix].
5318
5319         * url.c (url_file_name): Renamed from url_filename.
5320         (url_file_name): Add directory and hostdir prefix here, not in
5321         mkstruct.
5322         (append_dir_structure): New function, does part of the work that
5323         used to be in mkstruct.  Iterates over path elements in u->path,
5324         calling append_uri_pathel on each one to append it to the file
5325         name.
5326         (append_uri_pathel): URL-unescape a path element and reencode it
5327         with a different set of rules, more appropriate for handling of
5328         files.
5329         (file_unsafe_char): New function, uses a lookup table to decide
5330         whether a character should be escaped for use in file name.
5331         (append_string): New utility function.
5332         (append_char): Ditto.
5333         (file_unsafe_char): New argument restrict_for_windows, decide
5334         whether Windows file names should be escaped in run-time.
5335
5336         * connect.c: Include <stdlib.h> to get prototype for abort().
5337
5338 2003-09-14  Hrvoje Niksic  <hniksic@xemacs.org>
5339
5340         * utils.c (wtimer_sys_set): Extracted the code that sets the
5341         current time here.
5342         (wtimer_reset): Call it.
5343         (wtimer_sys_diff): Extracted the code that calculates the
5344         difference between two system times here.
5345         (wtimer_elapsed): Call it.
5346         (wtimer_elapsed): Don't return a value smaller than the previous
5347         one, which could previously happen when system time is set back.
5348         Instead, reset start time to current time and note the elapsed
5349         offset for future calculations.  The returned times are now
5350         guaranteed to be monotonically nondecreasing.
5351
5352 2003-09-10  Hrvoje Niksic  <hniksic@xemacs.org>
5353
5354         * host.c (lookup_host): Print the result of the DNS lookup.
5355
5356 2003-09-10  Hrvoje Niksic  <hniksic@xemacs.org>
5357
5358         * init.c (cmd_boolean): Accept yes/no along with on/off.
5359         (cmd_lockable_boolean): Ditto.
5360
5361 2003-09-10  Hrvoje Niksic  <hniksic@xemacs.org>
5362
5363         * init.c: New command dns_cache.
5364
5365         * main.c (main): New option --dns-cache[=off].
5366
5367 2003-09-09  Hrvoje Niksic  <hniksic@xemacs.org>
5368
5369         * config.h.in: Initialize HAVE_GETADDRINFO and ENABLE_IPV6.
5370
5371         * all: Use #ifdef ENABLE_IPV6 instead of the older INET6.  Use
5372         HAVE_GETADDRINFO for getaddrinfo-related stuff.
5373
5374 2003-09-09  Hrvoje Niksic  <hniksic@xemacs.org>
5375
5376         * url.c (url_parse): Return an error if the URL contains a [...]
5377         IPv6 numeric address and we don't support IPv6.
5378
5379 2003-09-05  Hrvoje Niksic  <hniksic@xemacs.org>
5380
5381         * url.c (is_valid_ipv6_address): Modified to not require
5382         zero-terminated strings.
5383         (is_valid_ipv4_address): Ditto.
5384
5385 2003-09-05  Mauro Tortonesi <mauro@deepspace6.net>
5386
5387         src/url.c: added RFC 2732 compliance for URL parsing. The
5388         functions is_*_address valid are a modified version of
5389         glibc 2.3.2 inet_pton's code.
5390
5391 2003-09-03  Ahmon Dancy  <dancy@dancysoft.com>
5392
5393         * main.c init.c options.h: Added --retry-connrefused option so
5394         that Connection Refused failures are treated as non-fatal (when
5395         trying to retrieve from busy servers).
5396
5397         * wget.h: New CONNECT_ERROR macro for encapsulating this
5398         modification.
5399
5400         * ftp.c http.c : Use CONNECT_ERROR macro in places where
5401         ECONNREFUSED was checked.
5402
5403 2003-01-11  Ian Abbott  <abbotti@mev.co.uk>
5404
5405         * ftp.c (ftp_retrieve_glob): Reject insecure filenames as determined
5406         by calling new function has_insecure_name_p.  This is based on a
5407         patch by Red Hat.
5408
5409         * fnmatch.c (has_insecure_name_p): New function: returns non-zero
5410         if filename starts with `/' or contains `../' and is therefore
5411         considered insecure.
5412
5413         * fnmatch.h: Declare has_insecure_name_p().
5414
5415 2002-08-03  Hrvoje Niksic  <hniksic@xemacs.org>
5416
5417         * init.c (cmd_file): Allocate RESULT correctly.
5418
5419 2002-07-24  Hrvoje Niksic  <hniksic@xemacs.org>
5420
5421         * recur.c (retrieve_tree): Check whether downloaded_html_set is
5422         non-NULL before using it.
5423
5424 2002-05-27  Hrvoje Niksic  <hniksic@arsdigita.com>
5425
5426         * html-parse.c (NAME_CHAR_P): Allow almost any character here.
5427
5428 2002-05-24  Hrvoje Niksic  <hniksic@arsdigita.com>
5429
5430         * progress.c (bar_set_params): Fall back to dot progress if the
5431         terminal type is "emacs".
5432
5433 2002-05-20  Hrvoje Niksic  <hniksic@arsdigita.com>
5434
5435         * log.c: Don't #undef WGET_USE_STDARG.
5436
5437 2002-05-16  Hrvoje Niksic  <hniksic@arsdigita.com>
5438
5439         * hash.c (prime_size): Store the offset of the prime number in the
5440         prime table.  When searching, start with the given offset.
5441         (hash_table_new): Pass the pointer to ht->prime_offset to
5442         prime_size.
5443         (grow_hash_table): Ditto.
5444         (prime_size): Make 13 the first prime to make empty hash tables
5445         slightly smaller.
5446
5447 2002-05-16  Ian Abbott  <abbotti@mev.co.uk>
5448
5449         * recur.c (download_child_p): Minor optimization to avoid an
5450         unnecessary additional call to schemes_are_similar_p function.
5451
5452 2002-05-16  Ian Abbott  <abbotti@mev.co.uk>
5453
5454         * url.c (schemes_are_similar_p): New function to test enumerated
5455         scheme codes for similarity.
5456
5457         * url.h: Declare it.
5458
5459         * recur.c (download_child_p): Use it to compare schemes.  This
5460         also fixes a bug that allows hosts to be spanned (without the
5461         -H option) when the parent scheme is https and the child's is
5462         http or vice versa.
5463
5464 2002-05-14  Bill Richardson  <bill@riverstonenet.com>
5465
5466         * ftp.c (getftp): Don't ftruncate stdout.
5467
5468         * http.c (gethttp): Don't ftruncate stdout.
5469
5470 2002-05-09  Ian Abbott  <abbotti@mev.co.uk>
5471
5472         * cmpt.c (strptime_internal): Synched with glibc-2.1.3.
5473         (get_number): Ditto.
5474         (get_alt_number): Ditto.
5475         (__isleap): New function-like macro used by strptime.
5476         (day_of_the_week): New function used by strptime.
5477         (day_of_the_year): Ditto.
5478         (__mon_yday): Now shared by mktime and strptime implementations.
5479
5480 2002-05-08  Hrvoje Niksic  <hniksic@arsdigita.com>
5481
5482         * cookies.c (check_domain_match): Use match_tail in case
5483         insensitive mode.
5484
5485         * utils.c (match_tail): Allow the caller to specify case
5486         insensitive mode.
5487
5488         * cookies.c (store_cookie): When expiry_time is 0, print it as
5489         undefined, not indefinite.
5490
5491 2002-05-07  Ian Abbott  <abbotti@mev.co.uk>
5492
5493         * cookies.c (cookie_jar_process_set_cookie): Do not store
5494         discarded cookie.
5495
5496 2002-04-21  Hrvoje Niksic  <hniksic@arsdigita.com>
5497
5498         * cookies.c (check_domain_match): Allow cookies to be set for
5499         subdomains of unknown top-level domains under some circumstances.
5500
5501 2002-04-21  Thomas Lussnig  <thomas.lussnig@bewegungsmelder.de>
5502
5503         * gen_ssl.c:
5504         - allow checking of server cert
5505         - allow defining client cert type
5506         - allow limit of ssl protocol
5507         - check more return values
5508         - added debug message on break
5509
5510 2002-04-21  Hrvoje Niksic  <hniksic@arsdigita.com>
5511
5512         * recur.c (download_child_p): Revert order of items in check
5513         number 6 for clarity.
5514
5515 2002-04-20  Hrvoje Niksic  <hniksic@arsdigita.com>
5516
5517         * init.c: Ditto.
5518
5519         * main.c: Ditto.
5520
5521         * http.c: Use the new interface.
5522
5523         * cookies.c: Provide an OO-style "cookie jar" interface to enable
5524         separate cookie jars.
5525
5526         * http.c (http_atotm): Declare argument as const.
5527
5528 2002-04-20  Hrvoje Niksic  <hniksic@arsdigita.com>
5529
5530         * cookies.c (cookie_new): Default to PORT_ANY.
5531         (find_cookie_chain_exact): Only search by DOMAIN.
5532         (find_matching_cookie): Also check that PORT matches.
5533         (store_cookie): Only match the domain.
5534         (set_cookie_header_cb): When a cookie "fakes" a domain, assume it
5535         is valid for that host rather than discarding it completely.
5536         (find_matching_chains): Don't search by PORT.
5537         (matching_cookie): Also match PORT.
5538         (load_cookies): Set the port if specified, otherwise leave it as
5539         ANY.
5540         (save_cookies_mapper): Save the port if specified, otherwise leave
5541         it empty.
5542
5543 2002-04-19  Thomas Lussnig  <thomas.lussnig@bewegungsmelder.de>
5544
5545         * init.c: The option `egdfile' was not in sort order.
5546
5547 2002-04-16  Hrvoje Niksic  <hniksic@arsdigita.com>
5548
5549         * ftp.c (getftp): Treat directories that begin with <letter>: as
5550         absolute.
5551         (getftp): Strip trailing slashes from con->id before merging it
5552         with TARGET.
5553
5554 2002-04-16  Hrvoje Niksic  <hniksic@arsdigita.com>
5555
5556         * http.c (gethttp): If Content-Type is not given, assume
5557         text/html.
5558
5559 2002-04-15  Hrvoje Niksic  <hniksic@arsdigita.com>
5560
5561         * recur.c (download_child_p): Don't ignore rejection of HTML
5562         documents that are themselves leaves of recursion.
5563
5564 2002-04-15  Ian Abbott  <abbotti@mev.co.uk>
5565
5566         Makefile.in: Updated several dependencies for object files to take
5567         account of nested include files.
5568
5569 2002-04-15  Ian Abbott  <abbotti@mev.co.uk>
5570
5571         Makefile.in: The target `connect$o' (connect.o) now depends on
5572         `utils.h'
5573
5574 2002-04-15  Ian Abbott  <abbotti@mev.co.uk>
5575
5576         * host.c (SET_H_ERRNO): New function-like macro to set `h_errno'.
5577         (gethostbyname_with_timeout): Use it.
5578
5579         * utils.c: Don't define `SETJMP()', `run_with_timeout_env' or
5580         `abort_run_with_timeout()' when `USE_SIGNAL_TIMEOUT' is undefined.
5581
5582 2002-04-15  Hrvoje Niksic  <hniksic@arsdigita.com>
5583
5584         * host.c (getaddrinfo_with_timeout): New function.
5585         (gethostbyname_with_timeout): Ditto.
5586         (lookup_host): Use them.
5587
5588 2002-04-14  Hrvoje Niksic  <hniksic@arsdigita.com>
5589
5590         * utils.c (number_to_string): Handle the case when n < -INT_MAX.
5591
5592 2002-04-14  Hrvoje Niksic  <hniksic@arsdigita.com>
5593
5594         * init.c (comind): Use a marginally faster implementation of
5595         binary search.  To quote Martin Buchholz, "a nanosecond saved is a
5596         nanosecond earned."
5597
5598 2002-04-14  Hrvoje Niksic  <hniksic@arsdigita.com>
5599
5600         * main.c (print_help): Document `--post-data' and `--post-file'.
5601
5602 2002-04-14  Hrvoje Niksic  <hniksic@arsdigita.com>
5603
5604         * http.c (gethttp): Ditto.
5605
5606         * retr.c (retrieve_url): Initialize variables to appease the
5607         compiler.
5608
5609         * gen_sslfunc.c (ssl_iread): Don't handle EINTR when calling
5610         select_fd.
5611         (ssl_iwrite): Ditto.
5612
5613         * connect.c (select_fd): Rewrite to handle EINTR.  Set errno to
5614         ETIMEDOUT in case of timeout.
5615         (iread): No need to handle EINTR when calling select_fd.
5616         (iwrite): Ditto.
5617
5618 2002-04-14  Hrvoje Niksic  <hniksic@arsdigita.com>
5619
5620         * retr.c (retrieve_url): Make sure that POST is not honored for
5621         redirections.
5622
5623         * http.c (gethttp): Send the POST data when requested.
5624         (post_file): New function.
5625         (gethttp): Use it.
5626
5627         * main.c (main): Ditto.
5628
5629         * init.c: Add new options.
5630
5631         * options.h (struct options): New options post_data and
5632         post_file_name.
5633
5634 2002-04-14  Hrvoje Niksic  <hniksic@arsdigita.com>
5635
5636         * connect.c (connect_with_timeout): Firing SIGALRM can result in
5637         connect() exiting with EINTR.  Treat EINTR the same as ETIMEDOUT.
5638
5639 2002-04-13  Hrvoje Niksic  <hniksic@arsdigita.com>
5640
5641         * connect.c (connect_with_timeout): Use it.
5642
5643         * utils.c (run_with_timeout): New function.
5644
5645 2002-04-13  Hrvoje Niksic  <hniksic@arsdigita.com>
5646
5647         * url.c (getproxy): Accept a struct url argument.  This obviates
5648         the need for USE_PROXY_P.
5649
5650         * retr.c (retrieve_url): Allow proxy to be a non-FTP URL.
5651
5652         * ftp.c (getftp): Recognize FWTK-style proxy.
5653
5654 2002-04-12  Hrvoje Niksic  <hniksic@arsdigita.com>
5655
5656         * config.h.in: Only define _VA_LIST when compiled with gcc.
5657
5658 2002-04012  Ian Abbott  <abbotti@mev.co.uk>
5659
5660         * http.c (http_loop): Compensate for MS Windows two-second
5661         granularity of file modification time when comparing timestamps.
5662
5663         * ftp.c (ftp_retrieve_list): Ditto.
5664
5665 2002-04-12  Ian Abbott  <abbotti@mev.co.uk>
5666
5667         * utils.c (has_html_suffix_p): New function to test filename for
5668         common html extensions.
5669
5670         * utils.h: Declare it.
5671
5672         * http.c (http_loop): Use it instead of previous test.
5673
5674         * retr.c (retrieve_url): Ditto.
5675
5676         * recur.c (download_child_p): Ditto.
5677
5678 2002-04-12  Hrvoje Niksic  <hniksic@arsdigita.com>
5679
5680         * config.h.in: Define _VA_LIST on Solaris to prevent stdio.h from
5681         declaring va_list.
5682         From Kevin Rodgers <kevinr@ihs.com>.
5683
5684 2002-04-12  Ian Abbott  <abbotti@mev.co.uk>
5685
5686         * Makefile.in: Specify libtool mode explicitly when linking.
5687
5688 2002-04-12  Hrvoje Niksic  <hniksic@arsdigita.com>
5689
5690         * connect.c (connect_with_timeout): New function.
5691         (connect_to_one): Use it.
5692
5693         * config.h.in: Add stubs for HAVE_SIGSETJMP, HAVE_SIGBLOCK, and
5694         HAVE_SETJMP_H.
5695
5696 2002-04-11  Hrvoje Niksic  <hniksic@arsdigita.com>
5697
5698         * log.c: Set WGET_USE_STDARG if __STDC__ is defined and stdarg.h
5699         is present.
5700
5701 2002-04-11  Hrvoje Niksic  <hniksic@arsdigita.com>
5702
5703         * progress.c (bar_create): If INITIAL is larger than TOTAL, fix
5704         TOTAL.
5705         (bar_finish): Likewise.
5706
5707 2002-04-11  Hrvoje Niksic  <hniksic@arsdigita.com>
5708
5709         * html-url.c (tag_handle_form): New function.  Pick up form
5710         actions and mark them for conversion only.
5711
5712 2002-04-11  Hrvoje Niksic  <hniksic@arsdigita.com>
5713
5714         * progress.c (struct progress_implementation): Use PARAMS when
5715         declaring the parameters of *create, *update, *finish, and
5716         *set_params.
5717
5718         * netrc.c: Ditto.
5719
5720         * http.c: Reformat some function definitions so that ansi2knr can
5721         read them.
5722
5723         * hash.c (struct hash_table): Use the PARAMS macro around
5724         parameters in the declaration of hash_function and test_function.
5725         (prime_size): Spell 2580823717UL and 3355070839UL as (unsigned
5726         long)0x99d43ea5 and (unsigned long)0xc7fa5177 respectively, so
5727         that pre-ANSI compilers can read them.
5728         (find_mapping): Use PARAMS when declaring EQUALS.
5729         (hash_table_put): Ditto.
5730
5731         * ftp.h: Wrap the parameters of ftp_index declaration in PARAMS.
5732
5733         * cookies.c (cookie_new): Use (unsigned long)0 instead of 0UL,
5734         which was unsupported by pre-ANSI compilers.
5735
5736         From Nelson H. F. Beebe <beebe@math.utah.edu>, for the most part.
5737
5738 2002-04-11  Hrvoje Niksic  <hniksic@arsdigita.com>
5739
5740         * url.c (url_filename): Use compose_file_name regardless of
5741         whether opt.dirstruct is set.
5742         (mkstruct): Don't handle the query and the reencoding of DIR; that
5743         is done in compose_file_name.
5744
5745 2002-04-10  Hrvoje Niksic  <hniksic@arsdigita.com>
5746
5747         * wget.h: Ditto for extern char *exec_name.
5748
5749         * options.h: Don't guard against OPTIONS_DEFINED_HERE -- it is
5750         perfectly legal to follow an `extern' with a non-`extern' ones,
5751         provided the types match.
5752
5753         * main.c: Don't define OPTIONS_DEFINED_HERE.
5754
5755 2002-04-10  Hrvoje Niksic  <hniksic@arsdigita.com>
5756
5757         * progress.c (create_image): Revert to calculating ETA based on
5758         average download speed.
5759         (create_image): Don't print ETA until the download has been active
5760         for at least 3 seconds.
5761         (create_image): When ETA is not available, don't print anything.
5762         The previous version would print --:--.
5763
5764 2002-04-10  Hrvoje Niksic  <hniksic@arsdigita.com>
5765
5766         * progress.c (bar_update): Keep updating a subinterval until it
5767         reaches or exceeds a watermark.  That way the measurement will be
5768         guaranteed to span a configurable minimum of time.  The current
5769         default is 3s in 30 100ms intervals.
5770
5771 2002-04-09  Hrvoje Niksic  <hniksic@arsdigita.com>
5772
5773         * progress.c (bar_update): Maintain an array of the time it took
5774         to perform previous 30 network reads.
5775         (create_image): Calculate the download speed and ETA based on the
5776         last 30 reads, not the entire download.
5777         (create_image): Make sure that the ETA is not changed more than
5778         once per second.
5779
5780 2002-04-09  Ian Abbott  <abbotti@mev.co.uk>
5781
5782         * mswindows.c (borland_utime): New function conditionally defined
5783         when `HACK_BCC_UTIME_BUG' is defined.  A reimplementation of
5784         `utime()' as Borland's `utime()' function is broken on Windows 9x
5785         systems.  (Original patch by Chin-yuan Kuo <sr1111111@yahoo.com.tw>.)
5786
5787 2002-04-08  Hrvoje Niksic  <hniksic@arsdigita.com>
5788
5789         * ftp.c (ftp_loop): Propagate the result of ftp_retrieve_glob.
5790
5791 2002-03-26  Ian Abbott  <abbotti@mev.co.uk>
5792
5793         * Makefile.in: Updated several dependencies for object files.
5794
5795 2002-03-20  Ian Abbott  <abbotti@mev.co.uk>
5796
5797         * mswindows.c: Include "utils.h".
5798
5799 2002-03-18  Ian Abbott  <abbotti@mev.co.uk>
5800
5801         * host.h: Don't include netdb.h on windows.
5802
5803 2002-02-19  Hrvoje Niksic  <hniksic@arsdigita.com>
5804
5805         * recur.c (retrieve_tree): Handle the case when start_url doesn't
5806         parse.
5807
5808 2002-02-19  Andreas Damm  <andreas-sourceforge@radab.org>
5809
5810         * wget.h (DO_REALLOC_FROM_ALLOCA): Multiply with sizeof(type) when
5811         calling xmalloc and memcpy.
5812
5813 2002-02-19  Hrvoje Niksic  <hniksic@arsdigita.com>
5814
5815         * host.h: Include Unix-specific includes #ifndef WINDOWS.
5816         Patch originally provided by Christian Lackas.
5817
5818 2002-02-11  Christian Lackas  <delta@lackas.net>
5819
5820         * recur.c: recurive downloading for https fixed.
5821
5822 2002-02-19  Alan Eldridge  <alane@geeksrus.net>
5823
5824         * host.h: Also include <netinet/in.h> and <sys/socket.h>.
5825
5826         * ftp-basic.c: Also include <netinet/in.h>.
5827
5828 2002-02-05  Ian Abbott  <abbotti@mev.co.uk>
5829
5830         * http.c (gethttp): when -c used, mark already fully retrieved
5831         file as successfully retrieved.
5832
5833 2002-02-19  Hrvoje Niksic  <hniksic@arsdigita.com>
5834
5835         * url.c (url_parse): Don't treat '?' as query string separator
5836         when parsing FTP URLs.
5837
5838 2002-02-01  Hrvoje Niksic  <hniksic@arsdigita.com>
5839
5840         * html-url.c (tag_handle_meta): Don't crash on <meta
5841         http-equiv=refresh> where content is missing.
5842
5843 2002-01-31  Herold Heiko  <Heiko.Herold@previnet.it>
5844
5845         * ftp-basic.c, host.c: don't include sys/socket.h, arpa/inet.h,
5846         netdb.h on windows.
5847
5848 2002-01-30  Hrvoje Niksic  <hniksic@arsdigita.com>
5849
5850         * retr.c (retrieve_url): Remove redirection cycle detection.  This
5851         is because some sites legitimately redirect the user back to the
5852         same location, e.g. after an authorization check performed by
5853         another page.  MAX_REDIRECTIONS is still used to prevent infinite
5854         redirection loops.
5855
5856 2002-01-26  Hrvoje Niksic  <hniksic@arsdigita.com>
5857
5858         * http.c (gethttp): Wrap host name in square brackets if it
5859         contains a colon.
5860
5861 2002-01-26  Hrvoje Niksic  <hniksic@arsdigita.com>
5862
5863         * url.c (url_parse): Allow all hex digits, not only decimal ones,
5864         to form an IP address.
5865
5866 2002-01-26  Hrvoje Niksic  <hniksic@arsdigita.com>
5867
5868         * url.c (urlchr_table): Make square braces reserved, so we can
5869         parse http://[::1]/.
5870         (url_parse): Handle host in braces.
5871         (url_string): If url->host contains colons, wrap it in braces.
5872
5873 2002-01-24  Hrvoje Niksic  <hniksic@arsdigita.com>
5874
5875         * connect.c (resolve_bind_address): New function.
5876         (connect_to_one): Use it.
5877         (bindport): Ditto.
5878
5879         * init.c: Don't resolve bind-address here.
5880
5881         * host.c (wget_sockaddr_set_address): Would bug out with ADDR == NULL.
5882
5883 2002-01-24  Hrvoje Niksic  <hniksic@arsdigita.com>
5884
5885         * host.c (lookup_host): Use sizeof(ip4_address) to calculate the
5886         offset.
5887         (address_list_new): Use map_ipv4_to_ip.
5888         (wget_sockaddr_set_address): Convert ADDR to IPv4 before using it
5889         in IPv4 context.
5890
5891 2002-01-24  Hrvoje Niksic  <hniksic@arsdigita.com>
5892
5893         * source: Integrated IPv6 support.
5894         Written by Thomas Lussnig <thomas.lussnig@bewegungsmelder.de>.
5895
5896 2002-01-15  Ian Abbott  <abbotti@mev.co.uk>
5897
5898         * init.c (cmd_file): Change `\' to `/' for Windows (yes, really!)
5899         (cmd_directory): New function. Like cmd_file(), but strips
5900         trailing directory separators.
5901         (commands): Change action for "dirprefix" from `cmd_file' to
5902         `cmd_directory'.
5903
5904         * utils.c (make_directory): Allow intermediate `mkdir' calls to
5905         fail, as not all path components that do not exist should be
5906         directory components, especially under Windows.
5907
5908 2002-01-17  Hrvoje Niksic  <hniksic@arsdigita.com>
5909
5910         * netrc.c (parse_netrc): Skip leading whitespace before testing
5911         whether the line is empty.  Empty lines still contain the line
5912         terminator.
5913
5914 2002-01-15  Hrvoje Niksic  <hniksic@arsdigita.com>
5915
5916         * gen_sslfunc.c (ssl_iread): Call select on the file descriptor
5917         only if no data is pending in SSL buffers.
5918         From tony@bluetail.com.
5919
5920 2002-01-14  Hrvoje Niksic  <hniksic@arsdigita.com>
5921
5922         * headers.c (header_get): Strip trailing whitespace from the
5923         header.
5924
5925 2002-01-14  Hrvoje Niksic  <hniksic@arsdigita.com>
5926
5927         * url.c (parse_uname): URL-decode *USER and *PASSWD.
5928
5929 2002-01-07  Ian Abbott <abbotti@mev.co.uk>
5930
5931         * url.c (uri_merge_1): Deal with "net path" relative URL (one that
5932         starts with "//").
5933
5934 2002-01-14  Hrvoje Niksic  <hniksic@arsdigita.com>
5935
5936         * http.c (gethttp): Invalidate SOCK if get_contents encountered an
5937         error.
5938
5939 2001-12-24  Hrvoje Niksic  <hniksic@arsdigita.com>
5940
5941         * version.c: Wget 1.8.1 is released.
5942
5943 2001-12-19  Hrvoje Niksic  <hniksic@arsdigita.com>
5944
5945         * version.c: Wget 1.8.1-pre3 is released.
5946
5947 2001-12-19  Hrvoje Niksic  <hniksic@arsdigita.com>
5948
5949         * recur.c (retrieve_tree): Enqueue the canonical representation of
5950         start_url, so that the test against dl_url_file_map works.
5951
5952 2001-12-19  Hrvoje Niksic  <hniksic@arsdigita.com>
5953
5954         * log.c (logputs): Check for requested verbosity before printing
5955         anything.
5956
5957 2001-12-19  Hrvoje Niksic  <hniksic@arsdigita.com>
5958
5959         * html-url.c (tag_handle_link): Treat the "shortcut icon" link as
5960         inline.
5961
5962 2001-12-18  Hrvoje Niksic  <hniksic@arsdigita.com>
5963
5964         * recur.c (retrieve_tree): Make a copy of file obtained from
5965         dl_url_file_map because the code calls xfree(file) later.
5966
5967 2001-12-18  Hrvoje Niksic  <hniksic@arsdigita.com>
5968
5969         * recur.c (register_html): Maintain a hash table of HTML files
5970         along with the list.  Disallow duplicates.
5971         (retrieve_tree): Use downloaded_html_set to check whether the file
5972         found in dl_url_file_map is an HTML file, and descend into it if
5973         so.
5974         (convert_all_links): Don't guard against duplicates in
5975         downloaded_html_list, since they are no longer possible.
5976
5977 2001-12-18  Ian Abbott  <abbotti@mev.co.uk>
5978
5979         * recur.c (retrieve_tree): Pass on referring URL when retrieving
5980         recursed URL.
5981
5982 2001-12-17  Hrvoje Niksic  <hniksic@arsdigita.com>
5983
5984         * version.c: Wget 1.8.1-pre2 is released.
5985
5986 2001-12-17  Hrvoje Niksic  <hniksic@arsdigita.com>
5987
5988         * retr.c (sleep_between_retrievals): Simplify indentation.
5989
5990 2001-12-17  Hrvoje Niksic  <hniksic@arsdigita.com>
5991
5992         * gen_sslfunc.c (ssl_init_prng): Use random_number to get a byte
5993         of "randomness" at a time.
5994         (ssl_init_prng): Don't seed the PRNG; random_number will do that.
5995
5996         * retr.c (sleep_between_retrievals): Use it.  Make sure that the
5997         random amount averages in opt.wait.
5998         (sleep_between_retrievals): Don't seed the PRNG; random_number
5999         will do that.
6000
6001         * utils.c (random_number): New function.
6002
6003 2001-12-14  Hrvoje Niksic  <hniksic@arsdigita.com>
6004
6005         * url.c (path_simplify): Move here from utils.c, and make static.
6006
6007 2001-12-13  Hrvoje Niksic  <hniksic@arsdigita.com>
6008
6009         * init.c (wgetrc_file_name): Print correct message when loading
6010         getenv("WGETRC") fails.
6011
6012 2001-12-13  Hrvoje Niksic  <hniksic@arsdigita.com>
6013
6014         * recur.c (register_download): Don't abort when one URL references
6015         two different files.
6016
6017 2001-12-13  Hrvoje Niksic  <hniksic@arsdigita.com>
6018
6019         * http.c (gethttp): Check for conn->scheme, not u->scheme, before
6020         calling ssl_iwrite.
6021
6022 2001-12-13  Hrvoje Niksic  <hniksic@arsdigita.com>
6023
6024         * version.c: Wget 1.8.1-pre1 is released.
6025
6026 2001-12-13  Hrvoje Niksic  <hniksic@arsdigita.com>
6027
6028         * res.c (matches): Fix broken URL in the docstring.
6029
6030 2001-12-13  Hrvoje Niksic  <hniksic@arsdigita.com>
6031
6032         * html-url.c (tag_url_attributes): Mark <embed href=...> as
6033         external.
6034
6035 2001-12-12  Hrvoje Niksic  <hniksic@arsdigita.com>
6036
6037         * url.c (get_urls_file): Cosmetic changes.
6038
6039 2001-12-12  Hrvoje Niksic  <hniksic@arsdigita.com>
6040
6041         * html-url.c (append_one_url): Resurrect warning when unable to
6042         resolve a relative link.
6043
6044 2001-12-12  Hrvoje Niksic  <hniksic@arsdigita.com>
6045
6046         * html-url.c (collect_tags_mapper): Break into several functions.
6047         (tag_url_attributes): Collect <embed href=...>.
6048
6049 2001-12-11  Hrvoje Niksic  <hniksic@arsdigita.com>
6050
6051         * host.c: New type ipv4_address.  Use it consistently instead of
6052         `unsigned char[4]' and `unsigned char *'.
6053         (pretty_print_address): Accept a `const void *', to require even
6054         less casting.
6055
6056 2001-12-11  Hrvoje Niksic  <hniksic@arsdigita.com>
6057
6058         * ftp-ls.c (ftp_parse_vms_ls): Fix obvious memory leaks.
6059
6060 2001-12-10  Hrvoje Niksic  <hniksic@arsdigita.com>
6061
6062         * main.c (main): Initialize progress after fork_to_background, so
6063         that it knows when to use dots.
6064
6065         * mswindows.c (ws_hangup): Call log_request_redirect_output.
6066
6067         * utils.c (fork_to_background): Print the PID of the child
6068         process.
6069
6070         * log.c (log_request_redirect_output): Set a flag that output
6071         redirection has been requested.  Doing anything else in a signal
6072         handler is unsafe.
6073         (check_redirect_output): New function: check whether redirection
6074         has been requested and, if so, call redirect_output().
6075         (logputs): Call check_redirect_output.
6076         (logprintf): Ditto.
6077         (debug_logprintf): Ditto.
6078         (redirect_output): Print clearer messages.
6079
6080         * main.c (redirect_output_signal): Don't call
6081         redirect_output_signal directly.  Instead, call
6082         log_request_redirect_output.
6083
6084         * utils.c (memfatal): Ditto.
6085
6086         * progress.c (display_image): Use it.
6087
6088         * log.c (log_set_save_context): New function: allow the caller to
6089         turn off saving log context lines.
6090
6091 2001-12-10  Hrvoje Niksic  <hniksic@arsdigita.com>
6092
6093         * host.c (address_list_set_faulty): Uncomment a sanity check.
6094
6095 2001-12-10  Hrvoje Niksic  <hniksic@arsdigita.com>
6096
6097         * utils.c (long_to_string): Return a pointer after where the
6098         number ends.
6099         (long_to_string): Rename to number_to_string.
6100
6101 2001-12-10  Hrvoje Niksic  <hniksic@arsdigita.com>
6102
6103         * utils.c (path_simplify): Correctly handle the unlikely case that
6104         b starts out as path + 1.
6105
6106 2001-12-10  Hrvoje Niksic  <hniksic@arsdigita.com>
6107
6108         * utils.c (path_simplify): Rewrite, with better comments, and
6109         without the use of strcpy to move overlapping blocks.
6110
6111 2001-12-09  Hrvoje Niksic  <hniksic@arsdigita.com>
6112
6113         * init.c (cmd_spec_progress): Resurrect.  Check whether VAL is a
6114         valid progress type before setting it.
6115
6116 2001-12-09  Hrvoje Niksic  <hniksic@arsdigita.com>
6117
6118         * main.c (main): Remove stray debugging message.
6119
6120 2001-12-09  Hrvoje Niksic  <hniksic@arsdigita.com>
6121
6122         * progress.c (create_image): Fix ETA padding when hours are prined.
6123
6124 2001-12-09  Hrvoje Niksic  <hniksic@arsdigita.com>
6125
6126         * version.c: Wget 1.8 is released.
6127
6128 2001-12-09  Hrvoje Niksic  <hniksic@arsdigita.com>
6129
6130         * url.c (reencode_string): Declare static.
6131
6132         * res.c (registered_specs): Declare static.
6133
6134         * progress.c (current_impl_locked): Declare static.
6135
6136         * log.c (flush_log_p): Declare static.
6137         (needs_flushing): Ditto.
6138
6139         * http.c (digest_authentication_encode): Declare static.
6140
6141         * html-url.c (init_interesting): Declare static.
6142
6143         * host.c (host_name_addresses_map): Declare static.
6144
6145         * cookies.c (find_matching_chains): Declare static.
6146
6147         * ftp-ls.c (ftp_parse_vms_ls): Warn about the memory leak
6148         indicated by lint.
6149
6150         * utils.c (path_simplify): Remove unused variable STUB_CHAR.
6151
6152         * host.c (address_list_set_faulty): Document that INDEX is
6153         currently unused.
6154
6155         * url.c (rewrite_shorthand_url): Remove unused variable PATH.
6156
6157 2001-12-08  Hrvoje Niksic  <hniksic@arsdigita.com>
6158
6159         * version.c: Wget 1.8-pre2 is released.
6160
6161 2001-12-06  Hrvoje Niksic  <hniksic@arsdigita.com>
6162
6163         * progress.c (progress_handle_sigwinch): Set up the signal again.
6164
6165         * utils.c: Include <sys/termios.h>, where Solaris defines
6166         TIOCGWINSZ.
6167
6168         * progress.c (bar_create): Don't use the last column on the screen.
6169         (create_image): Pad ETA to constant size.  Pad SIZE to nine digits
6170         only until it exceeded them.
6171
6172 2001-12-06  Hrvoje Niksic  <hniksic@arsdigita.com>
6173
6174         * version.c: Wget 1.8-pre1 is released.
6175
6176 2001-12-06  Hrvoje Niksic  <hniksic@arsdigita.com>
6177
6178         * progress.c (progress_create): Make sure that, when the output is
6179         redirected, the progress implementation gets changed to the
6180         fallback one.
6181         (bar_set_params): Set current_impl_locked to 1 when "force" is
6182         specified.
6183         (progress_create): Don't change the progress implementation if
6184         current_impl_locked is non-zero.
6185
6186         * main.c (redirect_output_signal): Call
6187         progress_schedule_redirect.
6188
6189         * progress.c (progress_schedule_redirect): New function.
6190
6191 2001-12-06  Hrvoje Niksic  <hniksic@arsdigita.com>
6192
6193         * log.c (logvprintf): Restructure to allow being called multiple
6194         times.
6195         (logprintf): Call logvprintf in a loop.
6196         (debug_logprintf): Ditto.
6197
6198 2001-12-06  Hrvoje Niksic  <hniksic@arsdigita.com>
6199
6200         * gen_sslfunc.c (ssl_init_prng): Allow the user to disable EGD by
6201         setting egd_file it to empty string.
6202
6203         * main.c (main): Change the option name from --sslegdsock to
6204         --egd-file.
6205
6206 2001-12-06  Hrvoje Niksic  <hniksic@arsdigita.com>
6207
6208         * gen_sslfunc.c (ssl_init_prng): Make the printed message
6209         translatable.
6210
6211 2001-12-06  Hrvoje Niksic  <hniksic@arsdigita.com>
6212
6213         * url.c (scheme_disable): New function.
6214
6215         * main.c (main): Call ssl_init_prng from here rather than from
6216         init_ssl, so that it has a chance to disable support for https
6217         before a URL has been resolved.
6218
6219         * gen_sslfunc.c (ssl_init_prng): Seed with rand() if all else
6220         failed.
6221         (ssl_init_prng): Disable support for https if seeding the PRNG
6222         fails.
6223
6224 2001-12-06  Hrvoje Niksic  <hniksic@arsdigita.com>
6225
6226         * utils.c (read_whole_line): Handle lines beginning with \0.
6227
6228 2001-12-05  Hrvoje Niksic  <hniksic@arsdigita.com>
6229
6230         * recur.c (convert_all_links): Guard against duplicates in
6231         downloaded_html_files.
6232         (register_download): Don't invalidate similar-looking URLs.
6233         (match_except_index): New function.
6234
6235 2001-12-05  Hrvoje Niksic  <hniksic@arsdigita.com>
6236
6237         * utils.c (path_simplify): Document with test cases.
6238
6239 2001-12-04  Hrvoje Niksic  <hniksic@arsdigita.com>
6240
6241         * gen_sslfunc.c: Ditto.
6242
6243         * rbuf.c: Include <string.h>.
6244
6245 2001-12-04  Hrvoje Niksic  <hniksic@arsdigita.com>
6246
6247         * recur.c (retrieve_tree): Check whether the URL was already
6248         downloaded before downloading it again.
6249         (descend_child_p): Renamed to download_child_p.
6250         (register_download): When one URL is downloaded to a file already
6251         "owned" by another URL, delete all references that map any URL to
6252         that file.
6253         (register_delete_file): New function.
6254         (retrieve_tree): Use it after deleting a file.
6255
6256         * url.c (url_parse): Re-canonicalize the URL also if the path is
6257         empty, so that e.g. "http://www.server.com" ->
6258         "http://www.server.com/".
6259         (lowercase_str): Use ISUPPER instead of !ISLOWER.
6260
6261         * retr.c (retrieve_url): Use the canonical URL form when calling
6262         register_download().
6263
6264 2001-12-04  Ian Abbott <abbotti@mev.co.uk>
6265
6266         * snprintf.c (dopr): Use `unsigned int' as the second argument to
6267         va_arg when casting to `unsigned short' is intended.
6268
6269 2001-12-04  Herold Heiko  <Heiko.Herold@previnet.it>
6270
6271         * gen_sslfunc.c: on windows provide ssl crypto random 
6272           initialization through RAND_screen(); could possibly
6273           be not enough for strong ssl communication (see the 
6274           relevant manual page from the openssl package).
6275
6276 2001-12-04  Hrvoje Niksic  <hniksic@arsdigita.com>
6277
6278         * url.c (local_quote_string): Reenable quoting of question marks,
6279         but only when `--html-extension' is used.
6280
6281 2001-12-03  Hrvoje Niksic  <hniksic@arsdigita.com>
6282
6283         * version.c: Wget 1.8-beta3 is released.
6284
6285 2001-12-03  Hrvoje Niksic  <hniksic@arsdigita.com>
6286
6287         * snprintf.c (dopr): Cast the result of va_arg to short int and
6288         short unsigned int where these types are expected to be used.
6289
6290 2001-12-03  Hrvoje Niksic  <hniksic@arsdigita.com>
6291
6292         * snprintf.c (dopr): Replace `short int' and `unsigned short int'
6293         with `int' when using it as the second argument to `va_arg'.
6294
6295 2001-12-03  Hrvoje Niksic  <hniksic@arsdigita.com>
6296
6297         * host.c (address_list_new_one): New function.
6298         (lookup_host): Use it.
6299
6300 2001-12-03  Andre Majorel  <amajorel@teaser.fr>
6301
6302         * host.c (lookup_host): Don't initialize TMPSTORE directly because
6303         it's not legal C.
6304
6305 2001-12-03  Hrvoje Niksic  <hniksic@arsdigita.com>
6306
6307         * ftp-basic.c (ftp_port): Don't return HOSTERR if we fail getting
6308         the socket data.
6309
6310         * ftp.c: Ditto.
6311
6312         * http.c: No need to declare h_errno.
6313
6314         * host.c: Declare h_errno.
6315
6316 2001-12-02  Hrvoje Niksic  <hniksic@arsdigita.com>
6317
6318         * utils.c (file_merge): If BASE doesn't contain a slash, just
6319         return a copy of FILE.
6320
6321 2001-12-02  Hrvoje Niksic  <hniksic@arsdigita.com>
6322
6323         * version.c: Wget 1.8-beta2 is released.
6324
6325 2001-12-01  Hrvoje Niksic  <hniksic@arsdigita.com>
6326
6327         * ftp.c (getftp): When PWD fails, assume "/".
6328
6329         * ftp-basic.c (ftp_syst): Fix indentation.
6330
6331 2001-12-01  Hrvoje Niksic  <hniksic@arsdigita.com>
6332
6333         * url.c (get_urls_file): If opt.base_href is specified, merge each
6334         URL with the base.
6335
6336 2001-12-01  Hrvoje Niksic  <hniksic@arsdigita.com>
6337
6338         * main.c (print_help): Don't document the removed `-nh'.
6339
6340 2001-12-01  Hrvoje Niksic  <hniksic@arsdigita.com>
6341
6342         * url.c (url_full_path): Document better.
6343
6344         * http.c (gethttp): Use the full path when creating digest
6345         authorization.
6346
6347 2001-12-01  Hrvoje Niksic  <hniksic@arsdigita.com>
6348
6349         * cookies.c (path_matches): Return 0 if PREFIX doesn't begin with
6350         '/'.
6351
6352 2001-12-01  Hrvoje Niksic  <hniksic@arsdigita.com>
6353
6354         * cookies.c (path_matches): FULL_PATH doesn't begin with '/', but
6355         PREFIX does.
6356
6357 2001-12-01  Hrvoje Niksic  <hniksic@arsdigita.com>
6358
6359         * cookies.c (check_domain_match): Reimplement to match Netscape's
6360         "preliminary specification" for cookies.
6361
6362 2001-12-01  Hrvoje Niksic  <hniksic@arsdigita.com>
6363
6364         * url.c (replace_attr_refresh_hack): New function.
6365         (convert_links): Call replace_attr_refresh_hack for Refresh
6366         links.  It will add the "TMOUT; URL=" junk before the link.
6367
6368         * html-url.c (collect_tags_mapper): Set ID to the ID of the
6369         "content" attribute, not "http-equiv".
6370         (collect_tags_mapper): Don't use OFFSET to hack the raw_* values;
6371         instead, store the information that this entry belongs to a
6372         "refresh" link.
6373
6374 2001-12-01  Hrvoje Niksic  <hniksic@arsdigita.com>
6375
6376         * version.c: Wget 1.8-beta1 is released.
6377
6378 2001-12-01  Hrvoje Niksic  <hniksic@arsdigita.com>
6379
6380         * recur.c (retrieve_tree): Allow -p retrievals to exceed maximum
6381         depth by more than one.
6382
6383 2001-11-30  Hrvoje Niksic  <hniksic@arsdigita.com>
6384
6385         * retr.c (retrieve_url): Don't allow more than 20 redirections.
6386
6387 2001-11-30  Hrvoje Niksic  <hniksic@arsdigita.com>
6388
6389         * recur.c (retrieve_tree): Skip the non-inline entries when
6390         enqueuing the children of a leaf HTML node in -p mode.
6391         (descend_url_p): Ignore opt.no_parent when in -p mode and UPOS is
6392         "inline".
6393
6394         * html-url.c (get_urls_html): Don't accept dash_p_leaf_HTML.
6395         (collect_tags_mapper): When an entry is "inline", mark it as such.
6396
6397         * recur.c (descend_url_p): Fix test when checking for
6398         acceptance/rejection rules.
6399
6400 2001-10-31 Daniel BODEA <dali@dali-designs.com>
6401
6402         * netrc.c (search_netrc): When slack_default is 0, still look for
6403         an account with matching password, just not the "default account".
6404         HTTP Authorization using .netrc should now work as expected.
6405
6406 2001-11-30  T. Bharath  <TBharath@responsenetworks.com>
6407
6408         * http.c (persistent_available_p): Call SHUTDOWN_SSL if
6409         test_socket_open fails.
6410
6411 2001-11-30  Hrvoje Niksic  <hniksic@arsdigita.com>
6412
6413         * progress.c (display_image): Just print one CR to reset the
6414         cursor position.
6415
6416 2001-11-30  Christian Fraenkel  <c.fraenkel@gmx.net>
6417
6418         * init.c: New command `ssl_egd_sock'.
6419
6420         * main.c (main): New option `--sslegdsock'.
6421
6422         * gen_sslfunc.c (ssl_init_prng): Seed the RNG using EGD.
6423
6424 2001-11-29  Hrvoje Niksic  <hniksic@arsdigita.com>
6425
6426         * cmpt.c (memmove): Include a simple memmove implementation.
6427
6428 2001-11-29  Hrvoje Niksic  <hniksic@arsdigita.com>
6429
6430         * headers: Guard against header files being included twice.
6431
6432 2001-11-29  Hrvoje Niksic  <hniksic@arsdigita.com>
6433
6434         * gen-md5.c: Use unsigned char * as the buffer argument to
6435         gen_md5_update.
6436
6437 2001-11-29  Hrvoje Niksic  <hniksic@arsdigita.com>
6438
6439         * connect.h: Declare select_fd.
6440
6441 2001-11-29  Hrvoje Niksic  <hniksic@arsdigita.com>
6442
6443         * recur.c (descend_url_p): When resolving no_parent, compare with
6444         start_url, not parent url.  Otherwise link from /a/b/ to /a/c/
6445         wouldn't be followed, although the download started from /a/.
6446
6447 2001-01-23  Herold Heiko  <Heiko.Herold@previnet.it>
6448
6449         * config.h.ms, mswindows.h: defined HAVE_ISATTY, use _isatty for
6450         MS VC; somebody with Borland compiler please check and provide
6451         patch if possible;
6452
6453         * cmpt.c: provided a usleep emulation.
6454
6455 2001-11-29  Hrvoje Niksic  <hniksic@arsdigita.com>
6456
6457         * host.c (address_list_new): Initialize al->faulty.
6458
6459 2001-11-29  Hrvoje Niksic  <hniksic@arsdigita.com>
6460
6461         * http.c (http_process_range): Accept the broken output of
6462         "JavaWebServer/1.1.1".
6463
6464 2001-11-28  Hrvoje Niksic  <hniksic@arsdigita.com>
6465
6466         * progress.c (dot_set_params): If PARAMS is unspecified, use
6467         dot_style, if available.
6468
6469         * init.c: Ditto.
6470
6471         * main.c (main): Resurect --dot-style.
6472
6473         * progress.c (dot_finish): Print the quantity if we're left at the
6474         beginning of a row.
6475
6476 2001-11-27  Hrvoje Niksic  <hniksic@arsdigita.com>
6477
6478         * cmpt.c (random): Removed.
6479
6480         * retr.c (sleep_between_retrievals): Use the more portable rand()
6481         instead of random().
6482
6483 2001-11-27  Ian Abbott <abbotti@mev.co.uk>
6484
6485         * retr.c (retrieve_from_file): Initialize `new_file' to NULL to
6486         prevent seg fault.
6487
6488 2001-11-27  Hrvoje Niksic  <hniksic@arsdigita.com>
6489
6490         * connect.c (connect_to_many): Use address_list_set_faulty to
6491         prevent the faulty address from being reused.
6492
6493         * host.c (address_list_set_faulty): New function.
6494         (address_list_get_bounds): New function, instead of
6495         address_list_count.
6496
6497 2001-11-27  Hrvoje Niksic  <hniksic@arsdigita.com>
6498
6499         * url.c (convert_links): Don't translate %d-%d.
6500
6501         * main.c (print_help): Remove stray HAVE_RANDOM code.
6502
6503 2001-11-27  Hrvoje Niksic  <hniksic@arsdigita.com>
6504
6505         * ftp.c (getftp): Improve output after sending PASV.  Don't
6506         attempt to "look up" the IP address we already know; call
6507         connect_to_one directly.
6508
6509 2001-11-27  Hrvoje Niksic  <hniksic@arsdigita.com>
6510
6511         * progress.c: Change the default progress implementation to "bar".
6512
6513 2001-11-27  Hrvoje Niksic  <hniksic@arsdigita.com>
6514
6515         * progress.c (bar_create): Print two newlines.
6516
6517 2001-11-27  Hrvoje Niksic  <hniksic@arsdigita.com>
6518
6519         * cmpt.c (random): New function, a simple-minded replacement for
6520         random() on systems that don't have it.
6521
6522 2001-11-26  Hrvoje Niksic  <hniksic@arsdigita.com>
6523
6524         * config.h.in: Put a HAVE_USLEEP stub.
6525
6526         * cmpt.c (usleep): Replacement implementation of usleep using
6527         select.
6528
6529         * init.c: New option init_rate.
6530
6531         * main.c (main): New option --limit-rate.
6532
6533         * retr.c (limit_bandwidth): New function.
6534         (get_contents): Call it to limit the bandwidth used when
6535         downloading.
6536
6537         * progress.c (dot_update): Would print the wrong download speed on
6538         rows other than the first one when the download was continued.
6539         (dot_finish): Ditto.
6540
6541 2001-11-26  Ian Abbott <abbotti@mev.co.uk>
6542
6543         * http.c (gethttp): fix undeclared variable 'err' when compiled
6544         with HAVE_SSL.
6545
6546 2001-11-26  Hrvoje Niksic  <hniksic@arsdigita.com>
6547
6548         * progress.c: Don't allocate new timers; use the timing data
6549         propagated from the caller.
6550
6551         * retr.c (get_contents): Allocate and use a timer.
6552
6553 2001-11-26  Hrvoje Niksic  <hniksic@arsdigita.com>
6554
6555         * http.c (last_host_ip): Made into an address_list.
6556         (invalidate_persistent): Release pc_last_host_ip.
6557         (register_persistent): Use lookup_host.
6558         (persistent_available_p): Check for equality of hosts using
6559         address_list_match_all.  Call address_list_release.
6560         (http_cleanup): New function.
6561
6562         * ftp.c (getftp): Use lookup_host and connect_to_many.
6563
6564         * http.c (gethttp): Use lookup_host and connect_to_many.
6565
6566         * connect.c (make_connection): Removed.
6567         (connect_to_one): New function.
6568         (connect_to_many): Ditto.
6569         (set_connection_host_name): Ditto.
6570
6571         * host.c (lookup_host): New function; new return type.
6572         (address_list_new): New function.
6573         (address_list_count): Ditto.
6574         (address_list_copy_one): Ditto.
6575         (address_list_delete): Ditto.
6576         (address_list_release): Ditto.
6577         (pretty_print_address): Ditto.
6578
6579 2001-11-26  Hrvoje Niksic  <hniksic@arsdigita.com>
6580
6581         * recur.c (retrieve_tree): In case of followed redirection,
6582         blacklist the pre-redirection URL.
6583
6584 2001-11-26  Hrvoje Niksic  <hniksic@arsdigita.com>
6585
6586         * recur.c (descend_redirect_p): New function.
6587         (retrieve_tree): Make sure redirections are not blindly followed.
6588
6589 2001-11-04  Alan Eldridge  <alane@geeksrus.net>
6590
6591         * config.h.in: added HAVE_RANDOM.
6592
6593         * options.h: added random_wait to struct options.
6594
6595         * main.c (print_help [HAVE_RANDOM], main): added arg parsing, help
6596         for --random-wait.
6597
6598         * retr.c (sleep_between_retrievals) [HAVE_RANDOM]: added
6599         implementation of random wait times.
6600
6601         * init.c (commands): added "randomwait" keyword.
6602
6603 2001-11-25  Hrvoje Niksic  <hniksic@arsdigita.com>
6604
6605         * recur.c (descend_url_p): Be more conservative with blacklisting
6606         URLs.
6607         (convert_all_links): Print how many files have been converted, and
6608         how long it took.
6609
6610         * progress.c (create_image): Place the number of downloaded bytes
6611         right after the progress bar.
6612
6613         * utils.c (suffix): Return a pointer into the string.
6614
6615 2001-11-25  Hrvoje Niksic  <hniksic@arsdigita.com>
6616
6617         * url.c (convert_links): Handle CO_NULLIFY_BASE.
6618
6619         * recur.c (retrieve_tree): Ignore download-ignorable children.
6620         (convert_all_links): Specify CO_NULLIFY_BASE when link_base_p.
6621
6622         * html-url.c (handle_link): Return the newly created urlpos.
6623         (collect_tags_mapper): When dealing with BASE, store the base
6624         reference and mark it as download-ignorable.
6625
6626 2001-11-25  Hrvoje Niksic  <hniksic@arsdigita.com>
6627
6628         * url.c (convert_links): Attempt to quote '?' as "%3F" when
6629         linking to local files.  Given up on the attempt, as it breaks
6630         local browsing.
6631
6632 2001-11-25  Hrvoje Niksic  <hniksic@arsdigita.com>
6633
6634         * main.c (private_initialize): Removed.
6635         (main): Don't call private_initialize.
6636
6637         * http.c: Call lookup_host.
6638
6639         * host.c (host_init): Removed.
6640         (add_host_to_cache): Initialize host_name_address_map here, on
6641         demand.
6642         (ngethostbyname): Commented out.
6643
6644         * connect.c (make_connection): Remove dead code; use lookup_host.
6645
6646         * host.c (store_hostaddress): Renamed to lookup_host and reversed
6647         the args.
6648         Removed host_address_name_map and host_slave_master_map.
6649
6650 2001-11-25  Hrvoje Niksic  <hniksic@arsdigita.com>
6651
6652         * progress.c (dot_create): Align the "[ skipping ... ]" string
6653         with the dots.
6654
6655         * retr.c (rate): Split into two functions: calc_rate and
6656         retr_rate.
6657
6658         * progress.c (create_image): Draw a dummy progress bar even when
6659         total size is unknown.
6660         (display_image): Place the text cursor at the end of the "image".
6661
6662 2001-11-25  Hrvoje Niksic  <hniksic@arsdigita.com>
6663
6664         * url.c (reencode_string): Use unsigned char, not char --
6665         otherwise the hex digits come out wrong for 8-bit chars such as
6666         nbsp.
6667         (lowercase_str): New function.
6668         (url_parse): Canonicalize u->url if needed.
6669         (get_urls_file): Parse each URL, and return only the valid ones.
6670         (free_urlpos): Call url_free.
6671         (mkstruct): Add :port if the port is non-standard.
6672         (mkstruct): Append the query string to the file name, if any.
6673         (urlpath_length): Use strpbrk_or_eos.
6674         (uri_merge_1): Handle the cases where LINK is an empty string,
6675         where LINK consists only of query, and where LINK consists only of
6676         fragment.
6677         (convert_links): Count and report both kinds of conversion.
6678         (downloaded_file): Use a hash table, not a list.
6679         (downloaded_files_free): Free the hash table.
6680
6681         * retr.c (retrieve_from_file): Ditto.
6682
6683         * main.c (main): Call either retrieve_url or retrieve_tree
6684         for each URL, not both.
6685
6686         * retr.c (register_all_redirections): New function.
6687         (register_redirections_mapper): Ditto.
6688         (retrieve_url): Register the redirections.
6689         (retrieve_url): Make the string "Error parsing proxy ..." 
6690         translatable.
6691
6692         * res.c (add_path): Strip leading slash from robots.txt paths so
6693         that the path representations are "compatible".
6694         (free_specs): Free each individual path, too.
6695         (res_cleanup): New function.
6696         (cleanup_hash_table_mapper): Ditto.
6697
6698         * recur.c (url_queue_new): New function.
6699         (url_queue_delete): Ditto.
6700         (url_enqueue): Ditto.
6701         (url_dequeue): Ditto.
6702         (retrieve_tree): New function, replacement for recursive_retrieve.
6703         (descend_url_p): New function.
6704         (register_redirection): New function.
6705
6706         * progress.c (create_image): Cosmetic changes.
6707
6708         * init.c (cleanup): Do all those complex cleanups only if
6709         DEBUG_MALLOC is defined.
6710
6711         * main.c: Removed --simple-check and the corresponding
6712         simple_host_check in init.c.
6713
6714         * html-url.c (handle_link): Parse the URL here, and propagate the
6715         parsed URL to the caller, who would otherwise have to parse it
6716         again.
6717
6718         * host.c (xstrdup_lower): Moved to utils.c.
6719         (realhost): Removed.
6720         (same_host): Ditto.
6721
6722 2001-11-24  Hrvoje Niksic  <hniksic@arsdigita.com>
6723
6724         * utils.c (path_simplify): Preserver the (non-)existence of
6725         leading slash.  Return non-zero if changes were made.
6726
6727 2001-11-24  Hrvoje Niksic  <hniksic@arsdigita.com>
6728
6729         * progress.c (bar_update): Don't modify bp->total_length if it is
6730         zero.
6731
6732 2001-11-24  Hrvoje Niksic  <hniksic@arsdigita.com>
6733
6734         * retr.c (retrieve_url): When the redirection URL doesn't parse,
6735         print the correct error message rather than "UNKNOWN".
6736
6737 2001-11-24  Hrvoje Niksic  <hniksic@arsdigita.com>
6738
6739         * progress.c (bar_finish): If the timer didn't record any time
6740         since the download beginning, fake 1ms.
6741
6742 2001-11-24  Hrvoje Niksic  <hniksic@arsdigita.com>
6743
6744         * recur.c (recursive_retrieve): Fix typo.
6745
6746 2001-11-23  Hrvoje Niksic  <hniksic@arsdigita.com>
6747
6748         * progress.c (create_image): Don't translate "%ld ".
6749
6750 2001-11-23  Hrvoje Niksic  <hniksic@arsdigita.com>
6751
6752         * progress.c (bar_set_params): Allow the user to force the use of
6753         the bar.
6754
6755 2001-11-23  Lemble Gregory  <gregory.lemble@st.com>
6756
6757         * gen_sslfunc.c (ssl_init_prng): New function; seed the SSL RNG.
6758
6759 2001-11-23  Hrvoje Niksic  <hniksic@arsdigita.com>
6760
6761         * progress.c: Renamed dp_* functions to dot_* for greater clarity
6762         and consistency with bar_*.
6763         (print_download_speed): Get rid of the unneeded '@' character.
6764         (create_image): Fix download rate geometry.
6765
6766         * progress.c (print_elapsed): Remove spurious space.
6767         (print_elapsed): Renamed to print_download_speed, since that's
6768         what it does.
6769
6770 2001-11-23  Hrvoje Niksic  <hniksic@arsdigita.com>
6771
6772         * progress.c (bar_update): If the downloaded amount becomes larger
6773         than the expected amount, adjust the expected amount accordingly.
6774
6775 2001-11-23  Hrvoje Niksic  <hniksic@arsdigita.com>
6776
6777         * utils.c (determine_screen_width): New function.
6778
6779         * main.c (main): New option `--progress=TYPE'.
6780         (main): Implement compatibility with the old option `--dot-style'.
6781
6782         * init.c: Removed cmd_spec_dotstyle -- that logic is now in
6783         dp_set_params.
6784         (cmd_spec_progress): New function.
6785
6786         * retr.c (get_contents): Use the progress_* functions instead of
6787         the old show_progress().
6788         (show_progress): Removed.
6789         (rate): Print "xxxx.xx K/s" instead of "KB/s".  Ditto for MB/s,
6790         etc.
6791
6792         * progress.c (set_progress_implementation): New function.
6793         (valid_progress_implementation_p): Ditto.
6794         (progress_create): Ditto.
6795         (progress_update): Ditto.
6796         (progress_finish): Ditto.
6797         (dp_create): Ditto.
6798         (dp_update): Ditto.
6799         (dp_finish): Ditto.
6800         (dp_set_params): Ditto.
6801         (print_elapsed): Ditto.
6802
6803 2001-11-22  Hrvoje Niksic  <hniksic@arsdigita.com>
6804
6805         * retr.c (show_progress): Use it.
6806
6807         * log.c (log_set_flush): New function.
6808
6809 2001-11-22  Hrvoje Niksic  <hniksic@arsdigita.com>
6810
6811         * utils.c (path_simplify): Don't remove trailing slashes.
6812
6813         * ftp.c (ftp_get_listing): Use it.
6814
6815         * utils.c (file_merge): New function.
6816
6817         * url.c (opt_url): Removed.
6818
6819         * recur.c (recursive_retrieve): Inline "opt_url" logic.
6820
6821         * main.c (main): Use xfree(), not free().
6822
6823         * url.c (rewrite_url_maybe): Renamed to rewrite_shorthand_url.
6824
6825         * ftp.c (ccon): Move `ccon' typedef here, since it's only used
6826         internally.
6827
6828         * config.h.in: Include a stub for HAVE_STRPBRK.
6829
6830         * cmpt.c (strpbrk): Include a replacement for systems without
6831         strpbrk().
6832
6833         * ftp.c: Use url_set_dir and url_set_file when modifying the URL.
6834
6835         * url.c (url_set_dir): New function.
6836         (url_set_file): Ditto.
6837
6838         * ftp-basic.c (ftp_process_type): Process FTP type here; the URL
6839         parser makes the URL "params" available, so we can do that in this
6840         function.
6841
6842         * retr.c: Ditto.
6843
6844         * ftp.c: Ditto; pass the local file information in `ccon'.
6845
6846         * http.c: Get rid of the ugly kludge that had URL being replaced
6847         with the proxy URL when proxy retrieval was requested.  Use a
6848         separate parameter to http_loop and gethttp for the proxy URL.
6849
6850         * http.c: Changed to reflect the fact that local file, proxy, and
6851         referer information are no longer stored in struct url.  The local
6852         file information is passed in `struct hstat' now.
6853
6854         * url.c: Reworked URL parsing to be more regular.  Reencode the
6855         URL using reencode_string.
6856         Removed non-URL-related information from struct url.  This
6857         includes fields `proxy', `local', and `referer'.
6858
6859 2001-11-22  Jochen Hein  <jochen@jochen.org>
6860
6861         * main.c (main): Split the copyright notice for easier
6862         translation.
6863
6864 2001-08-21  Dave Turner <dct25@hermes.cam.ac.uk>
6865
6866         * ftp-basic.c (ftp_size): New function to send non-standard SIZE
6867           command to server to request file size.
6868         * ftp.h (ftp_size): Export it.
6869         * ftp.c (getftp): Use new ftp_size function if restoring
6870           transfer of a file with unknown size.
6871
6872 2001-11-20  Hrvoje Niksic  <hniksic@arsdigita.com>
6873
6874         * url.c (parseurl): Don't depend on the now-obsolete TYPE.
6875
6876 2001-11-19  Hrvoje Niksic  <hniksic@arsdigita.com>
6877
6878         * url.c (getproxy): Handle URL shorthands.
6879
6880 2001-11-19  Hrvoje Niksic  <hniksic@arsdigita.com>
6881
6882         * main.c: Remove --wait / --waitretry backwards compatibility
6883         code.
6884         
6885 2001-11-19  Hrvoje Niksic  <hniksic@arsdigita.com>
6886
6887         * main.c (main): Use it.
6888
6889         * url.c (rewrite_url_maybe): New function.
6890
6891 2001-11-19  Hrvoje Niksic  <hniksic@arsdigita.com>
6892
6893         * url.c: Clean up handling of URL schemes.
6894
6895 2001-05-13  Hrvoje Niksic  <hniksic@arsdigita.com>
6896
6897         * url.c: Get rid of `protostrings'.
6898         (skip_proto): Don't use protostrings.
6899         (has_proto): Ditto.
6900
6901 2001-11-18  Hrvoje Niksic  <hniksic@arsdigita.com>
6902
6903         * Makefile.in: Conditionally compile getopt.o.
6904
6905 2001-11-18  Hrvoje Niksic  <hniksic@arsdigita.com>
6906
6907         * md5.h: Renamed to gnu-md5.h.
6908
6909         * md5.c: Renamed to gnu-md5.c.
6910
6911         * http.c: Ditto.
6912
6913         * ftp-opie.c: Use the new macros.
6914
6915         * sysdep.h: Define md5-related macros.
6916
6917         * config.h.in: Define HAVE_SOLARIS_MD5 or HAVE_BUILTIN_MD5
6918         depending on which md5 implementation is used.
6919
6920 2001-11-18  Hrvoje Niksic  <hniksic@arsdigita.com>
6921
6922         * res.c (res_register_specs): Initialize OLD and HP_OLD to appease
6923         the compiler.
6924
6925 2001-11-18  Hrvoje Niksic  <hniksic@arsdigita.com>
6926
6927         * http.c (gethttp): Print the whole response line when printing
6928         headers is requested.
6929
6930 2001-05-12  Hrvoje Niksic  <hniksic@arsdigita.com>
6931
6932         * res.c: New file.  Implement all RES-related code here.
6933
6934 2001-11-18  Hrvoje Niksic  <hniksic@arsdigita.com>
6935
6936         * version.c: Wget 1.7.1 is released.
6937
6938 2001-11-16  Hrvoje Niksic  <hniksic@arsdigita.com>
6939
6940         * headers.c (header_extract_number): Ignore trailing whitespace.
6941
6942 2001-08-24  Ian Abbott  <abbotti@mev.co.uk>
6943
6944         * html-url.c (collect_tags_mapper): Fix bug converting links
6945         with -k option for tags with multiple link attributes by
6946         handling links in the order they appear.
6947
6948 2001-08-15  Ian Abbott  <abbotti@mev.co.uk>
6949
6950         * ftp.c (ftp_loop_internal): Avoid a potential buffer overflow in
6951           the call to the 'rate' function by moving it past the error
6952           checking for the 'getftp' function return value.
6953
6954 2001-11-16  Hrvoje Niksic  <hniksic@arsdigita.com>
6955
6956         * html-parse.c (advance_declaration): Use 0x22 instead of '"' or
6957         '\"'.  Different compilers' assert macros are broken in different
6958         ways.
6959
6960 2001-09-29  Christian Fraenkel  <c.fraenkel@gmx.net>
6961
6962         * http.c (gethttp): print debug output for errors occuring during
6963         the ssl handshake.
6964
6965 2001-11-16  Chris Seawood  <cls@seawood.org>
6966
6967         * init.c: Ditto.
6968
6969         * host.c: Ditto.
6970
6971         * connect.c: Ditto.
6972
6973         * sysdep.h: Support compilation under BEOS.
6974
6975 2001-06-08  Edward J. Sabol  <sabol@alderaan.gsfc.nasa.gov>
6976
6977         * url.c (url_equal): Fix a memory leak when parseurl returns an
6978         error on the second URL. Also, since url_equal is not used at the
6979         moment, do not compile it.
6980
6981         * url.h: Ditto for the prototype of url_equal.
6982
6983 2001-11-16  Hrvoje Niksic  <hniksic@arsdigita.com>
6984
6985         * html-parse.c (map_html_tags): Support XML-style empty tags.
6986
6987 2001-06-26  Hrvoje Niksic  <hniksic@arsdigita.com>
6988
6989         * wget.h (DO_REALLOC_FROM_ALLOCA): Check for do_realloc_newsize in
6990         loop condition because we're no longer setting SIZEVAR here.
6991
6992 2001-06-26  Hrvoje Niksic  <hniksic@arsdigita.com>
6993
6994         * wget.h (DO_REALLOC_FROM_ALLOCA): Set SIZEVAR after the memcpy()
6995         call because it needs the old value.
6996
6997 2001-06-18  Hrvoje Niksic  <hniksic@arsdigita.com>
6998
6999         * cookies.c (ATTR_NAME_CHAR): Allow almost any character to be in
7000         an attribute name.
7001
7002 2001-06-18  Hrvoje Niksic  <hniksic@arsdigita.com>
7003
7004         * url.c (url_filename): Make sure that slashes that sneak in to
7005         u->file via query string get protected.
7006         (file_name_protect_query_string): New function.
7007
7008 2001-06-14  Hrvoje Niksic  <hniksic@arsdigita.com>
7009
7010         * recur.c (recursive_retrieve): Also check undesirable_urls with
7011         canonicalized URL.
7012
7013 2001-06-14  Hrvoje Niksic  <hniksic@arsdigita.com>
7014
7015         * http.c (gethttp): Search `.netrc' with real host, not the proxy
7016         one.
7017
7018 2001-06-14  Hrvoje Niksic  <hniksic@arsdigita.com>
7019
7020         * sysdep.h (MAP_FAILED): Provide MAP_FAILED for systems that don't
7021         define it.
7022
7023 2001-06-09  Jan Prikryl  <prikryl@cg.tuwien.ac.at>
7024
7025         * ftp.h: Provide correct prototype for ftp_parse_ls().
7026
7027 2001-06-04  Hrvoje Niksic  <hniksic@arsdigita.com>
7028
7029         * version.c: Wget 1.7 is released.
7030
7031 2001-06-03  Karl Eichwalder  <ke@suse.de>
7032
7033         * ftp-ls.c (ftp_parse_ls): Fix typo.
7034
7035 2001-05-27  Hrvoje Niksic  <hniksic@arsdigita.com>
7036
7037         * all: Update copyright information.
7038
7039 2001-05-26  Hrvoje Niksic  <hniksic@arsdigita.com>
7040
7041         * http.c (gethttp): Indicate that the continued download failed
7042         for *this* file.
7043
7044 2001-05-26  Hrvoje Niksic  <hniksic@arsdigita.com>
7045
7046         * version.c: Wget 1.7-pre1 is released.
7047
7048 2001-05-26  Hrvoje Niksic  <hniksic@arsdigita.com>
7049
7050         * version.c: Updated version to 1.7-pre1.
7051
7052 2001-05-14  Hrvoje Niksic  <hniksic@arsdigita.com>
7053
7054         * gen_sslfunc.c: Don't include <sys/time.h> directly.
7055
7056 2001-05-14  Hrvoje Niksic  <hniksic@arsdigita.com>
7057
7058         * http.c (gethttp): Use real URL data for cookies, not the proxy
7059         stuff.
7060
7061 2001-05-12  Hrvoje Niksic  <hniksic@arsdigita.com>
7062
7063         * main.c (print_help): Document `--no-http-keep-alive'.
7064
7065         * utils.c (numdigit): Handle negative numbers *correctly*.
7066
7067         * hash.c (make_nocase_string_hash_table): Use term "nocase" rather
7068         than the confusing "unsigned".
7069
7070         * utils.c (string_set_contains): Renamed from string_set_exists.
7071
7072         * hash.c (hash_table_contains): Renamed from hash_table_exists.
7073
7074         * cookies.c: Move case-insensitive hash tables to hash.c.
7075
7076 2001-05-09  Hrvoje Niksic  <hniksic@arsdigita.com>
7077
7078         * http.c (gethttp): Before concluding that the file is already
7079         fully retrieved, make sure that the file existed and `Range' was
7080         actually requested.
7081
7082 2001-05-09  Hrvoje Niksic  <hniksic@arsdigita.com>
7083
7084         * cookies.c (eliminate_dups): New function.
7085         (build_cookies_request): Use it.
7086         (build_cookies_request): Set chain_store_size after reallocating
7087         all_chains.
7088         (check_domain_match): Annotated for easier future debugging.
7089         (store_cookie): In the debug message, print whether the cookie is
7090         permanent.
7091
7092 2001-05-08  Hrvoje Niksic  <hniksic@arsdigita.com>
7093
7094         * http.c (http_loop): Reset no_truncate before deciding whether to
7095         set it.
7096         (gethttp): Further clarify "-c conflicts with existing file" error
7097         message, based on input from Herold Heiko.
7098
7099 2001-05-07  Hrvoje Niksic  <hniksic@arsdigita.com>
7100
7101         * http.c (http_loop): If restval is set, set no_truncate to 1
7102         unconditionally.
7103
7104 2001-05-02  Jan Prikryl  <prikryl@cg.tuwien.ac.at>
7105
7106         * ftp-ls.c (ftp_parse_winnt_ls): Assure months are being correctly
7107         converted. Pointed out by <Stefan.Weil@de.heidelberg.com>.
7108         (ftp_parse_vms_ls): Ditto.
7109
7110 2001-04-30  Hrvoje Niksic  <hniksic@arsdigita.com>
7111
7112         * init.c (cmd_address): Zero SIN before using it; apparently
7113         needed on *BSD.
7114
7115 2001-04-29  Hrvoje Niksic  <hniksic@arsdigita.com>
7116
7117         * ftp.c (ftp_loop_internal): Don't set NO_TRUNCATE if the file is
7118         empty.
7119
7120 2001-04-29  Hrvoje Niksic  <hniksic@arsdigita.com>
7121
7122         * main.c (main): Make `--cookies' respect its argument.
7123
7124 2001-04-28  Hrvoje Niksic  <hniksic@arsdigita.com>
7125
7126         * main.c (main): Removed undocumented option `--email-address'.
7127
7128         * netrc.c: Use the latest read_whole_line.
7129
7130         * init.c (defaults): Set opt.ftp_pass to "-wget@".
7131
7132         * mswindows.c (pwd_cuserid): Ditto.
7133
7134         * utils.c (pwd_cuserid): Removed.
7135
7136         * host.c (ftp_getaddress): Removed.
7137
7138 2001-04-28  Hrvoje Niksic  <hniksic@arsdigita.com>
7139
7140         (http_loop): Allocate space for filename_plus_orig_suffix with
7141         alloca; this is more efficient and removes the need to free it
7142         before each and every return.
7143
7144 2001-04-28  Hrvoje Niksic  <hniksic@arsdigita.com>
7145
7146         * http.c (gethttp): Return RETRUNNEEDED when the retrieval is
7147         unneeded because the file is already there and fully downloaded,
7148         and -c is specified.
7149         (http_loop): Handle RETRUNNEEDED.
7150
7151         * wget.h (uerr_t): New value RETRUNNEEDED.
7152
7153         * http.c (http_loop): Set no_truncate for files that both exist
7154         and are non-empty.
7155         (gethttp): Consider the download finished when restval >= contlen,
7156         not only when restval==contlen.
7157         (gethttp): Handle redirection before giving up due to -c.
7158         (gethttp): Clarify error message which explains that -c will not
7159         truncate the file.
7160         (gethttp): When returning CONTNOTSUPPORTED, don't forget to free
7161         the stuff that needs freeing and release the socket.
7162
7163 2001-04-27  Hrvoje Niksic  <hniksic@arsdigita.com>
7164
7165         * main.c (print_help): Wget booleans accept "off", not "no".
7166
7167 2001-04-27  Hrvoje Niksic  <hniksic@arsdigita.com>
7168
7169         * http.c (http_loop): If allow_cache is zero, always disable
7170         caching, not only when retrieving through proxy.
7171
7172         * init.c: Ditto.
7173
7174         * options.h (struct options): Rename proxy_cache to allow_cache.
7175
7176 2001-04-27  Hrvoje Niksic  <hniksic@arsdigita.com>
7177
7178         * http.c (mktime_from_utc): Improve documentation.
7179         (http_atotm): Put format strings into a separate array.
7180
7181 2001-04-27  Hrvoje Niksic  <hniksic@arsdigita.com>
7182
7183         * safe-ctype.h: Instead of throwing #error when isalpha is
7184         defined, redefine it to something that will throw a compile-time
7185         error if actually *used*.  Do the same for the rest of the
7186         standard C macros.
7187
7188 2001-04-26  Hrvoje Niksic  <hniksic@arsdigita.com>
7189
7190         * url.c (getproxy): Ignore empty proxy vars.
7191
7192 2001-04-25  Hrvoje Niksic  <hniksic@arsdigita.com>
7193
7194         * http.c (http_loop): Would load cookies every time.
7195
7196         * cookies.c (load_cookies): Handle cookies whose values contain
7197         embedded spaces.
7198
7199 2001-04-25  Hrvoje Niksic  <hniksic@arsdigita.com>
7200
7201         * utils.c: Define each DIGITS_* in one line.
7202
7203 2001-04-25  Roger L. Beeman  <beeman@cisco.com>
7204
7205         * http.c (http_atotm): Initialize t.tm_isdst to 0.
7206         (mktime_from_utc): Prevent mktime() from having discontinuities at
7207         DST transition points.
7208
7209 2001-04-25  Hrvoje Niksic  <hniksic@arsdigita.com>
7210
7211         * html-url.c (get_urls_html): Fix documentation.
7212
7213 2001-04-25  Hrvoje Niksic  <hniksic@arsdigita.com>
7214
7215         * url.c (UNSAFE_CHAR): Reimplement using a static table.
7216         (url_init): Removed.
7217         (init_unsafe_char_table): Removed.
7218
7219 2001-04-25  Hrvoje Niksic  <hniksic@arsdigita.com>
7220
7221         * snprintf.c (dopr): Replace ISDIGIT with '0' <= ch && ch <= '9'.
7222
7223 2001-04-25  Hrvoje Niksic  <hniksic@arsdigita.com>
7224
7225         * utils.c: Document timer functions.
7226
7227         * retr.c (rate): Use it.
7228         (rate): Print in GB/s if transfer rate exceeds 1 GB/s.
7229
7230         * utils.c (wtimer_granularity): New function.
7231
7232 2001-04-24  Hrvoje Niksic  <hniksic@arsdigita.com>
7233
7234         * retr.c (show_progress): Ditto.
7235
7236         * ftp.c (getftp): Ditto.
7237
7238         * http.c (gethttp): Use new timer functions.
7239
7240         * utils.c (wtimer_allocate): New function.
7241         (wtimer_new): Ditto.
7242         (wtimer_delete): Ditto.
7243         (wtimer_reset): Ditto.
7244         (wtimer_elapsed): Ditto.
7245
7246 2001-04-24  Hrvoje Niksic  <hniksic@arsdigita.com>
7247
7248         * utils.c (long_to_string): New, faster version.  Favors smaller
7249         numbers; much of the calculation is now done at compile-time.
7250
7251 2001-04-24  Hrvoje Niksic  <hniksic@arsdigita.com>
7252
7253         * utils.c (numdigit): Handle negative numbers.
7254
7255 2001-04-23  Hrvoje Niksic  <hniksic@arsdigita.com>
7256
7257         * retr.c (show_progress): Print the download rate even when the
7258         percentages are not available.
7259
7260 2001-04-21  Hrvoje Niksic  <hniksic@arsdigita.com>
7261
7262         * ftp.c (getftp): Adjust expected_bytes if the length is
7263         authoritative.
7264
7265 2001-04-14  Hrvoje Niksic  <hniksic@arsdigita.com>
7266
7267         * url.c: Don't declare `construct'.
7268
7269         * hash.c (grow_hash_table): Speed up rehashing; inline storing of
7270         mappings to new locations.
7271         (hash_table_new): Make resize_threshold a field in the hash table,
7272         so we don't have to recalculate it in each hash_table_put.
7273         (grow_hash_table): Update resize_threshold.
7274         (MAX): Remove unused macro.
7275         (prime_size): Made static.
7276
7277 2001-04-14  Hrvoje Niksic  <hniksic@arsdigita.com>
7278
7279         * retr.c (retrieve_url): Call uri_merge, not url_concat.
7280
7281         * html-url.c (collect_tags_mapper): Call uri_merge, not
7282         url_concat.
7283
7284         * url.c (mkstruct): Use encode_string instead of xstrdup followed
7285         by URL_CLEANSE.
7286         (path_simplify_with_kludge): Deleted.
7287         (contains_unsafe): Deleted.
7288         (construct): Renamed to uri_merge_1.
7289         (url_concat): Renamed to uri_merge.
7290
7291 2001-04-13  Hrvoje Niksic  <hniksic@arsdigita.com>
7292
7293         * url.c (str_url): Use encode_string instead of the unnecessary
7294         CLEANDUP.
7295         (encode_string_maybe): New function, returns input string if no
7296         encoding is needed.
7297         (encode_string): Call encode_string_maybe to do the dirty work,
7298         xstrdup if no work needed.
7299
7300 2001-04-13  Hrvoje Niksic  <hniksic@arsdigita.com>
7301
7302         * wget.h (XDIGIT_TO_xchar): Define here.
7303
7304         * url.c (decode_string): Use new name.
7305         (encode_string): Ditto.
7306
7307         * http.c (XDIGIT_TO_xchar): Rename HEXD2asc to XDIGIT_TO_xchar.
7308         (dump_hash): Use new name.
7309
7310         * wget.h: Rename ASC2HEXD and HEXD2ASC to XCHAR_TO_XDIGIT and
7311         XDIGIT_TO_XCHAR respectively.
7312
7313 2001-04-13  Hrvoje Niksic  <hniksic@arsdigita.com>
7314
7315         * init.c: Include cookies.h.
7316
7317         * cookies.h: Declare cookies_cleanup.
7318
7319         * cookies.c (check_domain_match): Remove unused variable.
7320         (save_cookies): Remove extraneous argument from debug statement.
7321
7322         * host.c (same_host): Don't call skip_url.
7323
7324         * url.c (skip_url): Removed.  Removed its calls from various
7325         functions in url.c.
7326
7327 2001-04-13  Hrvoje Niksic  <hniksic@arsdigita.com>
7328
7329         * cookies.c (unsigned_string_hash): Use the new code in
7330         string_hash as reference.
7331
7332         * hash.c (hash_table_map): Allow deletion and change of the
7333         element processed by MAPFUN.
7334         (string_hash): Use the function from glib.
7335
7336 2001-04-12  Hrvoje Niksic  <hniksic@arsdigita.com>
7337
7338         * config.h.in: Include #undef stub.
7339
7340         * hash.c (hash_table_remove): Rewrite to actually clear deleted
7341         entries instead of just marking them as deleted.
7342
7343 2001-04-12  Hrvoje Niksic  <hniksic@arsdigita.com>
7344
7345         * hash.h: Declare hash_table_get_pair and hash_table_count.
7346
7347 2001-04-12  Hrvoje Niksic  <hniksic@arsdigita.com>
7348
7349         * cookies.c: Declare http_atotm.
7350
7351 2001-04-12  Hrvoje Niksic  <hniksic@arsdigita.com>
7352
7353         * ftp-ls.c (ftp_parse_unix_ls): Use octal constants for
7354         permissions.  A compiler that doesn't accept octal constants is
7355         seriously broken and shouldn't be used -- octal constants were
7356         present in K&R C!
7357
7358 2001-01-20  Karl Eichwalder  <ke@suse.de>
7359
7360         * Makefile.in: Provide and use DESTDIR according to the Coding
7361         Standards.
7362
7363 2001-04-12  Hrvoje Niksic  <hniksic@arsdigita.com>
7364
7365         * ftp-ls.c (ftp_parse_vms_ls): Make seconds optional in time
7366         specification.
7367
7368 2001-04-11  Hrvoje Niksic  <hniksic@arsdigita.com>
7369
7370         * url.c (parseurl): Don't strip trailing slash when u->dir is "/"
7371         because that strips the *leading* slash, thus forcing relative
7372         FTP retrieval.
7373
7374 2001-04-10  Jan Prikryl  <prikryl@cg.tuwien.ac.at>
7375
7376         * ftp.c (getftp): Convert initial FTP directory from VMS to UNIX
7377         notation for VMS servers. 
7378         (ftp_retrieve_dirs): Do not prepend '/' to f->name when
7379         odir is an empty string.
7380
7381 2001-04-10  Jan Prikryl  <prikryl@cg.tuwien.ac.at>
7382
7383         * ftp-ls.c (ftp_parse_winnt_ls): Made the fix for AM/PM more
7384         effective. Suggested by Edward J. Sabol.
7385
7386 2001-04-10  Hrvoje Niksic  <hniksic@arsdigita.com>
7387
7388         * cookies.c (build_cookies_request): Use and sort cookies from all
7389         matching domains.
7390         (build_cookies_request): Check for duplicates before generating
7391         the `Cookies' header.
7392
7393         * main.c (main): Don't load cookies here.
7394         (main): Make loadcookies and savecookies call the correct command.
7395
7396         * http.c (http_loop): Load cookies on-demand.
7397
7398 2001-04-09  Hrvoje Niksic  <hniksic@arsdigita.com>
7399
7400         * http.c (gethttp): Fix indentation of SSL ifdef.
7401
7402 2001-04-09  Hrvoje Niksic  <hniksic@arsdigita.com>
7403
7404         * ftp.c (ftp_retrieve_dirs): Don't forcibly prepend "/" to u->dir;
7405         that hack is no longer necessary.
7406         (getftp): Prepend initial directory to *non*-absolute u->dir's.
7407
7408 2001-04-09  Hrvoje Niksic  <hniksic@arsdigita.com>
7409
7410         * init.c (cmd_file): New function.
7411         (enable_tilde_expansion): New variable.
7412         (run_wgetrc): Use it.
7413         (cmd_file): Use it.
7414
7415 2001-04-08  Hrvoje Niksic  <hniksic@arsdigita.com>
7416
7417         * init.c: Include cookie-related options.
7418
7419         * main.c (main): Include cookie-specific options.
7420         (main): Load cookies before download is finished.
7421         (main): Save cookies when done.
7422
7423         * http.c (gethttp): Process the `Set-Cookie' header.
7424         (gethttp): Include cookies in the response.
7425
7426         * cookies.c: New file.
7427
7428 2001-04-08  Hrvoje Niksic  <hniksic@arsdigita.com>
7429
7430         * utils.c (datetime_str): New function.
7431
7432 2001-04-08  Jan Prikryl  <prikryl@cg.tuwien.ac.at>
7433
7434         * ftp-ls.c (ftp_parse_winnt_ls): The AM/PM change did assume
7435         12:01PM == 00:01, which was obviously wrong. Taken care of this
7436         anomaly.
7437
7438         * ChangeLog: Removed an excess conflict marker. Reformatted the
7439         entry by Philipp Thomas from 2001-03-09.
7440
7441         * ftp-ls.c (ftp_parse_winnt_ls): Ensure that adjusted PM hours lay
7442         between 0 and 23. Elminate unused variable `sec'.
7443
7444 2001-04-08  Hrvoje Niksic  <hniksic@arsdigita.com>
7445
7446         * hash.c (hash_table_count): New function.
7447
7448 2001-04-06  Hrvoje Niksic  <hniksic@arsdigita.com>
7449
7450         * utils.c (read_file): Cast MAP_FAILED to char *.  Enforced by
7451         Digital Unix cc.
7452
7453 2001-04-06  Hrvoje Niksic  <hniksic@arsdigita.com>
7454
7455         * config.h.in: Oops, do the namespace tweaks only on systems we
7456         know about.
7457
7458 2001-04-06  Hrvoje Niksic  <hniksic@arsdigita.com>
7459
7460         * hash.c: Include <string.h>.
7461
7462 2001-04-06  Hrvoje Niksic  <hniksic@arsdigita.com>
7463
7464         * config.h.in: Define "compilation environment" options that work
7465         under Linux and Solaris.  To be reviewed on other OS'es.
7466
7467 2001-04-06  Hrvoje Niksic  <hniksic@arsdigita.com>
7468
7469         * http.c (gethttp): Prepend literal newline with `\n\'.
7470
7471 2001-04-06  Hrvoje Niksic  <hniksic@arsdigita.com>
7472
7473         * sysdep.h: Don't define VERY_LONG_FORMAT.
7474
7475         * utils.c (very_long_to_string): New function.
7476         (legible_very_long): Use it; don't use VERY_LONG_FORMAT.
7477
7478 2001-04-04  Christian Fraenkel  <christian.fraenkel@gmx.net>
7479
7480         * url.c (parse_uname): Would run past the end of the string if the
7481         username was present, but the URL did not contain a slash, e.g.
7482         http://foo:bar@myhost.
7483
7484 2001-04-03  KOJIMA Hajime  <kjm@rins.ryukoku.ac.jp>
7485
7486         * http.c (http_atotm): Use %A instead of %a to match full
7487         weekday.  (On most systems there is no difference.)
7488
7489 2001-04-03  Paul Bludov  <paul@ozero.net>
7490
7491         * mswindows.c (sleep): Use SleepEx() instead of Sleep().
7492         (ws_changetitle): Use alloca() instead of malloc() to avoid memory
7493         leak.
7494         (ws_mypath): Use GetModuleFileName instead of argv[0].
7495         (ws_startup): Use data.wVersion for comparison.
7496
7497 2001-04-02  Hrvoje Niksic  <hniksic@arsdigita.com>
7498
7499         * http.c (http_loop): Ditto.
7500
7501         * ftp.c (ftp_loop_internal): Made the check whether to continue
7502         retrieval `-O'-friendly.
7503
7504 2001-04-02  Hrvoje Niksic  <hniksic@arsdigita.com>
7505
7506         * netrc.c (parse_netrc): Don't trim the line endings explicitly;
7507         they will be handled as whitespace.
7508         (parse_netrc): Correctly handle lines that end with whitespace.
7509
7510 2001-04-02  Hrvoje Niksic  <hniksic@arsdigita.com>
7511
7512         * retr.c (retrieve_url): New variable global_download_count used
7513         to identify first retrieval.
7514
7515         * ftp.c (getftp): Ditto.
7516
7517         * http.c (gethttp): Rewind opt.dfp only on first retrieval.
7518
7519 2001-04-02  Hrvoje Niksic  <hniksic@arsdigita.com>
7520
7521         * init.c (cmd_address): Heap-allocate the address that gets stored
7522         to CLOSURE.  Old code would simply assign an address on the stack.
7523
7524 2001-04-01  Nicolas Lichtmaier <nick@debian.org>
7525
7526         * ftp.c (ftp_get_listing): Propagate error status.
7527         (ftp_retrieve_glob): Use it.
7528         (ftp_loop): Ditto.
7529
7530 2001-04-01  Nicolas Lichtmaier <nick@debian.org>
7531
7532         * main.c (main): Add -C to the string that is the third arg to
7533         getopt_long().
7534
7535 2001-04-01  Hrvoje Niksic  <hniksic@arsdigita.com>
7536
7537         * ftp.c (getftp): Don't start the download from scratch if `-c'
7538         was specified, but the file is already fully downloaded.
7539
7540         * http.c (gethttp): Don't truncate a pre-existing file if `-c' was
7541         specified and the server doesn't support continued download.
7542         (gethttp): Don't start the download from scratch if `-c' was
7543         specified, but the file is already fully downloaded.
7544
7545 2001-03-31  Hrvoje Niksic  <hniksic@arsdigita.com>
7546
7547         (recursive_retrieve): Don't clear the hash tables at this point at
7548         all; it interferes with the normal operation of register_download.
7549
7550 2001-03-31  Hrvoje Niksic  <hniksic@arsdigita.com>
7551
7552         * recur.c (recursive_retrieve): Clear the hash tables only when
7553         they are defined.
7554
7555 2001-03-31  Hrvoje Niksic  <hniksic@arsdigita.com>
7556
7557         * http.c (gethttp): Make sure the socket is closed with
7558         CLOSE_INVALIDATE before we have drained the body.
7559
7560 2001-03-31  Hrvoje Niksic  <hniksic@arsdigita.com>
7561
7562         * retr.c (retrieve_url): Call register_download() for downloaded
7563         files and register_html() for downloaded HTML files.
7564
7565         * recur.c (register_download): New function; register here that a
7566         file has been downloaded, rather than in recursive_retrieve().
7567         (register_html): New function; enqueue the location of HTML files
7568         here rather than in recursive_retrieve().
7569
7570 2001-03-31  Hrvoje Niksic  <hniksic@arsdigita.com>
7571
7572         * main.c (print_help): Use multiple fputs instead of a single ugly
7573         printf().
7574         (main): Consistently assign numbers >128 to options without a
7575         corresponding character.
7576
7577 2001-03-09  Philipp Thomas  <pthomas@suse.de>
7578
7579         * safe-ctype.h: New file. Locale independent ctype.h replacement
7580         taken from libiberty.
7581
7582         * safe-ctype.c: New file. Tables for above.
7583
7584         * Makefile.in: Add safe-ctype$o to OBJS.  Add dependencies for
7585         safe-ctype$o.
7586
7587         * cmpt.c: Remove include of ctype.h. Use ISSPACE instead of
7588         isspace.
7589
7590         * ftp-basic.c: Don't include ctype.h.
7591
7592         * ftp-ls.c: Likewise.
7593
7594         * ftp.c: Likewise.
7595
7596         * headers.c: Likewise.
7597
7598         * host.c: Likewise.
7599
7600         * html-parse.c: Likewise.
7601
7602         * html-url.c: Likewise.
7603
7604         * http.c: Likewise.
7605
7606         * init.c: Likewise.
7607
7608         * main.c: Likewise. Set LC_CTYPE along with LC_MESSAGES.
7609
7610         * netrc.c: Likewise.
7611
7612         * recur.c: Likewise.
7613
7614         * retr.c: Likewise.
7615
7616         * snprintf.c: Replace ctype.h with safe-ctype.h. Use ISDIGIT
7617         instead of isdigit.
7618
7619         * sysdep.h: Remove defines of ctype macros as they aren't needed
7620         for safe-ctype-h.
7621
7622         * url.c: Don't include ctype.h.
7623
7624         * utils.c: Likewise.
7625
7626         * wget.h: Include safe-ctype.h.
7627
7628 2001-03-27  Dan Harkless  <wget@harkless.org>
7629
7630         * Makefile.in: Moved top_builddir out of "User configuration
7631         section" of top Makefile and analogous spot in this one.
7632
7633 2001-03-17  Dan Harkless  <wget@harkless.org>
7634
7635         * Makefile.in: Include @SSL_INCLUDES@ substition in INCLUDES.
7636         Define top_builddir.  Link wget with libtool so the user doesn't
7637         have to supply a bunch of custom environment variables to 
7638         correctly link with the OpenSSL shared libraries.
7639
7640 2001-03-06  Hack Kampbjorn  <hack@hackdata.com>
7641
7642         * http.c (gethttp): skip :port in host header if it is the
7643         DEFAULT_HTTPS_PORT when using SSL.
7644
7645         * url.c: move the #define of DEFAULT_HTTP_PORT, DEFAULT_FTP_PORT
7646         and DEFAULT_HTTPS_PORT to the header file so it can be use in the
7647         rest of the code. 
7648         * url.h: Ditto
7649
7650 2001-03-01  Jonas Jensen  <bones@huleboer.dk>
7651
7652         * retr.c (show_progress): Correctly calculate the number of bytes
7653         in the first line of the download that have been actually
7654         downloaded in this run.
7655
7656 2001-02-23  Dan Harkless  <wget@harkless.org>
7657
7658         * main.c (print_help): --help documentation for -N said it would
7659         re-download files if they had the _same_ timestamp on server.
7660         (print_help): -nr belongs in "FTP options" section of --help
7661         output, not "Recursive retrieval" section.  Alphabetized FTP
7662         options by long option name.
7663
7664 2001-02-16  Dan Harkless  <wget@harkless.org>
7665
7666         * init.c (commands): Hack Kampbjørn <hack@hackdata.com> discovered
7667         that "httpsproxy" had been inserted into commands[] out of
7668         alphabetical order, causing "BUG: unknown command `httpuser'".
7669
7670 2001-02-13  Jan Prikryl  <prikryl@cg.tuwien.ac.at>
7671
7672         * ftp-ls.c (ftp_parse_ls): Added support of ST_MACOS (Unix-like
7673         listing without correct permissons).
7674
7675         * ftp.h (stype): Added ST_MACOS to identify the NetPresenz MacOS
7676         FTP server. 
7677
7678         * ftp.c (ftp_retrieve_list): New mirroring logic: A remote file
7679         shall be donwloaded only when it's newer than the local copy or
7680         when it has the same timeestamp but its size is different. ST_VMS
7681         and ST_MACOS as special cases that lie about file size. 
7682
7683         * ftp-ls.c (ftp_parse_ls): Support for ST_MACOS.
7684
7685         * Makefile.in: Removed dependency on ftpparse library due to unclear
7686         copyright issues and absence of any feedback to our queries. 
7687
7688         * ftp-ls.c: Removed dependency on ftpparse library due to unclear
7689         copyright issues and absence of any feedback to our queries.   
7690         (ftp_parse_ls): Added a warning message when remote server system
7691         does not seem to be suported by wget. 
7692         (ftp_parse_vms_ls): New function for parsing VMS ftp
7693         server listing output.
7694         (clean_line): New function responsible for removing
7695         end-of-line characters from FTP listing texts.
7696
7697         * ftp.c (getftp): Global variables pwd and host_type are now
7698         member of the ccon structure under names ccon.id and ccon.rs. 
7699
7700         * ftp.h (struct ccon): Added formed global variables from ftp.c,
7701         enum stype rs (remote system identification) and char *id (initial
7702         working directory), as suggested by Hrvoje.
7703
7704         * url.c (parse_uname): Added support for passwords containing '@'
7705         characters.
7706         (skip_uname): Ditto.
7707
7708 2001-02-11  Hrvoje Niksic  <hniksic@arsdigita.com>
7709
7710         * ftp.c (ftp_loop): Reset con.
7711
7712 2001-01-06  Jan Prikryl  <prikryl@cg.tuwien.ac.at>
7713
7714         * url.c (parse_uname): Added support for passwords containing '@'
7715         characters.
7716         (skip_uname): Ditto.
7717
7718 2001-02-11  Hack Kampbjørn  <hack@hackdata.com>
7719
7720         * url.c (parseurl): Debug-print u->ftp_type.
7721
7722 2001-02-11  Hrvoje Niksic  <hniksic@arsdigita.com>
7723
7724         * ftp.c (ftp_loop_internal): Disable padding.
7725         (getftp): Ditto.
7726
7727         * http.c (http_loop): Disable padding.
7728
7729         * retr.c (show_progress): Use it to enable padding.
7730
7731         * retr.c (rate): Optional parameter PAD for padding the rate.
7732
7733 2001-02-10  Hrvoje Niksic  <hniksic@arsdigita.com>
7734
7735         * retr.c (show_progress): Make sure that the last output line
7736         includes progress.
7737
7738 2001-02-10  Jonas Jensen  <bones@huleboer.dk>
7739
7740         * retr.c (show_progress): Print the download rate along with the
7741         percentages.
7742         Along with Anders Thorsby <anders@thorsby.dk>.
7743
7744 2001-02-10  Tim Mooney  <mooney@dogbert.cc.ndsu.NoDak.edu>
7745
7746         * ftp.h: Rename enums `command' to `wget_ftp_command' and
7747         `fstatus' to `wget_ftp_status' because old names clash with Tru64
7748         net/if.h.
7749
7750 2001-02-08  Christian Fraenkel <christian.fraenkel@gmx.net>
7751
7752         * gen_sslfunc.c: verify_callback is now static
7753
7754         * gen_sslfunc.c (init_ssl): load certificate if specified
7755
7756         * gen_sslfunc.c (ssl_printerr): new function
7757
7758         * init.c: added new --sslcertfile and --sslcertkey switches
7759
7760         * main.c: ditto
7761
7762         * options.h: ditto
7763
7764         * http.c (gethttp): abort when init_ssl fails
7765
7766 2001-01-23  Herold Heiko  <Heiko.Herold@previnet.it>
7767
7768         * mswindows.h: Include <malloc.h>; it's needed for alloca().
7769
7770 2001-01-10  Dan Harkless  <wget@harkless.org>
7771
7772         * url.c (str_url): Clarified this function's comment header after
7773         Hrvoje answered my question on the list as to when hide != 1.
7774         Also Hrvoje pointed out I need to use xstrdup() on the string literal.
7775
7776 2001-01-06  Hrvoje Niksic  <hniksic@arsdigita.com>
7777
7778         * connect.c (bindport): Declare addrlen as int.  Diagnosed by
7779         Drazen Kacar <dave@arsdigita.com>.
7780         (conaddr): Ditto.
7781
7782 2001-01-09  Dan Harkless  <wget@harkless.org>
7783
7784         * html-url.c: A bunch of fixup of `--page-requisites'-related
7785         comments to reflect Hrvoje's changes to my code when transplanting
7786         it into this new file, to fix spelling mistakes, to clarify, etc.
7787
7788         * url.c (write_backup_file): Clarified a comment.
7789         (str_url): Henrik van Ginhoven pointed out on the list that we
7790         shouldn't give away the number of characters in the password by
7791         replacing each character with a 'x'.  Use "<password>" instead.
7792
7793         * ftp.c (ftp_retrieve_dirs): The bug where recursion into FTP
7794         directories didn't work if logging in put you in a directory other
7795         than "/" is fixed now.  Removed the comment here warning of the bug.
7796
7797         * main.c (print_help): --continue's description was misleading.
7798         We don't "restart", we "resume".  Also, better to say
7799         "partially-downloaded file" rather than just "existing file".
7800
7801 2001-01-06  Dan Harkless  <wget@harkless.org>
7802
7803         * ChangeLog: The '[Not in 1.6 branch.]'s were decided not to be
7804         the best way to go about my aim.  Removed them in favor of:
7805
7806         * ChangeLog-branches/1.6_branch.ChangeLog: New file.
7807
7808 2001-01-04  Hrvoje Niksic  <hniksic@arsdigita.com>
7809
7810         * url.c (replace_attr): New function, to be used by both
7811         TO_COMPLETE and TO_RELATIVE case in convert_links.
7812         (find_fragment): New function for finding URL fragments.
7813         (replace_attr): Better handle the case where the original string
7814         is not quoted.  Use find_fragment.
7815         (convert_links): Use replace_attr().
7816
7817 2000-12-31  Dan Harkless  <wget@harkless.org>
7818
7819         * ChangeLog: Since this flat file doesn't have multiple branches,
7820         looking at the dates would make you think that things went into
7821         1.6 that actually just went into the 1.7-dev branch.  Added "[Not
7822         in 1.6 branch.]" where appropriate to clarify.
7823         
7824 2000-12-30  Dan Harkless  <wget@harkless.org>
7825
7826         * ftp.c, http.c:  Applied Hack Kampbjørn <hack@hackdata.com>'s
7827         patch to deal with h_errno not being defined in netdb.h under Cygwin.
7828
7829 2000-12-18  Csaba Raduly  <csaba.raduly@sophos.com>
7830
7831         * sysdep.h: Include <malloc.h> and <io.h> under Watcom.
7832
7833 2000-12-17  Igor Khristophorov  <igor@atdot.org>
7834
7835         * http.c (check_end): Fix test for '+' or '-'.
7836
7837 2000-12-17  Hrvoje Niksic  <hniksic@arsdigita.com>
7838
7839         * url.c (parseurl): Rename inner loop var from i to ind to avoid
7840         clash with the function top-level-declared variable i.
7841         (str_url): Likewise, rename inner-loop i to j.
7842
7843         * recur.c (parse_robots): Don't declare LEN at top of function.
7844         (robots_match): Renamed parameter FORBIDDEN to avoid hiding of
7845         global variable.
7846
7847         * main.c (main): Change erroneous use of bitwise and to logical.
7848
7849         * init.c (cmd_address): Don't heap-allocate `sin'; it can be on
7850         the stack because it will be copied to closure.
7851
7852         Thanks to Csaba Raduly's run of PC-LINT over the sources.
7853
7854 2000-12-17  Hrvoje Niksic  <hniksic@arsdigita.com>
7855
7856         * http.c (basic_authentication_encode): Use xmalloc(), not
7857         malloc().  Thanks to Csaba Raduly's run of PC-LINT over the
7858         sources.
7859
7860 2000-12-17  Csaba Raduly  <csaba.raduly@sophos.com>
7861
7862         * sysdep.h: Test for __EMX__ rather than for EMXOS2 for OS/2
7863         compilation.
7864
7865 2000-12-17  Hrvoje Niksic  <hniksic@arsdigita.com>
7866
7867         * mswindows.c: Include <errno.h>.
7868
7869         * gen_sslfunc.c: Include <errno.h>.
7870
7871         * ftp-basic.c: Don't attempt to declare errno or h_errno because
7872         they're not used.
7873
7874         * main.c: Include <errno.h> because errno is used.
7875
7876         * ftp.c: Ditto.
7877
7878         * http.c: Include <netdb.h> for h_errno.
7879
7880 2000-12-13  Hrvoje Niksic  <hniksic@arsdigita.com>
7881
7882         * html-parse.c (advance_declaration): MSVC assert() chokes on
7883         '\"'.  Use '"' instead.
7884
7885 2000-12-11  Hrvoje Niksic  <hniksic@arsdigita.com>
7886
7887         * utils.c (xfree_real): Removed.
7888         (xfree_debug): Just call free().
7889
7890         * wget.h (xfree): Make it an alias for free.
7891
7892 2000-12-11  Hrvoje Niksic  <hniksic@arsdigita.com>
7893
7894         * http.c (http_loop): Furthermore, touch output_document only if
7895         it is known to be an existing regular file.
7896
7897 2000-12-11  Hrvoje Niksic  <hniksic@arsdigita.com>
7898
7899         * ftp.c (ftp_retrieve_list): Ditto.
7900
7901         * http.c (http_loop): Touch output_document if that is used for
7902         output.
7903
7904 2000-12-06  Hrvoje Niksic  <hniksic@arsdigita.com>
7905
7906         * http.c: Include gen_sslfunc.h after including Wget's headers.
7907         (persistent_available_p): Needed coma before `int ssl'.
7908
7909 2000-12-06  Hrvoje Niksic  <hniksic@arsdigita.com>
7910
7911         * ftp.c (ftp_loop_internal): Ditto.
7912
7913         * http.c (http_loop): Use it.
7914
7915         * retr.c (sleep_between_retrievals): New function that handles the
7916         logic of opt.wait and opt.waitretry.
7917
7918 2000-12-06  Hrvoje Niksic  <hniksic@arsdigita.com>
7919
7920         * rbuf.h: Implement only a single version of RBUF_READCHAR, using
7921         rbuf_read_bufferful when the buffer is depleted.
7922
7923         * rbuf.c (rbuf_read_bufferful): New function.
7924
7925 2000-12-06  Hrvoje Niksic  <hniksic@arsdigita.com>
7926
7927         * gen_sslfunc.h: Use ansi2knr style function declarations.
7928
7929         * gen_sslfunc.c: Reformat according to the GNU coding standards.
7930         More should be done.
7931
7932         * http.c (persistent_available_p): Place the cheap SSL test nearer
7933         the top of the function.
7934         (CLOSE_FINISH, CLOSE_INVALIDATE): Define only one version of each.
7935
7936 2000-12-05  Hrvoje Niksic  <hniksic@arsdigita.com>
7937
7938         * url.c (init_unsafe_char_table): Reinstate space as an unsafe
7939         char.
7940
7941 2000-12-03  Christian Fraenkel <christian.fraenkel@gmx.net>
7942
7943         * Makefile.in: added gen_sslfunc object
7944         * config.h.in: added HAVE_SSL define
7945         * connect.c: changed select_fd from static int to int
7946         * connect.h: ditto
7947         * gen_sslfunc.h: New file
7948         * gen_sslfunc.c: ditto
7949         * http.c: added HTTPS fuctionality
7950         * retrc.c: ditto
7951         * url.c: ditto
7952         * init.c: added opt.httpsproxy
7953         * options.h: ditto
7954         * rbuf.h: added alternate rbuf struct
7955         * wget.h: added CONSSLERR
7956         * rbuf.c: ditto
7957
7958         * http.c: Added HTTPS fuctionality.
7959
7960         * retrc.c: Ditto.
7961
7962         * url.c: Ditto.
7963
7964         * init.c: Added opt.httpsproxy.
7965
7966         * options.h: Ditto.
7967
7968         * rbuf.h: Added alternate rbuf struct.
7969
7970         * wget.h: Added CONSSLERR.
7971
7972         * rbuf.c: Ditto.
7973
7974 2000-11-30  Jan Prikryl  <prikryl@cg.tuwien.ac.at>
7975
7976         * ftp-ls.c (ftp_parse_unix_ls): Added second parameter
7977         "ignore_perms" to ignore file and directory permissions for
7978         Windows NT FTP server listings.
7979         (ftp_parse_winnt_ls): New function.
7980         (ftp_parse_ls): Parses UNIX and Windows NT listings
7981         separately. Simple heuristics for distinguishing between UNIX and
7982         MS-DOS-like FTP listing provided by Windows NT FTP service.
7983
7984 2000-11-18  Jan Prikryl  <prikryl@cg.tuwien.ac.at>
7985
7986         * ftpparse.c, ftpparse.h: New files.
7987
7988         * ftp-ls.c (ftp_parse_ls): Use ftp_parse_unix_ls for UNIX servers
7989         only. Use ftp_parse_nonunix_ls otherwise.
7990         (ftp_parse_nonunix_ls): Stub to the ftpparse library handling all
7991         exotic FTP servers.
7992
7993         * ftp.h (stype): New enum, distinguishes UNIX, VMS, and "other"
7994         FTP servers.
7995
7996         * ftp.c: New static wariables host_type, pwd, and pwd_len. 
7997         (getftp): Support for VMS. Support for FTP servers that do not
7998         place you in the root directory after login.
7999         (ftp_retrieve_list): VMS is silent about the real file size, issue
8000         a more appropriate message.
8001         (ftp_get_listing): Pass host_type to ftp_parse_ls.
8002
8003         * ftp-basic.c (ftp_pwd, ftp_syst): New functions.
8004
8005 2000-11-30  Jan Prikryl  <prikryl@cg.tuwien.ac.at>
8006
8007         * ftp-ls.c (ftp_parse_unix_ls): Added second parameter
8008         "ignore_perms" to ignore file and directory permissions for
8009         Windows NT FTP server listings.
8010         (ftp_parse_winnt_ls): New function.
8011         (ftp_parse_ls): Parses UNIX and Windows NT listings
8012         separately. Simple heuristics for distinguishing between UNIX
8013         and MS-DOS-like FTP listing provided by Windows NT FTP service.
8014
8015 2000-11-29  John Summerfield  <summer@OS2.ami.com.au>
8016
8017         * netrc.c (parse_netrc): Get rid of line ending.
8018
8019 2000-11-25  Hrvoje Niksic  <hniksic@arsdigita.com>
8020
8021         * ftp.c (ftp_retrieve_list): Undo typo "fix" until resolution by
8022         Dan.
8023
8024 2000-11-24  Karl Eichwalder  <ke@suse.de>
8025
8026         * main.c (print_help): Untabify.
8027
8028 2000-11-23  Hrvoje Niksic  <hniksic@arsdigita.com>
8029
8030         * utils.c (xrealloc_debug): Do the unregister/register thing only
8031         if the pointer has actually changed.
8032         (xmalloc_real): Declare `static' in DEBUG_MALLOC builds.
8033         (xfree_real): Ditto.
8034         (xrealloc_real): Ditto.
8035         (xstrdup_real): Ditto.
8036
8037 2000-11-22  Hrvoje Niksic  <hniksic@arsdigita.com>
8038
8039         * ftp.c (getftp): ftp_getaddress() returns a malloc'ed copy of the
8040         string; no need to strdup() it.
8041         (getftp): Make pwd_len a local variable.
8042         (ftp_loop): Free PWD before returning.
8043
8044         * init.c (cleanup): Free opt.ftp_pass only if it's non-NULL.
8045
8046 2000-11-22  Hrvoje Niksic  <hniksic@arsdigita.com>
8047
8048         * all: Use xfree() instead of free.
8049
8050         * utils.c (xfree): New function.
8051
8052 2000-11-21  Hrvoje Niksic  <hniksic@arsdigita.com>
8053
8054         * url.c (convert_links): HTML-quote the converted string.
8055
8056         * utils.c (html_quote_string): Move here from ftp-ls.c
8057         (html_quote_string): Make non-static; declare in utils.h.
8058         (html_quote_string): Convert SP to &#32;.
8059
8060 2000-11-21  Hrvoje Niksic  <hniksic@arsdigita.com>
8061
8062         * ftp.c (getftp): Reformat Jan's code according to GNU coding
8063         standards; remove (debugging?) printf's; use '\0' for the ASCII
8064         zero character.  Use alloca() instead of malloc() for
8065         inter-function temporary allocations.
8066
8067 2000-11-18  Jan Prikryl  <prikryl@cg.tuwien.ac.at>
8068
8069         * ftpparse.c, ftpparse.h: New files.
8070
8071         * ftp-ls.c (ftp_parse_ls): Use ftp_parse_unix_ls for UNIX servers
8072         only. Use ftp_parse_nonunix_ls otherwise.
8073         (ftp_parse_nonunix_ls): Stub to the ftpparse library handling all
8074         exotic FTP servers.
8075
8076         * ftp.h (stype): New enum, distinguishes UNIX, VMS, and "other"
8077         FTP servers.
8078
8079         * ftp.c: New static wariables host_type, pwd, and pwd_len. 
8080         (getftp): Support for VMS. Support for FTP servers that do not
8081         place you in the root directory after login.
8082         (ftp_retrieve_list): VMS is silent about the real file size, issue
8083         a more appropriate message.
8084         (ftp_get_listing): Pass host_type to ftp_parse_ls.
8085
8086         * ftp-basic.c (ftp_pwd, ftp_syst): New functions.
8087
8088 2000-11-21  Hrvoje Niksic  <hniksic@arsdigita.com>
8089
8090         * hash.c (hash_table_put): Don't overwrite deleted mappings.
8091
8092 2000-11-21  Hrvoje Niksic  <hniksic@arsdigita.com>
8093
8094         * hash.c (find_mapping): New function.
8095         (hash_table_get): Use it.
8096         (hash_table_get_pair): Ditto.
8097         (hash_table_exists): Ditto.
8098         (hash_table_remove): Ditto.
8099         (hash_table_remove): Really delete the entry if the mapping
8100         following LOCATION is empty.
8101
8102         * utils.c (string_set_add): Check whether the element has existed
8103         before.
8104
8105         * hash.c (hash_table_get_pair): New function.
8106
8107 2000-11-20  Hrvoje Niksic  <hniksic@arsdigita.com>
8108
8109         * http.c (http_process_type): Ignore trailing whitespace; use
8110         strdupdelim().
8111
8112         * recur.c (recursive_retrieve): Use the new `convert' field.
8113         (convert_all_links): Ditto.
8114         (convert_all_links): Don't respect meta_disallow_follow.
8115
8116         * html-url.c (handle_link): Fill out link_relative_p and
8117         link_complete_p.
8118
8119         * url.h (struct _urlpos): Make elements more readable.
8120
8121         * recur.c (recursive_retrieve): Call slist_prepend instead of
8122         slist_append.
8123         (convert_all_links): Call slist_nreverse before iterating through
8124         urls_html.
8125
8126         * utils.c (slist_prepend): New function.
8127         (slist_nreverse): Ditto.
8128
8129 2000-11-20  Hrvoje Niksic  <hniksic@arsdigita.com>
8130
8131         * http.c (check_end): Constify.
8132
8133 2000-11-20  Hrvoje Niksic  <hniksic@arsdigita.com>
8134
8135         * http.c (http_loop): If username and password are known, try the
8136         `Basic' authentication scheme by default.
8137
8138         * connect.h: Declare test_socket_open.
8139
8140 2000-11-20  Hrvoje Niksic  <hniksic@arsdigita.com>
8141
8142         * version.c: Bump version from 1.5.3+dev to 1.7-dev.
8143
8144 2000-11-20  Hrvoje Niksic  <hniksic@arsdigita.com>
8145
8146         * http.c (gethttp): Don't use the return value of sprintf().
8147         (gethttp): Inhibit keep-alive if opt.http_keep_alive is 0.
8148
8149 2000-11-20  Hrvoje Niksic  <hniksic@arsdigita.com>
8150
8151         * recur.c (recursive_retrieve): Print the "so we don't load"
8152         debugging message only if we really don't load.
8153
8154         * http.c (gethttp): Inhibit keep-alive if proxy is being used.
8155         (gethttp): Don't request keep-alive if keep-alive is inhibited.
8156
8157 2000-11-19  Hrvoje Niksic  <hniksic@arsdigita.com>
8158
8159         * http.c (gethttp): Make the HTTP persistent connections more
8160         robust.
8161
8162 2000-11-19  Hrvoje Niksic  <hniksic@arsdigita.com>
8163
8164         * retr.c (get_contents): If use_expected, make sure that the
8165         appropriate amount of data is being read.
8166
8167         * http.c (gethttp): Check for both `Keep-Alive: ...' and
8168         `Connection: Keep-Alive'.
8169
8170         * wget.h (DEBUGP): Call debug_logprintf only if opt.debug is
8171         turned on.
8172
8173 2000-11-19  Hrvoje Niksic  <hniksic@arsdigita.com>
8174
8175         * http.c (connection_available_p): Use it.
8176
8177         * connect.c (test_socket_open): New function.
8178
8179         * http.c (gethttp): Support persistent connections.  Based on the
8180         ideas, and partly on code, by Sam Horrocks <sam@daemoninc.com>.
8181         (register_persistent): New function.
8182         (connection_available_p): Ditto.
8183         (invalidate_connection): Ditto.
8184
8185 2000-11-19  Hrvoje Niksic  <hniksic@arsdigita.com>
8186
8187         * url.c (convert_links): Handle UREL2ABS case.
8188
8189         * recur.c (recursive_retrieve): Instead of the list
8190         urls_downloaded, use hash tables dl_file_url_map and
8191         dl_url_file_map.
8192         (convert_all_links): Use them to retrieve data.
8193
8194         * host.c (clean_hosts): Free the hash tables.
8195
8196         * main.c (private_initialize): Call host_init().
8197
8198         * host.c (store_hostaddress): Use a saner, hash table-based data
8199         model.
8200         (realhost): Ditto.
8201         (host_init): Initialize the hash tables.
8202
8203 2000-11-18  Hrvoje Niksic  <hniksic@arsdigita.com>
8204
8205         * utils.c (slist_append): Eviscerate NOSORT.  Hash tables are now
8206         used for what the sorted slists used to be used for.
8207         (slist_contains): Don't rely on the list being sorted.
8208         (slist_append): Simplify the code.
8209
8210         * recur.c (recursive_cleanup): Use free_string_set.
8211
8212         * utils.c (string_set_add, string_set_exists, string_set_free):
8213         New functions for easier freeing of hash tables whose keys are
8214         strdup'ed strings.
8215
8216         * recur.c (recursive_retrieve): Use the hash table functions for
8217         storing undesirable URLs.
8218
8219         * hash.c: New file.
8220
8221 2000-11-17  Hrvoje Niksic  <hniksic@arsdigita.com>
8222
8223         * main.c (private_initialize): Call url_init.
8224         (main): Call private_initialize.
8225
8226         * url.c (unsafe_char_table): New table.
8227         (UNSAFE_CHAR): Use it.
8228         (init_unsafe_char_table): New function.
8229         (url_init): New function; call init_unsafe_char_table.
8230
8231 2000-11-16  Hrvoje Niksic  <hniksic@arsdigita.com>
8232
8233         * mswindows.h: Define snprintf and vsnprintf to _snprintf and
8234         _vsnprintf respectively.
8235
8236 2000-11-15  Hrvoje Niksic  <hniksic@arsdigita.com>
8237
8238         * config.h.in: Do the _XOPEN_SOURCE and _SVID_SOURCE things only
8239         on Linux.
8240
8241 2000-11-15  Hrvoje Niksic  <hniksic@arsdigita.com>
8242
8243         * html-url.c (handle_link): Handle HTML fragment identifiers.
8244
8245         * recur.c (recursive_retrieve): If norobot info is respected and
8246         the file is specified not to be followed by robots, respect that.
8247
8248         * html-url.c (collect_tags_mapper): Handle <meta name=robots
8249         content=X>.  For us the important cases are where X is NONE or
8250         where X contains NOFOLLOW.
8251         (get_urls_html): Propagate that information to the caller.
8252
8253 2000-11-13  Hrvoje Niksic  <hniksic@arsdigita.com>
8254
8255         * url.c (convert_links): Unlink the file we might be reading from
8256         before writing to it.
8257         (convert_links): Use alloca instead of malloc for
8258         filename_plus_orig_suffix.
8259
8260 2000-11-12  Hrvoje Niksic  <hniksic@arsdigita.com>
8261
8262         * host.c (realhost): Add HOST to the list with quality==0 only if
8263         it wasn't already there.
8264         Based on analysis by Lu Guohan <feng@public.bjnet.edu.cn>.
8265
8266 2000-11-10  Hrvoje Niksic  <hniksic@arsdigita.com>
8267
8268         * url.c (get_urls_file): Ditto.
8269         (convert_links): Ditto.
8270
8271         * html-url.c (get_urls_html): Use read_file() instead of
8272         load_file().
8273
8274         * utils.c (read_file): New function, instead of the old
8275         load_file().
8276         (read_file_free): Ditto.
8277
8278         * url.c (findurl): Search only for the supported protocols.
8279         (convert_links): Use fwrite() when writing out a region of
8280         characters.
8281
8282 2000-11-10  Hrvoje Niksic  <hniksic@arsdigita.com>
8283
8284         * ftp-ls.c: Move html_quote_string and ftp_index here.
8285
8286         * url.c: Remove get_urls_html, since that's now in html-url.c.
8287
8288         * html-url.c: New file.
8289
8290         * html-parse.c: New file.
8291
8292 2000-11-10  Hrvoje Niksic  <hniksic@arsdigita.com>
8293
8294         * init.c (run_wgetrc): Don't bother killing off '\r' since
8295         pars_line() skips whitespace at end of line anyway.
8296         (parse_line): Oops, it didn't.  Now it does.
8297
8298         * recur.c (parse_robots): Ditto here.
8299
8300         * ftp-ls.c (ftp_parse_unix_ls): Kill off the newline character
8301         manually because read_whole_line no longer does.
8302
8303         * utils.c (read_whole_line): Rewrite to: a) use less memory
8304         (reallocates to needed size after work), b) work faster -->
8305         fgets() instead of getc, c) be more correct --> doesn't kill the
8306         newline character at the end of line.
8307
8308 2000-11-10  Hrvoje Niksic  <hniksic@arsdigita.com>
8309
8310         * init.c (comind): Initialize MAX to array size - 1.
8311
8312 2000-11-08  Hrvoje Niksic  <hniksic@arsdigita.com>
8313
8314         * url.c (construct): Changed last_slash[-1] to *(last_slash - 1).
8315         Suggested by Edward J. Sabol.
8316
8317 2000-11-08  Hrvoje Niksic  <hniksic@arsdigita.com>
8318
8319         * url.c (construct): Handle the case where host name is not
8320         followed by a slash.
8321
8322 2000-11-06  Hrvoje Niksic  <hniksic@arsdigita.com>
8323
8324         * init.c: commands[] need to be sorted!  ("base" wasn't.)
8325
8326 2000-11-05  Hrvoje Niksic  <hniksic@arsdigita.com>
8327
8328         * wget.h (DO_REALLOC_FROM_ALLOCA): Use braces to disambiguate
8329         `if'.
8330
8331 2000-11-05  Hrvoje Niksic  <hniksic@arsdigita.com>
8332
8333         * url.c (construct): Insert unneeded initialization for the
8334         compiler to shut up.
8335
8336         * config.h.in: Define _XOPEN_SOURCE to 500 to get the prototype
8337         for strptime() (*duh*).  Define _SVID_SOURCE to get S_IFLNK which
8338         otherwise gets lost when you define _XOPEN_SOURCE.
8339
8340         * utils.c (touch): Include the file name in the error message.
8341         From Debian.
8342
8343 2000-11-05  Hrvoje Niksic  <hniksic@arsdigita.com>
8344
8345         * log.c (logvprintf): Use vsnprintf() in all cases.  If necessary,
8346         resize the buffer to fit the formated message.  That way, messages
8347         of arbitrary size may be printed.
8348         (logvprintf): Use saved_append() to optionally log the last
8349         several lines of output.
8350         (logputs): Ditto.
8351         (log_close): Adapt to new data structures.
8352         (log_dump): Ditto.
8353         (redirect_output): Print messages to stderr, not to stdout.
8354
8355         * log.c (saved_append_1): New function.  Replaces the old logging
8356         system ("log all output until 10M characters") with a new, much
8357         more reasonable one ("log last screenful of text").
8358         (saved_append): New function; call saved_append_1.
8359         (free_log_line): New function.
8360
8361 2000-11-05  Hrvoje Niksic  <hniksic@arsdigita.com>
8362
8363         * url.c (construct): Fix comment.
8364         (find_last_char): Document.
8365
8366 2000-11-04  Hrvoje Niksic  <hniksic@arsdigita.com>
8367
8368         * snprintf.c: New file.
8369
8370 2000-11-03  Hrvoje Niksic  <hniksic@arsdigita.com>
8371
8372         * wget.h: If HAVE_STDARG_H is not defined, don't declare argument
8373         types to logprintf() and debug_logprintf().
8374
8375 2000-11-02  Hrvoje Niksic  <hniksic@arsdigita.com>
8376
8377         * ftp.c (ftp_loop_internal): Hide the password from the URL when
8378         printing non-verbose.  Problem spotted by Dariusz Mlynarczyk
8379         <darekm@bydg.lomac.com.pl>.
8380
8381 2000-11-02  Junio Hamano  <junio@twinsun.com>
8382
8383         * ftp-basic.c (ftp_login): Make comparison case-insensitive.
8384
8385 2000-11-02  Tyler Riddle  <triddle@liquidmarket.com>
8386
8387         * http.c (known_authentication_scheme_p): Recognize NTML
8388         authentication.
8389         (create_authorization_line): Treat NTML the same as `Basic'.
8390
8391 2000-11-02  Hrvoje Niksic  <hniksic@arsdigita.com>
8392
8393         * retr.c (retrieve_url): Free url before returning.
8394         (retrieve_url): Free mynewloc before returning.
8395         Spotted by Mark A. Mankins <Mankins_Mark@prc.com>.
8396
8397 2000-11-02  Hrvoje Niksic  <hniksic@arsdigita.com>
8398
8399         * url.c (parseurl): Remove possible reading past the end of
8400         sup_protos[].  Spotted by Mark A. Mankins <Mankins_Mark@prc.com>.
8401
8402 2000-11-01  Hrvoje Niksic  <hniksic@arsdigita.com>
8403
8404         * main.c (main): In case of opt.downloaded overflowing, print
8405         <overflow> instead of a totally bogus random value.
8406
8407         * retr.c (retrieve_from_file): Ditto.
8408
8409         * recur.c (recursive_retrieve): Ditto.
8410
8411         * main.c (main): Ditto.
8412
8413         * http.c (http_loop): Ditto.
8414
8415         * ftp.c (ftp_loop_internal): Use downloaded_increase() instead of
8416         `+=', and downloaded_exceeds_quota() instead of the simple-minded
8417         check.
8418         (ftp_retrieve_list): Ditto.
8419         (ftp_retrieve_dirs): Ditto.
8420         (ftp_retrieve_glob): Ditto.
8421
8422         * retr.c (downloaded_increase): New function.  Notice overflows of
8423         opt.downloaded.
8424         (downloaded_exceeds_quota): Make sure that opt.downloaded is not
8425         used if it overflowed.
8426
8427         * options.h (struct options): New member downloaded_overflow.
8428
8429 2000-11-01  Hrvoje Niksic  <hniksic@arsdigita.com>
8430
8431         * wget.h (enum): Remove extra space after last enumeration.
8432
8433 2000-11-01  Hrvoje Niksic  <hniksic@arsdigita.com>
8434
8435         * main.c (main): Use legible_very_long() for printing
8436         opt.downloaded.
8437
8438         * utils.c (legible_1): New function that operates on strings and
8439         does the brunt of legible()'s work.
8440         (legible): Use legible_1().
8441         (legible_very_long): New function; dump the argument with
8442         sprintf(), and call legible_1().
8443
8444         * options.h (struct options): Use VERY_LONG_TYPE for
8445         opt.downloaded.
8446
8447         * sysdep.h (VERY_LONG_TYPE): Define it to have a 64-bit or greater
8448         type.
8449
8450         * config.h.in: Make sure that SIZEOF_LONG and SIZEOF_LONG_LONG get
8451         defined.  Define HAVE_LONG_LONG if long long is available.
8452
8453 2000-11-01  Hrvoje Niksic  <hniksic@arsdigita.com>
8454
8455         * utils.c (long_to_string): Update with a later, better version.
8456
8457 2000-11-01  Hrvoje Niksic  <hniksic@arsdigita.com>
8458
8459         * url.c (path_simplify_with_kludge): New function.
8460         (path_simplify_with_kludge): Disable it.  Instead...
8461         (parse_dir): ...make sure that at this point the right thing is
8462         done, i.e. that "query" part of the URL (?...) is always assigned
8463         to the file, never to the directory portion of the path.
8464
8465 2000-11-01  Hrvoje Niksic  <hniksic@arsdigita.com>
8466
8467         * retr.c (retrieve_url): Detect redirection cycles.
8468
8469 2000-11-01  Hrvoje Niksic  <hniksic@arsdigita.com>
8470
8471         * url.c (get_urls_html): Decode HTML entities using
8472         html_decode_entities.
8473
8474         * html.c (htmlfindurl): Don't count the `#' in numeric entities
8475         (&#NNN;) as an HTML fragemnt.
8476         (html_decode_entities): New function.
8477
8478 2000-11-01  Hrvoje Niksic  <hniksic@arsdigita.com>
8479
8480         * html.c (htmlfindurl): Fix recognition of # HTML fragments.
8481
8482 2000-11-01  Hrvoje Niksic  <hniksic@arsdigita.com>
8483
8484         * url.c (construct): Rewritten for clarity.  Avoids the
8485         unnecessary copying and stack-allocation the old version
8486         performed.
8487
8488 2000-10-31  Hrvoje Niksic  <hniksic@arsdigita.com>
8489
8490         * ftp.c (getftp): Ditto.
8491
8492         * http.c (gethttp): Rewind the stream when retrying from scratch.
8493
8494 2000-10-31  Hrvoje Niksic  <hniksic@arsdigita.com>
8495
8496         * retr.c (retrieve_url): Use url_concat() to handle relative
8497         redirections instead of /ad hoc/ code.
8498
8499         * url.c (url_concat): New function encapsulating weird
8500         construct().
8501         (urllen_http_hack): New function.
8502         (construct): When constructing new URLs, recognize that `?' does
8503         not form part of the file name in HTTP.
8504
8505 2000-10-13  Adrian Aichner  <adrian@xemacs.org>
8506
8507         * retr.c: Add msec timing support for WINDOWS.
8508         * retr.c (reset_timer): GetSystemTime() on WINDOWS.
8509         * retr.c (elapsed_time): Calculate delta time to msec on WINDOWS.
8510
8511 2000-10-27  Dan Harkless  <wget@harkless.org>
8512
8513         * retr.c (retrieve_url): Manually applied T. Bharath
8514         <TBharath@responsenetworks.com>'s patch to get wget to grok
8515         illegal relative URL redirects.  Reformatted and re-commented it.
8516
8517 2000-10-23  Dan Harkless  <wget@harkless.org>
8518
8519         * connect.c (make_connection and bindport): Manually applied Rob
8520         Mayoff <mayoff@dqd.com>'s 1.5.3 patch to add --bind-address,
8521         changing coding style to GNU's.
8522
8523         * ftp.c (ftp_loop_internal): --delete-after wasn't implemented for
8524         files downloaded via FTP.  Per a comment, .listing files were not
8525         counted towards number of bytes and files downloaded because they're 
8526         deleted anyway.  Well, they aren't under -nr, so count them then.
8527
8528         * init.c: Manually applied Rob Mayoff's 1.5.3 patch to add
8529         --bind-address, alphabetizing, changing coding style to GNU's,
8530         commenting, and renaming cmd_ip_address() to cmd_address() to
8531         imply hostnames also okay.
8532                 
8533         * main.c (main): --delete-after didn't delete the root of the
8534         tree.  Ignore --convert-links if --delete-after was specified.
8535         Manually applied Rob Mayoff's 1.5.3 patch to add --bind-address,
8536         fixing duplicate use of added-since-1.5.3 case value.
8537         (print_help): Clarified that --delete-after deletes local files.
8538         Rob forgot to add a line for his new --bind-address option.
8539                 
8540         * options.h (struct options): Manually applied Rob Mayoff's patch
8541         to add --bind-address (bind_address structure member).
8542                 
8543         * recur.c (recursive_retrieve): Improved comment; added DEBUGP().
8544         Ignore --convert-links if --delete-after was specified.
8545                 
8546         * retr.c (retrieve_from_file): Just added a DEBUGP().
8547                 
8548 2000-10-19  Dan Harkless  <wget@harkless.org>
8549
8550         * ftp.c (ftp_loop_internal): downloaded_file() enumerators changed.
8551         (getftp): Applied Piotr Sulecki <Piotr.Sulecki@ios.krakow.pl>'s
8552         patch to work around FTP servers that incorrectly respond to the
8553         "REST" command with the remaining size rather than the total file size.
8554                 
8555         * http.c (gethttp): Improved a comment and added code to tack on
8556         ".html" to text/html files without that extension when -E specified.
8557         (http_loop): Use new downloaded_file() enumerators and deal with
8558         the case of gethttp() called xrealloc() on u->local.
8559
8560         * init.c (commands): Added new "htmlextension" command.
8561         Also renamed John Daily's cmd_quad() to the more descriptive
8562         cmd_lockable_boolean(), alpha-sorted the CMD_DECLARE()s and
8563         removed duplicate cmd_boolean() declaration.
8564
8565         * main.c (print_help): Added my new -E / --html-extension option.
8566         (main): Undocumented --email-address option previously used -E synonym.
8567         Stole it away for the much more deserving --html-extension's use.
8568
8569         * options.h (struct options): Added html_extension field.
8570
8571         * url.c (convert_links): URL X that we saved as X.html locally due
8572         to -E needs to be backed up as X.orig, not X.html.orig.  Added comments.
8573         (downloaded_file): Now remembers if we added .html extension to a file.
8574
8575         * url.h (downloaded_file_t): Added extra enumerators to support above.
8576         (downloaded_file): Now takes and returns a downloaded_file_t.
8577
8578         * wget.h (unnamed "dt" enum): Added ADDED_HTML_EXTENSION enumerator.
8579         
8580 2000-10-09  Dan Harkless  <wget@harkless.org>
8581
8582         * html.c (htmlfindurl): Added unneeded initialization to quiet warning.
8583                 
8584         * main.c (print_help): Clarified what --retr-symlinks does.
8585         
8586 2000-09-15  John Daily  <jdaily@cyberdude.com>
8587
8588         * init.c: Add support for "always" and "never" values to allow
8589         .wgetrc to override commandline (useful e.g. with .pm files
8590         calling `wget --passive-ftp' when your firewall doesn't allow that).
8591
8592         * ftp.c (getftp): passive_ftp is first option to support always/never.
8593
8594 2000-08-30  Dan Harkless  <wget@harkless.org>
8595
8596         * ftp.c (ftp_retrieve_list): Use new INFINITE_RECURSION #define.
8597         
8598         * html.c: htmlfindurl() now takes final `dash_p_leaf_HTML' parameter.
8599         Wrapped some > 80-column lines.  When -p is specified and we're at a 
8600         leaf node, do not traverse <A>, <AREA>, or <LINK> tags other than 
8601         <LINK REL="stylesheet">.
8602         
8603         * html.h (htmlfindurl): Now takes final `dash_p_leaf_HTML' parameter.
8604         
8605         * init.c: Added new -p / --page-requisites / page_requisites option.
8606
8607         * main.c (print_help): Clarified that -l inf and -l 0 both allow
8608         infinite recursion.  Changed the unhelpful --mirrior description
8609         to simply give the options it's equivalent to.  Added new -p option.
8610         (main): Added some comments; handle new -p / --page-requisites.
8611         
8612         * options.h (struct options): Added new page_requisites field.
8613
8614         * recur.c: Changed "URL-s" to "URLs" and "HTML-s" to "HTMLs".
8615         Calculate and pass down new `dash_p_leaf_HTML' parameter to
8616         get_urls_html().  Use new INFINITE_RECURSION #define.
8617
8618         * retr.c: Changed "URL-s" to "URLs".  get_urls_html() now takes
8619         final `dash_p_leaf_HTML' parameter.
8620
8621         * url.c: get_urls_html() and htmlfindurl() now take final
8622         `dash_p_leaf_HTML' parameter.
8623
8624         * url.h (get_urls_html): Now takes final `dash_p_leaf_HTML' parameter.
8625
8626         * wget.h: Added some comments and new INFINITE_RECURSION #define.
8627         
8628 2000-08-23  Dan Harkless  <wget@harkless.org>
8629
8630         * main.c (print_help): -B / --base was not mentioned.
8631
8632 2000-08-22  Dan Harkless  <wget@harkless.org>
8633
8634         * main.c (print_help): Modified -nc description to mention that it
8635         also prevents the creation of multiple versions of the same file
8636         with ".<number>" suffixes.
8637
8638 2000-07-14  Jan Prikryl  <prikryl@cg.tuwien.ac.at>
8639
8640         * retr.c (retrieve_url): Consistently strdup opt.referer when
8641         setting u->referer.
8642
8643 2000-06-09  Dan Harkless  <wget@harkless.org>
8644
8645         * main.c (print_help): --help output for --waitretry was over 80 cols.
8646
8647 2000-06-09  Hrvoje Niksic  <hniksic@iskon.hr>
8648
8649         * url.c (encode_string): Fix comment.
8650         Suggested by Herold Heiko <Heiko.Herold@previnet.it>.
8651
8652 2000-06-01  Const Kaplinsky  <const@ce.cctpu.edu.ru>
8653
8654         * ftp.c (ftp_retrieve_list): Change permissions only on plain
8655         files.
8656
8657 2000-06-01  Hrvoje Niksic  <hniksic@iskon.hr>
8658
8659         * url.c (str_url): Print the port number only if it's different
8660         from the default port number for that protocol.
8661
8662 2000-05-22  Dan Harkless  <wget@harkless.org>
8663
8664         * main.c (print_help): Added --help line for Damir Dzeko
8665         <ddzeko@zesoi.fer.hr>'s until-now-undocumented --referer option.
8666         Removed comments that --referer and --waitretry were undocumented.
8667         Changed "`.wgetrc' command" to "`.wgetrc'-style command" on --help
8668         line for --execute.
8669
8670 2000-05-18  Hrvoje Niksic  <hniksic@iskon.hr>
8671
8672         * ftp.c (getftp): Ditto.
8673
8674         * http.c (gethttp): Check for return value of fclose/fflush.
8675
8676 2000-04-12  Hrvoje Niksic  <hniksic@iskon.hr>
8677
8678         * host.c (store_hostaddress): Instead of shifting ADDR, start
8679         copying from the correct address.
8680
8681 2000-04-12  Hrvoje Niksic  <hniksic@iskon.hr>
8682
8683         * http.c (gethttp): Don't free REQUEST -- it was allocated with
8684         alloca().
8685         Pointed out by Gisle Vanem <gvanem@eunet.no>.
8686
8687 2000-04-04  Dan Harkless  <wget@harkless.org>
8688
8689         * host.c (store_hostaddress): R. K. Owen's patch introduces a
8690         "left shift count >= width of type" warning on 32-bit
8691         architectures.  Got rid of it by tricking the compiler w/ a variable.
8692         
8693         * url.c (UNSAFE_CHAR): The macro didn't include all the illegal
8694         characters per RFC1738, namely everything above '~'.  It also
8695         generated a warning on OSes where char =~ unsigned char.  Fixed.
8696         
8697 1998-10-17  Hrvoje Niksic  <hniksic@srce.hr>
8698
8699         * http.c (http_process_type): Removed needless strdup(), a memory
8700         leak.
8701
8702 1998-09-25  Hrvoje Niksic  <hniksic@srce.hr>
8703
8704         * html.c (htmlfindurl): Set PH to the first occurrence of `#'.
8705
8706 1998-09-25  Simon Munton  <simonm@m4data.co.uk>
8707
8708         * init.c (wgetrc_file_name): Don't free HOME under Windows.
8709
8710 1998-12-01  "R. K. Owen"  <rkowen@Nersc.GOV>
8711
8712         * host.c (store_hostaddress): Fix for big endian 64-bit machines.
8713
8714 1998-12-01  Hrvoje Niksic  <hniksic@srce.hr>
8715
8716         * url.c (UNSAFE_CHAR): New macro.
8717         (contains_unsafe): Use it.
8718         (encode_string): Ditto.
8719
8720 1998-12-01  Hrvoje Niksic  <hniksic@srce.hr>
8721
8722         * main.c (i18n_initialize): Use LC_MESSAGES only if available.
8723
8724 2000-03-31  Hrvoje Niksic  <hniksic@srce.hr>
8725
8726         * Use TOUPPER/TOLOWER.
8727
8728 1998-12-22  Alexander V. Lukyanov  <lav@yars.free.net>
8729
8730         * ftp-opie.c (btoe): Zero-terminate OSTORE.
8731
8732 2000-03-21  Hrvoje Niksic  <hniksic@iskon.hr>
8733
8734         * wget.h (DO_REALLOC_FROM_ALLOCA): Ditto.
8735
8736         * sysdep.h (ISALNUM): New macro.
8737         (TOLOWER): Ditto.
8738         (TOUPPER): Ditto.
8739
8740 2000-03-10  Dan Harkless  <wget@harkless.org>
8741
8742         * html.c (idmatch): Implemented checking of my new --follow-tags
8743         and --ignore-tags options.
8744         
8745         * init.c (commands): Added comment reminding people adding new
8746         entries doing allocation to add corresponding freeing in cleanup().
8747         (commands): Added new followtags and ignoretags commands.
8748         (cleanup): Free storage for new followtags and ignoretags.
8749         
8750         * main.c: Use of "comma-separated list" was random -- normalized
8751         it.  Did some alphabetization.  Added comments pointing out
8752         "Options without arguments" and "Options accepting an argument"
8753         sections of long_options[].  Added new options --follow-tags and
8754         -G / --ignore-tags.  Added comment that Damir's --referer is
8755         currently undocumented.  Added comment that Heiko's --waitretry is
8756         partially undocumented (mentioned in --help but not in
8757         wget.texi).  Moved improperly sorted 24, 129, and 'G' cases.
8758         
8759         * options.h (struct options): Added new fields follow_tags and
8760         ignore_tags. 
8761         
8762         * wget.h: Added "#define EQ 0" so we can say "strcmp(a, b) == EQ".
8763         
8764 2000-03-02  Dan Harkless  <wget@harkless.org>
8765
8766         * ftp.c (ftp_loop_internal): Heiko introduced "suggest explicit
8767         braces to avoid ambiguous `else'" warnings.  Eliminated them.
8768         
8769         * http.c (gethttp): Dan Berger's query string patch is totally
8770         bogus.  If you have two different URLs, gen_page.cgi?page1 and
8771         get_page.cgi?page2, they'll both be saved as get_page.cgi and the
8772         second will overwrite the first.  Also, parameters to implicit
8773         CGIs, like "http://www.host.com/db/?2000-03-02" cause the URLs to
8774         be printed with trailing garbage characters, and could seg fault.
8775         Backing out the patch, which Dan B. informed me by email was just
8776         a kludge to download StarOffice from Sun made necessary due to
8777         wget's unconditional escaping of certain characters (room for an
8778         option there?).
8779         (http_loop): Heiko introduced "suggest explicit braces to avoid
8780         ambiguous `else'" warnings.  Eliminated them.
8781         
8782         * main.c: Heiko's --wait / --waitretry backwards compatibility
8783         code looks to have been totally untested -- automatic variable
8784         'wr' was used without being initialized, and a long int was passed
8785         into setval()'s char* val parameter.
8786         
8787         * recur.c (parse_robots): Applied Edward J. Sabol
8788         <sabol@alderaan.gsfc.nasa.gov>'s patch for Guan Yang's reported
8789         problem with "User-agent:<space>*<space>" lines in robots.txt.
8790         
8791         * url.c (parseurl, str_url): Removing Dan Berger's code (see
8792         http.c above for explanation).
8793         
8794 1999-08-25  Heiko Herold  <Heiko.Herold@previnet.it>
8795
8796         * ftp.c: Respect new option waitretry.
8797
8798 2000-01-30  Damir Dzeko  <ddzeko@zesoi.fer.hr>
8799
8800         * http.c (gethttp): Send custom Referer, if required.
8801
8802 1999-09-24  Charles G Waldman  <cgw@fnal.gov>
8803
8804         * netrc.c (parse_netrc): Allow passwords to contain spaces.
8805
8806         * netrc.c (parse_netrc): New function.
8807
8808 1999-09-17  Dan Berger  <dberger@ix.netcom.com>
8809
8810         * http.c (gethttp): Send it.
8811
8812         * url.c (parseurl): Detect query string in HTTP URL-s.
8813         (str_url): Print it.
8814
8815 2000-03-02  HIROSE Masaaki  <hirose31@t3.rim.or.jp>
8816
8817         * html.c (html_allow): Add <link href=...> and <script src=...>.
8818
8819 1999-05-02  andrew deryabin  <djsf@softhome.net>
8820
8821         * http.c (gethttp): Specify port in `Host' header only if it's
8822         different from 80.
8823
8824 1998-11-03  Edward J. Sabol  <sabol@alderaan.gsfc.nasa.gov>
8825
8826         * recur.c (recursive_retrieve): If a finite maximum depth is
8827         specified, and we're are already at that depth, don't download the
8828         HTML file for parsing.
8829
8830 2000-03-01  Dan Harkless  <wget@harkless.org>
8831
8832         * ftp.c (ftp_loop_internal): Call new downloaded_file() function,
8833         even though we don't do conversion on HTML files retrieved via
8834         FTP, so _current_ usage of downloaded_file() makes this call unneeded. 
8835         (ftp_retrieve_list): Added a comment saying where we need to
8836         stat() a .orig file if FTP'd HTML file conversion is ever implemented.
8837         (ftp_retrieve_list): "Local file '%s' is more recent," is sometimes
8838         a lie -- reworded as "Server file no newer than local file '%s' --".
8839         
8840         * http.c (http_loop): Fixed a typo and clarified a comment.
8841         (http_loop): When -K and -N are specified together, compare size
8842         and timestamp of server file X against local file X.orig (if
8843         extant) rather than converted local file X.
8844         (http_loop): "Local file '%s' is more recent," is sometimes a lie
8845         -- reworded as "Server file no newer than local file '%s' --".
8846         (http_loop): Call new downloaded_file() function to prevent
8847         wrongful overwriting of .orig file when -N is specified.
8848         
8849         * url.c (convert_links): When -K specified, only rename X to
8850         X.orig if downloaded_file() returns TRUE.  Otherwise when we skip
8851         file X due to -N, we clobber an X.orig from a previous invocation.
8852         (convert_links): Call the failsafe xstrdup(), not the real strdup().
8853         (convert_links): Added a note asking anyone who understands how
8854         multiple URLs can correspond to a single file to comment it.
8855         (downloaded_file): Added this new function.
8856         
8857         * url.h (downloaded_file): Added prototype for this new function
8858         as well as its downloaded_file_t enum type.
8859
8860         * wget.h (boolean): Added this new typedef and TRUE and FALSE #defines.
8861
8862 2000-02-29  Dan Harkless  <wget@harkless.org>
8863
8864         * version.c: Upped version to developer-only "1.5.3+dev".
8865
8866 2000-02-18  Dan Harkless  <wget@harkless.org>
8867
8868         * init.c (backup_converted): Added this new option.
8869
8870         * main.c (-K / --backup-converted): Added this new option.
8871
8872         * options.h (backup_converted): Added this new option.
8873
8874         * url.c (convert_links): When backup_converted is specified, save
8875         file X as X.orig before converting.
8876
8877         * url.h (urlpos): Fixed typo -- said "Rekative" instead of "Relative".
8878
8879 1998-09-21  Hrvoje Niksic  <hniksic@srce.hr>
8880
8881         * version.c: Wget 1.5.3 is released.
8882
8883 1998-09-21  Hrvoje Niksic  <hniksic@srce.hr>
8884
8885         * host.c (ftp_getaddress): Don't warn when reverse-lookup of local 
8886         address doesn't yield FQDN.
8887
8888 1998-09-21  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
8889
8890         * cmpt.c (strerror): Fix declaration of sys_errlist.
8891
8892 1998-09-11  Hrvoje Niksic  <hniksic@srce.hr>
8893
8894         * main.c (main): Don't use an array subscript as the first
8895         argument to STRDUP_ALLOCA.
8896         From Kaveh R. Ghazi.
8897
8898 1998-09-11  Szakacsits Szabolcs  <szaka@sienet.hu>
8899
8900         * html.c (htmlfindurl): Download table background.
8901
8902 1998-09-11  Hans Grobler  <grobh@conde.ee.sun.ac.za>
8903
8904         * init.c (parse_line): Would free *com before allocating it.
8905         (parse_line): Would free com instead of *com.
8906
8907 1998-09-10  Howard Gayle  <howard@fjst.com>
8908
8909         * url.c (get_urls_html): Would drop the last character of the
8910         link.
8911
8912 1998-09-10  Hrvoje Niksic  <hniksic@srce.hr>
8913
8914         * http.c (http_loop): Don't print status code if quiet.
8915
8916 1998-09-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8917
8918         * log.c: Use <stdarg.h> only when __STDC__.
8919
8920 1998-09-10  Adam D. Moss  <adam@foxbox.org>
8921
8922         * html.c (htmlfindurl): Download <layer src=...>.
8923
8924 1998-09-10  Howard Gayle  <howard@fjst.com>
8925
8926         * ftp.c (ftp_retrieve_list): Don't update the time stamp of a file 
8927         not retrieved.
8928
8929 1998-06-27  Hrvoje Niksic  <hniksic@srce.hr>
8930
8931         * utils.c: Include <libc.h> on NeXT.
8932
8933 1998-06-26  Heinz Salzmann  <heinz.salzmann@intermetall.de>
8934
8935         * url.c (get_urls_html): Fix calculation of URL position.
8936
8937 1998-06-23  Hrvoje Niksic  <hniksic@srce.hr>
8938
8939         * version.c: Wget 1.5.2 is released.
8940
8941 1998-06-23  Dave Love  <d.love@dl.ac.uk>
8942
8943         * ftp.c, init.c, netrc.c: Include errno.h.
8944
8945         * http.c: Include errno.h and time header.
8946
8947         * Makefile.in (exext): Define.
8948         (install.bin, uninstall.bin): Use it.
8949
8950 1998-06-21  Hrvoje Niksic  <hniksic@srce.hr>
8951
8952         * http.c (http_loop): Don't attempt to compare local and remote
8953         sizes if the remote size is unknown.
8954
8955 1998-06-16  Hrvoje Niksic  <hniksic@srce.hr>
8956
8957         * url.c (get_urls_html): Use malloc() instead of alloca in the
8958         loop.
8959
8960 1998-06-13  Hrvoje Niksic  <hniksic@srce.hr>
8961
8962         * version.c: Wget 1.5.2-b4 is released.
8963
8964 1998-06-13  Hrvoje Niksic  <hniksic@srce.hr>
8965
8966         * url.c (get_urls_html): Ignore spaces before and after the URI.
8967
8968 1998-06-08  Wanderlei Antonio Cavassin  <cavassin@conectiva.com.br>
8969
8970         * ftp.c (getftp): Translate `done'.
8971
8972 1998-06-06  Hrvoje Niksic  <hniksic@srce.hr>
8973
8974         * version.c: Wget 1.5.2-b3 is released.
8975
8976 1998-06-06  Alexander Kourakos  <awk@bnt.com>
8977
8978         * init.c (cleanup): Close dfp, don't free it.
8979
8980 1998-06-06  Hrvoje Niksic  <hniksic@srce.hr>
8981
8982         * utils.c (make_directory): Twiddle.
8983
8984         * config.h.in: Added template for access().
8985
8986 1998-06-05  Mathieu Guillaume  <mat@cythere.com>
8987
8988         * html.c (htmlfindurl): Download <input src=...>
8989
8990 1998-06-03  Hrvoje Niksic  <hniksic@srce.hr>
8991
8992         * utils.c (file_exists_p): Use access() with two arguments.
8993
8994 1998-05-27  Martin Kraemer  <Martin.Kraemer@mch.sni.de>
8995
8996         * netrc.c (parse_netrc): Correct logic.
8997
8998 1998-05-27  Hrvoje Niksic  <hniksic@srce.hr>
8999
9000         * ftp.c (getftp): Added `break'; suggested by Lin Zhe Min
9001         <ljm@ljm.wownet.net>.
9002
9003 1998-05-24  Hrvoje Niksic  <hniksic@srce.hr>
9004
9005         * version.c: Wget 1.5.2-b2 is released.
9006
9007 1998-05-18  Juan Jose Rodriguez  <jcnsoft@jal1.telmex.net.mx>
9008
9009         * mswindows.h: Don't translate mkdir to _mkdir under Borland.
9010
9011 1998-05-17  Hrvoje Niksic  <hniksic@srce.hr>
9012
9013         * retr.c (elapsed_time): Return correct value when
9014         HAVE_GETTIMEOFDAY is undefined.
9015
9016 1998-05-13  Hrvoje Niksic  <hniksic@srce.hr>
9017
9018         * version.c: Wget 1.5.2-b1 is released.
9019
9020 1998-05-08  Hrvoje Niksic  <hniksic@srce.hr>
9021
9022         * getopt.c (_getopt_internal): Use exec_name instead of argv[0].
9023         (_getopt_internal): Don't translate `#if 0'-ed strings.
9024
9025 1998-05-06  Douglas E. Wegscheid  <wegscd@whirlpool.com>
9026
9027         * mswindows.c (ws_handler): Use fork_to_background().
9028
9029 1998-05-05  Hrvoje Niksic  <hniksic@srce.hr>
9030
9031         * version.c: Wget 1.5.1 is released.
9032
9033 1998-05-05  Hrvoje Niksic  <hniksic@srce.hr>
9034
9035         * http.c (parse_http_status_line): Avoid `minor' and `major'
9036         names.
9037
9038 1998-05-02  Hrvoje Niksic  <hniksic@srce.hr>
9039
9040         * utils.c (mkdirhier): Renamed to make_directory.
9041
9042 1998-05-01  Hrvoje Niksic  <hniksic@srce.hr>
9043
9044         * mswindows.c (fork_to_background): Define under Windows.
9045
9046         * utils.c (fork_to_background): New function.
9047
9048         * html.c (htmlfindurl): Removed rerdundant casts.
9049
9050 1998-05-01  Douglas E. Wegscheid  <wegscd@whirlpool.com>
9051
9052         * mswindows.c (ws_mypath): Cache the path.
9053
9054 1998-04-30  Douglas E. Wegscheid  <wegscd@whirlpool.com>
9055
9056         * ftp.h: Prefix enum ftype members with FT_.
9057
9058         * ftp-ls.c, ftp.c, html.h: Adjust accordingly.
9059
9060         * mswindows.h: Use stat under Borland, _stat under MSVC.
9061
9062 1998-04-28  Hrvoje Niksic  <hniksic@srce.hr>
9063
9064         * http.c (known_authentication_scheme_p): New function.
9065         (gethttp): Handle authorization more correctly.
9066
9067         * ftp-basic.h: Removed.
9068
9069         * cmpt.h: Removed.
9070
9071         * utils.c: Include <unistd.h> before <pwd.h>; needed under SunOS
9072         with gcc 2.8.
9073         (numdigit): Use `while' loop.
9074
9075         * http.c (create_authorization_line): Detect authentication
9076         schemes case-insensitively.
9077
9078         * http.c (extract_header_attr): Use strdupdelim().
9079         (digest_authentication_encode): Move declaration of local
9080         variables to smaller scope.
9081         (digest_authentication_encode): Reset REALM, OPAQUE and NONCE.
9082         (create_authorization_line): Detect authentication schemes
9083         case-insensitively.
9084
9085         * utils.c (touch): Constify.
9086
9087         * http.c (gethttp): Report a nicer error when no data is received.
9088
9089         * rbuf.h (RBUF_READCHAR): Ditto.
9090
9091         * ftp-basic.c (ftp_response): Use sizeof.
9092
9093 1998-04-27  Hrvoje Niksic  <hniksic@srce.hr>
9094
9095         * retr.c (print_percentage): EXPECTED is long, not int.
9096         (print_percentage): Use floating-point arithmetic to avoid
9097         overflow with large files' sizes multiplied with 100.
9098
9099 1998-04-27  Gregor Hoffleit  <flight@mathi.uni-heidelberg.de>
9100
9101         * config.h.in: Added pid_t stub.
9102
9103         * sysdep.h (S_ISREG): Moved here from mswindows.h (NeXT doesn't
9104         define it).
9105
9106 1998-04-20  Hrvoje Niksic  <hniksic@srce.hr>
9107
9108         * version.c: Wget 1.5.0 is released.
9109
9110 1998-04-18  Hrvoje Niksic  <hniksic@srce.hr>
9111
9112         * url.c (str_url): Ditto.
9113
9114         * ftp-basic.c (ftp_rest): Use new name.
9115
9116         * utils.c (long_to_string): Renamed from prnum().
9117
9118 1998-04-16  Hrvoje Niksic  <hniksic@srce.hr>
9119
9120         * version.c: Wget 1.5-b17 is released.
9121
9122 1998-04-08  Hrvoje Niksic  <hniksic@srce.hr>
9123
9124         * headers.c (header_get): New argument FLAGS.
9125
9126         * http.c (gethttp): If request is malformed, bail out of the
9127         header loop.
9128         (gethttp): Check for empty header *after* the status line checks.
9129         (gethttp): Disallow continuations for status line.
9130
9131 1998-04-08  Hrvoje Niksic  <hniksic@srce.hr>
9132
9133         * version.c: Wget 1.5-b16 is released.
9134
9135 1998-04-08  Hrvoje Niksic  <hniksic@srce.hr>
9136
9137         * init.c (commands): Renamed `always_rest' to `continue'.
9138
9139 1998-04-05  Hrvoje Niksic  <hniksic@srce.hr>
9140
9141         * all: Use it.
9142
9143         * log.c (logputs): New argument.
9144         (logvprintf): Ditto.
9145         (logprintf): Ditto.
9146
9147 1998-04-04  Hrvoje Niksic  <hniksic@srce.hr>
9148
9149         * http.c (http_atotm): Update comment.
9150
9151         * main.c (i18n_initialize): Set LC_MESSAGES, not LC_ALL.
9152
9153         * wget.h: Renamed ENABLED_NLS to HAVE_NLS.
9154
9155         * main.c (i18n_initialize): New function.
9156         (main): Use it.
9157
9158         * log.c: Include <unistd.h>.
9159
9160         * retr.c (show_progress): Cast alloca to char *.
9161
9162 1998-04-04  Hrvoje Niksic  <hniksic@srce.hr>
9163
9164         * version.c: Wget 1.5-b15 is released.
9165
9166 1998-04-04  Hrvoje Niksic  <hniksic@srce.hr>
9167
9168         * utils.h: Declare file_non_directory_p().
9169
9170 1998-04-03  Hrvoje Niksic  <hniksic@srce.hr>
9171
9172         * main.c (main): It's `tries', not `numtries' now.
9173
9174 1998-04-01  Hrvoje Niksic  <hniksic@srce.hr>
9175
9176         * init.c (getperms): Removed.
9177
9178 1998-04-01  Tim Charron  <tcharron@interlog.com>
9179
9180         * log.c (logvprintf): Don't use ARGS twice.
9181
9182 1998-04-01  John  <john@futuresguide.com>
9183
9184         * mswindows.c: Cleaned up.
9185
9186 1998-04-01  Hrvoje Niksic  <hniksic@srce.hr>
9187
9188         * version.c: Wget 1.5-b14 is released.
9189
9190 1998-04-01  Hrvoje Niksic  <hniksic@srce.hr>
9191
9192         * ftp-opie.c (STRLEN4): New macro.
9193         (btoe): Use it.
9194
9195 1998-04-01  Junio Hamano  <junio@twinsun.com>
9196
9197         * http.c: Document all the Digest functions.
9198
9199 1998-04-01  Hrvoje Niksic  <hniksic@srce.hr>
9200
9201         * utils.c (file_non_directory_p): Renamed from isfile().
9202
9203         * mswindows.h (S_ISREG): New macro, suggested by Tim Adam.
9204
9205 1998-03-31  Hrvoje Niksic  <hniksic@srce.hr>
9206
9207         * utils.c (mkdirhier): Use 0777 instead of opt.dirmode.
9208
9209         * init.c (cmd_spec_dotstyle): Use 48 dots per line for binary
9210         style.
9211         (cmd_permissions): Removed.
9212
9213         * config.h.in: Add template for WORDS_BIGENDIAN.
9214
9215 1998-03-31  Junio Hamano  <junio@twinsun.com>
9216
9217         * http.c (HEXD2asc): New macro.
9218         (dump_hash): Use it.
9219
9220 1998-03-31  Hrvoje Niksic  <hniksic@srce.hr>
9221
9222         * version.c: Wget 1.5-b13 is released.
9223
9224 1998-03-31  Hrvoje Niksic  <hniksic@srce.hr>
9225
9226         * main.c (main): Don't try to use `com'.
9227
9228 1998-03-30  Hrvoje Niksic  <hniksic@srce.hr>
9229
9230         * init.c (cmd_permissions): New function.
9231
9232 1998-03-30  Hrvoje Niksic  <hniksic@srce.hr>
9233
9234         * version.c: Wget 1.5-b12 is released.
9235
9236 1998-03-30  Hrvoje Niksic  <hniksic@srce.hr>
9237
9238         * init.c (commands): Renamed `numtries' to `tries'.
9239         (cmd_spec_debug): Removed.
9240         (home_dir): Under Windows, return `C:\' if HOME is undefined.
9241
9242 1998-03-29  Hrvoje Niksic  <hniksic@srce.hr>
9243
9244         * config.h.in: Define _XOPEN_SOURCE.
9245
9246         * init.c (check_user_specified_header): New function.
9247         (cmd_spec_header): Use it.
9248         (cmd_spec_useragent): New function.
9249
9250 1998-03-29  Hrvoje Niksic  <hniksic@srce.hr>
9251
9252         * version.c: Wget 1.5-b11 is released.
9253
9254 1998-03-28  Hrvoje Niksic  <hniksic@srce.hr>
9255
9256         * wget.h: Include <libintl.h> only if NLS is enabled.
9257
9258 1998-03-26  Hrvoje Niksic  <hniksic@srce.hr>
9259
9260         * options.h (struct options): Made `wait' a long.
9261         (struct options): Ditto for `timeout'.
9262
9263 1998-03-19  Hrvoje Niksic  <hniksic@srce.hr>
9264
9265         * utils.c (exists): Renamed to file_exists_p.
9266         (file_exists_p): Use access() if available.
9267
9268 1998-03-17  Hrvoje Niksic  <hniksic@srce.hr>
9269
9270         * utils.c (memfatal): Set save_log_p to 0 to avoid potential
9271         infloop.
9272
9273         * log.c: do_logging -> save_log_p.
9274
9275         * config.h.in: Added template for HAVE_VSNPRINTF.
9276
9277 1998-03-16  Hrvoje Niksic  <hniksic@srce.hr>
9278
9279         * init.c: Ditto.
9280
9281         * http.c: Protect declaration against non-ANSI compiler.
9282
9283         * log.c (logvprintf): Use vsnprintf() if available.
9284
9285         * getopt.c (main): Don't translate test stuff.
9286
9287 1998-03-16  Hrvoje Niksic  <hniksic@srce.hr>
9288
9289         * version.c: Wget 1.5-b10 is released.
9290
9291 1998-03-11  Hrvoje Niksic  <hniksic@srce.hr>
9292
9293         * ftp.c (getftp): Don't translate "CWD %s".
9294
9295         * wget.h (GCC_FORMAT_ATTR): Renamed from FORMAT_ATTR.
9296
9297 1998-03-07  Hrvoje Niksic  <hniksic@srce.hr>
9298
9299         * ftp-opie.c (btoe): Use memcpy() instead of strncat().
9300
9301         * log.c (logputs): New function.
9302         (logvprintf): Renamed from vlogmsg; use logputs().
9303
9304         * retr.c (show_progress): Print `[100%]' when the retrieval is
9305         finished.
9306
9307         * init.c (run_wgetrc): Use FILE, not PATH.
9308         (wgetrc_file_name): Ditto.
9309
9310 1998-03-07  Tim Adam  <tma@osa.com.au>
9311
9312         * recur.c (parse_robots): Correctly reset `entries' on empty
9313         disallow.
9314
9315 1998-03-07  Hrvoje Niksic  <hniksic@srce.hr>
9316
9317         * init.c (cmd_spec_debug): Use cmd_boolean().
9318
9319 1998-02-23  Hrvoje Niksic  <hniksic@srce.hr>
9320
9321         * http.c (gethttp): Create proxy-authorization correctly.
9322
9323 1998-02-22  Hrvoje Niksic  <hniksic@srce.hr>
9324
9325         * md5.c: Ditto.
9326
9327         * getopt.c: Use ANSI function definitions.
9328
9329         * ftp-opie.c: New file.
9330
9331         * options.h: Don't redefine EXTERN.
9332
9333         * init.c: Sort it correctly.
9334
9335 1998-02-22  Hrvoje Niksic  <hniksic@srce.hr>
9336
9337         * version.c: Wget 1.5-b9 is released.
9338
9339 1998-02-22  Hrvoje Niksic  <hniksic@srce.hr>
9340
9341         * recur.c (recursive_retrieve): Reset `first_time'.
9342
9343         * ftp.c (getftp): Added `default' clause to switches of uerr_t.
9344
9345         * rbuf.c (rbuf_peek): Simplified.
9346         (rbuf_flush): Use MINVAL.
9347
9348         * wget.h (MINVAL): Moved from url.h.
9349
9350         * rbuf.h (RBUF_FD): New macro.
9351
9352         * url.c (add_url): Add to the head of the list.
9353
9354         * ftp.c (ftp_retrieve_list): Set the permissions to downloaded
9355         file.
9356         (getftp): Set the default permissions to 0600.
9357
9358 1998-02-21  Hrvoje Niksic  <hniksic@srce.hr>
9359
9360         * url.c (get_urls_html): Ditto.
9361         (convert_links): Ditto.
9362
9363         * recur.c (parse_robots): Ditto.
9364
9365         * html.c (ftp_index): Ditto.
9366
9367         * ftp-ls.c (ftp_parse_unix_ls): Open file as binary.
9368
9369         * init.c (defaults): Initialize `opt' to zero via memset.
9370
9371         * http.c (digest_authentication_encode): goto considered harmful.
9372
9373 1998-02-19  Hrvoje Niksic  <hniksic@srce.hr>
9374
9375         * ftp.c (delelement): Simplify and fix leak.
9376
9377 1998-02-18  Hrvoje Niksic  <hniksic@srce.hr>
9378
9379         * http.c (dump_hash): Use HEXD2ASC instead of home-grown stuff.
9380
9381         * url.h (HEXD2ASC): Removed warning.
9382
9383         * init.c (comind): Use binary search.
9384         (commands): Reorganized.
9385         (setval): Ditto.
9386         (cmd_boolean): New function.
9387         (cmd_number): Ditto.
9388         (cmd_number_inf): Ditto.
9389         (cmd_string): Ditto.
9390         (cmd_vector): Ditto.
9391         (cmd_directory_vector): Ditto.
9392         (cmd_bytes): Ditto.
9393         (cmd_time): Ditto.
9394         (cmd_spec_debug): Ditto.
9395         (cmd_spec_dirmode): Ditto.
9396         (cmd_spec_dirstruct): Ditto.
9397         (cmd_spec_dotstyle): Ditto.
9398         (cmd_spec_header): Ditto.
9399         (cmd_spec_htmlify): Ditto.
9400         (cmd_spec_mirror): Ditto.
9401         (cmd_spec_outputdocument): Ditto.
9402         (cmd_spec_recursive): Ditto.
9403         (settime): Merged with cmd_time().
9404         (setbytes): Merged with cmd_bytes().
9405         (setonoff): Merged with cmd_boolean().
9406         (onoff): Ditto.
9407
9408 1998-02-17  Hrvoje Niksic  <hniksic@srce.hr>
9409
9410         * Makefile.in (distclean): Remove `config.h'.
9411
9412 1998-02-17  Hrvoje Niksic  <hniksic@srce.hr>
9413
9414         * version.c: Wget 1.5-b8 is released.
9415
9416 1998-02-17  Hrvoje Niksic  <hniksic@srce.hr>
9417
9418         * http.c (digest_authentication_encode): New function.
9419         (create_authorization_line): Use it.
9420         (dump_hash): New function.
9421         (digest_authentication_encode): Use it.
9422
9423         * fnmatch.c: Renamed from `mtch.c'.
9424
9425 1998-02-15  Karl Eichwalder  <ke@suse.de>
9426
9427         * main.c (main): Tag "Written by..." string as translatable.
9428
9429 1998-02-15  Hrvoje Niksic  <hniksic@srce.hr>
9430
9431         * wget.h (FREE_MAYBE): New macro.
9432
9433         * http.c (create_authorization_line): Don't use ANSI C string
9434         concatenation feature.
9435         (basic_authentication_encode): Use alloca() for temporary
9436         variables.
9437
9438         * recur.h: Ditto.
9439
9440         * http.c: Ditto.
9441
9442         * headers.h: Ditto.
9443
9444         * ftp-basic.c: Protect declaration against non-ANSI compiler.
9445
9446         * http.c (create_authorization_line): Cast `unsigned char *' to
9447         `char *' for sprintf, to shut up the noisy Digital Unix cc.
9448
9449 1998-02-15  Hrvoje Niksic  <hniksic@srce.hr>
9450
9451         * version.c: Wget 1.5-b7 is released.
9452
9453 1998-02-15  Hrvoje Niksic  <hniksic@srce.hr>
9454
9455         * cmpt.c (strstr): Synched with glibc-2.0.6.
9456
9457         * ftp-basic.c (calculate_skey_response): Ditto.
9458         (calculate_skey_response): Use alloca().
9459
9460         * http.c (create_authorization_line): Work with FSF's version of
9461         md5.c.
9462
9463         * md5.c: New file, from GNU libc.
9464
9465 1998-02-14  Hrvoje Niksic  <hniksic@srce.hr>
9466
9467         * url.h (URL_CLEANSE): Name the temporary variable more carefully.
9468
9469 1998-02-13  Hrvoje Niksic  <hniksic@srce.hr>
9470
9471         * http.c (basic_authentication_encode): New function, instead of
9472         the macro.
9473
9474 1998-02-13  Junio Hamano  <junio@twinsun.com>
9475
9476         * http.c: Add HTTP-DA support.
9477         * ftp-basic.c: Add Opie/S-key support.
9478         * config.h.in, Makefile.in: Add HTTP-DA and Opie/S-key support.
9479         * md5.c, md5.h: New files.
9480
9481 1998-02-13  Hrvoje Niksic  <hniksic@srce.hr>
9482
9483         * http.c (http_process_range): Renamed from hprocrange().
9484         (http_process_range): Parse the whole header.
9485
9486         * headers.c: New file.
9487         (header_process): New function.
9488         (header_get): Renamed from fetch_next_header.
9489
9490         * all: Include utils.h only where necessary.
9491
9492         * wget.h: Declare xmalloc(), xrealloc() and xstrdup() here.
9493
9494         * wget.h: Add provisions for dmalloc.
9495
9496 1998-02-12  Hrvoje Niksic  <hniksic@srce.hr>
9497
9498         * version.c: Wget 1.5-b6 is released.
9499
9500 1998-02-12  Hrvoje Niksic  <hniksic@srce.hr>
9501
9502         * ftp.c (ftp_loop): Determine `filename' more precisely.
9503
9504         * init.c (setval): Don't set `opt.quiet' if output-document is
9505         `-'.
9506
9507         * log.c (log_init): Print to STDERR instead of STDOUT.
9508         (vlogmsg): Use STDERR by default.
9509         (logflush): Ditto.
9510
9511 1998-02-11  Simon Josefsson  <jas@pdc.kth.se>
9512
9513         * host.c: Use addr_in again.
9514
9515 1998-02-08  Karl Eichwalder  <karl@suse.de>
9516
9517         * http.c (gethttp): Fixed typo.
9518
9519 1998-02-08  Hrvoje Niksic  <hniksic@srce.hr>
9520
9521         * version.c: Wget 1.5-b5 is released.
9522
9523 1998-02-08  Hrvoje Niksic  <hniksic@srce.hr>
9524
9525         * retr.c (show_progress): Use it.
9526
9527         * log.c (logflush): New function.
9528
9529         * wget.h: Utilize __attribute__ if on gcc.
9530
9531 1998-02-07  Hrvoje Niksic  <hniksic@srce.hr>
9532
9533         * http.c (base64_encode_line): New argument LENGTH.
9534         (BASIC_AUTHENTICATION_ENCODE): Use it.
9535         (BASIC_AUTHENTICATION_ENCODE): Take length of HEADER into account.
9536
9537         * main.c (main): Fixed fprintf() format mismatch.
9538
9539 1998-02-06  Hrvoje Niksic  <hniksic@srce.hr>
9540
9541         * version.c: Wget 1.5-b4 is released.
9542
9543 1998-02-03  Simon Josefsson  <jas@pdc.kth.se>
9544
9545         * host.c: use sockaddr_in instead of addr_in.
9546
9547 1998-02-04  Hrvoje Niksic  <hniksic@srce.hr>
9548
9549         * init.c (cleanup): Use it.
9550
9551         * recur.c (recursive_cleanup): New function.
9552
9553         * retr.c (retrieve_from_file): Ditto.
9554
9555         * main.c (main): Use it.
9556
9557         * recur.c (recursive_reset): New function.
9558
9559         * retr.c (retrieve_from_file): Ditto.
9560
9561         * main.c (main): Simplify call to recursive_retrieve().
9562
9563         * recur.c (recursive_retrieve): Removed FLAGS argument.
9564
9565         * http.c (gethttp): Changed call to iwrite().
9566
9567 1998-02-03  Hrvoje Niksic  <hniksic@srce.hr>
9568
9569         * url.c (get_urls_html): Ditto.
9570         (free_urlpos): Ditto.
9571         (mkstruct): Ditto.
9572         (construct): Ditto.
9573
9574         * retr.c (retrieve_url): Move declaration of local variables to
9575         smaller scope.
9576
9577         * url.c (urlproto): Use it.
9578         (parseurl): Ditto.
9579         (str_url): Ditto.
9580         (get_urls_html): Ditto.
9581
9582         * utils.h (ARRAY_SIZE): New macro.
9583
9584         * url.c (proto): Moved from url.h.
9585
9586         * url.h (URL_CLEANSE): Reformatted.
9587         (USE_PROXY_P): Renamed from USE_PROXY.
9588
9589         * ftp-basic.c: Adjust to the new interface of iwrite().
9590
9591         * ftp-basic.c (ftp_port): Use alloca().
9592
9593 1998-02-03  Hrvoje Niksic  <hniksic@srce.hr>
9594
9595         * version.c: Wget 1.5-b3 is released.
9596
9597         * host.c (ftp_getaddress): Don't print to stderr directly.
9598
9599         * init.c (setbytes): Support `g' for gigabytes.
9600         (cmdtype): New specification CTIME.
9601         (setval): Use it with settime().
9602         (commands): Use it for WAIT and TIMEOUT.
9603
9604 1998-02-02  Hrvoje Niksic  <hniksic@srce.hr>
9605
9606         * http.c (BASIC_AUTHENTICATION_ENCODE): New macro.
9607         (gethttp): Use it.
9608
9609         * utils.c (unique_name_1): Moved from url.c.
9610         (unique_name): Ditto.
9611
9612         * url.c (url_filename): Ditto.
9613
9614         * log.c (redirect_output): Changed call to unique_name().
9615
9616         * url.c (unique_name_1): Renamed from unique_name().
9617         (unique_name): Changed interface.
9618
9619         * init.c (enum cmdid): Moved from init.h.
9620         (cmdtype): Ditto.
9621         (struct cmd): Ditto.
9622
9623         * main.c (main): Use it.
9624         (main): Moved `--backups' to not have a short option.
9625
9626         * options.h (struct options): New member BACKGROUND.
9627
9628         * main.c (print_help): Rearranged.
9629         (main): New long options for -n* short options: --no-directories,
9630         --no-host-directories, --non-verbose, --no-host-lookup and
9631         --dont-remove-listing.
9632
9633 1998-02-01  Hrvoje Niksic  <hniksic@srce.hr>
9634
9635         * main.c (main): Use log_close().
9636
9637         * log.c: New variable LOGFP.
9638         (vlogmsg): Use it.
9639         (redirect_output): Don't open /dev/null; set LOGFP to stdin
9640         instead.
9641         (log_close): New function.
9642
9643         * options.h (struct options): Removed LFILE.
9644
9645         * log.c (log_enable): Removed.
9646
9647         * main.c (main): Use it.
9648
9649         * log.c (log_init): New function.
9650
9651         * url.c (get_urls_html): Removed needless assignment to BASE.
9652
9653         * host.c (add_hlist): Don't set CMP needlessly.
9654
9655         * utils.c (match_backwards): Ditto.
9656         (in_acclist): Ditto.
9657
9658         * url.c (findurl): Ditto.
9659
9660         * netrc.c (parse_netrc): Ditto.
9661
9662         * log.c (log_dump): Ditto.
9663
9664         * html.c (html_quote_string): Ditto.
9665
9666         * ftp-basic.c (ftp_request): Made static.
9667
9668         * connect.c: Made global variables static.
9669
9670         * url.c (construct): Ditto.
9671
9672         * init.c (init_path): Avoid assignment inside `if'-condition.
9673
9674         * ftp.c: Don't include in.h or winsock.h.
9675
9676         * ftp.c (ftp_loop): Use SZ.
9677
9678         * connect.c (bindport): Cast &addrlen to int *.
9679         (conaddr): Ditto.
9680
9681         * init.c (initialize): Don't use SYSTEM_WGETRC unconditionally.
9682
9683 1998-01-31  Hrvoje Niksic  <hniksic@srce.hr>
9684
9685         * ftp.c (getftp): Initialize opt.ftp_pass here.
9686         (ftp_retrieve_dirs): Use alloca().
9687
9688         * init.c (defaults): Don't initialize opt.ftp_pass.
9689
9690         * sysdep.h (S_ISLNK): Declare for OS/2; ditto for lstat.
9691         From Ivan F. Martinez <ivanfm@ecodigit.com.br>.
9692
9693 1998-01-31  Hrvoje Niksic  <hniksic@srce.hr>
9694
9695         * recur.c (parse_robots): Check for comments more correctly.
9696
9697         * host.c (ftp_getaddress): Use STRDUP_ALLOCA.
9698         (ftp_getaddress): Add diagnostics when reverse-lookup yields only
9699         hostname.
9700
9701 1998-01-31  Hrvoje Niksic  <hniksic@srce.hr>
9702
9703         * version.c: Wget 1.5-b2 is released.
9704
9705         * netrc.c (NETRC_FILE_NAME): Moved from netrc.h.
9706
9707         * utils.c (proclist): Pass FNM_PATHNAME to fnmatch().
9708
9709         * ftp-basic.c (ftp_pasv): Avoid unnecessary casting to unsigned
9710         char.
9711
9712         * log.c: Don't attempt to hide arguments from ansi2knr.
9713
9714         * cmpt.c: Synched strptime() and mktime() with glibc-2.0.6.
9715
9716         * ansi2knr.c: Use a later version, from fileutils-3.16l alpha.
9717
9718         * ftp.c (getftp): Ditto.
9719
9720         * http.c (gethttp): Use it.
9721
9722         * retr.c (get_contents): New argument EXPECTED; pass it to
9723         show_progress().
9724         (show_progress): New argument EXPECTED; use it to display
9725         percentages.
9726
9727         * init.c (setval): Ditto.
9728
9729         * http.c (gethttp): Ditto.
9730         (http_loop): Ditto.
9731
9732         * ftp.c (getftp): Ditto.
9733         (ftp_loop_internal): Ditto.
9734
9735         * ftp-ls.c (ftp_parse_unix_ls): Use abort() instead of assert(0).
9736
9737         * sysdep.h (CLOSE): Simplify; use DEBUGP.
9738
9739         * netrc.c (search_netrc): Use alloca().
9740
9741         * init.c (defaults): Initialize no_flush.
9742
9743         * log.c (vlogmsg): Don't flush if no_flush.
9744
9745         * options.h (struct options): New variable no_flush.
9746
9747         * main.c (main): Don't play games with buffering.
9748
9749         * log.c (vlogmsg): Flush the output after every message.
9750
9751 1998-01-31  Hrvoje Niksic  <hniksic@srce.hr>
9752
9753         * init.c (parse_line): Ditto.
9754
9755         * url.c (get_urls_html): Ditto.
9756
9757         * main.c (main): Don't cast to unsigned char.
9758
9759         * init.c (run_wgetrc): Don't cast to unsigned char.
9760         (parse_line): Accept char instead of unsigned char.
9761
9762         * html.c (htmlfindurl): Use char instead of unsigned char.
9763
9764         * all: Use them.
9765
9766         * sysdep.h: Add wrappers to ctype macros to make them
9767         eight-bit-clean:
9768
9769 1998-01-30  Hrvoje Niksic  <hniksic@srce.hr>
9770
9771         * html.c (htmlfindurl): Download <img lowsrc=...>
9772
9773         * main.c (main): Ignore SIGPIPE.
9774
9775         * connect.c (select_fd): New argument WRITEP.
9776         (iwrite): Call select_fd().
9777
9778 1997-02-27  Fila Kolodny <fila@ibi.com>
9779
9780         * ftp.c (ftp_retrieve_list): If retrieving symlink and the proper
9781         one already exists, just skip it.
9782
9783 1998-01-30  Hrvoje Niksic  <hniksic@srce.hr>
9784
9785         * http.c (gethttp): Cosmetic changes.
9786
9787         * http.c (check_end): Allow `+D...' instead of `GMT'.
9788         From Fabrizio Pollastri <pollastri@cstv.to.cnr.it>.
9789
9790         * url.c (process_ftp_type): New function.
9791         (parseurl): Use it.
9792
9793         * connect.c (iwrite): Allow writing in a few chunks.
9794         (bindport): Made SRV static, so addr can point to it.
9795         (select_fd): Removed HPUX kludge.
9796
9797         * host.c (free_hlist): Incorporated into clean_hosts().
9798
9799 1998-01-29  Hrvoje Niksic  <hniksic@srce.hr>
9800
9801         * host.c (hlist): Made static.
9802         (search_address): Cosmetic change.
9803
9804 1998-01-29  Hrvoje Niksic  <hniksic@srce.hr>
9805
9806         * version.c: Wget v1.5-b1 is released.
9807
9808         * http.c (hgetlen): Use sizeof() to get the header length.
9809         (hgetrange): Ditto.
9810         (hgettype): Ditto.
9811         (hgetlocation): Ditto.
9812         (hgetmodified): Ditto.
9813         (haccepts_none): Ditto.
9814
9815         * main.c (main): Updated `--version' and `--help' output, as per
9816         Francois Pinard's suggestions.
9817
9818         * main.c: Include locale.h; call setlocale(), bindtextdomain() and 
9819         textdomain().
9820
9821         * config.h.in: Define stubs for I18N3.
9822
9823         * wget.h: Include libintl.h.
9824
9825 1998-01-28  Hrvoje Niksic  <hniksic@srce.hr>
9826
9827         * url.c (mkstruct): Check for opt.cut_dirs.
9828         (mkstruct): alloca()-te more, xmalloc() less.
9829
9830         * utils.c (load_file): Check for ferror().
9831
9832         * url.c (get_urls_file): Close only the files we opened.
9833         (get_urls_html): Ditto.
9834         (count_slashes): New function.
9835
9836         * http.h: Removed.
9837
9838         * http.c (gethttp): Respect username and password provided by
9839         proxy URL.
9840         (base64_encode_line): Write into an existing buffer instead of
9841         malloc-ing a new one.
9842         (struct http_stat): Moved from http.h
9843
9844         * retr.c (retrieve_url): Free SUF.
9845
9846         * all: Removed lots of unnecessary .h dependencies.
9847
9848         * html.c (global_state): Made static.
9849
9850         * utils.h (ALLOCA_ARRAY): New macro.
9851
9852         * main.c (main): New option `--cut-dirs'.
9853
9854         * url.c (construct): Use alloca() for T.
9855
9856         * utils.c (mkdirhier): Use STRDUP_ALLOCA.
9857
9858         * host.c (_host_t): Moved from host.h.
9859         (struct host): Renamed from _host_t.
9860         (store_hostaddress): Use STRDUP_ALLOCA for INET_S.
9861         (realhost): Ditto.
9862
9863         * host.h: Don't include url.h.
9864
9865         * ftp.c (LIST_FILENAME): Moved from ftp.h.
9866
9867         * init.c (DEFAULT_FTP_ACCT): Moved from ftp.h.
9868
9869         * main.c (main): Enable log if the output goes to a TTY.
9870
9871         * connect.h: Removed unused constant `BACKLOG'.
9872
9873         * config.h.in: Check for isatty().
9874
9875         * Makefile.in (LINK): Use CFLAGS when linking.
9876
9877 1998-01-27  Hrvoje Niksic  <hniksic@srce.hr>
9878
9879         * mswindows.c (ws_hangup): Use redirect_output().
9880
9881         * main.c (redirect_output_signal): New function; use
9882         redirect_output().
9883
9884         * log.c (redirect_output): New function, based on hangup(), which
9885         is deleted.
9886
9887         * log.c (vlogmsg): New function.
9888
9889         * wget.h (DEBUGP): Use debug_logmsg().
9890
9891         * main.c (hangup): Use it.
9892
9893         * log.c (log_dump): New function.
9894
9895         * utils.h (DO_REALLOC): Use `long' for various sizes.
9896
9897         * http.c (hskip_lws): Use `while', for clarity.
9898         (HTTP_DYNAMIC_LINE_BUFFER): New constant.
9899         (fetch_next_header): Use it instead of DYNAMIC_LINE_BUFFER.
9900
9901         * ftp-basic.c (FTP_DYNAMIC_LINE_BUFFER): New constant.
9902         (ftp_response): Use it instead of DYNAMIC_LINE_BUFFER.
9903
9904         * utils.c (DYNAMIC_LINE_BUFFER): Moved from utils.c.
9905         (LEGIBLE_SEPARATOR): Ditto.
9906         (FILE_BUFFER_SIZE): Ditto.
9907
9908         * retr.c (BUFFER_SIZE): Moved from retr.h.
9909
9910         * log.c: New file.
9911         (logmsg): Moved from utils.c.
9912         (debug_logmsg): New function.
9913
9914         * mswindows.h: Include it here.
9915
9916         * init.c: Ditto.
9917
9918         * utils.c: Don't include <windows.h>.
9919
9920 1998-01-25  Hrvoje Niksic  <hniksic@srce.hr>
9921
9922         * host.c (ftp_getaddress): Ditto.
9923
9924         * main.c (main): Use it.
9925
9926         * utils.h (STRDUP_ALLOCA): New macro.
9927
9928         * init.c: Prepend `wget: ' to error messages printed on stderr.
9929
9930         * utils.c (mkdirhier): Renamed from mymkdir.
9931         (touch): Renamed from my_touch.
9932         (pwd_cuserid): Renamed from my_cuserid().
9933
9934 1998-01-24  Andy Eskilsson  <andy.eskilsson@telelogic.se>
9935
9936         * utils.c (accdir): Process wildcards.
9937         (proclist): New function.
9938         (accdir): Use it to avoid code repetition.
9939
9940 1998-01-24  Hrvoje Niksic  <hniksic@srce.hr>
9941
9942         * recur.c (parse_robots): Respect opt.useragent; use alloca().
9943
9944         * http.c (gethttp): Construct useragent accordingly.
9945
9946         * version.c: Changed version string to numbers-only.
9947
9948         * main.c (print_help): List all the options.
9949
9950         * mswindows.c (windows_main_junk): Initialize argv0 here.
9951
9952 1998-01-24  Karl Heuer  <kwzh@gnu.org>
9953
9954         * netrc.c (search_netrc): Initialize `l' only after processing
9955         netrc.
9956
9957         * main.c (main): Don't trap SIGHUP if it's being ignored.
9958
9959 1998-01-24  Hrvoje Niksic  <hniksic@srce.hr>
9960
9961         * all: Use logmsg().
9962
9963         * utils.c (time_str): Moved from retr.c.
9964         (logmsg): New function.
9965         (logmsg_noflush): Ditto.
9966
9967         * rbuf.c: New file, moved buf_* functions here.
9968
9969         * ftp.c (ftp_expected_bytes): Moved from ftp-basic.c.
9970
9971         * ftp-basic.c (ftp_rest): Use prnum().
9972
9973         * ftp-basic.c: Ditto.
9974
9975         * ftp.c: Use the new reading functions and macros.
9976
9977         * retr.c (buf_initialize): New function.
9978         (buf_initialized_p): Ditto.
9979         (buf_uninitialize): Ditto.
9980         (buf_fd): Ditto.
9981
9982         * http.c (fetch_next_header): Use the BUF_READCHAR macro for
9983         efficiency.
9984         (gethttp): Use alloca() where appropriate.
9985
9986         * retr.c (buf_readchar): Use it.
9987         (buf_peek): Use rstreams.
9988
9989         * retr.h (BUF_READCHAR): New macro.
9990
9991         * init.c (home_dir): Rewritten for clarity.
9992         (init_path): Ditto.
9993
9994         * mswindows.c (ws_backgnd): Made static.
9995         (read_registry): Ditto.
9996         (ws_cleanup): Ditto.
9997         (ws_handler): Ditto.
9998
9999 1998-01-23  Hrvoje Niksic  <hniksic@srce.hr>
10000
10001         * alloca.c: New file.
10002
10003         * Makefile.in (ALLOCA): Define.
10004
10005         * mswindows.c (ws_help): Constify.
10006         (ws_help): Use alloca.
10007
10008         * mswindows.c: Reformat.
10009
10010         * all: Added _(...) annotations for I18N snarfing and translation.
10011
10012         * host.c (ftp_getaddress): Nuke SYSINFO.
10013         (ftp_getaddress): Don't use getdomainname().
10014         (ftp_getaddress): Use uname(), where available.
10015
10016         * http.c (gethttp): Protect a stray fprintf().
10017
10018         * init.c (settime): New function.
10019         (setval): Treat WAIT specially, allowing suffixes like `m' for
10020         minutes, etc.
10021
10022 1998-01-21  Hrvoje Niksic  <hniksic@srce.hr>
10023
10024         * url.c (get_urls_html): Use alloca() for TEMP.
10025
10026 1998-01-21  Jordan Mendelson  <jordy@wserv.com>
10027
10028         * url.c (rotate_backups): New function.
10029
10030         * http.c (gethttp): Ditto.
10031
10032         * ftp.c (getftp): Rotate backups.
10033
10034 1997-12-18  Hrvoje Niksic  <hniksic@srce.hr>
10035
10036         * all: Renamed nmalloc(), nrealloc() and nstrdup() to xmalloc(),
10037         xrealloc() and xstrdup().  Use the new functions.
10038
10039         * url.c (decode_string): Made static.
10040         (has_proto): Ditto.
10041         (parse_dir): Ditto.
10042         (parse_uname): Ditto.
10043         (mkstruct): Ditto.
10044         (construct): Ditto.
10045         (construct_relative): Ditto.
10046
10047         * retr.c (show_progress): Made static.
10048
10049         * recur.c (robots_url): Made static.
10050         (retrieve_robots): Ditto.
10051         (parse_robots): Ditto.
10052         (robots_match): Ditto.
10053
10054         * main.h: Removed.
10055
10056         * main.c (printhelp): Made static.
10057         (hangup): Ditto.
10058
10059         * init.c (comind): Made static.
10060         (defaults): Ditto.
10061         (init_path): Ditto.
10062         (run_wgetrc): Ditto.
10063         (onoff): Ditto.
10064         (setonoff): Ditto.
10065         (setnum): Ditto.
10066         (myatoi): Ditto.
10067         (getperms): Ditto.
10068         (setbytes): Ditto.
10069
10070         * http.c (fetch_next_header): Made static.
10071         (hparsestatline): Ditto.
10072         (hskip_lws): Ditto.
10073         (hgetlen): Ditto.
10074         (hgetrange): Ditto.
10075         (hgettype): Ditto.
10076         (hgetlocation): Ditto.
10077         (hgetmodified): Ditto.
10078         (haccepts_none): Ditto.
10079         (gethttp): Ditto.
10080         (base64_encode_line): Ditto.
10081         (mktime_from_utc): Ditto.
10082         (http_atotm): Ditto.
10083
10084         * html.c (idmatch): Made static.
10085
10086         * host.c (search_host): Made static.
10087         (search_address): Ditto.
10088         (free_hlist): Ditto.
10089
10090         * ftp.c (getftp): Made static.
10091         (ftp_loop_internal): Ditto.
10092         (ftp_get_listing): Ditto.
10093         (ftp_retrieve_list): Ditto.
10094         (ftp_retrieve_dirs): Ditto.
10095         (ftp_retrieve_glob): Ditto.
10096         (freefileinfo): Ditto.
10097         (delelement): Ditto.
10098
10099         * ftp-ls.c (symperms): Made static.
10100         (ftp_parse_unix_ls): Ditto.
10101
10102         * connect.c (select_fd): Made static.
10103
10104         * utils.c (xmalloc): Renamed from nmalloc.
10105         (xrealloc): Renamed from nrealloc.
10106         (xstrdup): Renamed from nstrdup.
10107
10108         * getopt.c (exchange): Use alloca.
10109
10110         * mswindows.c (mycuserid): Use strncpy.
10111
10112         * New files mswindows.c, mswindows.h, sysdep.h.  winjunk.c,
10113         systhings.h, windecl.h and winjunk.h removed.
10114
10115         * mswindows.c (sleep): New function.
10116
10117         * utils.c: Include <windows.h> under Windows.
10118
10119 1997-06-12  Darko Budor  <dbudor@zesoi.fer.hr>
10120
10121         * url.h (URL_UNSAFE): Change default under Windows.
10122
10123         * retr.c (retrieve_from_file): Respect opt.delete_after.
10124
10125         * main.c (main): Call ws_help on Windows.
10126
10127         * winjunk.c (windows_main_junk): New function.
10128
10129         * main.c (main): Junk-process argv[0].
10130
10131         * http.c (mktime_from_utc): Return -1 if mktime failed.
10132
10133         * http.c (http_loop): Ditto.
10134
10135         * ftp.c (ftp_loop_internal): Change title on Windows when using a
10136         new URL.
10137
10138         * winjunk.c (getdomainname): Lots of functions.
10139
10140 1997-06-12  Hrvoje Niksic  <hniksic@srce.hr>
10141
10142         * cmpt.c (strptime_internal): Handle years more correctly for
10143         `%y'.
10144
10145 1997-06-09  Mike Thomas <mthomas@reality.ctron.com>
10146
10147         * http.c (gethttp): Allocate enough space for
10148         `Proxy-Authorization' header.
10149
10150 1997-05-10  Hrvoje Niksic  <hniksic@srce.hr>
10151
10152         * version.c: Wget/1.4.5 is released.
10153
10154 1997-05-10  Hrvoje Niksic  <hniksic@srce.hr>
10155
10156         * retr.c (get_contents): Check return value of fwrite more
10157         carefully.
10158
10159 1997-03-30  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
10160
10161         * cmpt.c (strptime_internal) [case 'Y']: Always subtract 1900 from
10162         year, regardless of century.
10163
10164 1997-03-30  Hrvoje Niksic  <hniksic@srce.hr>
10165
10166         * utils.c (isfile): Use `lstat' instead of `stat'.
10167
10168 1997-03-29  Hrvoje Niksic  <hniksic@srce.hr>
10169
10170         * utils.c (numdigit): Use explicit test.
10171
10172 1997-03-21  Hrvoje Niksic  <hniksic@srce.hr>
10173
10174         * http.c (http_loop): Always use `url_filename' to get u->local.
10175
10176 1997-03-20  Hrvoje Niksic  <hniksic@srce.hr>
10177
10178         * url.c: Recognize https.
10179
10180 1997-03-13  Hrvoje Niksic  <hniksic@srce.hr>
10181
10182         * recur.c (recursive_retrieve): Lowercase just the host name.
10183
10184 1997-03-09  Hrvoje Niksic  <hniksic@srce.hr>
10185
10186         * url.c (get_urls_file): Use the correct test.
10187         (get_urls_html): Ditto.
10188
10189 1997-03-07  Hrvoje Niksic  <hniksic@srce.hr>
10190
10191         * connect.c: Reverted addrlen to int.
10192
10193         * init.c (parse_line): Check for -1 instead of NONE.
10194
10195         * version.c: Changed version to 1.4.5.
10196
10197 1997-02-17  Hrvoje Niksic  <hniksic@srce.hr>
10198
10199         * init.c: New option netrc.
10200         (initialize): Don't parse .netrc.
10201
10202         * cmpt.c (recursive): Return rp.
10203         (strptime_internal): Match the long strings first, the abbreviated
10204         second.
10205
10206 1997-02-16  Hrvoje Niksic  <hniksic@srce.hr>
10207
10208         * http.c (check_end): New function.
10209         (http_atotm): Use it.
10210
10211 1997-02-13  gilles Cedoc  <gilles@cedocar.fr>
10212
10213         * http.c (gethttp): Use them.
10214
10215         * init.c: New options proxy_user and proxy_passwd.
10216
10217 1997-02-14  Hrvoje Niksic  <hniksic@srce.hr>
10218
10219         * ftp.c (ftp_retrieve_list): Create links even if not relative.
10220
10221 1997-02-10  Hrvoje Niksic  <hniksic@srce.hr>
10222
10223         * recur.c (recursive_retrieve): Lowercase the host name, if the
10224         URL is not "optimized".
10225
10226         * host.c (realhost): Return l->hostname, even if it matches with
10227         host.
10228
10229 1997-02-10  Marin Purgar  <pmc@asgard.hr>
10230
10231         * connect.c: Make addrlen size_t instead of int.
10232         (conaddr): Ditto.
10233
10234 1997-02-09  Gregor Hoffleit  <flight@mathi.uni-heidelberg.DE>
10235
10236         * systhings.h: Define S_ISLNK on NeXT too.
10237
10238 1997-02-09  Hrvoje Niksic  <hniksic@srce.hr>
10239
10240         * version.c: Released 1.4.3.
10241
10242         * url.c: Futher update to list of protostrings.
10243         (skip_proto): Skip `//' correctly for FTP and HTTP.
10244
10245         * url.c (get_urls_html): Handle bogus `http:' things a little
10246         different.
10247
10248         * main.c (main): Removed `follow-ftp' from `f'.
10249         (main): Dumped the `prefix-files' and `file-prefix' options and
10250         features; old and bogus.
10251         (main): Exit on failed setval() in `-e'.
10252
10253         * http.c (fetch_next_header): Use it to detect header continuation
10254         correctly.
10255
10256         * retr.c (buf_peek): New function.
10257
10258 1997-02-08  Hrvoje Niksic  <hniksic@srce.hr>
10259
10260         * wget.h: Include time.h and stuff.
10261
10262 1997-02-08  Roger Beeman  <beeman@cisco.com>
10263
10264         * ftp.c: Include <time.h>
10265
10266 1997-02-07  Hrvoje Niksic  <hniksic@srce.hr>
10267
10268         * url.c (findurl): Would read over buffer limits.
10269
10270 1997-02-06  Hrvoje Niksic  <hniksic@srce.hr>
10271
10272         * ftp-ls.c (ftp_parse_unix_ls): Allow spaces in file names.
10273
10274 1997-02-05  Hrvoje Niksic  <hniksic@srce.hr>
10275
10276         * http.c (http_atotm): Initialize tm.is_dst.
10277
10278 1997-02-02  Hrvoje Niksic  <hniksic@srce.hr>
10279
10280         * http.c (gethttp): Don't print the number of retrieved headers.
10281
10282         * main.c (main): New option `--no-clobber', alias for `-nc'.
10283
10284         * url.c: Recognize `https://'.
10285
10286 1997-02-01  Hrvoje Niksic  <hniksic@srce.hr>
10287
10288         * host.c (herrmsg): Don't use h_errno.
10289
10290 1997-01-30  Hrvoje Niksic  <hniksic@srce.hr>
10291
10292         * host.c (accept_domain): Use it.
10293
10294         * main.c (main): New option `--exclude-domains'.
10295
10296         * retr.c (retrieve_url): Use it.
10297         (retrieve_url): Bail out when an URL is redirecting to itself.
10298
10299         * url.c (url_equal): New function.
10300
10301 1997-01-29  Hrvoje Niksic  <hniksic@srce.hr>
10302
10303         * connect.c: Include arpa/inet.h instead of arpa/nameser.h.
10304
10305         * http.c (mk_utc_time): New function.
10306         (http_atotm): Use it; handle time zones correctly.
10307
10308 1997-01-28  Hrvoje Niksic  <hniksic@srce.hr>
10309
10310         * http.c: Ditto.
10311
10312         * ftp-basic.c: Use it instead of WRITE.
10313
10314         * connect.c (iwrite): New function.
10315
10316 1997-01-27  Hrvoje Niksic  <hniksic@srce.hr>
10317
10318         * cmpt.c (mktime): New function.
10319
10320         * netrc.c: Include <sys/types.h>.
10321
10322         * main.c (main): Wouldn't recognize --spider.
10323
10324         * retr.c (rate): Use `B', `KB' and `MB'.
10325         (reset_timer,elapsed_time): Moved from utils.c.
10326
10327         * ftp.c (ftp_retrieve_list): Ditto.
10328
10329         * http.c (http_loop): Don't touch the file if opt.dfp.
10330
10331 1997-01-24  Hrvoje Niksic  <hniksic@srce.hr>
10332
10333         * cmpt.c: New file.
10334
10335         * ftp.c (ftp_retrieve_glob): New argument semantics.
10336         (ftp_retrieve_dirs): Use it.
10337         (ftp_loop): Ditto.
10338
10339         * html.c (htmlfindurl): Recognize `'' as the quote char.
10340
10341 1997-01-23  Hrvoje Niksic  <hniksic@srce.hr>
10342
10343         * ftp.c (ftp_loop_internal): Use it.
10344
10345         * utils.c (remove_link): New function.
10346
10347 1997-01-22  Hrvoje Niksic  <hniksic@srce.hr>
10348
10349         * retr.c (retrieve_url): Require STRICT redirection URL.
10350
10351         * url.c (parseurl): New argument STRICT.
10352
10353         * http.c (hparsestatline): Be a little-bit less strict about
10354         status line format.
10355
10356 1997-01-21  Hrvoje Niksic  <hniksic@srce.hr>
10357
10358         * http.c (gethttp): Use it.
10359
10360         * main.c (main): Don't use '<digit>' as options.
10361
10362         * init.c: New option ignore_length.
10363
10364         * http.c (gethttp): Ditto.
10365         (http_loop): Check for redirection without Location:.
10366         (gethttp): Don't print Length unless RETROKF.
10367
10368         * ftp.c (getftp): Use it.
10369
10370         * url.c (mkalldirs): New function.
10371
10372         * utils.c (mymkdir): Don't check for existing non-directory.
10373
10374         * url.c (mkstruct): Don't create the directory.
10375
10376 1997-01-20  Hrvoje Niksic  <hniksic@srce.hr>
10377
10378         * init.c (setval): Removed NO_RECURSION checks.
10379
10380 1997-01-19  Hrvoje Niksic  <hniksic@srce.hr>
10381
10382         * version.c: "Released" 1.4.3-pre2.
10383
10384         * recur.c (recursive_retrieve): Bypass host checking only if URL
10385         is ftp AND parent URL is not ftp.
10386
10387         * ftp-basic.c (ftp_request): Print out Turtle Power.
10388
10389         * ftp.c (ftp_loop): Call ftp_retrieve_glob with 0 if there's no
10390         wildcard.
10391         (ftp_retrieve_glob): Call ftp_loop_internal even on empty list, if
10392         not glob.
10393
10394         * http.c (gethttp): Be a little bit smarter about status codes.
10395
10396         * recur.c (recursive_retrieve): Always reset opt.recursive when
10397         dealing with FTP.
10398
10399 1997-01-18  Hrvoje Niksic  <hniksic@srce.hr>
10400
10401         * retr.c (retrieve_url): New variable location_changed; use it for
10402         tests instead of mynewloc.
10403         (retrieve_url): Allow heuristic adding of html.
10404
10405         * url.c (url_filename): Don't use the `%' in Windows file names.
10406
10407         * http.c (http_loop): Always time-stamp the local file.
10408
10409         * http.c (http_loop): Ditto.
10410
10411         * ftp.c (ftp_retrieve_list): Use it.
10412
10413         * utils.c (my_touch): New function.
10414
10415         * ftp.c (ftp_retrieve_list): Use #ifdef HAVE_STRUCT_UTIMBUF
10416         instead of #ifndef NeXT.
10417
10418         * utils.c (strptime): New version, by Ulrich Drepper.
10419
10420 1997-01-17  Hrvoje Niksic  <hniksic@srce.hr>
10421
10422         * http.c (haccepts_none): Renamed from `haccepts_bytes'.
10423         (gethttp): If haccepts_none(), disable ACCEPTRANGES.
10424         (http_loop): Would remove ACCEPTRANGES.
10425
10426         * ftp.c (getftp): Call ftp_list with NULL.
10427
10428 1997-01-15  Hrvoje Niksic  <hniksic@srce.hr>
10429
10430         * html.c (ftp_index): Don't print minutes and seconds if we don't
10431         know them; beautify the output.
10432
10433         * ftp.c (getftp): Don't close the socket on FTPNSFOD.
10434
10435 1997-01-14  Hrvoje Niksic  <hniksic@srce.hr>
10436
10437         * utils.c (strptime): New function.
10438         (strptime): Don't use get_alt_number.
10439         (strptime): Don't use locale.
10440         (match_string): Made it a function.
10441
10442 1997-01-12  Hrvoje Niksic  <hniksic@srce.hr>
10443
10444         * http.c (http_atotm): New function.
10445         (http_loop): Use it.
10446
10447         * atotm.c: Removed from the distribution.
10448
10449         * http.c (base64_encode_line): Rewrite.
10450
10451 1997-01-09  Hrvoje Niksic  <hniksic@srce.hr>
10452
10453         * ftp.c (getftp): Use ftp_expected_bytes; print size.
10454
10455         * ftp-basic.c (ftp_response): Use ftp_last_respline.
10456         (ftp_expected_bytes): New function.
10457
10458         * ftp.c (getftp): Print the unauthoritative file length.
10459
10460         * ftp-ls.c: Renamed from ftp-unix.c.
10461         (ftp_parse_ls): Moved from ftp.c.
10462         (ftp_parse_unix_ls): Recognize seconds in time spec.
10463         (ftp_parse_unix_ls): Recognize year-less dates of the previous
10464         year.
10465
10466 1997-01-08  Hrvoje Niksic  <hniksic@srce.hr>
10467
10468         * ftp-basic.c: Don't declare errno if #defined.
10469
10470         * host.c (ftp_getaddress): Check for sysinfo legally.
10471
10472 1997-01-08  Darko Budor  <dbudor@diana.zems.fer.hr>
10473
10474         * connect.c (iread): Use READ.
10475
10476 1996-12-23  Hrvoje Niksic  <hniksic@srce.hr>
10477
10478         * url.c: Recognize finger, rlogin, tn3270, mid and cid as valid
10479         schemes.
10480
10481 1996-12-22  Hrvoje Niksic  <hniksic@srce.hr>
10482
10483         * host.c (ftp_getaddress): Allow `.' in hostname.
10484
10485 1996-12-26  Darko Budor <dbudor@zems.fer.hr>
10486
10487         * wget.h: READ and WRITE macros for use instead of read and write
10488         on sockets, grep READ *.c, grep WRITE *.c
10489
10490         * wsstartup.c: new file - startup for winsock
10491
10492         * wsstartup.h: new file
10493
10494         * win32decl.h: new file - fixup for <errno.h> and winsock trouble
10495
10496         * configure.bat: Configure utility for MSVC
10497
10498         * src/Makefile.ms,config.h.ms: new files for use with MSVC 4.x
10499
10500 1996-12-22  Hrvoje Niksic  <hniksic@srce.hr>
10501
10502         * version.c: Released 1.4.3-pre.
10503
10504         * utils.c (prnum): Accept long.
10505         (legible): Use prnum().
10506
10507         * connect.c (make_connection): Accept port as short.
10508         (bindport): Ditto.
10509
10510         * http.c (gethttp): Use search_netrc.
10511
10512 1996-12-21  Hrvoje Niksic  <hniksic@srce.hr>
10513
10514         * ftp.c (getftp): Use search_netrc.
10515
10516         * netrc.c (free_netrc): New function.
10517
10518         * init.c (home_dir): New function.
10519
10520         * url.c (convert_links): Allow REL2ABS changes.
10521
10522 1996-12-21  Gordon Matzigkeit  <gord@gnu.ai.mit.edu>
10523
10524         * netrc.c: New file.
10525         (parse_netrc, maybe_add_to_list): New functions.
10526
10527 1996-12-17  Hrvoje Niksic  <hniksic@srce.hr>
10528
10529         * retr.c (retrieve_url): Reset opt.recursion before calling
10530         ftp_loop if it is reached through newloc.
10531
10532         * init.c (run_wgetrc): Print the wgetrc path too, when reporting
10533         error; don't use "Syntax error", since we don't know if it is
10534         really a syntax error.
10535
10536 1996-12-16  Hrvoje Niksic  <hniksic@srce.hr>
10537
10538         * utils.c (acceptable): Extract the filename part of the path.
10539
10540         * recur.c (recursive_retrieve): Call acceptable() with the right
10541         argument; would bug out on wildcards.
10542
10543         * init.c (parse_line): Likewise.
10544
10545         * html.c (htmlfindurl): Cast to char * when calling stuff.
10546
10547 1996-12-15  Hrvoje Niksic  <hniksic@srce.hr>
10548
10549         * ftp.c (getftp): Use ftp_pasv.
10550
10551         * ftp-basic.c (ftp_request): Accept NULL value.
10552         (ftp_pasv): New function.
10553
10554         * options.h (struct options): Add passive FTP option.
10555
10556 1996-12-15  Hrvoje Niksic  <hniksic@srce.hr>
10557
10558         * url.c (parseurl): Debug output.
10559
10560         * utils.c (path_simplify): New one, adapted from bash's
10561         canonicalize_pathname().
10562
10563 1996-12-14  Hrvoje Niksic  <hniksic@srce.hr>
10564
10565         * ftp.c (getftp): Don't discard the buffer.
10566
10567         * retr.c (get_contents): New parameter nobuf.
10568
10569 1996-12-13  Shawn McHorse  <riffraff@txdirect.net>
10570
10571         * html.c (htmlfindurl): Recognize <meta contents="d; URL=...".
10572
10573         * init.c (setval): Strip the trailing slashes on CVECDIR.
10574
10575 1996-12-13  Hrvoje Niksic  <hniksic@srce.hr>
10576
10577         * init.c: Make excludes and includes under CVECDIR instead of
10578         CVEC.
10579
10580 1996-12-13  Shawn McHorse  <riffraff@txdirect.net>
10581
10582         * url.c (get_urls_html): Skip "http:".
10583
10584 1996-12-13  Hrvoje Niksic  <hniksic@srce.hr>
10585
10586         * utils.c (strcasecmp): From glibc.
10587         (strncasecmp): Also.
10588         (strstr): Also.
10589
10590         * url.c: Added javascript: to the list of URLs prefixes.
10591
10592 1996-12-12  Shawn McHorse  <riffraff@txdirect.net>
10593
10594         * recur.c (retrieve_robots): Print the warning message only if
10595         verbose.
10596
10597 1996-12-12  Gregor Hoffleit  <flight@mathi.uni-heidelberg.DE>
10598
10599         * ftp.c (ftp_retrieve_list): Use NeXT old utime interface.
10600
10601 1996-12-12  Hrvoje Niksic  <hniksic@srce.hr>
10602
10603         * systhings.h: New file.
10604
10605         * ../configure.in: Check for utime.h
10606
10607         * ftp.c: Check whether we have unistd.h.
10608
10609 1996-11-27  Hrvoje Niksic  <hniksic@srce.hr>
10610
10611         * recur.c (recursive_retrieve): Send the canonical URL as referer.
10612         (recursive_retrieve): Call get_urls_html with the canonical URL.
10613
10614 1996-12-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10615
10616         * (configure.in, config.h.in, src/Makefile.in, src/*.[ch]): Add
10617         ansi2knr support for compilers which don't support ANSI style
10618         function prototypes and signatures.
10619
10620         * (aclocal.m4, src/ansi2knr.c, src/ansi2knr.1): New files.
10621
10622 1996-11-26  Hrvoje Niksic  <hniksic@srce.hr>
10623
10624         * url.c: Use it; Recognize paths ending with "." and ".." as
10625         directories.
10626         (url_filename): Append .n whenever file exists and could be a
10627         directory.
10628
10629         * url.h (ISDDOT): New macro.
10630
10631         * init.c (parse_line): Use unsigned char.
10632
10633         * url.c (get_urls_html): Cast to unsigned char * when calling
10634         htmlfindurl.
10635
10636         * html.c (htmlfindurl): Use unsigned char.
10637
10638         * version.c: Changed version to 1.4.3.
10639
10640 1996-11-25  Hrvoje Niksic  <hniksic@srce.hr>
10641
10642         * version.c: Released 1.4.2.
10643
10644         * ftp.c (getftp): Simplified assertion.
10645         (ftp_loop_internal): Remove symlink before downloading.
10646         (ftp_retrieve_list): Unlink the symlink name before attempting to
10647         create a symlink!
10648
10649         * options.h (struct options): Renamed print_server_response to
10650         server_response.
10651
10652         * ftp.c (rel_constr): Removed.
10653         (ftp_retrieve_list): Don't use it.
10654         (ftp_retrieve_list): Use opt.retr_symlinks.
10655
10656 1996-11-24  Hrvoje Niksic  <hniksic@srce.hr>
10657
10658         * main.c (main): New option retr_symlinks.
10659
10660         * url.c (convert_links): Print verbose message.
10661
10662 1996-11-24  Hrvoje Niksic  <hniksic@srce.hr>
10663
10664         * http.c (http_loop): Reset newloc in the beginning of function;
10665         would cause FMR in retrieve_url.
10666
10667 1996-11-23  Hrvoje Niksic  <hniksic@srce.hr>
10668
10669         * recur.c (convert_all_links): Find the URL of each HTML document,
10670         and feed it to get_urls_html; would bug out.
10671         (convert_all_links): Check for l2 instead of dl; removed dl.
10672
10673         * url.c (convert_links): Don't refer to freed newname.
10674
10675         * recur.c (recursive_retrieve): Add this_url to urls_downloaded.
10676
10677         * main.c (main): Print the OS_TYPE in the debug output, too.
10678
10679         * recur.c (recursive_retrieve): Check for opt.delete_after.
10680
10681         * main.c (main): New option delete-after.
10682
10683         * init.c (setval): Cleaned up.
10684
10685 1996-11-21  Hrvoje Niksic  <hniksic@srce.hr>
10686
10687         * Makefile.in (wget): Make `wget' the default target.
10688
10689         * ftp.c (ftp_loop_internal): Move noclobber checking out of the
10690         loop.
10691         (ftp_retrieve_list): Warn about non-matching sizes.
10692
10693         * http.c (http_loop): Made -nc non-dependent on opt.recursive.
10694
10695         * init.c (setnum): Renamed from setnuminf; New argument flags.
10696         (setval): Use it.
10697
10698         * main.c (main): Sorted the options.
10699         (main): New option --wait.
10700
10701 1996-11-21  Shawn McHorse  <riffraff@txdirect.net>
10702
10703         * html.c (htmlfindurl): Reset s->in_quote after getting out of
10704         quotes.
10705
10706 1996-11-20  Hrvoje Niksic  <hniksic@srce.hr>
10707
10708         * version.c: Changed version to 1.4.2.
10709
10710 1996-11-20  Hrvoje Niksic  <hniksic@srce.hr>
10711
10712         * version.c: Released 1.4.1.
10713
10714         * html.c (html_quote_string): New function.
10715         (ftp_index): Use it.
10716         (htmlfindurl): A more gentle ending debug message.
10717
10718         * ftp.c (ftp_loop): Check for opt.htmlify.
10719
10720         * init.c: New command htmlify.
10721
10722         * ftp.c (getftp): Nicer error messages, with `'-encapsulated
10723         strings.
10724         (ftp_loop): Print size of index.html.
10725
10726         * init.c (setval): Implement "styles".
10727
10728         * main.c (main): New option dotstyle.
10729
10730 1996-11-19  Hrvoje Niksic  <hniksic@srce.hr>
10731
10732         * ftp.c (getftp): Close the master socket in case of errors, after
10733         bindport().
10734
10735         * connect.c (bindport): Initialize msock to -1.
10736
10737         * ftp.c (getftp): Initialize dtsock to -1.
10738
10739         * connect.c (closeport): Don't close sock if sock == -1.
10740
10741 1996-11-18  Hrvoje Niksic  <hniksic@srce.hr>
10742
10743         * init.c (setnuminf): Nuked default value -- just leave unchanged.
10744         (setval): Don't send default values.
10745         (defaults): Use DEFAULT_TIMEOUT -- aaargh.
10746
10747         * options.h (struct options): Use long for dot_bytes.
10748
10749         * init.c (setquota): Renamed to setbytes.
10750         (setval): Use setbytes on DOTBYTES.
10751
10752 1996-11-17  Hrvoje Niksic  <hniksic@srce.hr>
10753
10754         * ftp.c (getftp): Initialize con->dltime.
10755
10756         * recur.c (recursive_retrieve): Use same_host instead of
10757         try_robots; simply load robots_txt whenever the host is changed.
10758         (recursive_retrieve): Free forbidden before calling parse_robots.
10759
10760 1996-11-16  Hrvoje Niksic  <hniksic@srce.hr>
10761
10762         * retr.c (show_progress): Use them.
10763
10764         * options.h (struct options): New options dot_bytes, dots_on_line
10765         and dot_spacing.
10766
10767 1996-11-16  Mark Boyns  <boyns@sdsu.edu>
10768
10769         * recur.c (recursive_retrieve): Retrieve directories regardless of
10770         acc/rej rules; check for empty u->file.
10771
10772 1996-11-14  Hrvoje Niksic  <hniksic@srce.hr>
10773
10774         * init.c (setval): Use it.
10775
10776         * utils.c (merge_vecs): New function.
10777
10778         * init.c (setval): Reset the list-type functions when encountering
10779         "".
10780
10781 1996-11-14  Shawn McHorse  <riffraff@txdirect.net>
10782
10783         * recur.c (recursive_retrieve): Use base_url instead of this_url
10784         for no_parent.
10785
10786 1996-11-14  Shawn McHorse  <riffraff@txdirect.net>
10787
10788         * html.c (htmlfindurl): Reset s->in_quote after exiting the quote.
10789
10790 1996-11-13  Hrvoje Niksic  <hniksic@srce.hr>
10791
10792         * utils.c (sepstring): Rewrote; don't use strtok.
10793
10794         * recur.c (recursive_retrieve): Enter assorted this_url to slist
10795         when running the first time.
10796         (retrieve_robots): Warn to ignore errors when robots are loaded.
10797
10798         * utils.c (load_file): Moved from url.c.
10799
10800         * http.c: Made static variables const too in h* functions.
10801
10802         * main.c (main): Renamed --continue-ftp to --continue.
10803
10804         * recur.c (recursive_retrieve): Use it.
10805
10806         * utils.c (frontcmp): New function.
10807
10808         * url.c (accdir): New function.
10809
10810         * html.c (htmlfindurl): Recognize <area href=...>.
10811
10812         * ftp.c (ftp_retrieve_dirs): Implemented opt.includes.
10813
10814         * init.c (setval): Free the existing opt.excludes and
10815         opt.includes, if available.
10816
10817         * main.c (main): New option -I.
10818
10819 1996-11-12  Hrvoje Niksic  <hniksic@srce.hr>
10820
10821         * ftp.c (ftp_retrieve_glob): Do not weed out directories.
10822
10823         * version.c: Changed version to 1.4.1.
10824
10825 1996-11-11  Hrvoje Niksic  <hniksic@srce.hr>
10826
10827         * version.c: Released 1.4.0.
10828
10829 1996-11-10  Hrvoje Niksic  <hniksic@srce.hr>
10830
10831         * main.c (main): Free com and val after parse_line.
10832         (printhelp): Reorder the listing.
10833
10834         * http.c: More robust header parsing.
10835
10836         * http.c: Allow any number of spaces, or no spaces, precede ':'.
10837         (hskip_lws): New function.
10838         (haccepts_bytes): New function.
10839         (gethttp): Use it.
10840
10841         * init.c (setval): Check header sanity.
10842         (setval): Allow resetting of headers.
10843
10844 1996-11-10  Hrvoje Niksic  <hniksic@srce.hr>
10845
10846         * http.c (http_loop): Don't use has_wildcards.
10847
10848         * http.c (gethttp): Free all_headers -- would leak.
10849
10850         * recur.c (recursive_retrieve): Initialize depth to 1 instead of
10851         0 -- this fixes a long-standing bug in -rl.
10852
10853 1996-11-09  Hrvoje Niksic  <hniksic@srce.hr>
10854
10855         * ftp.c: Use -1 as "impossible" value for con->fd.
10856
10857         * url.h (URL_SEPARATOR): Don't treat `*' and `+' as separators.
10858
10859         * init.c (parse_line): Use isalpha.
10860
10861         * ftp-unix.c: Use HAVE_UNISTD_H.
10862
10863         * mtch.c (has_wildcards): Don't match \.
10864
10865         * http.c (http_loop): Warn on HTTP wildcard usage.
10866
10867 1996-11-08  Hrvoje Niksic  <hniksic@srce.hr>
10868
10869         * url.c (url_filename): Do not create numbered suffixes if
10870         opt.noclobber -- would bug out on -nc.
10871
10872 1996-11-07  Hrvoje Niksic  <hniksic@srce.hr>
10873
10874         * recur.c (parse_robots): Don't chuck out the commands without
10875         arguments (`Disallow:<empty>' didn't work).
10876         (parse_robots): Compare versions lowercase.
10877         (parse_robots): Match on base_version, not version_string!
10878         (parse_robots): Handle comments properly.
10879         (parse_robots): Match versions in a sane way.
10880
10881         * init.c: Print nicer error messages.
10882
10883         * version.c: Changed version to 1.4.0.
10884
10885 1996-11-06  Hrvoje Niksic  <hniksic@srce.hr>
10886
10887         * version.c: Released 1.4.0-test2.
10888
10889         * init.c (run_wgetrc): Close fp.
10890
10891         * ftp.c (ftp_retrieve_dirs): Allocate the correct length for
10892         u->dir.
10893
10894 1996-11-06  Hrvoje Niksic  <hniksic@srce.hr>
10895
10896         * init.c (setquota): Allow inf as quota specification.
10897
10898 1996-11-05  Hrvoje Niksic  <hniksic@srce.hr>
10899
10900         * ftp.c (ftp_retrieve_dirs): Return QUOTEXC if quota exceeded.
10901         (ftp_retrieve_glob): Return QUOTEXC on quota exceeded.
10902
10903         * main.c (main): Check for quota by comparison with downloaded
10904         stuff, not from status.
10905
10906         * connect.c (select_fd): Should compile on HPUX without warnings now.
10907
10908         * ftp.c (ftp_get_listing): Check whether ftp_loop_internal
10909         returned RETROK.
10910
10911 1996-11-04  Hrvoje Niksic  <hniksic@srce.hr>
10912
10913         * ftp.c (ftp_retrieve_glob): Print the pattern nicely.
10914         (getftp): Return FTPRETRINT on control connection error.
10915
10916         * html.c (htmlfindurl): Recognize <embed src=...> and
10917         <bgsound src=...>.
10918         (ftp_index): Handle username and password correctly.
10919
10920         * main.c (main): Made `-np' a synonim for --no-parent.
10921
10922 1996-11-02  Hrvoje Niksic  <hniksic@srce.hr>
10923
10924         * ftp.c (ftp_loop): Check for opt.ftp_glob too before calling
10925         ftp_retrieve_glob.
10926
10927         * version.c: Changed version to 1.4.0-test2.
10928
10929 1996-11-02  Hrvoje Niksic  <hniksic@srce.hr>
10930
10931         * version.c: Released 1.4.0-test1.
10932
10933         * url.c (str_url): Don't use sprintf when creating %2F-prefixed
10934         directory.
10935         (convert_links): Removed definition of make_backup.
10936
10937         * http.h: Removed definition of MAX_ERROR_LENGTH.
10938
10939         * host.c (ftp_getaddress): Check for "(none)" domains.
10940
10941         * ftp.c (ftp_retrieve_dirs): Docfix.
10942
10943         * http.c (gethttp): Use ou->referer instead of u->referer.
10944
10945         * retr.c (retrieve_url): Reset u to avoid freeing pointers twice;
10946         this was known to cause coredumps on Linux.
10947
10948         * html.c (ftp_index): Cast the argument to local_time to time_t *.
10949
10950 1996-11-01  Hrvoje Niksic  <hniksic@srce.hr>
10951
10952         * connect.c (select_fd): Use exceptfds -- once and for all.
10953
10954         * retr.c (retrieve_from_file): Free filename after
10955         recursive_retrieve.
10956         (retrieve_from_file): Send RFIRST_TIME to recursive_retrieve on
10957         first-time retrieval.
10958         (retrieve_from_file): Return uerr_t; new argument, count.
10959         (retrieve_from_file): Break on QUOTEXC.
10960
10961         * init.c (setquota): Fixed a bug that caused rejection of
10962         non-postfixed values..
10963
10964 1996-10-30  Hrvoje Niksic  <hniksic@srce.hr>
10965
10966         * version.c: Changed name to wget.
10967
10968         * connect.c (iread): Smarter use of select.
10969         (select_fd): Set errno on timeout.  If not timeout, return 1
10970         instead of 0.
10971
10972 1996-10-29  Hrvoje Niksic  <hniksic@srce.hr>
10973
10974         * ftp.c (ftp_loop_internal): Don't use con->cmd before
10975         establishing it.
10976
10977 1996-10-26  Hrvoje Niksic  <hniksic@srce.hr>
10978
10979         * http.c (gethttp): Send correct referer when using proxy.
10980         (gethttp): Use struct urlinfo ou to access the relevant data; send
10981         correct authorization in all cases.
10982
10983         * host.c (same_host): Use skip_uname to skip username and
10984         password.
10985
10986         * url.c (skip_uname): New function.
10987         (parseurl): Use it.
10988
10989         * host.c (same_host): Do not assume HTTP -- same_host should now
10990         be totally foolproof.
10991
10992         * url.c (skip_proto): New function.
10993         (parse_uname): Use it.
10994
10995         * http.c (gethttp): Create local user and passwd from what is
10996         given.
10997
10998         * url.c (parseurl): Check for HTTP username and password too.
10999
11000 1996-10-25  Hrvoje Niksic  <hniksic@srce.hr>
11001
11002         * config.h.in: Removed #define gethostbyname R...
11003
11004 1996-10-22  Hrvoje Niksic  <hniksic@srce.hr>
11005
11006         * version.c: Changed version to 1.4.0-test1.
11007
11008 1996-10-21  Hrvoje Niksic  <hniksic@srce.hr>
11009
11010         * version.c: "Released" 1.4b29.
11011
11012         * recur.c (recursive_retrieve): Check for no_parent.
11013
11014         * init.c (setval): Option update.
11015
11016         * main.c (main): New option no-parent.
11017
11018         * options.h (struct options): New variable no_parent.
11019
11020         * recur.c (recursive_retrieve): Only files are checked for
11021         opt.accepts and opt.rejects.
11022         (recursive_retrieve): Check directories for opt.excludes.
11023         (recursive_retrieve): Make the dir absolute when checking
11024         opt.excludes.
11025
11026         * html.c (htmlfindurl): Recognize <applet code=...> and <script
11027         src=...>
11028
11029 1996-10-18  Hrvoje Niksic  <hniksic@srce.hr>
11030
11031         * ftp.c (getftp): Do not line-break assert entries at all.
11032         (ftp_retrieve_dirs): docfix.
11033
11034         * connect.c (select_fd): Use fd + 1 as nfds.
11035
11036         * version.c: Changed version to 1.4b29.
11037
11038 1996-10-18  Hrvoje Niksic  <hniksic@srce.hr>
11039
11040         * version.c: "Released" 1.4b28.
11041
11042         * ftp.c (ftp_loop_internal): Check whether f->size == len and
11043         don't continue the loop if it is.
11044         (ftp_get_listing): Remove list_filename on unsuccesful loop.
11045
11046 1996-10-17  Hrvoje Niksic  <hniksic@srce.hr>
11047
11048         * ftp.c (ftp_loop_internal): Use strcpy to initialize tmp.
11049         (getftp): Do not use multiline assert.
11050
11051         * http.c (hparsestatline): Use mjr and mnr instead of major and
11052         minor, which don't compile on Ultrix.
11053         (http_loop): Use strcpy() to initialize tmp.
11054
11055         * all: Geturl -> Fetch
11056
11057 1996-10-17  Hrvoje Niksic  <hniksic@srce.hr>
11058
11059         * recur.c (parse_robots): Fixed an off-by-one bug when looking for
11060         ':'.
11061
11062         * html.c (htmlfindurl): Fixed several possible off-by-one bugs by
11063         moving `bufsize &&' to the beginning of each check in for-loops.
11064
11065         * recur.c (parse_robots): Close fp on exit.
11066
11067         * url.c (mymkdir): Check for each directory before creating.
11068
11069 1996-10-16  Hrvoje Niksic  <hniksic@srce.hr>
11070
11071         * version.c: Changed version to 1.4b28.
11072
11073 1996-10-16  Hrvoje Niksic  <hniksic@srce.hr>
11074
11075         * version.c: "Released" 1.4b27.
11076
11077         * init.c (parse_line): Use isspace.
11078         (parse_line): Free *com on all errors.
11079
11080         * ftp.c (ftp_loop): Change FTPOK to RETROK before exiting.
11081         (delelement): Use next instead of f->next and prev instead of
11082         f->prev.
11083         (delelement): Free the members of the deleted element.
11084
11085         * http.c (http_loop): Do not return RETROK on code != 20x.
11086
11087         * init.c (cleanup): Free opt.user_header.
11088         (cleanup): Free opt.domains.
11089
11090         * url.c (freelists): Moved to cleanup().
11091
11092         * http.c (hparsestatline): Docfix.
11093
11094         * main.c (main): Return with error status on unsuccesful
11095         retrieval.
11096
11097         * init.c (setval): Do not remove listing when mirroring.
11098
11099         * url.c (url_filename): Use opt.fileprefix.
11100
11101         * ftp.c (ftp_get_listing): Use url_filename to get filename for
11102         .listing.
11103
11104         * main.c (main): New option: -rn.
11105
11106 1996-10-15  Hrvoje Niksic  <hniksic@srce.hr>
11107
11108         * Makefile.in (RM): Added RM = rm -f.
11109
11110         * host.c (clean_hosts): New function.
11111         (free_hlist): Just free the list, no reset.
11112
11113         * version.c: Changed version to 1.4b27.
11114
11115 1996-10-13  Hrvoje Niksic  <hniksic@srce.hr>
11116
11117         * version.c: "Released" 1.4b26.
11118
11119         * retr.c (retrieve_from_file): If call get_urls_html with
11120         opt.spider to make it silent in spider mode.
11121
11122         * url.c (str_url): Use CLEANDUP instead of URL_CLEANSE.
11123
11124         * url.h (CLEANDUP): New macro.
11125
11126         * http.c (gethttp): Fixed a bug that freed location only when it
11127         was NULL.
11128
11129         * retr.c (retrieve_url): Free url if it will not be stored,
11130         i.e. newloc is NULL.
11131
11132         * html.c (htmlfindurl): Handle exiting from quotes correctly; the
11133         old version would bug out on <a href="x#a"href="y">.
11134
11135         * html.h (state_t): New member in_quote.
11136
11137         * html.c (htmlfindurl): Free s->attr at the beginning of
11138         attr-loop.
11139
11140         * recur.c (recursive_retrieve): Recognize RCLEANUP.
11141         (tried_robots): Make hosts a global variable.
11142         (recursive_retrieve): Free constr after URL host optimization.
11143         (tried_robots): Free urlinfo before exiting.
11144
11145         * utils.c (free_slist): New function.
11146
11147         * recur.c (recursive_retrieve): Use flags to add cleanup
11148         possibility.
11149
11150         * main.c (main): Free filename after recursive_retrieve.
11151
11152         * http.c (gethttp): Store successful responses too.
11153
11154 1996-10-12  Hrvoje Niksic  <hniksic@srce.hr>
11155
11156         * all: Constified the whole source.  This required some minor
11157         changes in many functions in url.c, possibly introducing bugs -- I
11158         hope not.
11159
11160         * ftp-basic.c: Removed last_respline.
11161
11162         * http.c (gethttp): Free type.
11163
11164         * host.c (same_host): Free real1 and real2.
11165
11166         * main.c (main): New option --spider.
11167
11168         * retr.c (get_contents): Don't reset errno.
11169
11170         * main.c (main): Sorted the options.
11171
11172         * connect.c (iread): Set errno to ETIMEDOUT only if it was left
11173         uninitialized by select().
11174
11175         * http.c (http_loop): Print the time when the connection is
11176         closed.
11177         (gethttp): Debug-print the HTTP request.
11178
11179 1996-10-11  Hrvoje Niksic  <hniksic@srce.hr>
11180
11181         * connect.c (iread): Do not try reading after timeout.
11182
11183         * main.c (main): Would bug out on -T.
11184
11185         * connect.c (select_fd): Do not use exceptfds.
11186         (iread): Set ETIMEDOUT on select_fd <= 0.
11187
11188         * version.c: Changed version to 1.4b26.
11189
11190 1996-10-10  Hrvoje Niksic  <hniksic@srce.hr>
11191
11192         * version.c: "Released" 1.4b25.
11193
11194         * ftp-unix.c (ftp_parse_unix_ls): Ignore lines without file name
11195         or link name.
11196
11197         * http.c (gethttp): Add errcode to struct hstat.
11198         (http_loop): Use it.
11199
11200         * url.c (no_proxy_match): Simplify using char** for no_proxy.
11201
11202         * options.h (struct options): Make opt.no_proxy a vector.
11203
11204         * utils.c (sepstring): Use !*s instead of !strlen(s).
11205
11206         * init.c (setval): Set opt.maxreclevel to 0 on --mirror.
11207         (getperms): Use ISODIGIT instead of isdigit.
11208
11209         * ftp.c (getftp): Print time.
11210
11211         * main.c (main): Use legible output of downloaded quantity.
11212
11213         * ftp.c (getftp): Use elapsed_time().
11214         (ftp_loop_internal): Use rate().
11215
11216         * http.c (http_loop): Add download ratio output; Use rate().
11217
11218         * utils.c (rate): New function.
11219
11220 1996-10-09  Hrvoje Niksic  <hniksic@srce.hr>
11221
11222         * http.c (http_loop): Use timer.
11223
11224         * ftp.c: Split to ftp-basic.c and ftp.c
11225
11226         * utils.c (reset_timer): New function.
11227         (elapsed_time): New function.
11228
11229         * retr.c (show_progress): Make bytes_in_line and offs long; should
11230         work on 16-bit machines.
11231
11232 1996-10-08  Hrvoje Niksic  <hniksic@srce.hr>
11233
11234         * url.c (in_acclist): New argument backward.
11235
11236         * ftp.c (ftp_retrieve_glob): Use acceptable() to determine whether
11237         a file should be retrieved according to suffix.
11238         (ftp_get_listing): Check the return value of unlink; Do not call
11239         ftp_retrieve_dirs if depth reached maxreclevel.
11240         (ftp_retrieve_dirs): Check whether the directory is in
11241         exclude-list.
11242
11243         * main.c (main): Print the version number at the beginning of
11244         DEBUG output.
11245         (main): Use strrchr when creating exec_name.
11246
11247         * ftp.c (ftp_retrieve_glob): Do not close control connection.
11248
11249         * version.c: Changed version to 1.4b25.
11250
11251 1996-10-07  Hrvoje Niksic  <hniksic@srce.hr>
11252
11253         * version.c: "Released" 1.4b24.
11254
11255         * Makefile.in: Rewrite.
11256
11257         * ftp.c (ftp_loop_internal): Likewise.
11258
11259         * retr.c (time_str): Check for failed time().
11260
11261         * html.c (htmlfindurl): Recognize <fig src> and <overlay src> from
11262         HTML3.0.
11263
11264         * retr.c (time_str): Return time_t *.
11265
11266         * connect.c (bindport): Close msock on unsuccesful bind.
11267         (bindport): The same for getsockname and listen.
11268
11269         * retr.c (retrieve_url): Allow any number of retries on
11270         proxy.
11271
11272         * http.c (gethttp): Do not treat errno == 0 as timeout.
11273         (http_loop): Likewise.
11274         (http_loop): Cosmetic changes.
11275
11276         * connect.c (iread): Set errno to ETIMEDOUT in case of timeout.
11277
11278         * retr.c (get_contents): Reset errno.
11279
11280         * ftp.c (getftp): Minor fixes.
11281
11282 1996-10-06  Hrvoje Niksic  <hniksic@srce.hr>
11283
11284         * http.c: Do not use backups.
11285
11286         * geturl.1 (WARNING): Warn that man-page could be obsolete.
11287
11288         * getopt.c (getopt_long): Moved to getopt.c
11289
11290         * geturl.texi: Enhanced.
11291
11292         * main.c (main): Use it.
11293
11294         * recur.c (convert_all_links): New function.
11295
11296         * utils.c (add_slist): New argument flags.
11297
11298         * recur.c (recursive_retrieve): Update a list of downloaded URLs.
11299         (parse_robots): Do not chuck out empty value fields.
11300         (parse_robots): Make yourself welcome on empty Disallow.
11301
11302         * version.c: Changed version to 1.4b24.
11303
11304 1996-10-06  Hrvoje Niksic  <hniksic@srce.hr>
11305
11306         * version.c: "Released" 1.4b23.
11307
11308         * ftp.c (ftp_loop_internal): Get the time after getftp.
11309
11310         * Makefile.in (install.info): New target.
11311         (install): Use it.
11312
11313         * http.c (http_loop): Fix output when doing -O.
11314
11315 1996-10-05  Hrvoje Niksic  <hniksic@srce.hr>
11316
11317         * geturl.texi: New file.
11318
11319         * main.c (main): Do not print the warnings and download summary if
11320         opt.quiet is set.
11321
11322         * version.c: Changed version to 1.4b23.
11323
11324 1996-10-05  Hrvoje Niksic  <hniksic@srce.hr>
11325
11326         * "Released" 1.4b22.
11327
11328         * atotm.c (atotm): Use True and False instead of TRUE and FALSE,
11329         to avoid redefinition warnings.
11330
11331         * host.c (store_hostaddress): Use memcpy() to copy the address
11332         returned by inet_addr.
11333
11334         * version.c: Changed version to 1.4b22.
11335
11336 1996-10-04  Hrvoje Niksic  <hniksic@srce.hr>
11337
11338         * version.c: "Released" 1.4b21.
11339
11340         * ftp-unix.c (ftp_parse_ls): Renamed to ftp_parse_unix_ls.
11341
11342         * ftp.c (ftp_port): Use conaddr.
11343         (getftp): Print the file length.
11344         (ftp_retrieve_list): Check the stamps of plain files only.
11345
11346         * connect.c (closeport): Do not call shutdown().
11347         (conaddr): New function.
11348
11349         * html.c (ftp_index): Made it dfp-aware.
11350
11351         * init.c (cleanup): New name of freemem. Close opt.dfp.
11352
11353         * ftp.c (getftp): Use opt.dfp if it is set.
11354
11355         * ftp-unix.c (ftp_parse_ls): Recognize time in h:mm format.
11356
11357         * ftp.c (ftp_retrieve_dirs): Fixed a bug that caused incorrect
11358         CWDs to be sent with recursive FTP retrievals.
11359
11360 1996-10-03  Hrvoje Niksic  <hniksic@srce.hr>
11361
11362         * recur.c (parse_robots): Made it more compliant with "official"
11363         specifications.
11364
11365         * http.c: New function.
11366
11367         * ftp-unix.c (ftp_parse_ls): Added better debug output.
11368
11369         * ftp.c (getftp): Print out the LIST in case of
11370         opt.print_server_response.
11371
11372         * version.c: Changed version to 1.4b21.
11373
11374 1996-10-01  Hrvoje Niksic  <hniksic@srce.hr>
11375
11376         * version.c: "Released" 1.4b20.
11377
11378         * README: Update.
11379
11380         * http.c (gethttp): Preset lengths of various headers instead of
11381         calculating them dynamically.
11382         (gethttp): Check for 206 partial contents.
11383
11384 1996-09-30  Hrvoje Niksic  <hniksic@srce.hr>
11385
11386         * configure.in: Set SYSTEM_GETURLRC to $libdir/geturlrc
11387
11388         * http.c (gethttp): Send the port number in the Host: header.
11389
11390 1996-09-29  Hrvoje Niksic  <hniksic@srce.hr>
11391
11392         * http.c (gethttp): Send host: header.
11393         (gethttp): Add the possibility of user-defined headers.
11394         (gethttp): Move decision about pragma: no-cache to http_loop,
11395         where it belongs.
11396         (gethttp): Pass a struct instead of enormous argument list.
11397         (http_loop): Use a new, fancier display format.
11398         (ftp_loop): Likewise.
11399
11400         * main.c: (hangup): Turn off buffering of the new log file.
11401
11402         * install-sh: Likewise.
11403
11404         * config.sub: Replace with the one in autoconf-2.10
11405
11406         * geturl.1: Update.
11407
11408         * init.c: New options httpuser and httppasswd.
11409
11410         * http.c: (base64_encode_line): New function.
11411         (gethttp): Send authentication.
11412
11413         * connect.c (make_connection): Use store_hostaddress.
11414
11415 1996-09-28  Hrvoje Niksic  <hniksic@srce.hr>
11416
11417         * host.c (store_hostaddress): New function.
11418
11419         * NEWS: Update.
11420
11421         * http.c (hgetrange): New function.
11422         (gethttp): Use ranges.
11423
11424         * utils.c (numdigit): Accept long instead of int.
11425
11426         * http.c (http_loop): Add restart capabilities.
11427
11428         * ftp.c (ftp_retrieve_glob): Fixed a bug that could cause matchres
11429         being used uninitialized.
11430         (ftp_retrieve_list): Similar fix.
11431
11432         * host.c (add_hlist): Fixed a bug that could cause cmp being used
11433         uninitialized.
11434
11435         * url.c (construct_relative): New function.
11436
11437         * recur.c (recursive_retrieve): Use it.
11438
11439         * retr.c (convert_links): New function.
11440
11441 1996-09-27  Hrvoje Niksic  <hniksic@srce.hr>
11442
11443         * url.c (free_urlpos): New function.
11444
11445         * recur.c (recursive_retrieve): Adapt.
11446
11447         * url.c (get_urls_html): Return a linked list instead of a vector.
11448
11449         * url.c (get_urls_file): Return a linked list instead of a vector.
11450
11451         * geturl.1: Update.
11452
11453         * http.c (gethttp): Implement it.
11454
11455         * init.c (setval): New option: SAVEHEADERS
11456
11457         * ftp.c (ftp_loop_internal): Do not set restval if listing is to
11458         be retrieved. Lack of this test caused bugs when the connection
11459         was lost during listing.
11460
11461         * retr.c (retrieve_url): Fixed a bug that caused
11462         coredumps. *newloc is now reset by default.
11463         (retrieve_url): Lift the twenty-tries limit on proxies.
11464
11465         * version.c: Changed version to 1.4b20.
11466
11467 1996-09-20  Hrvoje Niksic  <hniksic@srce.hr>
11468
11469         * version.c: "Released" 1.4b19.
11470
11471 1996-09-19  Hrvoje Niksic  <hniksic@srce.hr>
11472
11473         * ftp.c (ftp_loop_internal): Renamed from ftp_1fl_loop.
11474         (getftp): Changed prototype to accept ccon *.
11475
11476 1996-09-17  Hrvoje Niksic  <hniksic@srce.hr>
11477
11478         * ftp.c (ftp_retrieve_list): Fixed a bug that caused setting
11479         incorrect values to files pointed to by symbolic links.
11480         (ftp_1fl_loop): Do not count listings among the downloaded URL-s.
11481
11482 1996-09-16  Hrvoje Niksic  <hniksic@srce.hr>
11483
11484         * url.c (mkstruct): Do not prepend "./" in front of a pathname.
11485
11486         * main.c (main): New option: --user-agent.
11487
11488         * geturl.1: Ditto.
11489
11490         * init.h: Ditto.
11491
11492         * init.c (setval): Ditto.
11493
11494         * main.c (main): Rename "server-headers" to "server-response".
11495
11496         * ftp-unix.c (ftp_parse_ls): Check for asterisks at the end of
11497         executables in 'ls -F' listings.
11498
11499 1996-09-15  Hrvoje Niksic  <hniksic@srce.hr>
11500
11501         * url.c (parseurl): Remove realloc() and sprintf().
11502         (str_url): Get rid of sprintf().
11503
11504         * recur.c (recursive_retrieve): Enable FTP recursion through proxy
11505         servers.
11506
11507         * url.h (URL_CLEANSE): Made it else-resistant.
11508         (USE_PROXY): New macro.
11509
11510 1996-09-14  Hrvoje Niksic  <hniksic@srce.hr>
11511
11512         * NEWS: Update.
11513
11514         * version.c: Changed version to 1.4b19.
11515
11516 1996-09-14  Hrvoje Niksic  <hniksic@srce.hr>
11517
11518         * version.c: "Released" 1.4b18.
11519
11520         * url.c: Made it reallocate space exponentially.
11521
11522 1996-09-14  Drazen Kacar  <dave@fly.cc.fer.hr>
11523
11524         * html.c (htmlfindurl): Added <frame src> and <iframe src> among
11525         the list of stuff to fetch.
11526
11527 1996-09-13  Hrvoje Niksic  <hniksic@srce.hr>
11528
11529         * url.c (get_urls_html): Fixed a bug that caused SIGSEGV's with
11530         -Fi.
11531
11532         * html.c (htmlfindurl): Rewrite.
11533
11534         * http.c (gethttp): Use opt.proxy_cache.
11535
11536         * main.c (main): Added --cache option.
11537
11538         * ftp.c (ftp_response): Print server response if opt.print_server
11539         response is set.
11540         (getftp): Print newlines after each request if the server response
11541         is to be printed.
11542         (ftp_response): Copy the last response line to last_respline.
11543
11544         * http.c (gethttp): Add Pragma: nocache for retried
11545         proxy-retrievals.
11546
11547         * ftp.c (getftp): Use it.
11548
11549         * retr.c (buf_discard): New function.
11550
11551         * ftp.c (ftp_response): Use buf_readchar().
11552         (getftp): Flush the control connection buffer before calling
11553         get_contents().
11554
11555         * retr.c (buf_readchar): New function.
11556         (buf_flush): New function.
11557         (get_contents): Use buf_readchar() instead of read(x, x, 1).
11558         (get_contents): Use buf_flush.
11559
11560 1996-09-12  Hrvoje Niksic  <hniksic@srce.hr>
11561
11562         * ftp.c: Incorporate changes to ftp_response.
11563
11564         * ftp.c (ftp_response): Allocate the server response dynamically,
11565         as in read_whole_line and fetch_next_header.
11566
11567         * utils.c (read_whole_line): Fixed a bug that prevented reading
11568         the last line if it is not \n-terminated. Also fixed a possible
11569         memory overflow.
11570
11571         * http.c (fetch_next_header): Return malloc-ed string as large as
11572         needed.
11573         (gethttp): Use new fetch_next_header.
11574
11575 1996-09-12  Hrvoje Niksic  <hniksic@srce.hr>
11576
11577         * http.c (hgetlen): Compute the header length the first time only.
11578         (hgettype): Ditto.
11579         (hgetlocation): Ditto.
11580         (hgetmodified): Ditto.
11581
11582 1996-09-11  Hrvoje Niksic  <hniksic@srce.hr>
11583
11584         * sample.geturlrc: Update.
11585
11586 1996-09-10  Hrvoje Niksic  <hniksic@srce.hr>
11587
11588         * http.c (http_loop): Ditto.
11589
11590         * ftp.c (getftp): Open the output file as binary.
11591
11592         * version.c: Changed version to 1.4b18.
11593
11594 1996-09-10  Hrvoje Niksic  <hniksic@srce.hr>
11595
11596         * version.c: "Released" 1.4b17.
11597
11598         * ftp-unix.c (ftp_parse_ls): If unable to open file, return NULL
11599         instead of failed assertion.
11600
11601 1996-09-09  Hrvoje Niksic  <hniksic@srce.hr>
11602
11603         * ftp.c (ftp_get_listing): Add a numbered suffix to LIST_FILENAME
11604         if a file of that name already exists.
11605
11606 1996-09-05  Hrvoje Niksic  <hniksic@srce.hr>
11607
11608         * ftp.c (ftp_1fl_loop): Handler FTPPORTERR and FOPENERR correctly.
11609
11610         * config.h.in: Define gethostbyname as Rgethostbyname when using
11611         Socks.
11612
11613         * configure.in: Check for -lresolv if using Socks.
11614
11615         * version.c: Changed version to 1.4b17.
11616
11617 1996-07-15  Hrvoje Niksic  <hniksic@srce.hr>
11618
11619         * version.c: "Released" 1.4b16.
11620
11621         * http.c (gethttp): More intelligent check for first line of HTTP
11622         response.
11623         (gethttp): Would bug out on time-stamping.
11624
11625         * version.c: Changed version to 1.4b16.
11626
11627 1996-07-11  Hrvoje Niksic  <hniksic@srce.hr>
11628
11629         * version.c: Released 1.4b15.
11630
11631         * http.c (http_loop): Print \n after the loop entry, not before.
11632
11633         * url.c (url_filename): Use ISDOT.
11634
11635         * url.h (ISDOT): New macro.
11636
11637         * recur.c (recursive_retrieve): Change only opt.recursive for
11638         following FTP.
11639
11640 1996-07-11  Antonio Rosella <antonio.rosella@agip.it>
11641
11642         * socks/geturl.cgi: Fixed version No.
11643
11644         * socks/download-netscape.html: Ditto.
11645
11646         * socks/download.html: Changed socks.html to download.html.
11647
11648 1996-07-11  Hrvoje Niksic  <hniksic@srce.hr>
11649
11650         * url.c (url_filename): Check for opt.dirstruct instead for
11651         opt.recursive && opt.dirstruct.
11652
11653         * init.c (defaults): Ditto.
11654         (defaults): Reset dirstruct by default.
11655         (setval): Set opt.dirstruct whenever setting recursive.
11656
11657         * init.h: Removed FORCEDIRHIER.
11658
11659         * INSTALL: Added -L to socks-description.
11660
11661         * version.c: Changed version to 1.4b15.
11662
11663 1996-07-10  Hrvoje Niksic  <hniksic@srce.hr>
11664
11665         * version.c: "Released" 1.4b14.
11666
11667         * geturl.1: Update AUTHOR to include Rosella as contributor.
11668
11669         * NEWS: Update.
11670
11671         * socks/geturl.cgi: Simplified command creation, nuked <blink>.
11672
11673         * socks/geturl.cgi: Wrap nutscape extensions within if $netscape.
11674         (cal_time): Fix == to eq.
11675
11676         * socks/geturl.cgi: GPL-ized with permission of A. Rosella.
11677
11678         * geturl.1 (hostname): Moved URL CONVENTIONS to the beginning.
11679
11680         * Makefile.in: Use @VERSION@.
11681
11682         * configure.in: Check version from version.c.
11683
11684         * socks/geturl.cgi: Changed /pub/bin/perl to /usr/bin/perl.
11685
11686         * socks/download.html: Created from download-netscape.html, made
11687         HTML-2.0 compliant.
11688
11689         * recur.c (recursive_retrieve): Set opt.force_dir_hier when
11690         following FTP links from recursions.
11691
11692 1996-07-09  Hrvoje Niksic  <hniksic@srce.hr>
11693
11694         * url.c (mymkdir): Fixed a bug that prevented mymkdir() to create
11695         absolute directories correctly.
11696
11697         * version.c: Changed version to 1.4b14.
11698
11699 1996-07-09  Hrvoje Niksic  <hniksic@srce.hr>
11700
11701         * version.c: "Released" 1.4b13.
11702
11703         * url.c (make_backup): New function.
11704
11705         * http.c (http_loop): Make a backup copy of the local file (using
11706         rename(2)) before opening it.
11707
11708         * main.c (main): Added --backups.
11709
11710         * host.c (ftp_getaddress): Bail out on failed mycuserid().
11711         (ftp_getaddress): Check for leading dot on MY_DOMAIN.
11712         (ftp_getaddress): Check for empty, null or (null) domain.
11713
11714         * url.c (get_urls_html): If this_url is NULL, the base must have a
11715         protocol.
11716         (parseurl): Use has_proto.
11717
11718         * retr.c (retrieve_url): Warn when proxy is used with more than 20
11719         retries.
11720
11721         * url.c (mkstruct): Create the directory (calling mymkdir()) only
11722         if it is not already there.
11723         (has_proto): New function.
11724         (get_urls_html): Eliminate the remaining call to findurl -- use
11725         has_proto.
11726
11727         * geturl.1: Ditto.
11728
11729         * main.c: Change -X to -x.
11730
11731         * url.c (url_filename): Simplify creation of filename if
11732         prefix_files is set.
11733         (url_filename): Simplify everything. And I do mean *everything*.
11734         (mkstruct): Add dir_prefix before hostname.
11735         (path_simplify): Fixed a bug that caused writing outside the path
11736         string in case of "." and ".." path strings.
11737
11738 1996-07-06  Hrvoje Niksic  <hniksic@srce.hr>
11739
11740         * init.c: Added --mirror.
11741
11742         * main.c (main): Added -X to force saving of directory hierarchy.
11743
11744         * ftp.c (ftp_retrieve_list): Added recursion depth counter.
11745         (ftp_retrieve_list): Check whether quota is exceeded.
11746
11747         * url.c (get_urls_html): Skip leading blanks for absolute URIs.
11748
11749         * http.c (gethttp): Use referer if present.
11750
11751         * recur.c (recursive_retrieve): Set u->referer before calling
11752         retrieve_url.
11753
11754         * url.c (newurl): Use memset to nullify the struct members.
11755         (freeurl): Free the referer field too.
11756
11757         * url.h: Added referer to urlinfo.
11758
11759         * geturl.1: Updated the manual to document some of the new features.
11760
11761         * utils.c (numdigit): Moved from url.c.
11762
11763         * README: Rewritten.
11764
11765         * config.h.in: Add the support for socks.
11766
11767         * configure.in: Add the support for socks.
11768
11769         * url.c (url_filename): If the dir_prefix is ".", work with just
11770         the file name.
11771         (url_filename): Do not look for .n extensions if timestamping if
11772         turned on.
11773
11774         * retr.c (show_progress): Skip the over-abundant restval data, and
11775         print the rest of it with ',' instead of '.'.
11776
11777 1996-07-05  Hrvoje Niksic  <hniksic@srce.hr>
11778
11779         * retr.c (show_progress): Changed second arg. to long (as it
11780         should be).
11781         (show_progress): Moved to retr.c.
11782         (get_contents): Moved to retr.c.
11783
11784         * version.c: Change version to 1.4b13.
11785
11786 1996-07-05  Hrvoje Lacko <hlacko@fly.cc.fer.hr>
11787
11788         * url.c (in_acclist): Would return after the first suffix.
11789
11790 1996-07-04  Hrvoje Niksic  <hniksic@srce.hr>
11791
11792         * version.c: "Released" 1.4b12.
11793
11794         * url.c (path_simplify): More kludgifications.
11795         (get_urls_html): Use new parameters for htmlfindurl.
11796
11797         * html.c: Removed memorizing "parser states", since the new
11798         organization does not require them.
11799
11800         * init.c (run_geturlrc): Use read_whole_line.
11801
11802         * ftp-unix.c (ftp_parse_ls): Use read_whole_line.
11803
11804         * recur.c (parse_robots): Use read_whole_line.
11805
11806         * utils.c (read_whole_line): New function.
11807
11808         * recur.c (tried_robots): Use add_slist/in_slist, *much* cleaner.
11809
11810         * host.c (ngethostbyname): Call inet_addr just once. Yet to be
11811         tested on OSF and Ultrix.
11812         (add_hlist): New function.
11813         (free_hlist): New function.
11814         (search_host): New function.
11815         (search_address): New function.
11816         (realhost): Use search_host, search_address and add_hlist.
11817         (same_host): Replaced realloc() with strdupdelim(), made
11818         case-insensitive, fixed a memory leak.
11819
11820         * html.c (ftp_index): Fixed tm_min and tm_sec to be tm_hour and
11821         tm_min, like intended.
11822
11823         * version.c: Change user agent information to
11824         Geturl/version.
11825
11826 1996-07-03  Hrvoje Niksic  <hniksic@srce.hr>
11827
11828         * utils.c: Renamed nmalloc.c to utils.c, .h likewise.
11829
11830         * url.c (acceptable): Always accept directories.
11831
11832         * ftp-unix.c (ftp_parse_ls): Support brain-damaged "ls -F"-loving
11833         servers by stripping trailing @ from symlinks and trailing / from
11834         directories.
11835
11836         * ftp.c (ftp_loop): Debugged the "enhanced" heuristics. :-)
11837
11838         * url.c (skip_url): Use toupper instead of UCASE.
11839
11840         * host.c (sufmatch): Made it case-insensitive.
11841
11842         * url.c (match_backwards_or_pattern): Fixed i == -1 to j == -1.
11843         (match_backwards): New function, instead of
11844         match_backwards_or_pattern.
11845
11846         * recur.c (recursive_retrieve): Increased performance by
11847         introducing inl, which reduces number of calls to in_slist to only
11848         one.
11849
11850         * ftp.c (ftp_loop): Enhanced the heuristics that decides which
11851         routine to use.
11852
11853         * main.c (printhelp): Removed the warranty stuff.
11854
11855 1996-07-02  Hrvoje Niksic  <hniksic@srce.hr>
11856
11857         * url.c (add_slist): Simplify.
11858         (match_backwards_or_pattern): New function.
11859         (in_acclist): Use match_backwards_or_pattern.
11860         (matches): Remove.
11861
11862 1996-06-30  Hrvoje Niksic  <hniksic@srce.hr>
11863
11864         * ftp.c (ftp_loop): Call ftp_index on empty file names, if not
11865         recursive.
11866
11867         * html.c (ftp_index): Fixed to work. Beautified the output.
11868
11869         * ftp.c (ftp_retrieve_glob): Another argument to control whether
11870         globbing is to be used.
11871         (ftp_retrieve_list): Compare the time-stamps of local and remote
11872         files to determine whether to download.
11873
11874 1996-06-29  Hrvoje Niksic  <hniksic@srce.hr>
11875
11876         * ftp.c (rel_constr): New function.
11877
11878         * retr.c (retrieve_from_file): Check for text/html before
11879         retrieving recursively.
11880
11881         * main.c (main): Check whether the file is HTML before going into
11882         recursive HTML retrieving.
11883
11884         * ftp.c (ftp_retrieve_list): Manage directories.
11885         (ftp_retrieve_glob): Pass all the file-types to ftp_retrieve_list.
11886         (ftp_1fl_loop): Fixed a bug that caused con->com to be incorrectly
11887         initialized, causing bugchecks in getftp to fail.
11888
11889         * configure.in: Check for symlink.
11890
11891         * ftp.c (ftp_retrieve_list): Added support for symlinks.
11892
11893         * version.c: "Released" 1.4b10.
11894
11895         * atotm.c (atotm): Redeclared as time_t.
11896
11897         * init.c: New variable "timestamping".
11898
11899         * main.c (main): New option 'N'.
11900
11901         * http.c (hgetlocation): Case-insensitive match.
11902         (hgetmodified): New function.
11903         (http_loop): Implement time-stamping.
11904
11905 1996-06-28  Hrvoje Niksic  <hniksic@srce.hr>
11906
11907         * version.c: Changed version to 1.4b10
11908
11909         * atotm.c: New file, from phttpd.
11910
11911         * options.h (struct options): New parameter timestamping.
11912
11913         * version.c: 1.4b9 "released".
11914
11915         * recur.c (recursive_retrieve): Used linked list (ulist) for
11916         faster storing of URLs.
11917
11918         * url.c (get_urls_html): Removed the old kludge with comparing the
11919         outputs of htmlfindurl and findurl.
11920         (get_urls_html): Added better protocol support here.
11921         (create_hash): Removed, as well as add_hash and in_hash.
11922         (addslist): New function.
11923         (in_slist): ditto
11924
11925         * version.c: Released 1.4b8, changed version to b9.
11926
11927 1996-06-27  Hrvoje Niksic  <hniksic@srce.hr>
11928
11929         * ftp.c (freefileinfo): New function.
11930         (delelement): New function.
11931
11932         * everywhere: GPL!
11933
11934         * ftp.c (ftp_loop): Use ccon.
11935         (ftp_retrieve_glob): Likewise.
11936
11937         * ftp.h: Define ccon, to define status of control connection.
11938
11939         * ftp.c (ftp_get_listing): New function.
11940         (ftp_retrieve_more): New function.
11941         (ftp_retrieve_glob): New function.
11942
11943 1996-06-25  Hrvoje Niksic  <hniksic@srce.hr>
11944
11945         * configure.in: Removed the search for cuserid().
11946
11947         * init.c (getmode): Renamed to getperms.
11948
11949 1996-06-24  Hrvoje Niksic  <hniksic@srce.hr>
11950
11951         * version.c: New version.
11952
11953         * main.c (hangup): New function, that handles hangup. Hangup
11954         signal now causes geturl to stop writing on stdout, and to write
11955         to a log file.
11956
11957         * ftp.c (getftp): "Released" 1.4b7.
11958
11959         * html.c (htmlfindurl): Ignore everything inside <head>...</head>.
11960         (ftp_index): Use fileinfo/urlinfo.
11961
11962         * ftp-unix.c (ftp_parse_ls): New function.
11963         (symperms): New function.
11964
11965         * ftp.c (ftp_1fl_loop): New function, to handle 1-file loops.
11966
11967         * retr.c (retrieve_url): Added FTP support.
11968
11969 1996-06-23  Hrvoje Niksic  <hniksic@srce.hr>
11970
11971         * geturl.h: Removed NOTFTP2HTML enum.
11972         Added DO_LOGIN, DO_CWD and DO_LIST. LIST_ONLY is obsolete.
11973
11974         * ftp.c (getftp): Resynched with urlinfo.
11975         (getftp): Removed HMTL-ization of index.html from getftp.
11976
11977         * version.c: 1.4b6 "released".
11978
11979         * options.h (options): New struct, to keep options in.
11980
11981         * http.c (http_loop,gethttp): Synched with proxy.
11982
11983         * retr.c (retrieve_url): Implemented proxy retrieval.
11984
11985         * main.c (main): Use retrieve_from_file.
11986
11987 1996-06-22  Hrvoje Niksic  <hniksic@srce.hr>
11988
11989         * retr.c (retrieve_from_file): New function.
11990
11991         * url.c (parseurl): Modified to return URLOK if all OK. Protocol
11992         can be found in u->proto.
11993
11994         * ftp.c (ftp_response): Fixed to accept multi-line responses as
11995         per RFC 959.
11996
11997         * recr.c (recursive_retrieve): Take newloc from retrieve_url.
11998
11999         * url.c (mymkdir): Removed the file of the same name, if one
12000         exists.
12001         (isfile): New function.
12002         (mkstruct): Fixed the '/' glitches.
12003         (path_simplify): Hacked to treat something/.. correctly.
12004
12005 1996-06-21  Hrvoje Niksic  <hniksic@srce.hr>
12006
12007         * http.c (gethttp): Close the socket after error in headers.
12008         (http_loop): HEOF no longer a fatal header.
12009
12010         * loop.c (retrieve_url): When dt is NULL, do not modify it. This
12011         simplifies the syntax of calling retrieve_url.
12012
12013         * recr.c (recursive_retrieve): Modified to use get_urls_html.
12014
12015         * url.c (get_urls_file): New function.
12016         (get_urls_html): New function.
12017
12018         * recr.c (recursive_retrieve): Patched up to conform to the
12019         standards.
12020
12021         * http.c (gethttp): Synched with the rest...
12022         (gethttp): Treat only CONREFUSED specially, with connection
12023         errors.
12024
12025         * init.c,geturl.1,http.c (http_loop): Removed kill_error.
12026
12027 1996-06-20  Hrvoje Niksic  <hniksic@srce.hr>
12028
12029         * http.c (http_loop): New function.
12030
12031         * loop.c: Removed *lots* of stuff from retrieve_url.
12032
12033         * url.c (parseurl): Changed to work with urlinfo. Integrated
12034         username finding and path parsing.
12035         (newurl): New function.
12036         (freeurl): New function.
12037         (mkstruct): Removed the old bogosities, made it urlinfo-compliant.
12038         (url_filename): Likewise.
12039         (path_simplify): Accept relative paths too.
12040         (opt_url): Made urlinfo-compliant, removed bogosities.
12041         (path_simplify): Expanded to accept relative paths.
12042         (str_url): A replacement for hide_url
12043         (decode_string): Fixed a bug that caused malfunctioning when
12044         encountering an illegal %.. combination.
12045         (opt_url): Removed the argument. Dot-optimizations are now default.
12046
12047         * nmalloc.c (strdupdelim): New function.
12048
12049         * url.h: Added the urlinfo structure
12050
12051 1996-06-19  Hrvoje Niksic  <hniksic@srce.hr>
12052
12053         * url.c (hide_url): Thrown out the protocol assertion. Do not
12054         change the URL if the protocol if not recognized.
12055         (findurl): Put continue instead of break.
12056
12057 1996-06-18  Hrvoje Niksic  <hniksic@srce.hr>
12058
12059         * sample.geturlrc: Changed the defaults to be commented out and
12060         harmless (previous defaults caused pains if copied to
12061         ~/.geturlrc).
12062
12063         * http.c (gethttp): Print the HTTP request in debug mode.
12064
12065         * connect.c (iread): Added EINTR check loop to select-ing
12066         too. EINTR is now correctly handled with select().
12067
12068         * TODO: new file
12069
12070 1996-05-07  Hrvoje Niksic  <hniksic@srce.hr>
12071
12072         * host.c (same_host): Made the function a little bit more
12073         intelligent regarding diversified URL syntaxes.
12074
12075         * url.c (skip_url): Spaces are now skipped after URL:
12076
12077         * Released 1.3.1 with the patch to prevent crashing when sending
12078         NULL to robot* functions and the patch to compile "out of the box"
12079         on AIX.
12080
12081         * recr.c (recursive_retrieve): Added checking whether this_url is
12082         NULL when calling the robot functions.
12083
12084         * ChangeLog: New file.