]> sjero.net Git - wget/blob - src/ChangeLog
Automated merge.
[wget] / src / ChangeLog
1 2009-08-29  Steven Schubiger  <stsc@member.fsf.org>
2
3         * convert.c (local_quote_string): Percent-encode semicolons
4         in local file strings.
5
6 2009-08-27  Micah Cowan  <micah@cowan.name>
7
8         * wget.h (uerr_t): added new VERIFCERTERR code for SSL certificate
9         problems. Marked exit codes that are defined but never used (at
10         least, the ones I could find).
11
12         * retr.c, retr.h (retrieve_url): Added a new boolean argument to
13         determine whether an exit status should be recorded.
14         (retrieve_from_file): Adjust to new retrieve_url signature.
15
16         * res.c (res_retrieve_file): Don't have retrieve_url record an
17         exit status for robots.txt.
18
19         * recur.c (retrieve_tree): Adjust to new retrieve_url signature.
20
21         * main.c (main): Use the exit status stored by retrieve_url.
22
23         * http.c (gethttp): Distinguish certificate verification problems
24         from SSL connection issues.
25         (http_loop): Handle newly-created VERIFCERTERR error code.
26
27         * exits.c, exits.h: Newly added.
28         
29         * Makefile.am (wget_SOURCES): Add exits.c and exits.h.
30
31 2009-08-27  Micah Cowan  <micah@cowan.name>
32
33         * http.c (gethttp): Make sure Wget heeds cookies when they
34         are sent with a 401 response; or any other sort of response for
35         that matter (#26775).
36
37 2009-08-19  Micah Cowan  <micah@cowan.name>
38
39         * openssl.c (ssl_check_certificate): Only warn about an attack if
40         the hostname would otherwise have matched. Also some formatting
41         cleanup.
42
43 2009-08-19  Joao Ferreira  <joao@joaoff.com>
44
45         * openssl.c (ssl_check_certificate): Detect embedded NUL
46         characters in the SSL certificate common name.
47
48 2009-08-17  Tony Lewis  <tlewis@exelana.com>
49
50         * http.c (gethttp): Ensure that we parse Content-Length before we
51         attempt to refer to its value. Without this fix, NTLM support was
52         completely buggered. #27192
53
54 2009-08-09  Michael Baeuerle  <michael.baeuerle@gmx.net>
55
56         * ftp.c: #include <strings.h> for strcasecmp.
57
58 2009-07-28  Micah Cowan  <micah@cowan.name>
59
60         * main.c (option_data): Rename --html-extension to
61         --adjust-extension.
62         (print_help): Ditto.
63         
64         * options.h (struct option): Rename html_extension to
65         adjust_extension.
66         * http.c (gethttp): Ditto.
67         * convert.c (local_quote_string): Ditto.
68
69         * init.c (commands): Add "adjustextension", and reflect rename
70         change for opt.adjust_extension, for both "adjustextension" and
71         "htmlextension".
72
73 2009-07-27  Micah Cowan  <micah@cowan.name>
74
75         * options.h (struct options): Added restrict_files_nonascii
76         boolean field.
77
78         * url.c (FILE_CHAR_TEST): Add check for chars outside the ASCII
79         range.
80
81         * init.c (defaults): Add restrict_files_nonascii to initialization.
82         (cmd_spec_restrict_file_names): Allow parsing of "ascii" keyword.
83
84 2009-07-27  Marcel Telka  <marcel@telka.sk>
85
86         * iri.c (do_conversion): Typo: invalide -> invalid
87
88 2009-07-27  Petr Pisar  <petr.pisar@atlas.cz>
89
90         * main.c (print_help): Fixed a couple typos.
91
92 2009-07-26  Micah Cowan  <micah@cowan.name>
93
94         * main.c (option_data): Rename --locale option to --local-encoding
95         (print_help): Document --no-iri, --local-encoding, and
96         --remote-encoding, within usage message. Remove defunct
97         --preserve-permissions.
98
99 2009-07-23  Micah Cowan  <micah@cowan.name>
100
101         * progress.c (get_eta): Change "Translation note" in comment to
102         "TRANSLATORS", so it actually appears in wget.pot.
103
104 2009-07-06  Micah Cowan  <micah@cowan.name>
105
106         * main.c (print_help): Improve documentation of --base.
107
108 2009-07-05  Micah Cowan  <micah@cowan.name>
109
110         * html-url.c (tag_handle_meta): Handle meta name="robots"
111         properly: deal with whitespace, commas after...
112
113         * netrc.c (parse_netrc): Rename local-scope variable "quote" to
114         "qmark", to avoid conflict with the function name.
115
116 2009-07-05  Petr Pisar  <petr.pisar@atlas.cz>
117
118         * main.c (print_version): Mark initial line for translation, along
119         with (env), (user), and (system). Change copyright year to 2009.
120
121         * http.c (http_loop): Space after colon.
122
123         * gnutls.c (ssl_check_certificate): Use quote function, rather
124         than explicit quotes.
125
126 2009-07-05  Micah Cowan  <micah@cowan.name>
127
128         * Makefile.am (version.c): Add dependency on configure.ac.
129
130         * iri.c: Mark some strings for translation.
131
132 2009-07-04  Steven Schweda  <sms@antinode.info>
133
134         * wget.h (ORIG_SFX): Macro added, to supply an alternative "_orig"
135         suffix on VMS.
136         
137         * connect.c, host.c, host.h, main.c: Include "vms_ip.h" rather
138         than <netdb.h> on VMS systems.
139
140         * convert.c (write_backup_file): Use "_orig" rather than ".orig"
141         on VMS.
142
143         * ftp-basic.c (ftp_list): Don't use LIST -a on VMS servers.
144
145         * ftp.c [__VMS]: Include "vms.h"
146         * ftp.c (getftp): Disable some unhelpful "for VMS" code. Pass the
147         OS type to ftp_list.
148         (getftp) [__VMS]: Alter the filename as required, and invoke fopen
149         with extra optional arguments.
150         (ftp_retrieve_list): Set permissions before setting the times.
151
152         * ftp-ls.c [__VMS]: Various improvements.
153
154         * http.c (SET_USER_AGENT): Added. Include operating-system info in
155         the User-Agent header.
156         (gethttp): Use ORIG_SFX macro.
157         (gethttp) [__VMS]: invoke fopen with extra arguments to
158         communicate file type.
159         (http_loop): Add cast to time_t.
160
161         * init.c (wgetrc_user_file_name) [__VMS]: Adjustments for where to
162         find the .wgetrc.
163
164         * log.c: Adjustments to improve handling of log files on VMS.
165
166         * main.c [__VMS]: Added --ftp-stmlf option (and associated
167         documentation). Adjust description of backup-suffixes, as they now
168         differ for VMS.
169         (print_help, print_version): Include OS type in version
170         information.
171         (main) [__VMS]: Invoke fopen with extra options, to specify file
172         type information.
173
174         * netrc.c (search_netrc) [__VMS]: Fix .netrc-finding.
175
176         * openssl.c, openssl.h (ssl_connect_wget): Renamed from ssl_connect.
177
178         * options.h (struct options): Add ftp_stmlf field.
179
180         * retr.c (write_data) [__VMS]: Avoid fflush.
181
182         * url.c [__VMS]: Include vms.h.
183         * url.c (url_file_name) [__VMS]: Handle naming as required for VMS.
184
185         * utils.c [__VMS]: Include vms.h. Various added facilities for VMS
186         needs.
187
188 2009-07-04  Micah Cowan  <micah@cowan.name>
189
190         * main.c (print_version): Allow localization of the version-info
191         labels, eschew attempts at alignment (which is complicated when
192         handling translated strings), and avoid using printf() with
193         variable-stored format strings that lack conversion
194         specifications.
195         (format_and_print_line): For similar reasons, don't calculate
196         line-continuation tabulation based on the number of bytes in a
197         string.
198
199 2009-07-04  Steven Schubiger  <stsc@member.fsf.org>
200
201         * url.c (url_parse): If an URL scheme is invalid, distinguish
202         between an unsupported or missing scheme.
203
204         * url.c: Add a "missing scheme" entry to parse_errors.
205
206 2009-07-03  Micah Cowan  <micah@cowan.name>
207
208         * iri.h (iri_dup): Provide macro definition for when IRIs are
209         disabled.
210
211         * Makefile.am (LIBS): Added @LIBICONV@.
212         (wget_SOURCES): Added iri.h.
213         (EXTRA_wget_SOURCES): Added iri.c, so it gets packaged even if IRI
214         support was disabled.
215
216 2009-07-02  Micah Cowan  <micah@cowan.name>
217
218         * recur.c (url_enqueue): Quote enqueue/dequeue debug messages.
219
220         * html-url.c (append_url): Change "merge()" quoting style from
221         locale_quoting_style to escape_quoting_style.
222
223 2009-07-01  Micah Cowan  <micah@cowan.name>
224
225         * retr.c (retrieve_url): Use the existing "redirect" label,
226         instead of superfluous "second_try". Removed no-longer-accurate
227         debug statement. Use the "newloc" parameter to store the fallback
228         URL, when IRI version was rejected.
229
230         * recur.c (retrieve_tree): Always use the parsed URL for tracking
231         the Referer, since that's the one we actually requested (if
232         there's a difference in terms of percent-encodings and such).
233
234 2009-07-01  Steven Schubiger  <stsc@member.fsf.org>
235
236         * Makefile.am: Add a rule to generate build_info.c and list
237         the build_info.c.in file in EXTRA_DIST. Adjust elsewhere
238         where needed.
239         
240         * build_info.c: Remove this static source file.
241         
242         * build_info.c.in: Data for generation of build_info.c.
243
244 2009-06-29  Micah Cowan  <micah@cowan.name>
245
246         * html-url.c (append_url): Quote some more arguments that might
247         contain characters that are inappropriate to display for the
248         current locale.
249
250         * retr.c (retrieve_from_file): Be sure to pass iri information
251         when parsing an input-fle url, and be sure to hand a clean iri
252         struct, off to retrieve_tree and retrieve_url.
253
254         * iri.c, iri.h (iri_dup): Added.
255
256         * retr.c (retrieve_url): Re-parse for IRI fallback.
257
258         * main.c (main): Set up iri before the url_parse invocation (so we
259         can use it).
260
261 2009-06-20  Jay Krell  <jay.krell@cornell.edu>
262
263         * sysdep.h (_ALL_SOURCE): (small change) Define the _ALL_SOURCE
264         macro on INTERIX systems. (I switched the location from ftp.c to
265         sysdep.h --mjc)
266
267 2009-06-15  Micah Cowan  <micah@cowan.name>
268
269         * ftp.c (getftp): If we can't accept the connection, return
270         CONERROR, not whatever the contents of err happens to be. Fixes
271         bug #25015.
272
273         * retr.c (fd_read_body): Make both args to progress_create
274         consistent, resulting in an accurate progress display. Fixes bug
275         #24948.
276
277 2009-06-14  Micah Cowan  <micah@cowan.name>
278
279         * Makefile.am (wget_SOURCES): css-tokens.h needs to ship with
280         dist, too.
281
282 2009-06-13  Micah Cowan  <micah@cowan.name>
283
284         * init.c: Rename setval_internal_wrapper to setval_internal_tilde,
285         ensure we don't "replace" the tilde unless it's actually
286         present. Clean up some minor GNU style issues.
287
288 2009-06-13  Julien Pichon  <julienpichon7@gmail.com>
289
290         * init.c: Handle tilde-expansion in wgetrc commands, without
291         resorting to setting/unsetting globals to change behavior in one
292         call location.
293
294 2009-06-12  Micah Cowan  <micah@cowan.name>
295
296         * host.c: Include <sys/types.h> before <sys/socket.h>. Not
297         required by POSIX any more, but some older systems (such as
298         FreeBSD 4.1) still need it, and it doesn't seem like it could
299         hurt...
300
301         * build_info.c (library): Handle "https" as a feature in its own
302         right, apart from "gnutls" and "openssl".
303
304         * host.c: Declare h_errno if no declaration is provided. Idea
305         thanks to Maciej W. Rozycki.
306
307 2009-06-11  Xin Zou  <zouxin2008@gmail.com>     
308         
309         * http.c (gethttp): Fix some memory leaks.
310         
311 2009-06-11  Micah Cowan  <micah@cowan.name>
312
313         * http.c (http_atotm): Handle potential for setlocale's return
314         value to be static storage. Thanks to Benjamin Wolsey
315         <bwy@benjaminwolsey.de>.
316
317         * sysdep.h: Need NAMESPACE_TWEAKS on non-Linux glibc-based
318         systems, too. Thanks to Robert Millan.
319
320 2009-05-28  Steven Schubiger  <stsc@member.fsf.org>
321
322         * ftp.c (ftp_get_listing): Update the "listing file" 
323         string after calling ftp_loop_internal().
324
325 2009-05-27  Steven Schubiger  <stsc@member.fsf.org>
326
327         * ftp.c (ftp_get_listing): Duplicate the "listing file"
328         string to avoid memory corruption when FOPEN_EXCL_ERR is
329         encountered.
330
331 2009-05-17  Steven Schubiger  <stsc@member.fsf.org>
332
333         * progress.c (eta_to_human_short): Fix the remaining hours
334         to be displayed. Spotted by Tadeu Martins (#26411).
335
336 2009-04-24  Micah Cowan  <micah@cowan.name>
337
338         * hash.c: Change stdint.h inclusion to use HAVE_STDINT_H, not C99
339         check.
340
341         * connect.c: stdint.h inclusion added.
342
343         Thanks to Markus Duft <mduft@gentoo.org> for a similar patch.
344         
345 2009-04-20  Micah Cowan  <micah@cowan.name>
346
347         * Makefile.am (version.c): Fix unportable use of "echo -n".
348
349 2009-04-13  Steven Schubiger  <stsc@member.fsf.org>
350
351         * ftp.c (ftp_retrieve_list): Move the duplicated code that
352         determines the local file to a function.
353         
354         * http.c (http_loop): Likewise.
355
356         * retr.c (set_local_file): New function.
357
358 2009-04-11  Steven Schubiger  <stsc@member.fsf.org>
359
360         * init.c (initialize): Run a custom SYSTEM_WGETRC when 
361         provided as an environment variable.
362
363 2009-02-27  Gisle Vanem  <gvanem@broadpark.no>
364
365         * main.c (main): "freopen (NULL,.." causes an assertion in MSVC
366         debug-mode.  I.e. NULL isn't legal. But the "CONOUT$" device works
367         fine.
368
369 2009-02-27  Steven Schubiger  <stsc@member.fsf.org>
370
371         * ftp.c (ftp_loop_internal): Don't claim for FTP retrievals
372         when writing to standard output either that the document
373         has been saved. Addresses bug #20520 again.
374
375 2009-02-21  Steven Schubiger  <stsc@member.fsf.org>
376
377         * http.c (http_loop): When a document is written to 
378         standard output, don't claim it has been saved to a file.
379         Addresses bug #20520.
380
381 2009-02-18  Steven Schubiger  <stsc@members.fsf.org>
382
383         * recur.h: Remove the dangling declaration for recursive_cleanup().
384
385 2009-02-01  Gerardo E. Gidoni  <gerel@gnu.org>
386
387         * main.c, recur.c, recur.h, res.c, retr.c, retr.h: restructured code to
388         avoid multiple 'url_parse' calls.
389
390 2008-11-13  Micah Cowan  <micah@cowan.name>
391
392         * http.c (gethttp): Don't do anything when content-length >= our
393         requested range.
394
395 2008-11-27  Saint Xavier  <wget@sxav.eu>
396
397         * http.c (gethttp): Move authentication code before filename
398         allocation avoiding fallbacking on default filename because
399         "Content-Disposition" header wasn't present before authentcation
400         has been completed. Fixes bug #24862.
401
402 2008-11-16  Steven Schubiger  <stsc@members.fsf.org>
403
404         * main.c: Declare and initialize the numurls counter.
405
406         * ftp.c, http.c: Make the counter visible here and use it.
407         
408         * options.h: Remove old declaration from options struct.
409
410 2008-11-15  Steven Schubiger  <stsc@members.fsf.org>
411
412         * init.c (defaults): Set default waitretry value.
413
414 2008-11-14  Steven Schubiger  <stsc@members.fsf.org>
415
416         * main.c (format_and_print_line): Use a custom format 
417         string for printing leading spaces.
418
419 2008-11-12  Micah Cowan  <micah@cowan.name>
420
421         * ftp-ls.c (ftp_index): HTML-escape dir name in title, h1, a:href.
422
423 2008-11-12  Alexander Belopolsky  <alexander.belopolsky@gmail.com>
424
425         * url.c, url.h (url_escape_unsafe_and_reserved): Added.
426
427         * ftp-ls.c (ftp_index): URL-escape, rather than HTML-escape, the
428         filename appearing in the link.
429
430 2008-11-12  Steven Schubiger  <stsc@members.fsf.org>
431
432         * main.c (print_version): Hand the relevant
433         xstrdup/xfree calls back to format_and_print_line().
434
435 2008-11-11  Steven Schubiger  <stsc@members.fsf.org>
436
437         * main.c (format_and_print_line): Move both the memory
438         allocating and freeing bits upwards to print_version().
439
440 2008-11-10  Saint Xavier  <wget@sxav.eu>
441
442         * http.c: Make --auth-no-challenge works with user:pass@ in URLs.
443
444 2008-11-05  Micah Cowan  <micah@cowan.name>
445
446         * ftp.c (print_length): Should print humanized "size remaining"
447         only when it's at least 1k.
448
449 2008-10-31  Micah Cowan  <micah@cowan.name>
450
451         * main.c (print_version): Add information about the mailing list.
452
453 2008-10-31  Alexander Drozdov  <dzal_mail@mtu-net.ru>
454
455         * retr.c (fd_read_hunk): Make assert deal with maxsize == 0.
456
457         * ftp-ls.c (clean_line): Prevent underflow on empty lines.
458
459 2008-10-26  Gisle Vanem  <gvanem@broadpark.no>
460
461         * main.c (format_and_print_line): Put variables on top of
462         blocks (not all compilers are C99). Add an extra '\n' if
463         SYSTEM_WGETRC isn't defined and printed.
464
465 2008-09-09  Gisle Vanem  <gvanem@broadpark.no>
466
467         * url.c (url_error): Use aprintf, not asprintf.
468         
469 2008-09-09  Micah Cowan  <micah@cowan.name>
470
471         * init.c (home_dir): Save the calculated value for home,
472         to avoid duplicated work on repeated calls.
473         (wgetrc_file_name) [WINDOWS]: Define and initialize home var.
474
475         * build_info.c, main.c: Remove unnecessary extern vars
476         system_wgetrc and locale_dir.
477
478         * main.c: Define program_name for lib/error.c.
479
480 2008-09-02  Gisle Vanem  <gvanem@broadpark.no>
481
482         * mswindows.h: Must ensure <stdio.h> is included before
483         we redefine ?vsnprintf().
484
485 2008-08-08  Steven Schubiger  <stsc@members.fsf.org>
486
487         * main.c, utils.h: Removed some dead conditional DEBUG_MALLOC code.
488
489 2008-08-03  Micah Cowan  <micah@cowan.name>
490
491         * main.c (print_help): Added --default-page.
492
493 2008-08-01  Joao Ferreira  <joao@joaoff.com>
494
495         * init.c, main.c, options.h, url.c: Added option --default-page
496         to support alternative default names for index.html
497
498 2008-08-03  Micah Cowan  <micah@cowan.name>
499
500         * build_info.c, css-url.c: #include wget.h, not config.h.
501
502 2008-08-03  Steven Schubiger  <stsc@members.fsf.org>
503
504         * url.c, url.h (url_error): Better messages for unsupported
505         schemes, especially https.
506
507         * html-url.c, recur.c, retr.c: Adjust to new url_error
508         invocation, and free result.
509
510 2008-07-17  Steven Schubiger  <stsc@members.fsf.org>
511
512         * retr.c (retrieve_from_file): When given an URL as input file,
513         use it as baseref if none was specified and treat the input file
514         as HTML if its content type is text/html.
515
516         * init.c (cleanup): Free the memory associated with the base
517         option (when DEBUG_MALLOC is defined).
518
519 2008-07-02  Xavier Saint  <wget@sxav.eu>
520
521         * iri.c, iri.h  : New function idn_decode() to decode ASCII
522         encoded hostname to the locale.
523
524         * host.c : Show hostname to be resolved both in locale and
525         ASCII encoded.
526
527 2008-06-28  Steven Schubiger  <stsc@members.fsf.org>
528
529         * retr.c (retrieve_from_file): Allow for reading the links from
530         an external file (HTTP/FTP).
531
532 2008-06-26  Xavier Saint  <wget@sxav.eu>
533
534         * iri.c, iri.h : New functions locale_to_utf8() and
535         idn_encode() adding basic capabilities of IRI/IDN.
536
537         * url.c : Convert URLs from locale to UTF-8 allowing a basic
538         support of IRI/IDN
539
540 2008-06-25  Steven Schubiger  <stsc@members.fsf.org>
541
542         * ftp.c (getftp): When spidering a FTP URL, emit a diagnostic
543         message if the remote file exists.
544
545 2008-06-24  Steven Schubiger  <stsc@members.fsf.org>
546
547         * http.c (http_loop): Replace escnonprint() occurence with
548         a quotearg_style() call.
549
550 2008-06-24  Micah Cowan  <micah@cowan.name>
551
552         * ftp-ls.c (ftp_index): Don't assume time_t* is compatible with
553         long*. Fixes crash on Windows, and probably other systems.
554
555 2008-06-22  Steven Schubiger  <stsc@members.fsf.org>
556
557         * http.c: Explicitly initialize and deallocate the message
558         string used by the -nv --spider functionality.
559
560 2008-06-22  Steven Schubiger  <schubiger@gmail.com>
561
562         * http.c: Make -nv --spider include the file's name when it
563         exists.
564
565 2008-06-22  Micah Cowan  <micah@cowan.name>
566
567         * Makefile.am (version.c): Fixed version string invocation so it
568         once again can't result in unterminated strings, made all the
569         string vars pointers-to-const, and moved line lengths
570         below 80 (in Makefile.am, not in version.c).
571
572 2008-06-19  Xavier Saint  <wget@sxav.eu>
573
574         * iri.c, iri.h : New function check_encoding_name() as
575         a preliminary encoding name check.
576
577         * main.c, iri.c : Make use of check_encoding_name().
578
579 2008-06-19  Xavier Saint  <wget@sxav.eu>
580
581         * iri.c : Include missing stringprep.h file and add a
582         cast.
583
584         * init.c : set a default initial value for opt.enable_iri,
585         opt.locale and opt.encoding_remote.
586
587 2008-06-19  Xavier Saint  <wget@sxav.eu>
588
589         * iri.c, iri.h : Add a new function find_locale() to find
590         out the local system encoding.
591
592         * main.c : Make use of find_locale().
593
594 2008-06-19  Xavier Saint  <wget@sxav.eu>
595
596         * html-url.c : Add "content-type" meta tag parsing for
597         retrieving page encoding.
598
599         * iri.h : Make no-op version of parse_charset() return
600         NULL.
601
602 2008-06-16  Micah Cowan  <micah@cowan.name>
603
604         * http.c (http_loop): When hstat.len is higher than the
605         successfully completed content's length, but it's because we
606         _set_ it that way, don't abort.
607
608 2008-06-14  Xavier Saint  <wget@sxav.eu>
609
610         * iri.c, iri.h : New files.
611
612         * Makefile.am : Add files iri.h and conditional iri.c.
613
614         * build_info.c : Add compiled feature "iri".
615
616         * http.c : include iri.h and parse charset from Content-Type
617         header.
618
619         * init.c, main.c, options.h : if an options isn't supported
620         at compiled time, don't get rid off it and show a dummy
621         message instead if they are used.
622
623 2008-06-13  Micah Cowan  <micah@cowan.name>
624
625         * build_info.c: ENABLE_NTLM, not HAVE_NTLM; distinguish OpenSSL
626         from "ssl".
627
628 2008-06-13  Madhusudan Hosaagrahara <com.gmail.hrmadhu>
629
630         * Makefile.am, main.c, init.c, init.h, build_info.c: Adds build
631         information to the --version command line option. Fixes bug
632         #20636.
633
634 2008-06-01  Micah Cowan  <micah@cowan.name>
635
636         * main.c [WINDOWS]: Reopen stdout in binary mode, when -O - is
637         given.
638
639 2008-05-31 Micah Cowan  <micah@cowan.name>
640
641         * html-url.c, http.c: Avoid casts in a couple spots.
642
643 2008-05-30 Henri Häkkinen  <henux@users.sourceforge.net>
644
645         * cookies.c, ftp-basic.c, hash.c, html-url.c, http-ntlm.c, http.c,
646         init.c, log.c, main.c, progress.c, ptimer.c, spider.c, url.c,
647         utils.c: Minor changes to silence warnings when using -Wall.
648
649 2008-05-26  Steven Schubiger  <schubiger@gmail.com>
650
651         * ftp.c (getftp): Replace last remaining invocation of escnonprint
652         with gnulib quote.
653
654 2008-05-19  Micah Cowan  <micah@cowan.name>
655
656         * main.c (main): Password prompt should be done only once (not
657         once per argument), and should be done prior to the background
658         fork.
659
660 2008-05-17  Steven Schubiger  <schubiger@gmail.com>
661
662         * init.c (defaults): Set the preferred IP family to `none' by
663         default.
664
665 2008-05-17  Kenny Parnell  <k.parnell@gmail.com>
666
667         (cmd_spec_prefer_family): Initialize prefer_family to prefer_none.
668
669 2008-05-17  Micah Cowan  <micah@cowan.name>
670
671         * main.c (main): Handle Ctrl-D on command-line.
672
673 2008-05-15  Steven Schubiger  <schubiger@gmail.com>
674
675         * ftp.c (getftp): Verify that the file actually exists in FTP, by
676         checking it against the listing.
677
678 2008-05-15  Micah Cowan  <micah@cowan.name>
679
680         * main.c (prompt_for_password): Use the quote module.
681
682 2008-05-14  Micah Cowan  <micah@cowan.name>
683
684         * ftp.c (ftp_retrieve_list): Symlinks and other filenames
685         should be fully quoted.
686
687 2008-05-12  Micah Cowan  <micah@cowan.name>
688
689         * main.c (main): Downgrade "-N with -O" to a warning, and switch
690         it off to avoid confusing messages.
691
692 2008-04-30  Micah Cowan  <micah@cowan.name>
693
694         * progress.c (create_image): Fix glitch where too many spaces are
695         printed on lines that don't display the ETA, in multibyte
696         locales.
697
698 2008-04-30  Steven Schubiger  <stsc@members.fsf.org>
699
700         * main.c (main): New code that handles prompting for passwords
701         when specified explicitly via command-line option (using gnulib's
702         getpass-gnu module).
703         (main): Include the getpass header.
704
705         * init.c: Add "ask-password" to the list of recognized commands.
706
707         * options.h: Add an according boolean member to the options
708         struct.
709
710         * sysdep.h: Comment the defines __EXTENSIONS__ and _GNU_SOURCE
711         out, because they're now defined independently by config.h.
712
713 2008-04-27  Rabin Vincent  <rabin@rab.in>
714
715         * http.c (http_loop): Fix return for the case where we don't
716         download a file because of -nc.
717
718 2008-04-27  Micah Cowan  <micah@cowan.name>
719
720         * url.c (path_simplify): Go back to allowing leading ".." in
721         paths, but only for FTP URLs.
722         (test_path_simplify): Add scheme-specificness to tests, adapt for
723         mu_run_test.
724
725         * test.c (all_tests): Add test_path_simplify.
726
727         * main.c (main): Downgrade -r, -p with -O to a warning rather than
728         an error; elaborate just a bit more for other -O combination
729         cases.
730
731 2008-04-26  Micah Cowan  <micah@cowan.name>
732
733         * http.c (gethttp): Move proxy CONNECT handling to below the
734         retry_with_auth label, to deal with properly reconnecting to
735         proxies when we need to authenticate.
736
737 2008-04-25  Micah Cowan  <micah@cowan.name>
738
739         * Makefile.am: -I foo -> -Ifoo.
740
741 2008-04-24  Micah Cowan  <micah@cowan.name>
742
743         * main.c: Revised usage description of --convert-links to apply
744         to CSS as well as to HTML.
745
746 2008-04-23  Micah Cowan  <micah@cowan.name>
747
748         * utils.c (test_dir_matches_p): Added a test for the case
749         described in issue #20518.
750
751 2008-04-22  Micah Cowan  <micah@cowan.name>
752
753         * Makefile.am, css.lex, css.l: Renamed css.lex to css.l.
754         * recur.c (retrieve_tree): Fix typo to allow text/css files to
755         be parsed.
756
757 2008-04-22  Ted Mielczarek  <ted.mielczarek@gmail.com>
758
759         * css.lex, css-url.c, css-url.h: Added to implement support for
760         parsing CSS in Wget.
761         * convert.c: Convert links in CSS files, too.
762         * convert.h (convert_options): Added for options link_css_p,
763         link_expect_css.
764         * convert.h: Added prototype for new register_css function.
765         * html-parse.c: Added support for parsing element content, in
766         addition to tag starts and ends.
767         * html-parse.h (taginfo): Added delimiter fields for element
768         content.
769         * html-url.h: Added.
770         * html-url.c (append_url): No longer internal-linkage only. Now
771         takes position and size as explicit parameters.
772         * html-url.c: Use new html-url.h header, add support for
773         handling of "style" HTML attributes. Mark URIs obtained from
774         link tags with rel="stylesheet" with link_expect_css. Adapt
775         uses of append_url to supply the newly-added parameters for
776         position and size.
777         * http.c: Add detection for when the content-type is text/css;
778         and ensure that such files have the ".css" filename extension,
779         when --convert-links is active.
780         * recur.h: Remove declarations for functions found in
781         html-url.c (moved to html-url.h).
782         * recur.c: Add support for culling links from CSS files, too,
783         and tracking for when we're expecting the file to be CSS (even
784         when its content type isn't text/css).
785         * retr.c (retrieve_url): Add registration of CSS files.
786         * wget.h: Added TEXTCSS to dt flags enum.
787         * Makefile.am: Added css.lex, css-url.c, css-url.h, html-url.h
788         to wget_SOURCES.
789
790 2008-04-22  Jim Paris  <jim@jtan.com>
791
792         * openssl.c (ssl_init): Enable combined certificate/key in
793         single file (apparent regression from ~1.9). Resolves issue
794         #22767.
795
796 2008-04-22  Steven Schubiger  <schubiger@gmail.com>
797
798         * http.c (print_response_line): Changed to make responses always
799         be logged, even in --quiet mode, if --server-response was
800         specified. This is to bring http.c's handling of the situation
801         in line with ftp.c's.
802
803 2008-04-22  Pranab Shenoy  <pranab.loosinit.shenoy@gmail.com>
804
805         * init.c: Added test_commands_sorted unit test to check is
806         commands are sorted.  Fixes bug #21245.
807
808         * test.c: Added test_commands_sorted to the test suite.
809
810 2008-04-22  Rabin Vincent  <rabin@rab.in>
811
812         * ftp.c (ftp_get_listing): Only remove .listing if it has been
813         created. 
814
815 2008-04-22  Alain Guibert  <alguibert+bts@free.fr>
816
817         * test.h (mu_run_test): Move declaration before statements, for
818         C90 conformance. Fixes bug #22789.
819
820 2008-04-22  Mike Frysinger  <vapier@gentoo.org>
821
822         * Makefile.am: Move @LIBS@ after other libraries, for better
823         static-linking support. Fixes bug #22143.
824
825 2008-04-16  Steven Schubiger  <schubiger@gmail.com>
826
827         * ftp.c: Use Gnulib's quote function for printing filenames and
828         such.
829         * connect.c: Likewise.
830         * convert.c: Likewise.
831         * cookies.c: Likewise.
832         * ftp-opie.c: Likewise.
833         * gnutls.c: Likewise.
834         * init.c: Likewise.
835         * log.c: Likewise.
836         * mswindows.c: Likewise.
837         * openssl.c: Likewise.
838         * progress.c: Likewise.
839         * recur.c: Likewise.
840         * res.c: Likewise.
841         * utils.c: Likewise.
842
843 2008-04-16  Steven Schubiger  <schubiger@gmail.com>
844
845         * sysdep.h: Comment the defines __EXTENSIONS__ and _GNU_SOURCE 
846         out, because they're now defined independently by config.h.
847
848 2008-04-14  Steven Schubiger  <schubiger@gmail.com>
849
850         * http.c: Use Gnulib's quote function for printing filenames and
851         such.
852         * wget.h: #include "quote.h".
853
854 2008-04-12  Rabin Vincent  <rabin@rab.in>
855
856         * mswindows.c (fake_fork_child): Don't create a logfile for
857         --background when --quiet is used, but not --server-response.
858         Fixes bug #20917.
859
860         * utils.c (fork_to_background): Likewise.
861
862 2008-04-12  Micah Cowan  <micah@cowan.name>
863
864         * utils.c (aprintf): Minor formatting changes to Alex's code (80-
865         column limit, concatenated string literals, avoiding nesting
866         levels), and removed invocation of free (since we're aborting
867         anyway).
868
869 2008-04-11  Alexander Dergachev  <cy6erbr4in@gmail.com>
870
871         * utils.c (aprintf): Now we are setting limits (1 Mb) for text
872         buffer when we use non-C99 vsnprintf.
873         
874 2008-04-11  Micah Cowan  <micah@cowan.name>
875
876         * ftp.c (getftp, ftp_loop_internal): Don't append to an existing
877         .listing when --continue is used.  Fixes bug #22825. Thanks to
878         Rabin Vincent <rabin@rab.in> for pointing the way with a
879         suggested fix!
880
881 2008-04-10  Alexander Dergachev  <cy6erbr4in@gmail.com>
882
883         * xmalloc.c, xmalloc.h (memfatal): Now exported; accepts an
884         "unknown" value for the attempted allocation size.
885         * utils.c (aprintf): Now calls memfatal, instead of aborting.
886
887 2008-03-19  Micah Cowan  <micah@cowan.name>
888
889         * utils.c (test_dir_matches_p): More tests related for
890         dir_matches_p.
891
892 2008-03-17  Micah Cowan  <micah@cowan.name>
893
894         * connect.c: Include sys/time.h to support use of the select
895         function on older systems.
896
897 2008-02-11  Benno Schulenberg  <bensberg@justemail.net>
898
899         * http.c: More accurate and descriptive messages for when a file
900         won't be retrieved during spider-mode.
901
902 2008-02-10  Micah Cowan  <micah@cowan.name>
903
904         * http.c: Added existence_checked member to the http_stat
905         struct.
906         (gethttp): Mark hs->existence_checked when we've checked whether
907         a file-to-download exists; so we don't check it again if the
908         connection gets lost (and potentially pick a new "unique" name).
909         This fixes bug 22251.
910         * progress.c (create_image): Add space for an extra column in
911         the "eta" portion of the progress bar image; to deal with
912         too-long Czech translation.
913         * main.c, http.c, init.c: Added --auth-no-challenge option, to
914         bring back 1.10.2 unsafe auth behavior when needed. This fixes
915         bug #22242.
916
917 2008-02-07  Micah Cowan  <micah@cowan.name>
918
919         * progress.c (create_image): Remove assertion on exceeding
920         screen width, which given the less-than-robust code there, can
921         be broken by a number of factors (such as large file downloads).
922
923 2008-02-06  Micah Cowan  <micah@cowan.name>
924
925         * progress.c (countcols): Use strlen() when mbtowc or wcwidth
926         not available (or not using NLS).
927         * utils.c: Ensure we use single-byte separators when not doing
928         NLS progress-bars.
929         * wget.h: Determine whether to use NLS for progress-bars, based
930         on whether wcwidth and mbtowc are available.
931
932 2008-02-03  Micah Cowan  <micah@cowan.name>
933
934         * progress.c (create_image): Use number of characters/columns
935         consumed, rather than number of bytes, to determine how much of
936         a line we've used. Fixes assertion errors and field alignment
937         bugs (#22161, #20481)
938         (get_eta, count_cols): Added to support the changes for
939         create_image.
940         * http.c (http_loop): Put no-clobber logic back into http_loop,
941         before starting to fetch, for when we're not doing
942         content-disposition.
943
944 2008-01-31  Micah Cowan  <micah@cowan.name>
945
946         * http.c (gethttp): Don't derive hs->contlen from possibly
947         invalid/missing Content-Length; instead, get the appropriate
948         value from the Content-Range header values.
949         (parse_content_range): Handle '*' instance-length field.
950
951 2008-01-25  Micah Cowan  <micah@cowan.name>
952
953         * main.c: Added notes to translators regarding (C), diacritics
954         in names.
955         * Makefile.am, cmpt.c, connect.c, connect.h, convert.c,
956         cookies.c, cookies.h, ftp-basic.c, ftp-ls.c, ftp-opie.c, ftp.c,
957         ftp.h, gen-md5.c, gen-md5.h, gnutls.c, hash.c, hash.h, host.c,
958         host.h, html-parse.c, html-parse.h, html-url.c, http-ntlm.c,
959         http-ntlm.h, http.c, http.h, init.c, init.h, log.c, log.h,
960         main.c, mswindows.c, mswindows.h, netrc.c, netrc.h, openssl.c,
961         options.h, progress.c, progress.h, ptimer.c, ptimer.h, recur.c,
962         recur.h, res.c, res.h, retr.c, retr.h, spider.c, spider.h,
963         ssl.h, sysdep.h, test.c, test.h, url.c, url.h, utils.c,
964         utils.h, wget.h, xmalloc.c, xmalloc.h: Updated copyright year.
965
966 2007-12-10  Micah Cowan  <micah@cowan.name>
967
968         * main.c: The option is --content-disposition, not
969         --no-content-disposition (at the moment).
970
971 2007-12-08  Hrvoje Niksic  <hniksic@xemacs.org>
972
973         * ftp.c (ftp_retrieve_glob): Print both arguments of fnmatch in
974         fnmatch error message.
975         (ftp_retrieve_glob): Don't match with fnmatch if we're only
976         supposed to get one file.
977
978 2007-12-07  Micah Cowan  <micah@cowan.name>
979
980         * Makefile.am: Plug in vars to include stuff from
981         $(top_srcdir)/md5 when appropriate.
982
983 2007-12-05  Micah Cowan  <micah@cowan.name>
984
985         * utils.c (subdir_p): Handle the case where d1 is "".
986         * convert.c (convert_all_links): Don't return without
987         deallocating timer.
988
989 2007-11-28  Micah Cowan  <micah@cowan.name>
990
991         * Makefile.am, cmpt.c, connect.c, connect.h, convert.c,
992         convert.h, cookies.c, cookies.h, ftp-basic.c, ftp-ls.c,
993         ftp-opie.c, ftp.c, ftp.h, gen-md5.c, gen-md5.h, gnutls.c,
994         hash.c, hash.h, host.c, host.h, html-parse.c, html-parse.h,
995         html-url.c, http-ntlm.c, http-ntlm.h, http.c, http.h, init.c,
996         init.h, log.c, log.h, main.c, mswindows.c, mswindows.h,
997         netrc.c, netrc.h, openssl.c, options.h, progress.c, progress.h,
998         ptimer.c, ptimer.h, recur.c, recur.h, res.c, res.h, retr.c,
999         retr.h, safe-ctype.c, safe-ctype.h, spider.c, spider.h, ssl.h,
1000         sysdep.h, test.c, test.h, url.c, url.h, utils.c, utils.h,
1001         wget.h, xmalloc.c, xmalloc.h: Updated license exception for
1002         OpenSSL, per the SFLC.
1003
1004 2007-10-30  Micah Cowan  <micah@cowan.name>
1005
1006         * main.c (main): Declare argv parameter as char **argv, rather
1007         than char *const *argv. This fixes usage of getopt_long,
1008         regardless of whether getopt_long has a constified argv or not.
1009
1010 2007-10-22  Gisle Vanem  <gvanem@broadpark.no>
1011
1012         * mswindows.c: Move INHIBIT_WRAP macro definition up with wget.h
1013         inclusion.
1014
1015 2007-10-18  Steven Schweda  <sms@antinode.org>
1016
1017         * sysdep.h: #include <stdint.h> as well as <inttypes.h>, to work
1018         around a glitch on Tru64 systems.
1019
1020 2007-10-18  Micah Cowan  <micah@cowan.name>
1021
1022         * Makefile.am: version.c should not be distributed. Removed
1023         config-post.h. Add version.c dependency and gnulib include path
1024         for libunittest.a.
1025         * sysdep.h: Got contents of config-post.h
1026         * config-post.h: Removed.
1027         * wget.h: #include "config.h".
1028         * alloca.c, cmpt.c, connect.c, convert.c, cookies.c,
1029         ftp-basic.c, ftp-ls.c, ftp-opie.c, ftp.c, gen-md5.c, gnutls.c,
1030         hash.c, host.c, html-parse.c, html-url.c, http-ntlm.c, http.c,
1031         init.c, log.c, main.c, mswindows.c, netrc.c, openssl.c,
1032         progress.c, ptimer.c, recur.c, res.c, retr.c, spider.c, url.c,
1033         utils.c, xmalloc.c: Use wget.h at very top, and instead of
1034         config.h.
1035
1036 2007-10-15  Micah Cowan  <micah@cowan.name>
1037
1038         * Makefile.am: Remove intermediary hg-id file generation, make
1039         version.c-generation more portable.
1040
1041 2007-10-14  Micah Cowan  <micah@cowan.name>
1042
1043         * cmpt.c, cookies.c, ftp-basic.c, ftp-ls.c, ftp.c, hash.c,
1044         host.c, html-parse.c, html-url.c, http-ntlm.c, http.c, init.c,
1045         log.c, main.c, netrc.c, openssl.c, res.c, url.c, utils.c,
1046         wget.h: Replace uses of ISSPACE, etc with c_isspace, etc.
1047         * gnu-md5.c, gnu-md5.h: Removed, in deference to gnulib.
1048         * Makefile.am: Removed gnu-md5.h from wget_SOURCES.
1049         * gen-md5.c: Changed #inclusion of gnu-md5.h to md5.h (gnulib's).
1050         * recur.c (download_child_p): Print error if unlink of
1051         robots.txt fails.
1052         * main.c (main): --spider or --delete-after now implies
1053         --no-directories (thanks, Josh Williams).
1054
1055 2007-10-14  Joshua David Williams  <yurimxpxman@gmail.com>
1056
1057         * recur.c (download_child_p): Remove robots.txt if
1058         --delete-after or --spider is on.
1059
1060 2007-10-13  Micah Cowan  <micah@cowan.name>
1061
1062         * Makefile.am: Make version.c depend on Wget dependencies (source
1063         files, plus such things as LIBOBJS so we get things like
1064         http-ntlm.c). Removed getopt.[ch], as we're now using gnulib for
1065         these.
1066
1067 2007-10-10  Micah Cowan  <micah@cowan.name>
1068
1069         * http-ntlm.c: Include openssl/opensslv.h explicitly, instead of
1070         hoping it'll be included by accident in openssl/des.h.
1071
1072 2007-10-09  Gisle Vanem  <gvanem@broadpark.no>
1073
1074         * mswindows.c: 'argc' and 'argv' in 'windows_main()' are no longer
1075         needed.  Hence simply the prototype. Free 'exec_name' at exit.
1076
1077 2007-10-09  Micah Cowan  <micah@cowan.name>
1078
1079         * gettext.h: Imported from /usr/share/gettext, fuller handling
1080         of --disable-nls.
1081         * wget.h: Remove logic for handling lack of NLS (now in
1082         gettext.h).
1083         * main.c: Use gettext's ENABLE_NLS rather than HAVE_NLS.
1084         * Makefile.am: added @LIBINTL@ to LIBS (though it probably
1085         belongs in LDADD, along with everything else currently assigned
1086         to LIBS).
1087
1088 2007-10-08  Micah Cowan  <micah@cowan.name>
1089
1090         * http.c (http_loop): Add send_head_first conditional back
1091         around code that needs it, but not around the last-modified
1092         header-parsing stuff this time. Removed no-longer-useful (was it
1093         ever?) restart_loop boolean, continuing unconditionally at end
1094         of send_head_first conditional block (if we haven't jumped out).
1095
1096 2007-10-04  Micah Cowan  <micah@cowan.name>
1097
1098         * http.c (http_loop): We've got_name if content_disposition
1099         support isn't on; make sure we continue properly in that case,
1100         even though we're not sending HEAD.
1101         * Makefile.in: Removed, replaced by Makefile.am.
1102         * Makefile.am: Converted from Makefile.in.
1103
1104 2007-10-02  Gisle Vanem  <gvanem@broadpark.no>
1105         
1106         * ftp.c: Use "_listing" for MSDOS (".listing" is illegal).
1107
1108         * url.c: Update comment for 'filechr_not_windows'.
1109
1110         * utils.c: Include <process.h> for 'getpid()' on Watcom.
1111
1112 2007-10-02  Micah Cowan  <micah@cowan.name>
1113
1114         * ftp.c (getftp, ftp_loop_internal), http.c (http_loop), main
1115         (main): Use datetime_str instead of time_str, for those who have
1116         potentially long-running sessions. Based on suggestions by Saso
1117         Tomat <miskox@hotmail.com> and Steven M. Schweda
1118         <sms@antinode.org>.
1119         * http.c (gethttp): Warn about host lookup failures. Adjusted
1120         from Stephen Gildea's patch.
1121
1122 2007-10-02  Stephen Gildea  <stepheng+wget@gildea.com>
1123
1124         * connect.c (connect_to_host): Warn about host lookup failures.
1125
1126 2007-09-25  Micah Cowan  <micah@cowan.name>
1127
1128         * Makefile.in: Use EXEEXT instead of exeext.
1129
1130 2007-09-24  Gisle Vanem  <giva@bgnett.no>
1131
1132         * connect.c, init.c, main.c, openssl.c, options.h, sysdep.h,
1133         url.c, utils.c: Added support for building on MS-DOS.
1134
1135 2007-09-24  Jochen Roderburg  <roderburg@uni-koeln.de>
1136
1137         * http.c (http_zero): Remove no-longer-used local_size variable.
1138         Fixes bug #21057.
1139
1140 2007-09-12  Micah Cowan  <micah@cowan.name>
1141
1142         * http.c (http_loop): Remove send_head_first from condition for
1143         parsing timestamp.
1144
1145 2007-08-29  Micah Cowan  <micah@cowan.name>
1146
1147         * openssl.c (ssl_init): Re un-const-ified the meth local
1148         variable, to match current versions of openssl.
1149         * spider.c: Removed visited_url function, as it may be very
1150         inefficient.
1151         (print_broken_links): Removed traversal of referrers, until such
1152         time as a more efficient implementation can be written.
1153         * spider.h: Replaced declaration of visited_url with an
1154         empty-bodied, function-like macro.
1155
1156 2007-08-27  Gisle Vanem  <giva@bgnett.no>
1157
1158         * mswindows.c (run_with_timeout): Ensure that the correct
1159         conversion specification is used for the return result of
1160         the GetLastError function.
1161         * getopt.c: Fix missing (but, accidentally, legal) comment
1162         delimiter after licensing text.
1163         * recur.c (retrieve_tree): Inserted missing cast for strip_auth.
1164         Includes adjustment by Ralf Wildenhues.
1165         * openssl.c (ssl_init): const-ified the meth local variable.
1166         * main.c: Include all the static function definitions in the
1167         "#ifndef TESTING" clause, leaving just the definitions for
1168         exec_name (not set), and opt.
1169         * utils.c (run_with_timeout): Now returns bool, to align with
1170         declaration in utils.h.
1171
1172 2007-08-27  Micah Cowan  <micah@cowan.name>
1173
1174         * wget.h: Added macro replacement for ngettext, for environs
1175         that lack NLS.
1176
1177 2007-08-26  Micah Cowan  <micah@cowan.name>
1178
1179         * spider.c (print_broken_links): Fixed incorrect plurals msgid
1180         usage, switched to use ngettext function.
1181
1182 2007-08-24  Micah Cowan  <micah@cowan.name>
1183
1184         * http.c (http_loop): Introduced time_came_from_head boolean
1185         flag, to help avoid parsing the same Last-Modified header twice.
1186         Replaced spidering returns of RETRUNNEEDED for some situations,
1187         to RETROK, as otherwise it will be interpreted as an error.
1188         RETRUNNEEDED appears never to be referenced outside of
1189         http.c (and wget.h), and, when returned by gethttp, is
1190         translated by http_loop to RETROK.
1191         * url.c (are_urls_equal): Don't call getchar_from_escaped_string
1192         if u2 is shorter than u1.
1193         (getchar_from_escaped_string): Don't decode reserved characters.
1194         Handle illegally appearing '%'s as literal '%'s. Ensure hex
1195         digits before attempting to decode.
1196         (test_are_urls_equal): Added tests to handle u2 shorter than u1,
1197         and %2f not treated the same as /.
1198         * spider.c (in_url_list_p): Don't call are_urls_equal if one of
1199         them is NULL.
1200
1201 2007-08-23  Joshua David Williams  <yurimxpxman@gmail.com>
1202
1203         * spider.c (in_url_list_p): Removed the bool verbose argument
1204
1205 2007-08-22  Mauro Tortonesi  <mauro@ferrara.linux.it>
1206
1207         * http.c (http_loop): Fall back to GET if HEAD fails with a 500 or 501
1208         error code.
1209
1210 2007-08-21  Mauro Tortonesi  <mauro@ferrara.linux.it>
1211         
1212         * http.c (http_loop): Send preliminary HEAD request if -N is given and
1213         the destination file exists already.
1214
1215 2007-08-10  Mauro Tortonesi  <mauro@ferrara.linux.it>
1216
1217         * http.c (http_loop): Fixed HTTP HEAD requests logic when --spider is
1218         given.
1219
1220 2007-08-10  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1221
1222         * url.c (append_uri_pathel): Do not assume dest string to be
1223         zero-terminated.
1224         (test_append_uri_pathel): Terminate string to fix test failure.
1225
1226 2007-08-09  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1227
1228         * url.c (url_string): Use comparison, not assignment, in
1229         check for auth_mode == URL_AUTH_HIDE_PASSWD.
1230
1231 2007-08-09  Micah Cowan  <micah@cowan.name>
1232
1233         * http.c (http_loop): If we got a HEAD and then a GET, and the
1234         GET had a timestamp, use that one, not any we may have gotten
1235         from the HEAD.
1236
1237 2007-08-08  Micah Cowan  <micah@cowan.name>
1238
1239         * init.c (defaults): Content disposition will not be default,
1240         since it currently results in extra round-trips.
1241
1242 2007-07-31  Micah Cowan  <micah@cowan.name>
1243
1244         * http.c (gethttp): Set contlen = -1 when we encounter a
1245         negative-valued Content-Length header, so we don't consider it
1246         an internal error later on and call abort().
1247
1248 2007-07-29  Micah Cowan  <micah@cowan.name>
1249
1250         * url.h, url.c (url_string): Replaced bool arg of the url_string
1251         function with enum url_auth_mode, with added option to
1252         completely remove user/pass auth information.
1253         * http.c, ftp.c, url.c, recur.c: Adapted call to url_string
1254         function to fit new usage.
1255         * recur.c (retrieve_tree): Remove auth info from Referer header.
1256
1257 2007-07-28  Micah Cowan  <micah@cowan.name>
1258
1259         * options.h, init.c, retr.c, main.c: renamed opt maxredirect
1260         field to max_redirect, for improved consistency.
1261         * init.c: changed max_redirect parser from cmd_number_inf to
1262         cmd_number, as infinite redirects may not be appropriate.
1263         Alternatively, if cmd_number_inf should be used, then
1264         opt.max_redirect's value should be checked a bit differently in
1265         retr.c, to allow for the "infinite" meaning of zero.
1266
1267 2007-07-25  Micah Cowan  <micah@cowan.name>
1268
1269         * http.c (create_authorization_line)
1270         (basic_authentication_encode, known_authentication_scheme_p)
1271         (load_cookies): Moved declarations up.
1272         (basic_authed_hosts): Added. Tracks what hosts have issued Basic
1273         challenge and been given the global username, password.
1274         (maybe_send_basic_creds): Added. Sends Basic creds for hosts that
1275         have issued Basic challenges.
1276         (register_basic_auth_host): Added. Instantiates
1277         basic_authed_hosts if necessary, then registers the host that
1278         has issued a challenge.
1279         (gethttp) <auth>: Only send authentication credentials after
1280         we've received a challenge from that host. This is a stop-gap
1281         fix until a proper fix can be implemented; still isn't quite
1282         right, as we should only be sending credentials automatically
1283         for authenticated paths and below, and not for the entire host.
1284
1285 2007-07-16  Joshua David Williams  <yurimxpxman@gmail.com>
1286
1287         * options.h: added maxredirect to options struct
1288         * init.c: added maxredirect to list of variables
1289         * retr.c (retrieve_url): replaced MAX_REDIRECTIONS with opt.maxredirect
1290         * main.c: added option --max-redirect
1291
1292 2007-07-16  Joshua David Williams  <yurimxpxman@gmail.com>
1293
1294         * test.h: tests made more verbose; now displays the name
1295         of each test run.
1296
1297 2007-07-10  Mauro Tortonesi  <mauro@ferrara.linux.it>
1298
1299         * http.c (http_loop): Fixed the HTTP requests logic. Now it skips the 
1300         preliminary HEAD request if either -O or --no-content-disposition are 
1301         given, and neither --spider and -N are given.
1302
1303 2007-07-05  Micah Cowan  <micah@cowan.name>
1304
1305         * cmpt.c, connect.c, connect.h, convert.c, convert.h:
1306         * cookies.c, cookies.h, ftp-basic.c, ftp.c, ftp.h, ftp-ls.c:
1307         * ftp-opie.c, gen-md5.c, gen-md5.h, getopt.c, getopt.h, gnu-md5.c:
1308         * gnu-md5.h, gnutls.c, hash.c, hash.h, host.c, host.h:
1309         * html-parse.c, html-parse.h, html-url.c, http.c, http.h:
1310         * http-ntlm.c, http-ntlm.h, init.c, init.h, log.c, log.h, main.c:
1311         * Makefile.in, mswindows.c, mswindows.h, netrc.c, netrc.h:
1312         * openssl.c, options.h, progress.c, progress.h, ptimer.c:
1313         * ptimer.h, recur.c, recur.h, res.c, res.h, retr.c, retr.h:
1314         * safe-ctype.c, safe-ctype.h, spider.c, spider.h, ssl.h, sysdep.h:
1315         * test.c, test.h, url.c, url.h, utils.c, utils.h, wget.h:
1316         * xmalloc.c, xmalloc.h:
1317         Updated GPL reference to version 3 or later, removed FSF
1318         address.
1319
1320 2007-07-04  Mauro Tortonesi  <mauro@ferrara.linux.it>
1321
1322         * http.c (http_loop): Skip HEAD request and start immediately with GET
1323         if -O is given.
1324
1325 2007-02-02  Hrvoje Niksic  <hniksic@xemacs.org>
1326
1327         * http.c (print_server_response): Escape non-printable characters
1328         in server respone.
1329
1330 2007-02-02  Hrvoje Niksic  <hniksic@xemacs.org>
1331
1332         * netrc.c: Don't make netrc_list static, as it prevents
1333         compilation with DEBUG_MALLOC.
1334
1335         * utils.c (aprintf): Don't use vasprintf when DEBUG_MALLOC is
1336         requested because, in that case, we want the calls to malloc to be
1337         coming from us.
1338
1339 2007-01-23  Hrvoje Niksic  <hniksic@xemacs.org>
1340
1341         * cookies.c (parse_set_cookie): Would erroneously discard cookies
1342         with unparsable expiry time.
1343
1344 2007-01-23  Hrvoje Niksic  <hniksic@xemacs.org>
1345
1346         * progress.c (create_image): Check for ETA overflow.
1347         (print_row_stats): Ditto.
1348
1349 2007-01-09  Mauro Tortonesi  <mauro@ferrara.linux.it>
1350
1351         * init.c (cmd_spec_prefer_family): Small fix to get rid of a gcc
1352         warning about strict-aliasing violation.
1353
1354 2007-01-09  Steven M. Schweda  <sms@antinode.org>
1355
1356         * ftp-basic.c (ftp_syst): Fixed segfault if response text is missing.
1357
1358 2006-12-29  Gisle Vanem  <giva@bgnett.no>
1359
1360         * mswindows.c: Avoid a warning if 'ws_hangup()' is unused.
1361
1362 2006-12-27  Mauro Tortonesi  <mauro@ferrara.linux.it>
1363
1364         * http.c (parse_content_disposition): Consider directory prefix, if
1365         specified.
1366
1367 2006-11-21  Hrvoje Niksic  <hniksic@xemacs.org>
1368
1369         * retr.c (retrieve_from_file): Ditto.
1370         (url_uses_proxy): New function.
1371
1372         * main.c (main): Don't check for opt.use_proxy when deciding
1373         whether to call retrieve_url or retrieve_tree; check whether the
1374         proxy would be used for *this* URL.
1375
1376 2006-10-17  Mike Grant  <mggr@pml.ac.uk>
1377
1378         * ftp.c (ftp_loop_internal): Would incorrectly skip changing
1379         working directory when retrying after a failed FTP attempt.
1380         Originally reported by Nate Eldredge.
1381
1382 2006-10-12  Mauro Tortonesi  <mauro@ferrara.linux.it>
1383
1384         * convert.c (downloaded_file): Fixed bug which used to break -E -k -K 
1385         mode.
1386
1387 2006-08-28  Mauro Tortonesi  <mauro@ferrara.linux.it>
1388
1389         * http.c: #include'd spider.h to get rid of compiler warnings.
1390
1391         * main.c: Ditto.
1392
1393         * recur.c: Ditto.
1394
1395 2006-08-24  Mauro Tortonesi  <mauro@ferrara.linux.it>
1396
1397         * Makefile.in: Added spider.c to the list of files to compile and
1398         spider.h to the list of header files. Updated copyright information.
1399
1400         * http.c: Major changes to recursive spider mode. Now for every
1401         resource we are supposed to check, we send a HEAD request to find out
1402         if it exists. If the resource is a HTML file, we retrieve it and parse
1403         it to discover links to other resources.
1404
1405         * recur.c: Ditto.
1406
1407         * res.c (res_retrieve_file): Disable opt.timestamping and opt.spider
1408         when retrieving robots.txt. Updated copyright information.
1409
1410         * convert.c: Moved code tracking broken links to spider.c.
1411
1412         * convert.h: Ditto.
1413
1414         * spider.c: Created new file to keep track of visited URLs in spider
1415         mode.
1416
1417         * spider.h: Ditto.
1418
1419 2006-08-21  Mauro Tortonesi  <mauro@ferrara.linux.it>
1420
1421         * http.c: Fixed timestamping-related bug.
1422
1423 2006-08-16  Mauro Tortonesi  <mauro@ferrara.linux.it>
1424
1425         * http.c: Fixed bug which broke --continue feature. Now if -c is
1426         given, http_loop sends a HEAD request to find out the destination
1427         filename before resuming download.
1428
1429 2006-08-08  Hrvoje Niksic  <hniksic@xemacs.org>
1430
1431         * utils.c (datetime_str): Avoid code repetition with time_str.
1432
1433 2006-07-21  Hrvoje Niksic  <hniksic@xemacs.org>
1434
1435         * init.c (commands): Correctly place "contentdisposition".
1436
1437 2006-07-14  Mauro Tortonesi  <mauro@ferrara.linux.it>
1438         
1439         * sysdep.h: If intptr_t isn't defined, simply typedef it to long.
1440
1441         * http.c: Added explicit cast to int in logprintf call to remove
1442         compiler warnings on 64-bit platforms.
1443
1444         * connect.c: Added a few casts to intptr_t to remove compiler warnings
1445         on 64-bit platforms.
1446         
1447         * main.c: Disable -r, -p and -N when -O is used. Disable -k when -O is
1448         used and multiple URLs are given. Update maintainer information.
1449         
1450         * all: Update copyright information.
1451         
1452 2006-07-10  KJKHyperion  <hackbunny@reactos.com>
1453
1454         * url.c (filechr_table): Mark DEL (0x7f) as a control character
1455         and | as a character Windows can't handle.
1456
1457 2006-06-28  Mauro Tortonesi  <mauro@ferrara.linux.it>
1458
1459         * res.c: Implemented is_robots_txt_url function for detection of
1460         robots.txt URLs and related test routine.
1461
1462         * res.h: Ditto.
1463
1464         * url.c: Implemented are_urls_equal function for URL comparison and
1465         related testing routine.
1466
1467         * url.h: Ditto.
1468
1469         * convert.c: Fixes for recursive spider mode: don't consider
1470         non-existing robots.txt as a broken link, and use are_urls_equal
1471         instead of strcasecmp for referrer URLs comparison.
1472
1473         * test.c: Call tests routines for are_urls_equal and 
1474         is_robots_txt_url.
1475
1476 2006-06-26  Hrvoje Niksic  <hniksic@xemacs.org>
1477
1478         * wget.h (wgint): Typedef to any 64-bit (or larger) type we can
1479         find, not necessarily off_t or long.
1480
1481 2006-06-26  Hrvoje Niksic  <hniksic@xemacs.org>
1482
1483         * cmpt.c (strtoll): Check for overflow and underflow without
1484         relying on (technically) undefined behavior.  Don't assume that
1485         strtoll_type is 64 bits wide.
1486
1487 2006-06-21  Hrvoje Niksic  <hniksic@xemacs.org>
1488
1489         * utils.c (base64_encode): Cast void pointer to char * before
1490         doing arithmetic.
1491
1492 2006-06-20  Hrvoje Niksic  <hniksic@xemacs.org>
1493
1494         * utils.c (base64_encode): Made TBL const.
1495         (base64_decode): Made the base64_char_to_value table const.
1496
1497 2006-06-19  Hrvoje Niksic  <hniksic@xemacs.org>
1498
1499         * utils.c (base64_encode): Made the DATA pointer void * so the
1500         callers can pass it any kind of pointer (including both signed and
1501         unsigned char pointers).
1502         (base64_decode): Ditto for DEST.
1503
1504 2006-06-19  Hrvoje Niksic  <hniksic@xemacs.org>
1505
1506         * utils.c (base64_encode): Would read past end of STR.
1507         Reported by rick@eckle.org.
1508
1509 2006-06-13  Mauro Tortonesi  <mauro@ferrara.linux.it>
1510
1511         * options.h (struct options): Introduced member restrict_files_case to
1512         keep track of preferences on character case restrictions for
1513         filenames.
1514
1515         * init.c: Modified defaults and cmd_spec_restrict_file_names to
1516         support character case restrictions for filenames. Added
1517         test_cmd_spec_restrict_file_names unit test.
1518
1519         * url.c: Modified append_uri_pathel to support character case
1520         restrictions for filenames. Added test_append_uri_pathel unit test.
1521
1522         * test.c: Added test_cmd_spec_restrict_file_names and
1523         test_append_uri_pathel to the list of unit tests to run.
1524
1525 2006-06-12  Mauro Tortonesi  <mauro@ferrara.linux.it>
1526
1527         * retr.c (retrieve_from_file): Use retrieve_tree and automatically
1528         turn on opt.follow_ftp in case of recursive FTP retrieval through HTTP
1529         proxy.
1530
1531         * main.c: Automatically turn on opt.follow_ftp in case of recursive
1532         FTP retrieval through HTTP proxy.
1533
1534 2006-06-12  Tony Lewis  <tlewis@exelana.com>
1535
1536         * main.c: Improved CHEN Peng's patch by proposing a simpler logic.
1537
1538 2006-06-12  CHEN Peng  <chenpeng@alumni.nus.edu.sg>
1539
1540         * main.c: Use retrieve_tree in case of recursive FTP retrieval through
1541         HTTP proxy.
1542
1543 2006-05-25  Mauro Tortonesi  <mauro@ferrara.linux.it>
1544
1545         * convert.c: Added mechanisms to keep track broken links.
1546
1547         * convert.h: Ditto.
1548
1549         * wget.h: Reordered and enumerated uerr_t constants.
1550
1551         * recur.c: Fixes to support recursive spider mode.
1552
1553         * http.c: Ditto.
1554
1555         * main.c: Print broken links in case of recursive spider mode.
1556
1557         * retr.c: Changed interface of retrieve_url.
1558
1559         * retr.h: Ditto.
1560
1561         * ftp.c: Changed interface of ftp_loop.
1562
1563         * ftp.h: Ditto.
1564
1565         * res.c: Minor change to reflect changes in interface of retrieve_url.
1566
1567 2006-05-18  Lawrence Jones  <lawrence.jones@ugs.com>
1568
1569         * ftp-ls.c (ftp_parse_unix_ls): Correct size parsing, add size
1570         and filename debugging output.
1571
1572 2006-04-28  Mauro Tortonesi  <mauro@ferrara.linux.it>
1573
1574         * http.c: If Content-Disposition header is present, allow unique
1575         filename generation unless -nc is given. Permit to disable parsing of
1576         Content-Disposition header.
1577
1578         * options.h: Added option --no-content-disposition to disable parsing
1579         of HTTP Content-Disposition header.
1580
1581         * init.c: Ditto.
1582         
1583         * main.c: Ditto.
1584
1585 2006-04-11  Hrvoje Niksic  <hniksic@xemacs.org>
1586
1587         * hash.c (TOLOWER): Wrap macro arg in parentheses.
1588
1589 2006-04-08  Hrvoje Niksic  <hniksic@xemacs.org>
1590
1591         * http.c (parse_content_disposition): Doc fix.
1592
1593 2006-03-15  Mauro Tortonesi  <mauro@ferrara.linux.it>
1594
1595         * utils.c: Restricted operational semantics of frontcmp and proclist
1596         from generic strings to directory names and them to subdir_p and
1597         dir_matches_p respectively.  Applied George Ogata's one line patch to
1598         restrict algorithm of subdir_p to full directory name matching.  Added
1599         testcases for subdir_p and dir_matches_p.
1600
1601         * utils.h: Changed all frontcmp occurrences to subdir_p.
1602         
1603         * recur.c: Ditto.
1604         
1605         * test.c: Changed type returned by test functions from char * to const
1606         char *.  Added test_subdir_p and test_dir_matches_p to the list of
1607         tests to run.
1608
1609         * http.c (test_parse_content_disposition): Changed return type from
1610         char * to const char *. 
1611
1612 2006-03-14  Mauro Tortonesi  <mauro@ferrara.linux.it>
1613
1614         * recur.c (struct queue_element): Changed type of html_allowed member
1615         to bool.
1616         
1617 2006-03-09  Mauro Tortonesi  <mauro@ferrara.linux.it>
1618
1619         * ftp.c (ftp_list): Try `LIST -a' command first and revert to `LIST'
1620         in case of failure.
1621
1622 2006-03-06  Hrvoje Niksic  <hniksic@xemacs.org>
1623
1624         * hash.c (TOLOWER): Fix definition when STANDALONE.
1625         Reported by Beni Serfaty.
1626
1627 2006-03-02  Mauro Tortonesi  <mauro@ferrara.linux.it>
1628
1629         * http.c (http_loop): Fixed recursive HTTP retrieval.
1630
1631 2006-02-28  Hrvoje Niksic  <hniksic@xemacs.org>
1632
1633         * http.c (extract_param): Declare extern so it can be used from
1634         other files.
1635         (extract_param): Return error for empty name.
1636
1637 2006-02-28  Hrvoje Niksic  <hniksic@xemacs.org>
1638
1639         * url.c (find_last_char): Define in terms of memrchr.
1640
1641         * cmpt.c (memrchr): Define it on systems that don't have it.
1642
1643         * http.c (extract_param): New function for parsing header values
1644         with parameters.
1645         (parse_content_disposition): Use it.  Don't allow slashes and
1646         backslashes in the file name.
1647
1648 2006-02-27  Hrvoje Niksic  <hniksic@xemacs.org>
1649
1650         * url.c (path_simplify): Don't preserve ".." at beginning of path.
1651         Suggested by Frank McCown.
1652
1653 2006-02-25  Hrvoje Niksic  <hniksic@xemacs.org>
1654
1655         * http.c (gethttp): Only use FILE.N.html if FILE.html exists.
1656
1657 2006-02-09  Hrvoje Niksic  <hniksic@xemacs.org>
1658
1659         * mswindows.c (run_with_timeout): Made thread_hnd non-static.
1660
1661 2006-02-05  Hrvoje Niksic  <hniksic@xemacs.org>
1662
1663         * retr.c (sleep_between_retrievals): Sleep at a minimum of 1/2 of
1664         the specified wait period.
1665
1666 2006-02-03  Hrvoje Niksic  <hniksic@xemacs.org>
1667
1668         * utils.c (number_to_string): Don't use sprintf for printing
1669         WGINT_MIN; simply divide n by 10 and defer printing the last
1670         digit.
1671         (number_to_string): Removed the SPRINTF_WGINT macro.
1672
1673 2006-02-03  Mauro Tortonesi  <mauro@ferrara.linux.it>
1674
1675         * http.c: Fixed support for Content-Disposition header.
1676
1677         * test.c: Added test_parse_content_disposition to the list of unit
1678         tests to run.
1679
1680 2006-02-02  Hrvoje Niksic  <hniksic@xemacs.org>
1681
1682         * hash.c: Don't define countof if it's already defined.
1683
1684         * hash.c: Obtain the definition of uintptr_t when standalone.
1685
1686 2006-01-30  Mauro Tortonesi  <mauro@ferrara.linux.it>
1687
1688         * http.c: Changed output format. Removed excessively verbose debugging
1689         output.
1690
1691 2005-12-07  Mauro Tortonesi  <mauro@ferrara.linux.it>
1692
1693         * http.c: Fixed pre-download verbose output which was broken by 
1694         HTTP code refactoring.
1695
1696 2005-11-23  Mauro Tortonesi  <mauro@ferrara.linux.it>
1697
1698         * http.c: Refactored HTTP code.  If -O is not used, the new code
1699         delays the choice of the file name where the downloaded resource
1700         will be saved until the HTTP headers have been retrieved.
1701         Added support for Content-Disposition header. 
1702
1703 2005-11-19  Hrvoje Niksic  <hniksic@xemacs.org>
1704
1705         * hash.c (INVALID_PTR): Use uintptr_t instead of unsigned long.
1706         (hash_pointer): Don't assume a pointer fits in `unsigned long'.
1707
1708 2005-11-02  Mauro Tortonesi  <mauro@ferrara.linux.it>
1709
1710         * Makefile.in: Removed support for unit testing (now it is in
1711         tests/Makefile.in).
1712
1713 2005-10-27  Mauro Tortonesi  <mauro@ferrara.linux.it>
1714
1715         * Makefile.in: Added basic support for unit testing.
1716
1717         * test.c: Ditto.
1718         
1719         * test.h: Ditto.
1720         
1721 2005-10-13  Daniel Stenberg  <daniel@haxx.se>
1722
1723         * http-ntlm.c (ntlm_output): Fixed buffer overflow vulnerability.
1724
1725 2005-10-09  Russ Allbery  <rra@stanford.edu>
1726
1727         * snprintf.c: Remove round to round_int and pow10 to pow10_int, to
1728         avoid warnings from GCC 4.0.
1729
1730 2005-10-05  Mauro Tortonesi  <mauro@ferrara.linux.it>
1731
1732         * retr.c: Changed semantics of no_proxy_match.
1733
1734 2005-09-17  Hrvoje Niksic  <hniksic@xemacs.org>
1735
1736         * main.c (main): Don't print the summary if nothing has been downloaded.
1737
1738 2005-09-17  Hrvoje Niksic  <hniksic@xemacs.org>
1739
1740         * retr.c (retr_rate): Rename parameter from MSECS to SECS since it
1741         no longer holds milliseconds.
1742
1743 2005-09-01  Hrvoje Niksic  <hniksic@xemacs.org>
1744
1745         * progress.c: Introduce symbolic constants for "magic" values of
1746         0.2 and 0.9, REFRESH_INTERVAL and ETA_REFRESH_INTERVAL.
1747
1748 2005-08-27  Hrvoje Niksic  <hniksic@xemacs.org>
1749
1750         * cmpt.c (strtoll): Correctly handle strtoll("0x", ptr, 0) and
1751         strtoll("0x<nonhexchar>", ptr, 0) -- in both cases *ptr must be
1752         set to the position of 'x', not after it.
1753
1754 2005-08-27  Hrvoje Niksic  <hniksic@xemacs.org>
1755
1756         * hash.c (hash_table_map): Rename to hash_table_for_each and
1757         update callers.
1758         Document the meaning of the callback's return value.
1759         (hash_table_iterate): New function.
1760         (hash_table_iter_next): Likewise.
1761         Update most places that used hash_table_for_each to use the
1762         iteration, which doesn't require a temporary function with
1763         explicit state management.
1764
1765 2005-08-26  Albert Chin  <wget@mlists.thewrittenword.com>
1766
1767         * Makefile.in: Use @datadir@.  Define localedir as $(datadir)/locale.
1768
1769 2005-08-26  Jeremy Shapiro  <jnshapiro@gmail.com>
1770
1771         * openssl.c (ssl_init): Set SSL_MODE_AUTO_RETRY.
1772
1773 2005-08-23  Hrvoje Niksic  <hniksic@xemacs.org>
1774
1775         * host.c (address_list_from_ipv4_addresses): Use IP_INADDR_DATA.
1776
1777 2005-08-12  Hrvoje Niksic  <hniksic@xemacs.org>
1778
1779         * wget.h: Renamed strtoll_return to strtoll_type.
1780
1781 2005-08-11  Hrvoje Niksic  <hniksic@xemacs.org>
1782
1783         * progress.c (eta_to_human_short): Switch to days when printing
1784         more than 48h rather than 100h.  (It's not immediately apparent
1785         how many days there are in 83h.)
1786
1787 2005-08-11  Hrvoje Niksic  <hniksic@xemacs.org>
1788
1789         * cmpt.c (strtoll): Define it if missing on the system and if Wget
1790         needs it.
1791
1792         * mswindows.c (str_to_int64): Move to cmpt.c and rename to strtoll.
1793
1794 2005-08-10  Hrvoje Niksic  <hniksic@xemacs.org>
1795
1796         * host.c (print_address): Always use inet_ntop when IPv6 is
1797         enabled.
1798
1799         * host.h (ip_address): Simplify the data union.
1800
1801 2005-08-09  Hrvoje Niksic  <hniksic@xemacs.org>
1802
1803         * mswindows.c (inet_ntop): Also handle IPv4 addresses for
1804         completeness.
1805
1806 2005-08-09  Hrvoje Niksic  <hniksic@xemacs.org>
1807
1808         * http.c (gethttp): Don't read more than the amount of data
1809         specified by the content-length header.
1810
1811 2005-08-09  Vasil Dimov  <vd@datamax.bg>
1812
1813         * ftp.c (getftp): Don't free RESPLINE if ftp_response returns a
1814         status other than FTPOK.
1815
1816 2005-08-04  Giuseppe Bonacci  <g.bonacci@libero.it>
1817
1818         * ftp-ls.c (ftp_parse_unix_ls): Remember the position of the
1819         previous token instead of backtracking back to it.
1820
1821 2005-07-08  Gisle Vanem  <giva@bgnett.no>
1822
1823         * mswindows.h: Include process.h to get getpid() declaration.
1824
1825 2005-07-08  Hrvoje Niksic  <hniksic@xemacs.org>
1826
1827         * utils.c (aprintf): Use vasprintf where available.
1828
1829 2005-07-08  Hrvoje Niksic  <hniksic@xemacs.org>
1830
1831         * url.c (rewrite_shorthand_url): Simplify code using aprintf and
1832         strspn.
1833
1834 2005-07-07  Hrvoje Niksic  <hniksic@xemacs.org>
1835
1836         * gnutls.c (ssl_check_certificate): Check for the validity of the
1837         presented X509 certificate.
1838
1839 2005-07-07  Hrvoje Niksic  <hniksic@xemacs.org>
1840
1841         * openssl.c (ssl_check_certificate): Print custom error messages
1842         for frequent X509 certificate problems.
1843
1844 2005-07-07  Hrvoje Niksic  <hniksic@xemacs.org>
1845
1846         * mswindows.h: Define an alias for stat and fstat, as requested by
1847         config-compiler.h.
1848         (gai_strerror): Define to windows_strerror if NEED_GAI_STRERROR is
1849         defined.
1850
1851 2005-07-06  Hrvoje Niksic  <hniksic@xemacs.org>
1852
1853         * mswindows.h: Use strtoll where available.
1854
1855 2005-07-06  Hrvoje Niksic  <hniksic@xemacs.org>
1856
1857         * sysdep.h: Add a full declaration of fnmatch.h.
1858
1859 2005-07-06  Hrvoje Niksic  <hniksic@xemacs.org>
1860
1861         * utils.c: Unconditionally include <setjmp.h>.
1862
1863 2005-07-06  Hrvoje Niksic  <hniksic@xemacs.org>
1864
1865         * utils.c (fnmatch_nocase): New function.
1866         (proclist): Use it instead of fnmatch when opt.ignore_case is
1867         requested.
1868         (in_acclist): Respect opt.ignore_case.
1869         (frontcmp): Respect opt.ignore_case.
1870
1871         * options.h (struct options): New flag opt.ignore_case.
1872
1873 2005-07-06  Hrvoje Niksic  <hniksic@xemacs.org>
1874
1875         * ptimer.c: Measure time in seconds rather than milliseconds.
1876         Adjusted all callers.
1877
1878 2005-07-06  Hrvoje Niksic  <hniksic@xemacs.org>
1879
1880         * http.c (gethttp): When freeing MESSAGE, take into account that
1881         it can be NULL.
1882
1883 2005-07-05  Hrvoje Niksic  <hniksic@xemacs.org>
1884
1885         * cmpt.c (timegm): Handle years after 2099.
1886
1887 2005-07-05  Hrvoje Niksic  <hniksic@xemacs.org>
1888
1889         * cmpt.c (timegm): Remove unused variable.
1890
1891 2005-07-05  Hrvoje Niksic  <hniksic@xemacs.org>
1892
1893         * cmpt.c (timegm): Don't call mktime; simply count the seconds
1894         between 1970-01-01 and the specified date.
1895
1896 2005-07-05  Hrvoje Niksic  <hniksic@xemacs.org>
1897
1898         * wget.h (or): Define HAVE_SSL when either HAVE_OPENSSL or
1899         HAVE_GNUTLS are defined.
1900
1901         * gnutls.c: New file.
1902
1903 2005-07-05  Hrvoje Niksic  <hniksic@xemacs.org>
1904
1905         * http.c (gethttp): Don't print the request write error message
1906         twice.
1907
1908 2005-07-04  Hrvoje Niksic  <hniksic@xemacs.org>
1909
1910         * openssl.c (openssl_errstr): Instead of always using a large
1911         static buffer, only allocate the error string when there is an
1912         actual error.
1913
1914 2005-07-04  Hrvoje Niksic  <hniksic@xemacs.org>
1915
1916         * xmalloc.c (debugging_free): Prefix hex pointer value with "0x"
1917         when printing.
1918
1919 2005-07-04  Hrvoje Niksic  <hniksic@xemacs.org>
1920
1921         * utils.c (NEXT_BASE64_CHAR): Rename to NEXT_CHAR and simplify to
1922         get the next non-whitespace character.
1923
1924 2005-07-04  Hrvoje Niksic  <hniksic@xemacs.org>
1925
1926         * utils.c (base64_decode): Don't silently tolerate non-base64
1927         non-white-space characters in the base64 stream.
1928
1929 2005-07-04  Hrvoje Niksic  <hniksic@xemacs.org>
1930
1931         * connect.c (LAZY_RETRIEVE_INFO): Make last_tick unsigned to match
1932         transport_map_modified_tick.
1933
1934 2005-07-04  Hrvoje Niksic  <hniksic@xemacs.org>
1935
1936         * config-post.h (alloca): Updated declaration to not enumerate all
1937         Windows compilers.
1938
1939 2005-07-04  Hrvoje Niksic  <hniksic@xemacs.org>
1940
1941         * openssl.c (openssl_errstr): Separate error messages with "; ".
1942
1943 2005-07-03  Hrvoje Niksic  <hniksic@xemacs.org>
1944
1945         * ftp.c (getftp): Ditto.
1946
1947         * http.c (gethttp): Use fd_errstr.
1948
1949         * connect.c (fd_register_transport): Restructure parameters to
1950         include only a single structure that describes transport
1951         implementation.
1952
1953         * openssl.c (openssl_errstr): New function: dump SSL error strings
1954         into a static buffer and return a pointer to the buffer.
1955
1956         * connect.c (fd_errstr): New function; returns transport-specific
1957         error message, or strerror(errno) if transport doesn't supply one.
1958
1959 2005-07-03  Hrvoje Niksic  <hniksic@xemacs.org>
1960
1961         * mswindows.h: Also wrap accept() and listen().
1962
1963 2005-07-03  Hrvoje Niksic  <hniksic@xemacs.org>
1964
1965         * url.c (path_end): Skip separators appropriate for the scheme.
1966         (strpbrk_or_eos): Remove gcc-specific version, as the optimization
1967         it tried to perform no longer applies.
1968
1969 2005-07-02  Hrvoje Niksic  <hniksic@xemacs.org>
1970
1971         * host.c: Don't include "connect.h" now that we no longer have
1972         socket_has_inet6.
1973
1974 2005-07-02  Hrvoje Niksic  <hniksic@xemacs.org>
1975
1976         * host.c: Remove extraneous definition of netdb.h.
1977
1978 2005-07-02  Hrvoje Niksic  <hniksic@xemacs.org>
1979
1980         * http.c (gethttp): Skip error message body in the keep-alive
1981         case.
1982
1983 2005-07-02  Hrvoje Niksic  <hniksic@xemacs.org>
1984
1985         * url.c (url_parse): Would crash when parsing fragments.  Support
1986         fragments for FTP URLs too.
1987
1988 2005-07-02  Hrvoje Niksic  <hniksic@xemacs.org>
1989
1990         * version.c: Don't use "cvs" in version name, since we're not
1991         using CVS anymore.
1992
1993 2005-07-02  Hrvoje Niksic  <hniksic@xemacs.org>
1994
1995         * progress.c (create_image): Ditto.
1996
1997         * retr.c (retr_rate): Display smaller rate numbers with greater
1998         precision.
1999
2000 2005-07-02  Hrvoje Niksic  <hniksic@xemacs.org>
2001
2002         * http.c (response_head_terminator): Minor optimization.
2003
2004         * retr.c (fd_read_hunk): Call terminator with pointer to the start
2005         of the data and the pointer to the current data.  Changed all
2006         callers.
2007
2008 2005-07-01  Hrvoje Niksic  <hniksic@xemacs.org>
2009
2010         * url.c (url_parse): Make sure u->params is not initialized for
2011         http/https URLs.
2012         (url_parse): Don't crash on garbage following []-delimited IPv6
2013         addresses.
2014
2015 2005-07-01  Hrvoje Niksic  <hniksic@xemacs.org>
2016
2017         * main.c (print_help): Don't refer to the non-existent -nr in
2018         description of --mirror.
2019
2020 2005-06-30  Hrvoje Niksic  <hniksic@xemacs.org>
2021
2022         * host.c (pretty_print_address): Renamed to just print_address.
2023         Clarify documentation.
2024
2025 2005-06-30  Hrvoje Niksic  <hniksic@xemacs.org>
2026
2027         * http.c (gethttp): Explicitly document the different cases when
2028         generating the Host header.
2029
2030 2005-06-30  Hrvoje Niksic  <hniksic@xemacs.org>
2031
2032         * host.c (pretty_print_address): Handle error result from
2033         inet_ntop.
2034
2035 2005-06-30  Gisle Vanem  <giva@bgnett.no>
2036
2037         * mswindows.c (inet_ntop): New function.  Print IPv6 addresses
2038         using WSAAddressToString.
2039
2040 2005-06-27  Hrvoje Niksic  <hniksic@xemacs.org>
2041
2042         * progress.c (dot_update): Remove unused variable row_qty.
2043
2044 2005-06-29  Hrvoje Niksic  <hniksic@xemacs.org>
2045
2046         * main.c: Check for both SIGHUP and SIGUSR1 before using them.
2047
2048 2005-06-29  Hrvoje Niksic  <hniksic@xemacs.org>
2049
2050         * utils.c: Unconditionally include locale.h.
2051
2052 2005-06-29  Hrvoje Niksic  <hniksic@xemacs.org>
2053
2054         * ptimer.c: Include sys/time.h to get struct timeval.
2055
2056 2005-06-29  Hrvoje Niksic  <hniksic@xemacs.org>
2057
2058         * wget.h: Remove obsolete definition of with_thousand_seps_sum.
2059
2060 2005-06-29  Hrvoje Niksic  <hniksic@xemacs.org>
2061
2062         * gnu-md5.h: Unconditionally include limits.h.
2063
2064 2005-06-29  Hrvoje Niksic  <hniksic@xemacs.org>
2065
2066         * utils.c (random_number): Use lrand48 if available.
2067         (random_float): Use drand48 if available.
2068
2069 2005-06-29  Hrvoje Niksic  <hniksic@xemacs.org>
2070
2071         * main.c (secs_to_human_time): Use print_decimal when printing
2072         total download time in seconds.
2073
2074         * progress.c (print_row_stats): Use it to print total download
2075         time at the end of the download.
2076         (create_image): Ditto.
2077
2078         * utils.c (print_decimal): New function; print small decimal
2079         numbers with more precision than large ones.
2080
2081         * progress.c (print_row_stats): New function.  Print ETA after the
2082         download rate at the end of each row.
2083
2084 2005-06-28  Hrvoje Niksic  <hniksic@xemacs.org>
2085
2086         * init.c (parse_line): Check for alphanumerics.
2087
2088 2005-06-28  Hrvoje Niksic  <hniksic@xemacs.org>
2089
2090         * (dot_create): Remove unnecessary casts.
2091
2092 2005-06-28  Hrvoje Niksic  <hniksic@xemacs.org>
2093
2094         * ftp.c (getftp): Delete trailing newlines from LIST output so
2095         lines don't come out with trailing \015\012 with -S.
2096
2097 2005-06-27  Hrvoje Niksic  <hniksic@xemacs.org>
2098
2099         * mswindows.h: Remove superfluous includes.
2100
2101 2005-06-27  Hrvoje Niksic  <hniksic@xemacs.org>
2102
2103         * config-post.h (alloca): Amend alloca declaration to take care of
2104         all Win32 compilers, not just MSVC and MinGW.
2105
2106 2005-06-27  Hrvoje Niksic  <hniksic@xemacs.org>
2107
2108         * utils.c (get_grouping_data): Force separator to "." rather than
2109         " " when "," is taken.
2110
2111 2005-06-27  Hrvoje Niksic  <hniksic@xemacs.org>
2112
2113         * wget.h (PTR_FORMAT): Cast the result of sizeof to int before
2114         passing it to printf's %*.
2115
2116         * retr.h: Declare output_stream and output_stream_regular.
2117
2118         * ftp.h: Declare ftp_last_respline.
2119
2120         * convert.h: Declare dl_url_file_map.
2121
2122         * http.h: New file.
2123
2124 2005-06-27  Hrvoje Niksic  <hniksic@xemacs.org>
2125
2126         * cookies.c: Make cookies_now static.
2127
2128 2005-06-27  Hrvoje Niksic  <hniksic@xemacs.org>
2129
2130         * utils.c (human_readable): Remove intermediary cast to long; MSVC
2131         has problems casting *unsigned* __int64 to double.
2132
2133 2005-06-27  Hrvoje Niksic  <hniksic@xemacs.org>
2134
2135         * sysdep.h: Use the system-provided fnmatch by default.
2136
2137 2005-06-27  Hrvoje Niksic  <hniksic@xemacs.org>
2138
2139         * http.c (mktime_from_utc): Renamed to timegm and moved to cmpt.c.
2140         Don't compile it if GNU timegm is available.
2141         (http_atotm): Use timegm.
2142
2143 2005-06-27  Hrvoje Niksic  <hniksic@xemacs.org>
2144
2145         * http.c (http_atotm): Correctly query the old locale value.
2146
2147 2005-06-27  Hrvoje Niksic  <hniksic@xemacs.org>
2148
2149         * config-post.h (alloca): Don't #define alloca under MinGW32,
2150         which defines it in malloc.h, included from mswindows.h.
2151
2152 2005-06-27  Hrvoje Niksic  <hniksic@xemacs.org>
2153
2154         * utils.c (get_grouping_data): Force the use of separators in C
2155         locale.
2156
2157 2005-06-27  Hrvoje Niksic  <hniksic@xemacs.org>
2158
2159         * main.c (i18n_initialize): Set all locale categories.
2160
2161         * http.c (http_atotm): Temporarily set locale to "C".
2162
2163 2005-06-27  Hrvoje Niksic  <hniksic@xemacs.org>
2164
2165         * http.c (gethttp): Improve "POST data file missing" error
2166         message.
2167
2168 2005-06-27  Hrvoje Niksic  <hniksic@xemacs.org>
2169
2170         * progress.c (set_progress_implementation): Type COLON as const
2171         char *.
2172
2173 2005-06-27  Hrvoje Niksic  <hniksic@xemacs.org>
2174
2175         * utils.c (with_thousand_seps): Handle negative numbers.
2176
2177 2005-06-26  Hrvoje Niksic  <hniksic@xemacs.org>
2178
2179         * progress.c (create_image): Mark the "eta" string for translation.
2180
2181 2005-06-26  Hrvoje Niksic  <hniksic@xemacs.org>
2182
2183         * html-url.c (get_urls_file): Don't explicitly set entry->next to
2184         NULL since entry is already zeroed out.
2185
2186 2005-06-26  Gisle Vanem  <giva@bgnett.no>
2187
2188         * mswindows.h: Define gai_strerror under MinGW.
2189
2190 2005-06-26  Hrvoje Niksic  <hniksic@xemacs.org>
2191
2192         * utils.c (with_thousand_seps): Correctly implement thousand seps
2193         consisting of more than one character.
2194
2195 2005-06-26  Hrvoje Niksic  <hniksic@xemacs.org>
2196
2197         * main.c (secs_to_human_time): Ditto.
2198
2199         * progress.c (create_image): Print more exact duration of very
2200         short downloads.
2201
2202         * main.c (secs_to_human_time): Don't translate time suffixes "h",
2203         "m", and "s", which are not strictly SI, but are "accepted for use
2204         with SI".
2205         (secs_to_human_time): Print really small intervals as 0s, not
2206         0.00s.
2207
2208 2005-06-26  Hrvoje Niksic  <hniksic@xemacs.org>
2209
2210         * config-post.h: Replace the alloca declaration with the one from
2211         the latest Autoconf manual.  This should remove a warning with GCC
2212         on AIX.
2213
2214 2005-06-26  Hrvoje Niksic  <hniksic@xemacs.org>
2215
2216         * ftp.c (getftp): Always invoke SIZE, not only when continuing a
2217         download.
2218
2219         * main.c (main): Ditto here.
2220
2221         * progress.c (create_image): When the download is finished, print
2222         how long it took.
2223
2224 2005-06-26  Hrvoje Niksic  <hniksic@xemacs.org>
2225
2226         * main.c (main): Print the downloaded and quota amounts with the
2227         "human_readable" function.
2228
2229         * ftp.c (print_length): Ditto.
2230
2231         * http.c (gethttp): Don't display thousand separators.
2232
2233         * utils.c (with_thousand_seps): Rewritten to respect locale
2234         settings and to be type size agnostic.
2235
2236 2005-06-25  Hrvoje Niksic  <hniksic@xemacs.org>
2237
2238         * utils.c (human_readable): Divide with 1024 instead of shifting
2239         so the operation can work with non-integer N.
2240
2241 2005-06-25  Hrvoje Niksic  <hniksic@xemacs.org>
2242
2243         * progress.c (eta_to_human): New logic for more human-readable
2244         ETA.
2245
2246 2005-06-25  Hrvoje Niksic  <hniksic@xemacs.org>
2247
2248         * utils.c (with_thousand_seps_sum): Decrease buffer size so it
2249         cannot overrun add_thousand_seps's buffer.
2250
2251 2005-06-25  Hrvoje Niksic  <hniksic@xemacs.org>
2252
2253         * utils.c (SPRINTF_WGINT): The correct format is %I64d, not just
2254         %I64.
2255
2256 2005-06-25  Hrvoje Niksic  <hniksic@xemacs.org>
2257
2258         * http.c (http_loop): Don't warn about wildcards in HTTP URLs if
2259         globbing isn't requested in the first place.
2260
2261         * retr.c (retrieve_url): Temporarily turn off globbing when
2262         processing HTTP->FTP redirects.
2263
2264 2005-06-25  Hrvoje Niksic  <hniksic@xemacs.org>
2265
2266         * utils.c (with_thousand_seps_sum): Now defined only if
2267         SUM_SIZE_INT is double.
2268
2269         * wget.h (SUM_SIZE_INT): Instead of bothering with long, long
2270         long, __int64, and friends, simply either use wgint or double, end
2271         of story.  Since we know how to print either, we no longer need
2272         LARGE_INT_FMT.
2273
2274         * sysdeps.h (LARGE_INT): Renamed to SUM_SIZE_INT to better reflect
2275         its intent, and moved to wget.h.
2276
2277 2005-06-25  Hrvoje Niksic  <hniksic@xemacs.org>
2278
2279         * Makefile.in: No need to clean .libs.
2280
2281 2005-06-25  Hrvoje Niksic  <hniksic@xemacs.org>
2282
2283         * cookies.c (parse_set_cookies): Cast pointer subtraction to int
2284         before using it with %d; AIX compiler warns on this.
2285         Reported by Jens Schleusener.
2286
2287 2005-06-24  Hrvoje Niksic  <hniksic@xemacs.org>
2288
2289         * http.c (gethttp): Don't prepend / here.
2290
2291         * cookies.c (cookie_handle_set_cookie): Prepend / to PATH.
2292         (cookie_header): Ditto.
2293
2294 2005-06-24  Hrvoje Niksic  <hniksic@xemacs.org>
2295
2296         * init.c: opt.verbose must be declared as int.
2297
2298 2005-06-23  Hrvoje Niksic  <hniksic@xemacs.org>
2299
2300         * cmpt.c (strpbrk): Removed.
2301         (mktime): Removed.
2302         Include <time.h>.
2303
2304 2005-06-23  Hrvoje Niksic  <hniksic@xemacs.org>
2305
2306         * utils.c (read_file): Ditto.
2307
2308         * main.c (main): Use struct_fstat.
2309
2310         * mswindows.h (struct_fstat): Define a struct_fstat to deal with
2311         the fact that Borland 5.5 has 64-bit stat, but not 64-bit fstat!
2312
2313 2005-06-23  Hrvoje Niksic  <hniksic@xemacs.org>
2314
2315         * sysdep.h: Remove code that deals with Watcom.
2316
2317 2005-06-22  Hrvoje Niksic  <hniksic@xemacs.org>
2318
2319         * all: Use bool instead of int and false/true instead of 0/non-0
2320         for boolean variables and values.
2321
2322 2005-06-22  Hrvoje Niksic  <hniksic@xemacs.org>
2323
2324         * sysdep.h: Include the stdbool.h/_Bool/bool blurb from Autoconf.
2325
2326 2005-06-22  Hrvoje Niksic  <hniksic@xemacs.org>
2327
2328         * init.c (cmd_lockable_boolean): Removed.
2329
2330 2005-06-22  Hrvoje Niksic  <hniksic@xemacs.org>
2331
2332         * cookies.c (struct cookie): Use 1-bit bitfields for booleans
2333         which makes the structure takes less space at no cost in
2334         complexity.
2335
2336 2005-06-22  Hrvoje Niksic  <hniksic@xemacs.org>
2337
2338         * Makefile.in ($(OBJ)): Add the config.h dependency.
2339
2340 2005-06-22  Hrvoje Niksic  <hniksic@xemacs.org>
2341
2342         * openssl.c, connect.c, host.c: Replace instances of #ifdef
2343         ENABLE_DEBUG if (opt.debug) {...} #endif with IF_DEBUG {...}.
2344
2345         * main.c: Rename the IF_DEBUG defined here to WHEN_DEBUG.
2346
2347         * wget.h (IF_DEBUG): New macro.
2348         (DEBUGP): Define in terms of IF_DEBUG.
2349
2350 2005-06-22  Hrvoje Niksic  <hniksic@xemacs.org>
2351
2352         * http.c (gethttp): Only handle --set-cookies (and assert that
2353         cookie jar exists) if opt.cookies is true.  Failure to do so
2354         triggered the assert when --no-cookies was used and the server
2355         sent a Set-Cookie header.  Ouch!
2356
2357 2005-06-22  Hrvoje Niksic  <hniksic@xemacs.org>
2358
2359         * connect.c (select_fd): Expect select() to exist.
2360
2361         * utils.c (xsleep): Always use select() as sleep fallback on
2362         non-Windows platforms.
2363
2364         * ptimer.c: Delete the implementation of PTIMER_TIME.
2365
2366         * main.c: Assume existence of signal(), test for different signal
2367         names instead.
2368
2369         * cmpt.c: Better document reasons why certain functions are
2370         included.
2371
2372 2005-06-22  Hrvoje Niksic  <hniksic@xemacs.org>
2373
2374         * Makefile.in: Remove the manually maintained dependency list;
2375         make all object files depend on every header.
2376
2377 2005-06-20  Hrvoje Niksic  <hniksic@xemacs.org>
2378
2379         * hash.c: Rename "mapping" to "cell" to avoid confusion with the
2380         term "mapping" (or "map") sometimes being used for the entire hash
2381         table.  Also rename "non-empty" to "occupied" for easier reading
2382         of if (!NON_EMPTY (...)) ... .
2383
2384 2005-06-20  Hrvoje Niksic  <hniksic@xemacs.org>
2385
2386         * main.c, ptimer.c, sysdep.h, utils.c: Use #elif to simplify reading of
2387         chained if-else-else-else-... statements.
2388
2389 2005-06-20  Hrvoje Niksic  <hniksic@xemacs.org>
2390
2391         * all: Return type of signal handlers is `void'.  Include signal.h
2392         unconditionally.
2393
2394         * all: Don't explicitly cast values returned by malloc.  We no
2395         longer support ancient compilers that don't declare malloc, and we
2396         never supported C++ builds.
2397
2398 2005-06-19  Hrvoje Niksic  <hniksic@xemacs.org>
2399
2400         * all: Don't declare errno.  Include both time.h and sys/time.h,
2401         as long as sys/time.h exists.  Don't dereference function pointers
2402         when invoking the functions they point to.
2403
2404         * cmpt.c (memmove): Remove function mandated by C89.
2405         (strerror): Ditto.
2406         (strstr): Ditto.
2407
2408         * all: Undo the K&R-ization changes from 2005-05-03.
2409
2410         * all: Remove support for K&R compilers: use C89 function
2411         declarations, remove definition of PARAMS, remove support for
2412         varargs, and remove ansi2knr.  Assume the presence of time.h,
2413         string.h, and other headers mandated by C89.
2414
2415 2005-06-19  Hrvoje Niksic  <hniksic@xemacs.org>
2416
2417         * init.c (cmd_lockable_boolean): Don't recognize literal "2" and
2418         "-1" values; unlike 0 and 1, those should never be exposed to the
2419         user.  Update the error message to be more self-consistent, as
2420         proposed by Benno Schulenberg.
2421
2422 2005-06-18  Hrvoje Niksic  <hniksic@xemacs.org>
2423
2424         * http.c (gethttp): Don't free "head" before using it to save
2425         headers.
2426
2427 2005-06-18  Hrvoje Niksic  <hniksic@xemacs.org>
2428
2429         * http.c (gethttp): When -E is in use, check for file existence
2430         after appending ".html" to the name and modify the file name if
2431         necessary.
2432
2433 2005-06-17  Hrvoje Niksic  <hniksic@xemacs.org>
2434
2435         * connect.c (socket_has_inet6): Removed.
2436
2437         * host.c (lookup_host): Don't use the AI_ADDRCONFIG getaddrinfo
2438         hint.
2439
2440 2005-06-16  Hrvoje Niksic  <hniksic@xemacs.org>
2441
2442         * init.c (cmd_lockable_boolean): Improve the error message so it
2443         lists the more useful values first.
2444
2445 2005-06-15  Hrvoje Niksic  <hniksic@xemacs.org>
2446
2447         * http.c (gethttp): Also report the system error when the POST
2448         data file is missing.
2449
2450 2005-06-15  Benno Schulenberg  <benno@nietvergeten.nl>
2451
2452         * ftp.c, http.c, connect.c, cookies.c, html-url.c, init.c, res.c:
2453         Gettext-ize messages that were previously missed.
2454
2455 2005-06-15  Hrvoje Niksic  <hniksic@xemacs.org>
2456
2457         * host.h (ip_address): Remove the trailing comma from the type
2458         enum in the no-IPv6 case.
2459
2460         * main.c (struct cmdline_option): Remove the trailing comma from
2461         the enum.
2462
2463         Reported by Jens Schleusener.
2464
2465 2005-05-30  Hrvoje Niksic  <hniksic@xemacs.org>
2466
2467         * url.c (strpbrk_or_eos): Check for a recent GCC version before
2468         using the statement-as-expression extension.
2469
2470 2005-05-30  Hrvoje Niksic  <hniksic@xemacs.org>
2471
2472         * http.c (gethttp): Don't attempt to "skip short body" if we're
2473         issuing a HEAD request (in which case the response head is not
2474         followed by a body).
2475
2476 2005-05-30  Hrvoje Niksic  <hniksic@xemacs.org>
2477
2478         * init.c (cmd_spec_header): Don't split the string along the
2479         commas using cmd_vector; just append the new value using
2480         vec_append instead.
2481
2482         * utils.c (vec_append): New function.
2483
2484 2005-05-27  Andreas Beckmann  <debian@abeckmann.de>
2485
2486         * html-url.c (tag_handle_link): Mark the content from the <link
2487         src="..."> tag as expecting HTML.
2488
2489 2005-05-24  Hrvoje Niksic  <hniksic@xemacs.org>
2490
2491         * http.c (http_atotm): Document the origin of the "cookie date"
2492         format.
2493
2494 2005-05-21  Hrvoje Niksic  <hniksic@xemacs.org>
2495
2496         * init.c (setval_internal): Report exact command name alongside
2497         the "display name".
2498
2499 2005-05-18  Hrvoje Niksic  <hniksic@xemacs.org>
2500
2501         * cookies.c (update_cookie_field): Explicitly cast -1 to time_t to
2502         cope with systems where time_t is unsigned.
2503
2504         * cookies.c: Remove unnecessary casts to time_t from values
2505         already of that type.
2506
2507 2005-05-17  Hrvoje Niksic  <hniksic@xemacs.org>
2508
2509         * ftp.c (ftp_loop_internal): Same here.
2510
2511         * http.c (http_loop): Don't clobber the file when -c is specified
2512         and the first attempt to retrieve the file fails.
2513
2514 2005-05-16  Hrvoje Niksic  <hniksic@xemacs.org>
2515
2516         * openssl.c (ssl_check_certificate): Print all issues with a
2517         certificate.
2518
2519 2005-05-16  Hrvoje Niksic  <hniksic@xemacs.org>
2520
2521         * ftp-basic.c: Don't xfree() the line returned by ftp_response if
2522         the returned code is not FTPOK.
2523
2524 2005-05-16  Hrvoje Niksic  <hniksic@xemacs.org>
2525
2526         * init.c (cleanup): Don't free the non-existent opt.ftp_acc.  Free
2527         the SSL-related stuff.
2528
2529 2005-05-16  Hrvoje Niksic  <hniksic@xemacs.org>
2530
2531         * ftp.c (print_length): Consistently print \n at end of the
2532         "Length" line.
2533
2534 2005-05-14  Hrvoje Niksic  <hniksic@xemacs.org>
2535
2536         * openssl.c (ssl_connect): Announce the beginning and the end of
2537         the SSL handshake when in debug mode.
2538
2539         * wget.h (PTR_FORMAT): New macro for easier printing of pointer
2540         values.  Use %0*lx along with PTR_FORMAT instead of %p.
2541
2542 2005-05-14  Hrvoje Niksic  <hniksic@xemacs.org>
2543
2544         * http.c (gethttp): Would forget to close the connection when
2545         keep_alive was not used.
2546
2547 2005-05-13  Hrvoje Niksic  <hniksic@xemacs.org>
2548
2549         * openssl.c (pattern_match): Document the code that decides
2550         whether "*" matches ".".
2551
2552 2005-05-12  Hrvoje Niksic  <hniksic@xemacs.org>
2553
2554         * ftp-ls.c (ftp_index): Use %d to print the port number, which is
2555         now int.
2556         From Steven M. Schweda's VMS patches.
2557
2558 2005-05-12  Hrvoje Niksic  <hniksic@xemacs.org>
2559
2560         * url.c (rewrite_shorthand_url): Don't rewrite "https://host" to
2561         "ftp://https//host" when SSL is not used.
2562
2563 2005-05-11  Hrvoje Niksic  <hniksic@xemacs.org>
2564
2565         * openssl.c (ssl_check_server_identity): Renamed to
2566         ssl_check_certificate because it does more than just checking the
2567         server's identity.
2568         (ssl_check_certificate): Tell the user about
2569         --no-check-certificate.
2570
2571 2005-05-11  Hrvoje Niksic  <hniksic@xemacs.org>
2572
2573         * openssl.c (ssl_init): Always use SSL_VERIFY_NONE, so that the
2574         handshake finishes even if the certificate is invalid.  That way
2575         ssl_check_server_identity can provide better diagnostics on why
2576         the verification failed.
2577
2578 2005-05-11  Hrvoje Niksic  <hniksic@xemacs.org>
2579
2580         * openssl.c (pattern_match): New function.
2581         (ssl_check_server_identity): Treat peer certificate common name as
2582         wildcard.
2583
2584 2005-05-10  Hrvoje Niksic  <hniksic@xemacs.org>
2585
2586         * openssl.c (ssl_check_server_identity): Print certificate subject
2587         and issuer.
2588
2589 2005-05-10  Hrvoje Niksic  <hniksic@xemacs.org>
2590
2591         * res.c (res_register_specs): Correctly pass pointers to
2592         hash_table_get_pair.
2593
2594 2005-05-10  Hrvoje Niksic  <hniksic@xemacs.org>
2595
2596         * http.c (gethttp): Call ssl_check_server_identity.
2597
2598         * openssl.c (ssl_check_server_identity): New function, verifies
2599         that the host name in the certificate matches the actual host
2600         name.
2601         (verify_cert_callback): Removed, since it didn't do anything
2602         except returning the preverify_ok argument.
2603
2604         * connect.c (fd_transport_context): Allow retrieval of the context
2605         pointer registered with fd_register_transport.
2606
2607 2005-05-09  Hrvoje Niksic  <hniksic@xemacs.org>
2608
2609         * openssl.c (verify_cert_callback): Renamed from verify_callback.
2610         Always return the received "ok" value.  Print the X509 name in
2611         debug mode.
2612         (ssl_init): Enable partial writes in SSL context.
2613
2614 2005-05-08  Hrvoje Niksic  <hniksic@xemacs.org>
2615
2616         * http.c (http_loop): Check for wildcards in the URL path
2617         component, not in the whole URL.
2618
2619         * ftp.c (ftp_loop): Check for wildcards in URL path before
2620         unescaping, so the users can escape globbing metacharacters with %
2621         escapes.
2622
2623 2005-05-08  Hrvoje Niksic  <hniksic@xemacs.org>
2624
2625         * init.c (run_command): Correctly interpret the return value of
2626         parse_line.
2627         (commands): Re-alphabetize.
2628
2629 2005-05-08  Hrvoje Niksic  <hniksic@xemacs.org>
2630
2631         * netrc.c (parse_netrc): Explicitly check for assignment != NULL
2632         to silence warning from Borland C.
2633
2634         * url.c (sync_path): Don't unnecessarily increment p.
2635         (url_parse): Don't unnecessarily set url_encode to NULL just
2636         prior to return from the function.
2637
2638 2005-05-08  Hrvoje Niksic  <hniksic@xemacs.org>
2639
2640         * log.c (escnonprint_internal): Place variable declarations
2641         before other statements.
2642
2643 2005-05-08  Hrvoje Niksic  <hniksic@xemacs.org>
2644
2645         * html-url.c: Include recur.h.
2646
2647         * http.c (request_new): Define as accepting no args.
2648
2649 2005-05-07  Hrvoje Niksic  <hniksic@xemacs.org>
2650
2651         * url.c (strpbrk_or_eos): Made inline.  Use strchr(s, '\0') for
2652         finding the NUL char position.
2653
2654 2005-05-07  Hrvoje Niksic  <hniksic@xemacs.org>
2655
2656         * url.c (decide_copy_method): Renamed to char_needs_escaping.
2657         Since it now returns only two possible values, change it to return
2658         boolean (int).
2659
2660 2005-05-07  Hrvoje Niksic  <hniksic@xemacs.org>
2661
2662         * ftp-basic.c (ftp_request): Prevent newlines in VALUE causing
2663         inadvertent sending of multiple FTP commands.
2664
2665 2005-05-07  Hrvoje Niksic  <hniksic@xemacs.org>
2666
2667         * url.c (decide_copy_method): Never cause reencode_escapes to
2668         decode % escapes; it is too intrusive and breaks some servers.
2669
2670 2005-05-07  Hrvoje Niksic  <hniksic@xemacs.org>
2671
2672         * http.c (gethttp): When tunnelling SSL traffic over proxy with
2673         CONNECT, we're really talking to the remote server directly.
2674         Because of this, the request-line argument must be the URL path
2675         rather than the whole URL, as it would be when using regular
2676         proxies.
2677         Reported by Charles Lane.
2678
2679 2005-05-06  Hrvoje Niksic  <hniksic@xemacs.org>
2680
2681         * init.c (cmd_spec_useragent): Allow empty User-Agent.
2682
2683         * http.c (gethttp): Don't print "unknown authentication scheme"
2684         for failed Basic authentication.
2685         (SET_USER_AGENT): Don't set user-agent if opt.useragent is empty.
2686         (gethttp): Use alloca for allocation of www_authenticate.
2687
2688 2005-05-06  Hrvoje Niksic  <hniksic@xemacs.org>
2689
2690         * main.c (print_help): Fix wording of --secure-protocol help text.
2691
2692 2005-05-06  Hrvoje Niksic  <hniksic@xemacs.org>
2693
2694         * cmpt.c (strstr): Updated from glibc 2.3.5.
2695
2696 2005-05-05  Hrvoje Niksic  <hniksic@xemacs.org>
2697
2698         * http.c (http_atotm): Zero out the whole struct tm being passed
2699         to strptime.
2700
2701 2005-05-05  Hrvoje Niksic  <hniksic@xemacs.org>
2702
2703         * main.c (main): Propagate option name to setoptval.
2704
2705         * init.c (setoptval): Accept another argument, OPTNAME.  Propagate
2706         that argument as the option name independently of the actual
2707         command, determined by command_by_name(com).
2708
2709 2005-05-05  Hrvoje Niksic  <hniksic@xemacs.org>
2710
2711         * init.c (parse_line): Make the return value indicate whether
2712         there was a syntax error or a setter failed.
2713         (run_wgetrc): Return an indication on whether an error has been
2714         encountered.
2715         (initialize): Abort if there have been errors running either
2716         .wgetrc file.
2717
2718 2005-05-05  Hrvoje Niksic  <hniksic@xemacs.org>
2719
2720         * log.c (copy_and_escape): Slightly reduce code repetition between
2721         the two loops.
2722
2723 2005-05-05  Charles C.Fu  <ccwf@bacchus.com>
2724
2725         * utils.c (proclist): Strip leading slash when calling fnmatch
2726         too, otherwise wildcard comparisons always fail.
2727
2728 2005-05-05  Hrvoje Niksic  <hniksic@xemacs.org>
2729
2730         * utils.c (touch): Set access time to current time.
2731
2732 2005-05-05  Hrvoje Niksic  <hniksic@xemacs.org>
2733
2734         * url.c (url_unescape): Don't unescape %00, it effectively
2735         truncates the string.
2736
2737 2005-05-05  Hrvoje Niksic  <hniksic@xemacs.org>
2738
2739         * log.c (copy_and_escape): Replace the FOR_URI argument with a
2740         slightly more general mechanism for specifying different kinds of
2741         escape.
2742
2743 2005-05-05  Hrvoje Niksic  <hniksic@xemacs.org>
2744
2745         * ftp-basic.c (ftp_response): Fix printing FTP server response.
2746
2747 2005-05-05  Hrvoje Niksic  <hniksic@xemacs.org>
2748
2749         * retr.c (limit_bandwidth_reset): Reset sleep_adjust.
2750         (limit_bandwidth): Don't allow huge "adjustment" values that
2751         result from being suspended for a while.
2752
2753 2005-05-04  Hrvoje Niksic  <hniksic@xemacs.org>
2754
2755         * wget.h: If gettext was found but libtintl.h wasn't, declare
2756         gettext's return type to avoid type mismatches.
2757
2758 2005-05-03  Hrvoje Niksic  <hniksic@xemacs.org>
2759
2760         * url.c (url_parse): Rename label `error' to avoid conflict with
2761         identifier.
2762
2763         * retr.c (fd_read_body): Rename label `out' to avoid conflict with
2764         identifier.
2765         (fd_read_hunk): Use explicit double constant.
2766         (retrieve_from_file): Don't use string concatenation.
2767         (sleep_between_retrievals): Make sure xsleep is called with a
2768         `double' argument.
2769         (no_proxy_match): Define as static, like it is declared.
2770
2771         * progress.c (bar_create): Use 0.0 instead of 0 because K&R
2772         compilers can't automatically promote it.
2773
2774         * http-ntlm.c (ntlm_output): Replace \xHH sequences with \OOO for
2775         the sake of old compilers.
2776
2777         * ftp.c (ftp_loop_internal): Don't use string concatenation.
2778
2779         * http.c (request_send): Use explicit double constants when
2780         calling fd_read and fd_write.
2781         (post_file): Ditto.
2782         (gethttp): Ditto.
2783         (skip_short_body): Ditto.
2784
2785         * ftp-basic.c: When calling fd_write, specify the last argument as
2786         a `double' constant for the sake of K&R compilers which don't see
2787         the prototype and therefore can't promote it to double
2788         automatically.
2789
2790         * cookies.c (cookie_jar_load): Rename abort label to abort_cookie
2791         to avoid name conflict in K&R compilers.
2792
2793 2005-04-29  Hrvoje Niksic  <hniksic@xemacs.org>
2794
2795         * ptimer.c (posix_init): Since we allow _POSIX_MONOTONIC_CLOCK==0,
2796         it is not enough to check for _POSIX_MONOTONIC_CLOCK-0, we must
2797         also check for defined(_POSIX_MONOTONIC_CLOCK).
2798
2799 2005-04-28  Hrvoje Niksic  <hniksic@xemacs.org>
2800
2801         * ftp.c, hash.c, connect.c, host.c, http.c: Remove unreached code,
2802         such as "break" following return or abort.
2803
2804 2005-04-28  Hrvoje Niksic  <hniksic@xemacs.org>
2805
2806         * init.c (commands): Wrap the use of opt.random_file in #ifdef
2807         HAVE_SSL.
2808
2809 2005-04-28  Hrvoje Niksic  <hniksic@xemacs.org>
2810
2811         * http.c (gethttp): Correctly set the user agent.
2812
2813 2005-04-27  Hrvoje Niksic  <hniksic@xemacs.org>
2814
2815         * init.c (cmd_spec_useragent): Free the old value of
2816         opt.useragent before setting the new one.
2817
2818 2005-04-27  Mauro Tortonesi  <mauro@ferrara.linux.it>
2819
2820         * main.c: Map --ftp-password, --http-password and --proxy-password to
2821         the new ftppassword, httppassword and proxypassword commands
2822         respectively.  Document the --user and --password options in the help
2823         string.
2824         
2825 2005-04-27  Mauro Tortonesi  <mauro@ferrara.linux.it>
2826
2827         * ftp.c: Add support for --user and --password.
2828         
2829         * http.c: Add support for --user and --password.
2830         
2831         * init.c: Deprecated ftppasswd, httppasswd, login, passwd and
2832         proxypasswd commands.  Added ftppassword, ftpuser, httppassword,
2833         password, proxypassword and user commands.
2834
2835         * main.c: Renamed --ftp-passwd to --ftp-password.  Added --ftp-user,
2836         --http-password, --password, --proxy-password and --user.  Deprecated
2837         --http-passwd and --proxy-passwd.  Added documentation for new options
2838         and removed documentation for deprecated options in the help string.
2839         
2840         * options.h (struct options): Added user and passwd members to handle
2841         --user and --password respectively.  Renamed ftp_acc and ftp_pass
2842         members to ftp_user and ftp_passwd for consistency.
2843
2844 2005-04-27  Hrvoje Niksic  <hniksic@xemacs.org>
2845
2846         * main.c (print_help): Advertise "DER", not "ASN1".
2847
2848 2005-04-27  Hrvoje Niksic  <hniksic@xemacs.org>
2849
2850         * openssl.c (init_prng): Disable the weak random seed by default.
2851
2852         * http.c (gethttp): Simplify SSL initialization; disable SSL when
2853         anything goes wrong with the initialization.
2854
2855         * options.h (struct options): New option opt.random_file.
2856
2857 2005-04-27  Hrvoje Niksic  <hniksic@xemacs.org>
2858
2859         * init.c: Wrap private key commands in IF_SSL.
2860
2861 2005-04-27  Hrvoje Niksic  <hniksic@xemacs.org>
2862
2863         * openssl.c (ssl_init): Ditto.
2864
2865         * options.h (struct options): Allow separate specification of key
2866         type and certificate type.
2867
2868         * init.c (cmd_spec_cert_type): Provide a "der" synonym for "asn1"
2869         certificate encoding.
2870
2871 2005-04-26  Hrvoje Niksic  <hniksic@xemacs.org>
2872
2873         * openssl.c: Renamed "gen_sslfunc.c" to "openssl.c" and
2874         "gen_sslfunc.h" to "openssl.h".  This reflects the intent of
2875         openssl.c encapsulating the OpenSSL-specific code.
2876
2877 2005-04-26  Hrvoje Niksic  <hniksic@xemacs.org>
2878
2879         * init.c: Renamed "closure" (a synonym for context in some
2880         cultures) to "place", which more accurately reflects the usage.
2881
2882 2005-04-26  Hrvoje Niksic  <hniksic@xemacs.org>
2883
2884         * gen_sslfunc.c (ssl_init): Use default locations for loading the
2885         certificate bundles.
2886         (ssl_init_prng): Disable the cryptographically weak PRNG
2887         initialization fallback.
2888
2889         * init.c: Renamed SSL command-line arguments and wgetrc commands.
2890         (defaults): Check the server certificate by default.
2891
2892 2005-04-26  Hrvoje Niksic  <hniksic@xemacs.org>
2893
2894         * cookies.c (cookie_handle_set_cookie): Delete the part of the
2895         path after the trailing slash.
2896
2897         * http.c (gethttp): Call cookie_handle_set_cookie with path that
2898         begins with '/'.
2899
2900 2005-04-26  Hrvoje Niksic  <hniksic@xemacs.org>
2901
2902         * http.c (gethttp): Call skip_short_body only if keep_alive is in
2903         use.
2904         (gethttp): Send the User-Agent header with the CONNECT request as
2905         well.
2906
2907 2005-04-25  Hrvoje Niksic  <hniksic@xemacs.org>
2908
2909         * main.c (option_data): Removed support for the undocumented flag
2910         --use-proxy.
2911
2912 2005-04-25  Hrvoje Niksic  <hniksic@xemacs.org>
2913
2914         * main.c (option_data): Don't treat -Y as a boolean switch; treat
2915         it as a value switch instead, so "-Y off" continues to work.
2916
2917 2005-04-24  Hrvoje Niksic  <hniksic@xemacs.org>
2918
2919         * utils.c (aprintf): Delete unreachable statement.
2920
2921 2005-04-24  Hrvoje Niksic  <hniksic@xemacs.org>
2922
2923         * host.c (cmp_prefer_ipv4): New function.
2924         (cmp_prefer_ipv6): New function.
2925         (lookup_host): Use the appropriate comparator according to
2926         opt.prefer_family.
2927
2928         * init.c: New option prefer_family.
2929
2930         * host.c (is_valid_ipv6_address): Spell NS_* constants in lower
2931         case to avoid clash with system headers.
2932         (lookup_host): Reorder the addresses so that IPv4 ones come first.
2933
2934         * utils.c (stable_sort): New function.
2935
2936 2005-04-24  Hrvoje Niksic  <hniksic@xemacs.org>
2937
2938         * connect.c (retryable_socket_connect_error): Return 0 for
2939         ENETUNREACH and EHOSTUNREACH.
2940
2941 2005-04-23  Hrvoje Niksic  <hniksic@xemacs.org>
2942
2943         * cmpt.c: Reenable the memmove implementation for systems that
2944         lack it.
2945
2946         * http.c (gethttp): Store the "authorized" state of the persistent
2947         connection.
2948         (request_remove_header): New function.
2949         (gethttp): Don't send the "Basic" authentication if the connection
2950         is already authorized.
2951
2952 2005-04-23  Hrvoje Niksic  <hniksic@xemacs.org>
2953
2954         * utils.c (base64_encode): Treat input as unsigned chars.
2955         Required for correct encoding of binary stuff.
2956
2957 2005-04-23  Hrvoje Niksic  <hniksic@xemacs.org>
2958
2959         * http-ntlm.c: Format the function definitions in an
2960         ansi2knr-friendly fashion.
2961
2962 2005-04-22  Hrvoje Niksic  <hniksic@xemacs.org>
2963
2964         * http.c (gethttp): Handle multiple WWW-Authentication headers,
2965         only one of which is recognized.  Those are sent by IIS with NTLM
2966         authorization.
2967         (create_authorization_line): Propagate information whether
2968         authorization is finished.
2969         (gethttp): Only stop authorization when it's really finished, not
2970         after fixed two steps.
2971
2972 2005-04-21  Hrvoje Niksic  <hniksic@xemacs.org>
2973
2974         * gen_sslfunc.c (ssl_init): Fix warning message text; mark the
2975         message as translatable.
2976
2977 2005-04-21  Hrvoje Niksic  <hniksic@xemacs.org>
2978
2979         * main.c (print_help): Print the EGD option outside the cluster of
2980         SSL options.
2981
2982 2005-04-21  Hrvoje Niksic  <hniksic@xemacs.org>
2983
2984         * http-ntlm.c (ntlm_output): Fix setting the domain.
2985         Suggested by Sami Krank.
2986
2987 2005-04-20  Mauro Tortonesi  <mauro@ferrara.linux.it>
2988
2989         * connect.c: Set IPV6_V6ONLY socket option when -6 switch is used.
2990
2991 2005-04-20  FUJISHIMA Satsuki  <sf@FreeBSD.org>
2992
2993         * http.c (request_set_header): Fix the check whether a new header
2994         needs to be allocated.
2995
2996 2005-04-18  Hrvoje Niksic  <hniksic@xemacs.org>
2997
2998         * utils.c (base64_encode): Use the parameter order that makes more
2999         sense.  Return the length of the base64 written.  Updated all
3000         callers.
3001
3002 2005-04-17  Hrvoje Niksic  <hniksic@xemacs.org>
3003
3004         * http.c (request_set_header): Free NAME when VALUE is NULL and
3005         freeing the header name is requested.
3006
3007 2005-04-17  Hrvoje Niksic  <hniksic@xemacs.org>
3008
3009         * snprintf.c (fmtstr): Declare VALUE as const char *.
3010         Based on patch by Russ Allbery.
3011
3012 2005-04-17  Hrvoje Niksic  <hniksic@xemacs.org>
3013
3014         * snprintf.c (fmtfp): More correct handling of significant digit
3015         count with %g -- 0.002 has one significant digit, not three.
3016
3017 2005-04-16  Hrvoje Niksic  <hniksic@xemacs.org>
3018
3019         * retr.c (fd_read_body): Respect read timeout with non-interactive
3020         or no progress gauge -- treat ETIMEDOUT specially only when
3021         progress_interactive.
3022         Reported by FUJISHIMA Satsuki.
3023
3024 2005-04-16  FUJISHIMA Satsuki  <sf@FreeBSD.org>
3025
3026         * http.c (gethttp): Don't use HTTP/1.0 persistent connections over
3027         proxy.
3028
3029 2005-04-16  Hrvoje Niksic  <hniksic@xemacs.org>
3030
3031         * snprintf.c: Use the PARAMS macro to handle prototypes.  Write
3032         function definitions in the ansi2knr-friendly way.
3033         (fmtstr): If string precision is specified, don't read VALUE past
3034         it.
3035         (dopr): Actually print %g and %e formats.
3036         (fmtfp): Fix a bug that caused 0.01 to be printed as 0.1.
3037         (fmtfp): Use LLONG in floating point conversions to be able to
3038         convert more digits.
3039         (fmtfp): Interpret precision as number of significant digits with
3040         %g.
3041         (fmtfp): Omit trailing decimal zeros with %g.
3042
3043         * snprintf.c: Don't include <ctype.h> because none of it is used.
3044         Include strings.h/string.h, as per Autoconf.
3045
3046 2005-04-15  Hrvoje Niksic  <hniksic@xemacs.org>
3047
3048         * ptimer.c: Use _POSIX_TIMERS - 0 > 0, which handles the case when
3049         _POSIX_TIMERS is defined but empty, as well as the case when it is
3050         undefined.  Do the same with the check for _POSIX_MONOTONIC_CLOCK.
3051         Suggested by Larry Jones.
3052
3053 2005-04-15  Hrvoje Niksic  <hniksic@xemacs.org>
3054
3055         * ptimer.c: Check that _POSIX_TIMERS is defined as well as > 0.
3056         Problem reported by Steven M. Schweda.
3057
3058 2005-04-14  Hrvoje Niksic  <hniksic@xemacs.org>
3059
3060         * http.c (skip_short_body): Print the skipped body data in debug
3061         mode.
3062         (skip_short_body): Don't skip more than 4k of body data.
3063         (skip_short_body): Return whether the skipping was successful.
3064         (gethttp): If skip_short_body failed, invalidate the connection.
3065
3066 2005-04-12  Gisle Vanem  <giva@bgnett.no>
3067
3068         * ftp.c (getftp): Ditto.
3069
3070         * http.c (gethttp): Open the output file in binary mode.
3071
3072 2005-04-11  Hrvoje Niksic  <hniksic@xemacs.org>
3073
3074         * hash.c: Conditionalize including config.h on HAVE_CONFIG_H
3075         instead of on STANDALONE.
3076
3077 2005-04-11  Hrvoje Niksic  <hniksic@xemacs.org>
3078
3079         * gen_sslfunc.c (ssl_print_errors): Made static.
3080         (ssl_print_errors): Eliminate potentially dangerous fixed-size
3081         error buffer.  Passing NULL to ERR_error_string causes it to use
3082         its own static buffer, which is fine for our purposes.
3083
3084         * gen_sslfunc.c: Include gen_sslfunc.h.  Make the declarations of
3085         ssl_init and ssl_conect match the actual definitions.
3086         (ssl_connect): Simply return a boolean, the SSL context is no
3087         longer useful as a return value.
3088
3089         * retr.c: Don't include SSL headers; we don't need them.
3090
3091 2005-04-11  Hrvoje Niksic  <hniksic@xemacs.org>
3092
3093         * config-post.h: Don't define _VA_LIST under Solaris; it breaks
3094         compilation with GCC 3.4 under Solaris 10.  (It was defined to
3095         avoid a warning with previous versions of GCC.)
3096
3097 2005-04-11  Hrvoje Niksic  <hniksic@xemacs.org>
3098
3099         * xmalloc.c (register_ptr): Warn the user to increase SZ prior to
3100         aborting.
3101
3102 2005-04-11  Hrvoje Niksic  <hniksic@xemacs.org>
3103
3104         * convert.c (convert_cleanup): Free converted_files.
3105
3106 2005-04-10  Hrvoje Niksic  <hniksic@xemacs.org>
3107
3108         * wget.h (DEBUGP): Use __builtin_expect to give a hint to GCC that
3109         opt.debug is false in the vast majority of cases.
3110
3111 2005-04-10  Hrvoje Niksic  <hniksic@xemacs.org>
3112
3113         * config-post.h: Declare alloca as void *, not char *.
3114
3115 2005-04-09  Hrvoje Niksic  <hniksic@xemacs.org>
3116
3117         * recur.c (download_child_p): When -p is used, (temporarily)
3118         ignore accept/reject rules for HTMLs, even when they are at the
3119         maximum recursion depth.  That is because with -p we are, if
3120         necessary, overstepping the max. depth to get the requisites.
3121
3122 2004-06-12  Larry Jones <lawrence.jones@ugsplm.com>
3123
3124         * recur.c (download_child_p): Correct the logic in check number 6:
3125         test opt.reclevel (not DEPTH) against INFINITE_RECURSION.
3126
3127 2005-04-09  Hrvoje Niksic  <hniksic@xemacs.org>
3128
3129         * url.c: Use "static const" in preference to "const static".
3130         Sun's cc warns that "storage class after type is obsolescent".
3131
3132         * url.c (urlchr_table): Don't mark ~ as unsafe, too many broken
3133         web sites are confused when ~ is changed to %7E.  Their servers
3134         redirect /%7Efoo/ to /~foo/, which Wget again accesses using %7E,
3135         causing further redirections, therefore looping infinitely.  See
3136         Debian bug #301624 for an example.
3137
3138 2005-04-09  Hrvoje Niksic  <hniksic@xemacs.org>
3139
3140         * alloca.c: Include wget.h to be able to use xmalloc.  In addition
3141         to defining malloc to xmalloc, also define free to xfree.
3142
3143 2005-04-09  Hrvoje Niksic  <hniksic@xemacs.org>
3144
3145         * http-ntlm.c (ntlm_output): Use "char", not "unsigned char" for
3146         ntlmbuf.  Our base64 functions accept char anyway.
3147         (ntlm_output): Join up the format string, since we nominally
3148         support K&R compilers.
3149         (ntlm_output): Ditto.
3150
3151 2005-04-08  Hrvoje Niksic  <hniksic@xemacs.org>
3152
3153         * ptimer.c: Use Windows timers under Cygwin, whose POSIX timer
3154         implementation is incomplete.
3155
3156 2005-04-08  Hrvoje Niksic  <hniksic@xemacs.org>
3157
3158         * ptimer.c (struct ptimer): Remove the unused initialized field.
3159
3160         * ptimer.c: Renamed function parameters from WT (which used to
3161         stand for wget_timer or wtimer) to PT.
3162
3163 2005-04-08  Hrvoje Niksic  <hniksic@xemacs.org>
3164
3165         * ptimer.c (posix_init): Be smarter about choosing clocks.  In
3166         decreasing order of preference, use CLOCK_MONOTONIC,
3167         CLOCK_HIGHRES, and CLOCK_REALTIME.
3168         (ptimer_allocate): Removed.
3169
3170         * ptimer.c: Refactor the code by cleanly separating the
3171         architecture-dependent code from the architecture-independent
3172         code.
3173
3174 2005-04-08  Hrvoje Niksic  <hniksic@xemacs.org>
3175
3176         * ptimer.c (ptimer_init): Explicitly check that
3177         _POSIX_MONOTONIC_CLOCK is *both* defined and >=0.  (Undefined
3178         symbols are >=0.)
3179
3180 2005-04-08  Hrvoje Niksic  <hniksic@xemacs.org>
3181
3182         * ptimer.c (ptimer_diff): Fix typo affecting Windows build.
3183
3184 2005-04-08  Hrvoje Niksic  <hniksic@xemacs.org>
3185
3186         * ptimer.c (ptimer_init): In fact, _POSIX_MONOTONIC_CLOCK needs to
3187         be >= 0.
3188
3189         * ptimer.c (ptimer_init): Check whether _POSIX_MONOTONIC_CLOCK is
3190         defined instead of whether it's greater than 0.  glibc defines it
3191         to 0, but still makes it available via sysconf.
3192
3193 2005-04-08  Hrvoje Niksic  <hniksic@xemacs.org>
3194
3195         * mswindows.c (str_to_int64): Rename OVERFLOW and UNDERFLOW to
3196         INT64_OVERFLOW and INT64_UNDERFLOW, since those names are used.
3197
3198 2005-04-07  Hrvoje Niksic  <hniksic@xemacs.org>
3199
3200         * ptimer.c: New file.  Move the "wtimer" functions from utils.c to
3201         this file and rename them to ptimer_.
3202
3203 2005-04-07  Hrvoje Niksic  <hniksic@xemacs.org>
3204
3205         * host.c (NO_ADDRESS): Define NO_ADDRESS only after the system
3206         headers have been included.
3207
3208 2005-04-06  Hrvoje Niksic  <hniksic@xemacs.org>
3209
3210         * http.c (pconn): Include NTLM data, which is per-connection.
3211         (known_authentication_scheme_p): Recognize NTLM authorization.
3212         (create_authorization_line): Call ntlm_input and ntlm_output.
3213
3214         * http-ntlm.c: New file, donated by Daniel Stenberg and originally
3215         written for curl, heavily modified for Wget.
3216
3217         * utils.c (base64_encode): Relocated from http.c, since it is now
3218         used by http-ntlm.c, and will possibly be used elsewhere.
3219         (base64_decode): New function, originally based on code from GNU
3220         recode.
3221
3222 2005-04-02  Hrvoje Niksic  <hniksic@xemacs.org>
3223
3224         * ftp.c (ftp_loop): Ditto.
3225
3226         * ftp-basic.c (ftp_pasv): Use the xzero shorthand for memset(0).
3227         (ftp_lpsv): Ditto.
3228
3229 2005-04-05  Mauro Tortonesi  <mauro@ferrara.linux.it>
3230
3231         * Makefile.in: removed string_t.c from list of source files.
3232
3233 2005-04-04  Mauro Tortonesi  <mauro@ferrara.linux.it>
3234
3235         * string_t.c: Removed.
3236         
3237         * string_t.h: Removed.
3238
3239 2005-04-02  Hrvoje Niksic  <hniksic@xemacs.org>
3240
3241         * url.c (rewrite_shorthand_url): Only accept recognized schemes.
3242         That way "foo:80" will correctly be rewritten to "http://foo:80"
3243         instead of left unchanged and ultimately rejected because of
3244         "unsupported scheme foo".
3245
3246 2005-03-31  Hrvoje Niksic  <hniksic@xemacs.org>
3247
3248         * utils.c (number_to_string): Avoid explicit 64-bit constants;
3249         construct them by multiplication at compile-time.
3250
3251         * utils.c, elsewhere: Don't append "L" to 32-bit integer
3252         constants; we aren't really compilable on 16-bit systems anyway.
3253
3254         * hash.c (prime_size): Remove primes larger than 2^31, but include
3255         2^31-1, which is prime.
3256
3257 2005-03-30  Hrvoje Niksic  <hniksic@xemacs.org>
3258
3259         * utils.c (string_set_to_array): New function.
3260
3261         * convert.c: Replace the use of "slists" with sets/hash-tables,
3262         which in fact suit the intended purpose much better.
3263         downloaded_html_list is removed altogether.
3264
3265 2005-03-29  Hrvoje Niksic  <hniksic@xemacs.org>
3266
3267         * ftp.h (enum): Rename GLOBALL, GETALL, and GETONE to
3268         GLOB_GLOBALL, GLOB_GETALL, and GLOB_GETONE to avoid conflict with
3269         Linux headers.
3270
3271 2005-03-29  Hrvoje Niksic  <hniksic@xemacs.org>
3272
3273         * utils.c (numdigit): More correct handling of negative numbers.
3274
3275 2005-03-21  Hrvoje Niksic  <hniksic@xemacs.org>
3276
3277         * http.c (gethttp): Print the human-readable size.
3278
3279         * ftp.c (getftp): Print the human-readable size of the file to be
3280         downloaded.
3281
3282         * utils.c (human_readable): New function.
3283
3284         * utils.c: Renamed "legible" to "with_thousand_seps",
3285         "legible_large_int" to "with_thousand_seps_large", and "legible_1"
3286         to "add_thousand_seps".
3287
3288 2005-03-21  Hrvoje Niksic  <hniksic@xemacs.org>
3289
3290         * http.c (gethttp): Inhibit persistent connections when talking to
3291         proxies, as mandated by RFC 2068.
3292
3293 2005-03-20  Hrvoje Niksic  <hniksic@xemacs.org>
3294
3295         * url.c (unescape_single_char): New function.
3296         (url_escape_dir): Use it to unescape slashes in directory
3297         components.
3298         (url_string): Escape unsafe chars in host name, except for the ':'
3299         charaters, which can appear in IPv6 addresses.
3300
3301         * main.c (main): Don't access the cookie jar directly.
3302
3303         * log.c (escnonprint_internal): Correctly calculate the needed
3304         string size.  Don't forget the buffer's new size after having
3305         reallocated it.
3306         (log_cleanup): New function.  Free the escnonprint ring data.
3307
3308         * init.c (cleanup): Don't free the cookie jar explicitly, it is
3309         now done by http_cleanup.
3310         (cleanup): opt.user_headers is now a vector, free it with
3311         free_vec.
3312
3313         * http.c (gethttp): Make sure to free the request data, the status
3314         message, and the response data before returning from the function.
3315         (save_cookies): New function.
3316         (http_cleanup): Free the cookie jar here.
3317
3318         * hash.c: Renamed string_hash to hash_string and ptrhash to
3319         hash_pointer.  Exported hash_pointer.
3320
3321         * xmalloc.c: Organized malloc_table (previously malloc_debug) as a
3322         simple EQ hash table.  register_ptr and unregister_ptr are now of
3323         O(1) complexity.
3324
3325         * xmalloc.c: Renamed "*_debug" to debugging_* and "*_real" to
3326         checking_*.
3327
3328 2005-03-12  Hrvoje Niksic  <hniksic@xemacs.org>
3329
3330         * utils.c (debug_test_md5): Moved to gen-md5.c.
3331
3332         * mswindows.h: Don't declare inet_ntop, since we don't use it.
3333
3334         * mswindows.h: For consistency, also wrap closesocket, it being
3335         a Winsock call.
3336
3337         * mswindows.h: Don't declare sleep and usleep; we're defining
3338         xsleep now.
3339
3340         * mswindows.h (mkdir): Don't special-case Borland C, _mkdir
3341         works there as well.
3342
3343         * host.c: Don't include winsock header files; the correct ones
3344         are already included by mswindows.h.
3345
3346         * mswindows.c (xsleep): Round toward the nearest millisecond
3347         in an attempt to avoid average short sleeps.
3348
3349         * utils.c (wtimer_granularity): Report correct values for
3350         Windows timers and for high-resolution timers.
3351
3352         * utils.c (wtimer_initialize_once): New function, called to
3353         initialize the timer frequency.
3354
3355         * utils.c: Replace the use of GetSystemTime with high-resolution
3356         counters under Windows.  When high-resolution counters are
3357         unavailable, use GetTickCount().
3358
3359 2005-03-15  Hrvoje Niksic  <hniksic@xemacs.org>
3360
3361         * retr.c (fd_read_body): Undo the 2004-11-18 change.  Instead,
3362         always be "exact".
3363
3364 2005-03-17  Hrvoje Niksic  <hniksic@xemacs.org>
3365
3366         * ftp-basic.c (ftp_login): Don't free the string if ftp_response
3367         returned an error status because the line didn't get allocated in
3368         the first place.
3369
3370 2005-03-15  Hrvoje Niksic  <hniksic@xemacs.org>
3371
3372         * http.c (read_http_response_head): Limit the response size to 64k
3373         bytes.
3374
3375         * retr.c (fd_read_hunk): Accept a MAXSIZE argument that limits the
3376         number of bytes the function is allowed to allocate.
3377         (fd_read_line): Limit the line to 4096 bytes.
3378
3379 2005-03-12  Hrvoje Niksic  <hniksic@xemacs.org>
3380
3381         * wget.h: Include options.h after wgint has been defined.
3382
3383         * options.h (struct options): Declare options processed with
3384         cmd_bytes as wgint, not long.
3385
3386 2005-03-18  Hrvoje Niksic  <hniksic@xemacs.org>
3387
3388         * init.c (cmd_file): Use concat_strings.
3389
3390         * http.c (basic_authentication_encode): Use concat_strings.
3391
3392         * ftp-ls.c (ftp_index): Use concat_strings.
3393
3394         * ftp-basic.c (ftp_request): Use concat_strings.
3395
3396         * utils.c (concat_strings): New function.
3397
3398 2005-03-12  Hrvoje Niksic  <hniksic@xemacs.org>
3399
3400         * init.c (simple_atof): Handle negative numbers; skip whitespace
3401         before the number.
3402         (simple_atoi): Ditto.  Also, check for overflow and underflow.
3403         (cmd_number): Bail out on negative numbers.
3404         (parse_bytes_helper): Ditto.
3405
3406 2005-03-06  Hrvoje Niksic  <hniksic@xemacs.org>
3407
3408         * http.c (gethttp): Handle multiple Set-Cookie headers sent by
3409         remote server.
3410
3411 2005-03-06  Hrvoje Niksic  <hniksic@xemacs.org>
3412
3413         * init.c (defaults): Use passive FTP by default.
3414
3415 2005-03-06  Hrvoje Niksic  <hniksic@xemacs.org>
3416
3417         * mswindows.c: Provide wrappers to Winsock functions that set
3418         errno to WSAGetLastError() in case of failure.  Also provide a
3419         Windows-specific version of strerror.
3420
3421         * mswindows.h: Wrap calls to socket, bind, connect, recv, send,
3422         select, getsockname, getpeername, and setsockopt.
3423
3424 2005-03-06  Hrvoje Niksic  <hniksic@xemacs.org>
3425
3426         * url.c (url_parse): Reject port numbers larger than 65535.  We
3427         also check for overflow while parsing port numbers.
3428
3429 2005-03-06  Hrvoje Niksic  <hniksic@xemacs.org>
3430
3431         * utils.c (read_file): Don't use wgint for file size; LFS won't
3432         work since the file is mmap'ed as a whole.
3433
3434         * options.h: Don't include stdio.h.
3435
3436         * log.c: Ditto.
3437
3438         * init.c: Disambiguate assignment from non-zero test to avoid
3439         Borland C warning.
3440
3441         * http.c (response_new): Don't needlessly post-increment count.
3442
3443         * hash.c: Include stdio.h.
3444
3445         * gnu-md5.h: Don't include stdio.h.
3446
3447         * getopt.h (struct option): Always use const.
3448
3449         * ftp.c (getftp): Avoid unnecessary assignment to RES to avoid
3450         Borland C warning.
3451
3452         * ftp-ls.c: Disambiguate assignment from non-zero test to avoid
3453         Borland C warning.
3454
3455         * cmpt.c (strptime_internal): Don't initialize rp_backup when
3456         !_NL_CURRENT to avoid Borland C warning.
3457
3458 2005-03-06  Hrvoje Niksic  <hniksic@xemacs.org>
3459
3460         * utils.c (fopen_excl): Fix parse error when O_BINARY is
3461         available.
3462
3463 2005-03-05  Hrvoje Niksic  <hniksic@xemacs.org>
3464
3465         * url.c (url_file_name): Don't allow hosts named ".." to be
3466         appended as path elements.
3467
3468 2005-03-03  Hrvoje Niksic  <hniksic@xemacs.org>
3469
3470         * retr.c (retrieve_url): Escape location header.
3471
3472         * http.c (print_server_response_1): Escape server response when
3473         printing it.
3474         (gethttp): Escape host name, status message, location header, and
3475         content type.
3476         (http_loop): Escape error message from server.
3477
3478         * host.c (lookup_host): Escape host name when printing it.
3479
3480         * ftp.c (getftp): Escape user name when printing it.
3481         (getftp): Escape remote file and directory for printing.
3482         (getftp): Escape server listing when printing it.
3483         (ftp_retrieve_list): Escape link name and file name.
3484         (ftp_retrieve_glob): Escape file name.
3485
3486         * ftp-basic.c (ftp_response): Escape server response when printing
3487         it.
3488
3489         * cookies.c (parse_set_cookies): Escape the cookie field when
3490         printing it.
3491         (parse_set_cookies): Escape contents of remote header.
3492         (cookie_handle_set_cookie): Escape host name and cookie domain.
3493
3494         * connect.c (connect_to_ip): Escape the host name.
3495
3496         * log.c (escnonprint): New function, used for printing strings
3497         coming from the server that possibly contain non-ASCII characters.
3498         (escnonprint_uri): Ditto.
3499
3500 2005-02-24  Hrvoje Niksic  <hniksic@xemacs.org>
3501
3502         * ftp.c (getftp): Ditto.
3503
3504         * http.c (gethttp): When we're not supposed to overwrite files,
3505         use fopen_excl to open the file and recompute the file name.
3506
3507         * log.c (redirect_output): Use unique_create to avoid a race
3508         condition.
3509
3510         * mswindows.c (fake_fork_child): Use unique_create.
3511
3512         * utils.c (fopen_excl): New function that opens a stdio stream
3513         with the O_EXCL flag (where available).
3514         (unique_create): New function, like unique_name, but also creating
3515         the file and returning a file pointer.
3516         (fork_to_background): Use unique_create to create the file
3517         immediately to avoid race condition with multiple instances of
3518         wget -b.
3519
3520 2005-02-24  Hrvoje Niksic  <hniksic@xemacs.org>
3521
3522         * host.c (lookup_host): Test for AI_ADDRCONFIG directly, instead
3523         of checking for HAVE_GETADDRINFO_AI_ADDRCONFIG.
3524
3525 2005-02-23  Hrvoje Niksic  <hniksic@xemacs.org>
3526
3527         * host.c (is_valid_ipv6_address): Move here from url.c.
3528         (lookup_host): If the address is numeric, don't print the
3529         "resolving..." line, don't set up DNS timeouts, and set the
3530         AI_NUMERICHOST hint, where available.
3531
3532 2005-02-26  Gisle Vanem  <giva@bgnett.no>
3533
3534         * utils.c: Use the nnnLL syntax under GCC.  Define struct_stat to
3535         struct _stati64 under __MINGW32__ as well as under MS VC.
3536
3537 2005-02-26  Hrvoje Niksic  <hniksic@xemacs.org>
3538
3539         * utils.c: Use the nnnI64 syntax for __int64 constants under all
3540         Windows compilers.
3541         (SPRINTF_WGINT): Use "%I64" under all Windows compilers.
3542
3543         * mswindows.h (WGINT_MAX): Use the nnnI64 syntax for
3544         __int64 constants under all Windows compilers.
3545         (struct_stat): Use `struct stati64' under Borland C.
3546         (fstat): Don't redefine to _fstati64 under Borland.
3547
3548         * mswindows.c: Define str_to_int64 under Borland C as well as
3549         under (older) Visual C.
3550
3551 2005-02-25  Hrvoje Niksic  <hniksic@xemacs.org>
3552
3553         * ftp.c (getftp): Initialize err to suppress compiler warning.
3554
3555 2005-02-24  Hrvoje Niksic  <hniksic@xemacs.org>
3556
3557         * ftp.c (ftp_expected_bytes): Fix bug that caused infloop because
3558         of not correctly skipping the '(' character.
3559
3560 2005-02-24  Hrvoje Niksic  <hniksic@xemacs.org>
3561
3562         * mswindows.c (wget_ftello): Removed.
3563
3564         * mswindows.h: Remove bogus definition of stat.
3565         (wget_ftello): Remove the leftover ftello replacement.
3566
3567 2005-02-20  Hrvoje Niksic  <hniksic@xemacs.org>
3568
3569         * mswindows.c (wget_ftello): Wget's replacement for ftello.
3570
3571         * utils.c (file_size): Use ftello where available.
3572
3573         * ftp-ls.c (ftp_parse_unix_ls): Use str_to_wgint to parse the file
3574         size.
3575         (ftp_parse_winnt_ls): Ditto.
3576
3577         * ftp-basic.c (ftp_size): Use str_to_wgint to convert number to
3578         wgint; pass 10 instead of 0 as the BASE argument.
3579
3580         * ftp.c (ftp_expected_bytes): Use str_to_wgint to parse the file
3581         size.
3582
3583         * sysdep.h (LARGE_INT_FMT): Use __int64 as LARGE_INT on
3584         MSVC/Windows; print it with "%I64".
3585
3586         * wget.h: Define a `wgint' type, normally aliased to (the possibly
3587         64-bit variant of) off_t.
3588
3589         * all: Use `wgint' instead of `long' for numeric variables that
3590         can hold file sizes.
3591
3592         * utils.c (number_to_string): Support printing of `wgint'
3593         argument.
3594         (number_to_static_string): New function.
3595
3596         * all: Replace printf("%ld", long_value) with printf("%s",
3597         number_to_static_string(wgint_value)).
3598
3599 2005-02-18  Mauro Tortonesi <mauro@ferrara.linux.it>
3600
3601         * main.c: Added the --ftp-passwd command line option.
3602
3603         * init.c: Renamed command passwd to ftppasswd.
3604
3605 2005-02-11  Mauro Tortonesi <mauro@ferrara.linux.it>
3606         
3607         * string_t.c: Fixed a bug in do_escape and triggered escape of
3608         backslashes in string_escape to avoid ambiguities in the result
3609         string.
3610         
3611 2005-02-10  Mauro Tortonesi <mauro@ferrara.linux.it>
3612
3613         * string.h: Renamed to string_t.h to fix a compilation conflict 
3614         with the string.h header in the standard C library.
3615         
3616         * string.c: Renamed to string_t.c for consistency with string.h.
3617         
3618         * string_t.c: Ditto.
3619
3620         * string_t.h: Ditto.
3621         
3622 2004-12-31  Mauro Tortonesi <mauro@ferrara.linux.it>
3623
3624         * string.c: New file.
3625
3626         * string.h: New file.
3627
3628         * Makefile.in: Added string.c to the list of modules to compile.
3629
3630         * main.c: Updated copyright.
3631
3632 2004-11-18  Ulf Harnhammar <ulf.harnhammar.9485@student.uu.se>
3633
3634         * ftp-ls.c: Fixed a problem in ftp_parse_winnt_ls that could allow a
3635         malicious remote FTP server to crash wget.
3636
3637 2004-11-18  Hans-Andreas Engel <engel@node.ch>
3638
3639         * http.c: Enable --convert-links (-k) when a single page is downloaded
3640         via --output-document (-O).
3641
3642 2004-11-18  Mauro Tortonesi <mauro@deepspace6.net>
3643
3644         * connect.c: Minor correction to the comment in front of fd_peek.
3645
3646 2004-11-18  Leonid Petrov <nouser@lpetrov.net>
3647
3648         * retr.c: Fix a timeout problem in fd_read_body when using http_proxy.
3649
3650 2004-11-15  YAMAZAKI Makoto <Yamazaki.Makoto@fujixerox.co.jp>
3651
3652         * netrc.c: Fix termination by assertion bug in netrc parsing.
3653
3654 2004-05-09  David Fritz  <zeroxdf@att.net>
3655
3656         * mswindows.c (fake_fork): Pass entire command line to the child
3657         process.
3658
3659 2004-03-31  Hrvoje Niksic  <hniksic@xemacs.org>
3660
3661         * http.c (gethttp): Fix typo: SCHEME_SSL -> SCHEME_HTTPS.
3662
3663 2004-03-30  Hrvoje Niksic  <hniksic@xemacs.org>
3664
3665         * http.c (gethttp): Send the Proxy-Authorization header over
3666         non-SSL connections too.
3667
3668 2004-03-25  David Fritz  <zeroxdf@att.net>
3669
3670         * mswindows.c (fake_fork_child): Ignore error code when
3671         OpenFileMapping() fails; assume it failed because the object does
3672         not exist.
3673
3674 2004-03-24  David Fritz  <zeroxdf@att.net>
3675
3676         * mswindows.c (fake_fork): New function.
3677
3678         * mswindows.c (fork_to_background): Use it.
3679
3680 2004-03-19  David Fritz  <zeroxdf@att.net>
3681
3682         * mswindows.c (ws_hangup): Incorporate old fork_to_background()
3683         code.  Add event name argument.
3684         (fork_to_backgorund): Now a simple wrapper around ws_hangup().
3685         (ws_handler): Correctly handle the case when neither CTRLC_BACKGND
3686         nor CTRLBREAK_BACKGND are defined.  Don't bother handling close,
3687         logoff, or shutdown events.  Call ws_hangup() with the correct
3688         event name; don't assume it was CTRL+Break.
3689
3690 2004-03-19  Hrvoje Niksic  <hniksic@xemacs.org>
3691
3692         * url.c (url_parse): Decode %HH sequences in host name.
3693
3694 2004-03-04  Hrvoje Niksic  <hniksic@xemacs.org>
3695
3696         * convert.c (local_quote_string): Quote "#" as "%23" and "%" as
3697         "%25" when creating links to local files.
3698
3699 2004-03-02  David Fritz  <zeroxdf@att.net>
3700
3701         * mswindows.c (ws_percenttitle): Guard against future changes by
3702         doing nothing if the proper variables have not been initialized.
3703         Clamp percentage value.
3704
3705 2004-03-04  Gisle Vanem  <giva@bgnett.no>
3706
3707         * retr.c (fd_read_body): Don't change console title if quiet.
3708
3709 2004-02-25  David Fritz  <zeroxdf@att.net>
3710
3711         * mswindows.c (set_sleep_mode): Remove argument and return value.
3712         Call GetModuleHandle() instead of LoadLibrary()/FreeLibrary() for
3713         kernel32.dll.  Use typedef for function-pointer.  Don't cast
3714         l-value.  Don't use dereference operator when calling through
3715         function-pointer.
3716         (ws_startup): Update call to set_sleep_mode().
3717         (ws_cleanup): Remove call to set_sleep_mode().
3718
3719 2004-02-23  David Fritz  <zeroxdf@att.net>
3720
3721         * http.c (http_loop): Ditto.
3722
3723         * ftp.c (ftp_loop_internal): Update call to ws_changetitle().
3724
3725         * main.c (main): Don't bother calling ws_changetitle().
3726
3727         * mswindows.h (ws_changetitle): Update prototype.
3728
3729         * mswindows.c (ws_changetitle): Remove second argument.  Use
3730         xfree_null().
3731         (ws_percenttitle): Only update title when percentage has changed.
3732
3733 2004-02-23  David Fritz  <zeroxdf@att.net>
3734
3735         * mswindows.h: Ditto.
3736
3737         * mswindows.c: Misc. formatting/comment tweaks throughout.
3738
3739 2004-02-20  David Fritz  <zeroxdf@att.net>
3740
3741         * main.c (print_help): Remove call to ws_help().
3742
3743         * mswindows.c (ws_help): Remove.
3744
3745         * mswindows.h (ws_help): Remove.
3746
3747 2004-02-16  David Fritz  <zeroxdf@att.net>
3748
3749         * init.c (home_dir): Use aprintf() instead of xmalloc()/sprintf().
3750         Under Windows, if $HOME is not defined, use the directory that
3751         contains the Wget binary instead of hard-coded `C:\'.
3752         (wgetrc_file_name): Under Windows, look for $HOME/.wgetrc then, if
3753         not found, look for wget.ini in the directory of the Wget binary.
3754
3755         * mswindows.c (ws_mypath): Employ slightly more robust methodology.
3756         Strip trailing path separator.
3757
3758 2004-02-06  Hrvoje Niksic  <hniksic@xemacs.org>
3759
3760         * http.c (gethttp): Respect --ignore-length.
3761         (gethttp): Inhibit keep-alive if --ignore-length is specified.
3762
3763 2004-02-06  Hrvoje Niksic  <hniksic@xemacs.org>
3764
3765         * connect.c (sockaddr_set_data): Zero out
3766         sockaddr_in/sockaddr_in6.  Apparently BSD-derived stacks need this
3767         when binding a socket to local address.
3768
3769 2004-02-04  Hrvoje Niksic  <hniksic@xemacs.org>
3770
3771         * hash.c: Make the file compilable outside Wget source tree when
3772         -DSTANDALONE is used.
3773
3774 2004-01-29  Hrvoje Niksic  <hniksic@xemacs.org>
3775
3776         * utils.c (determine_screen_width): Return 0 if not running on
3777         Windows or on a TIOCGWINSZ-capable system.
3778
3779 2004-01-28  David Fritz  <zeroxdf@att.net>
3780
3781         * utils.c (determine_screen_width): Correctly determine console
3782         width under Windows.
3783
3784 2004-01-28  Christian Biere  <christianbiere@gmx.de>
3785
3786         * progress.c (bar_set_params): Fixed syntax error when HAVE_ISATTY
3787         was undefined.
3788
3789         * ftp.c (ftp_loop_internal): Allocate a larger buffer in case
3790         "try" gets translated to something large.  Ditto in http_loop in
3791         http.c.
3792
3793         * http.c (response_header_copy): Don't write to buf[BUFSIZE].
3794
3795         * ftp-opie.c (skey_response): Eliminate unnecessary string
3796         concatenation; just call gen_md5_update twice.
3797
3798 2004-01-25  Hrvoje Niksic  <hniksic@xemacs.org>
3799
3800         * utils.c (xsleep): Don't call usleep with values larger than
3801         1,000,000.
3802
3803 2003-12-16  Hrvoje Niksic  <hniksic@xemacs.org>
3804
3805         * http.c (gethttp): Fix generation of `Content-Length'.
3806
3807 2003-12-15  Gisle Vanem  <giva@bgnett.no>
3808
3809         * url.c (url_skip_credentials): Fixed return value; 'url' if no
3810         credentials.
3811
3812 2003-12-14  Hrvoje Niksic  <hniksic@xemacs.org>
3813
3814         * url.c (url_skip_credentials): Return a pointer directly.
3815
3816 2003-12-14  Hrvoje Niksic  <hniksic@xemacs.org>
3817
3818         * url.c (url_file_name): Ditto.
3819         (parse_errors): Ditto.
3820
3821         * retr.c (retr_rate): Ditto.
3822
3823         * progress.c (create_image): Ditto.
3824
3825         * netrc.c (parse_netrc): Ditto.
3826
3827         * main.c (struct cmdline_option): Ditto.
3828         (redirect_output_signal): Ditto.
3829
3830         * init.c (commands): Ditto.
3831
3832         * ftp-ls.c (ftp_index): Ditto.
3833
3834         * cookies.c (check_domain_match): Declare the pointer to a literal
3835         string as `const'.
3836
3837 2003-12-12  Hrvoje Niksic  <hniksic@xemacs.org>
3838
3839         * retr.c (fd_read_body): Pass total size to progress_create, not
3840         the remaining amount.
3841
3842 2003-12-12  Hrvoje Niksic  <hniksic@xemacs.org>
3843
3844         * retr.c (fd_read_body): Don't fiddle with "interactive timeout"
3845         if read timeout is unset.
3846
3847 2003-12-12  Hrvoje Niksic  <hniksic@xemacs.org>
3848
3849         * connect.c (bind_local): Don't set the IPV6_V6ONLY option on the
3850         socket.
3851
3852 2003-12-06  Hrvoje Niksic  <hniksic@xemacs.org>
3853
3854         * url.c (url_file_name): Respect the setting of
3855         opt.protocol_directories.
3856
3857         * main.c (main): Only check for ret=='?' when longindex is unset.
3858         (option_data): New option --protocol-directories.
3859
3860 2003-12-06  Hrvoje Niksic  <hniksic@xemacs.org>
3861
3862         * ftp.c (getftp): Ditto.
3863
3864         * http.c (gethttp): Correctly calculate bandwidth as total data
3865         read divided with download time.
3866
3867         * retr.c (fd_read_body): Separate the return values for data
3868         written and read.
3869
3870 2003-12-05  Hrvoje Niksic  <hniksic@xemacs.org>
3871
3872         * http.c (H_REDIRECTED): Respect the HTTP/1.1 "303 See Other"
3873         response code.
3874         Suggested by Dan Razzell.
3875
3876 2003-11-30  Hrvoje Niksic  <hniksic@xemacs.org>
3877
3878         * retr.c (fd_read_body): Report the amount of data *written* as
3879         amount_read.  This is not entirely logical, but that's what the
3880         callers expect, and it's not easy to change.
3881
3882         * ftp.c (ftp_loop_internal): Ditto.
3883
3884         * http.c (http_loop): Be smarter about assigning restval; if we're
3885         in the nth pass of a download, simply use the information we have
3886         about how much data has been retrieved as restval.
3887
3888         * ftp.c (getftp): Ditto for FTP "REST" command.
3889
3890         * http.c (gethttp): When the server doesn't respect range, skip
3891         the first RESTVAL bytes of the read body.  Never truncate the
3892         output file.
3893
3894         * retr.c (fd_read_body): Support skipping initial STARTPOS octets.
3895
3896 2003-11-30  Hrvoje Niksic  <hniksic@xemacs.org>
3897
3898         * http.c (skip_short_body): Renamed skip_body to skip_short_body;
3899         don't bother calling fd_read_body.
3900
3901 2003-11-30  Hrvoje Niksic  <hniksic@xemacs.org>
3902
3903         * retr.c (fd_read_body): Sanitize arguments and document them
3904         better.  Make sure the timer is created and updated only if
3905         necessary.  Updated callers.
3906
3907 2003-11-30  Hrvoje Niksic  <hniksic@xemacs.org>
3908
3909         * http.c (skip_body): New function.
3910         (gethttp): Use it to skip the body of the responses we don't care
3911         to download.  That allows us to reuse the connection.
3912         (gethttp): Trust that the HEAD requests will not generate body
3913         data.
3914
3915         * retr.c (fd_read_body): Don't write to OUT if it's NULL.
3916
3917 2003-11-29  Hrvoje Niksic  <hniksic@xemacs.org>
3918
3919         * http.c (gethttp): Initialize SSL only the first time when SSL
3920         URL is downloaded.
3921
3922 2003-11-29  Hrvoje Niksic  <hniksic@xemacs.org>
3923
3924         * cookies.c (cookie_header): Only generate the contents of the
3925         header, not the leading "Cookie: " or the trailing "\r\n".
3926
3927         * http.c (gethttp): When adding headers specified with `--header',
3928         allow them to override the headers generated by Wget.
3929
3930         * init.c (cmd_spec_header): Made opt.user_headers a vector.
3931
3932         * http.c (request_new): New function.  Returns a request structure
3933         which can be modified in various ways, most notably by adding HTTP
3934         headers to the request.
3935         (request_set_header): New function for adding the header to the
3936         request.  If the header is already available, it gets replaced.
3937         (request_send): Construct and send the request.
3938         (gethttp): Use the request_* functions to generate the request.
3939
3940 2003-11-28  Hrvoje Niksic  <hniksic@xemacs.org>
3941
3942         * http.c (gethttp): Don't include the Proxy-Authorization header
3943         in the request tunneled through proxy.
3944
3945 2003-11-28  Hrvoje Niksic  <hniksic@xemacs.org>
3946
3947         * http.c (gethttp): Use the CONNECT handle to establish SSL
3948         passthrough through non-SSL proxies.
3949
3950 2003-11-28  Hrvoje Niksic  <hniksic@xemacs.org>
3951
3952         * init.c: Don't #include netinet/Winsock stuff.
3953
3954 2003-11-28  Hrvoje Niksic  <hniksic@xemacs.org>
3955
3956         * http.c: Deleted the old functions header_process,
3957         header_extract_number, header_exists, header_strdup,
3958         http_process_range, http_process_none, http_process_type, and
3959         http_process_connection.
3960
3961         * http.c (response_new): New function.
3962         (response_header_bounds): Ditto.
3963         (response_header_copy): Ditto.
3964         (response_header_strdup): Ditto.
3965         (response_status): Ditto.
3966         (gethttp): Use the new response_* functions to parse the response.
3967         Support HTTP/0.9 responses.
3968
3969 2003-11-27  Hrvoje Niksic  <hniksic@xemacs.org>
3970
3971         * progress.c (create_image): Don't calculate ETA if nothing has
3972         been downloaded yet, because it causes division by zero.
3973
3974 2003-11-27  Hrvoje Niksic  <hniksic@xemacs.org>
3975
3976         * connect.c (bind_local): Rename sa_len to addrlen because IRIX
3977         headers define sa_len as a macro.
3978
3979 2003-11-26  Hrvoje Niksic  <hniksic@xemacs.org>
3980
3981         * html-parse.c (convert_and_copy): Remove embedded newlines when
3982         AP_TRIM_BLANKS is specified.
3983
3984 2003-11-26  Hrvoje Niksic  <hniksic@xemacs.org>
3985
3986         * ftp.c: Set con->csock to -1 where rbuf_uninitialize was
3987         previously used.
3988
3989 2003-11-26  Hrvoje Niksic  <hniksic@xemacs.org>
3990
3991         * Makefile.in (http$o): Added the trailing backslash that was
3992         missing.
3993
3994 2003-11-21  Hrvoje Niksic  <hniksic@xemacs.org>
3995
3996         * headers.c: Removed.  The file is no longer relevant, now that no
3997         special handling of headers is done by the rbuf code.  Moved
3998         portions to http.c.
3999
4000 2003-11-21  Hrvoje Niksic  <hniksic@xemacs.org>
4001
4002         * rbuf.c: Removed.
4003
4004         * ftp-basic.c (ftp_response): Use fd_read_line.  No longer use
4005         struct rbuf.  Updated all callers.
4006
4007         * http.c (gethttp): Use fd_read_head to read all the headers in
4008         one go.
4009         (next_header): New function.
4010
4011         * retr.c (fd_read_line): New function: reads a line from FD,
4012         leaving the rest of the data unread.
4013         (fd_read_head): New function.
4014
4015         * connect.c (fd_peek): New function, implements peeking.
4016         (poll_internal): New function.
4017         (fd_read): Use it.
4018         (fd_write): Ditto.
4019         (fd_peek): Ditto.
4020         (fd_register_transport): Allow registering a "peeker" callback.
4021
4022 2003-11-20  Hrvoje Niksic  <hniksic@xemacs.org>
4023
4024         * connect.c: Renamed xread/xwrite/xclose to
4025         fd_read/fd_write/fd_close.  The "x" prefix is not appropriate
4026         because the semantics have diverged from read/write/close too
4027         significantly.  Updated all callers.
4028
4029 2003-11-20  Hrvoje Niksic  <hniksic@xemacs.org>
4030
4031         * connect.c (sock_write): It's not necessary to initialize RES.
4032
4033 2003-11-19  Hrvoje Niksic  <hniksic@xemacs.org>
4034
4035         * main.c (main): Don't reference opt.ipv4_only and opt.ipv6_only
4036         if IPv6 is disabled.
4037
4038 2003-11-19  Hrvoje Niksic  <hniksic@xemacs.org>
4039
4040         * connect.c (socket_has_inet6): Only compile it if IPv6 is enabled
4041         and AI_ADDRCONFIG is missing.
4042
4043 2003-11-18  Hrvoje Niksic  <hniksic@xemacs.org>
4044
4045         * gen_sslfunc.c (ssl_init_prng): Warn the user when using a weak
4046         random seed.
4047
4048 2003-11-18  Hrvoje Niksic  <hniksic@xemacs.org>
4049
4050         * host.c (address_list_contains): Renamed address_list_find to
4051         address_list_contains because its result is boolean.
4052
4053 2003-11-18  Hrvoje Niksic  <hniksic@xemacs.org>
4054
4055         * connect.c (select_fd): Return 1 if select is not available.
4056
4057 2003-11-17  Hrvoje Niksic  <hniksic@xemacs.org>
4058
4059         * connect.c (connect_to_host): Don't reference address list after
4060         releasing it.
4061
4062 2003-11-17  Hrvoje Niksic  <hniksic@xemacs.org>
4063
4064         * main.c (print_help): Fix alignment of FTP options output.
4065
4066 2003-11-17  Hrvoje Niksic  <hniksic@xemacs.org>
4067
4068         * host.c (lookup_host): Check for the ability to create IPv6
4069         sockets here.
4070
4071         * init.c (defaults): Don't auto-set --inet4-only on IPv6-less
4072         systems.
4073
4074 2003-11-16  Hrvoje Niksic  <hniksic@xemacs.org>
4075
4076         * main.c (print_help): Fix typo in `-O' help message.  Fix docs of
4077         -Y/--proxy.  Fix docs of `--cookies' and `--glob'.  Improve docs
4078         of --convert-links.  Fix docs of SSL options.
4079
4080 2003-11-16  Hrvoje Niksic  <hniksic@xemacs.org>
4081
4082         * ftp-basic.c: Don't include <arpa/inet.h> and others because
4083         they're no longer needed.
4084
4085 2003-11-16  Hrvoje Niksic  <hniksic@xemacs.org>
4086
4087         * main.c (main): Don't allow setting of both opt.ipv4_only and
4088         opt.ipv6_only.
4089
4090         * init.c (defaults): Mark opt.ipv4_only specially when set
4091         automatically.
4092
4093 2003-11-15  Hrvoje Niksic  <hniksic@xemacs.org>
4094
4095         * host.c (lookup_host): Use AI_ADDRCONFIG only if the family is
4096         unspecified.  This ensures that specifying `--no-inet4' on systems
4097         where IPv6 resolves, but doesn't work behaves the same regardless
4098         of the availability of AI_ADDRCONFIG.
4099
4100 2003-11-15  Hrvoje Niksic  <hniksic@xemacs.org>
4101
4102         * host.c: Don't refer to the now-removed function
4103         forget_host_lookup in the documentation of lookup_host.
4104
4105 2003-11-15  Hrvoje Niksic  <hniksic@xemacs.org>
4106
4107         * http.c (persistent_available_p): Correctly specify the endpoint
4108         argument to socket_ip_address.
4109         (gethttp): When printing the "reusing connection to..." message,
4110         specify the host name of the reused connection, not the current
4111         host name.  That makes more sense because it provides a useful
4112         piece of information -- we know to which host we're supposed to
4113         connect anyway!
4114
4115 2003-11-15  Hrvoje Niksic  <hniksic@xemacs.org>
4116
4117         * init.c: Make sure the options are in alphabetic order!
4118
4119         * host.c (lookup_host): Merge lookup_host_passive and lookup_host
4120         after all -- having both would result in some code duplication.
4121         (lookup_host): Set hints.ai_family to AF_INET if ipv4_only is
4122         requested.  Likewise, set it to AF_INET6 for ipv6_only.  Specify
4123         AI_ADDRCONFIG where available.
4124         (lookup_host): New flag LH_REFRESH that specifies that a cached
4125         entry for HOST should be refreshed.
4126         (cache_query): New function.
4127         (cache_store): Ditto.
4128         (cache_remove): Ditto.
4129         (forget_host_lookup): No longer necessary, replaced with static
4130         function cache_remove.
4131
4132 2003-11-14  Hrvoje Niksic  <hniksic@xemacs.org>
4133
4134         * main.c: Enable -4 and -6 only if IPv6 is enabled.
4135
4136 2003-11-14  Hrvoje Niksic  <hniksic@xemacs.org>
4137
4138         * connect.c (register_transport): Renamed from register_extended.
4139         Explain the intended usage.
4140
4141 2003-11-14  Hrvoje Niksic  <hniksic@xemacs.org>
4142
4143         * url.c (uri_merge): Merging "foo" and "bar" should result in
4144         "bar", not in "foo/bar".
4145         (path_simplify): Don't remove empty path elements; don't
4146         special-case leading slash.
4147         (path_simplify): Don't swallow ".."'s at the beginning of string.
4148         E.g. simplify "foo/../../bar" as "../bar", not as "bar".
4149         (append_uri_pathel): Defang ".." path element upon encountering
4150         it.
4151
4152 2003-11-13  Hrvoje Niksic  <hniksic@xemacs.org>
4153
4154         * http.c (persistent_available_p): Don't attempt to talk to two
4155         different SSL sites over the same secure connection.
4156
4157 2003-11-13  Hrvoje Niksic  <hniksic@xemacs.org>
4158
4159         * http.c (gethttp): Ditto.
4160
4161         * ftp.c (getftp): Use retryable_socket_connect_error instead of
4162         CONNECT_ERROR.
4163
4164         * wget.h (CONNECT_ERROR): Removed.
4165
4166         * connect.c (retryable_socket_connect_error): New function instead
4167         of unsupported_socket_family_error.
4168
4169 2003-11-13  Hrvoje Niksic  <hniksic@xemacs.org>
4170
4171         * wget.h (CONNECT_ERROR): Use it.
4172
4173         * connect.c (unsupported_socket_family_error): New function.
4174
4175 2003-11-13  Hrvoje Niksic  <hniksic@xemacs.org>
4176
4177         * connect.c (bind_local): Renamed bindport to bind_local; return
4178         the socket directly.  Updated callers.
4179         (accept_connection): Renamed acceptport to accept_connection;
4180         return the created socket directly.  Updated callers.
4181
4182 2003-11-13  Hrvoje Niksic  <hniksic@xemacs.org>
4183
4184         * init.c (defaults): Turn on opt.ipv4_only if we're compiling with
4185         IPv6, and AI_ADDRINFO is not available, and AF_INET6 sockets can't
4186         be created.
4187
4188 2003-11-13  Hrvoje Niksic  <hniksic@xemacs.org>
4189
4190         * host.c (lookup_host): Document the fact that the addresses are
4191         returned in order.
4192
4193 2003-11-12  Hrvoje Niksic  <hniksic@xemacs.org>
4194
4195         * utils.c: Use limits.h only where available.
4196
4197         * hash.c: Use INVALID_PTR and INVALID_PTR_BYTE.  Include limits.h.
4198
4199 2003-11-11  Hrvoje Niksic  <hniksic@xemacs.org>
4200
4201         * main.c: Added options --inet4-only and --inet6-only.
4202
4203 2003-11-11  Hrvoje Niksic  <hniksic@xemacs.org>
4204
4205         * host.c (host_errstr): Use the more standard message "Unknown
4206         host".
4207
4208 2003-11-10  Hrvoje Niksic  <hniksic@xemacs.org>
4209
4210         * connect.c (connect_to_host): Use that flag to decide whether to
4211         re-resolve the host name.
4212
4213         * host.c (struct address_list): Added a flag that maintains
4214         whether the connection worked at some point.
4215
4216 2003-11-10  Hrvoje Niksic  <hniksic@xemacs.org>
4217
4218         * host.c (lookup_host): Special-case the numeric addresses only in
4219         the non-IPv6 case.
4220
4221 2003-11-10  Hrvoje Niksic  <hniksic@xemacs.org>
4222
4223         * connect.c (resolve_bind_address): Call lookup_host_passive.
4224         Make sure that opt.bind_address is resolved only once.
4225
4226         * host.c (lookup_host_passive): New function, handles "passive"
4227         lookups.
4228         (lookup_host): Remove the passive flags.  Remove the
4229         family-related flags -- use ip_default_family instead.
4230
4231 2003-11-09  Hrvoje Niksic  <hniksic@xemacs.org>
4232
4233         * html-url.c: Get URLs from <object data="...">.
4234
4235 2003-11-09  Hrvoje Niksic  <hniksic@xemacs.org>
4236
4237         * main.c (option_data): Specify the command to use for --mirror.
4238
4239 2003-11-08  Hrvoje Niksic  <hniksic@xemacs.org>
4240
4241         * cookies.c (cookie_handle_set_cookie): Specify exact match for
4242         unspecified domains.
4243
4244 2003-11-08  Hrvoje Niksic  <hniksic@xemacs.org>
4245
4246         * main.c (main): Removed one-letter options `-C', `-g', `-G', and
4247         `-s'.
4248
4249 2003-11-08  Hrvoje Niksic  <hniksic@xemacs.org>
4250
4251         * main.c (main): Add --dont-remove-listing for backward
4252         compatibility with previous versions.
4253         (print_help): Fix typo, spotted by Dennis Smit.
4254
4255 2003-11-08  Gisle Vanem  <giva@bgnett.no>
4256
4257         * ftp-basic.c: Support Windows-2000 ftp servers. Win-2000 *is*
4258         Win-NT 5.0 so calling it ST_WINNT is okay I guess.
4259
4260 2003-11-08  Hrvoje Niksic  <hniksic@xemacs.org>
4261
4262         * progress.c (update_speed_ring): Clear the speed ring when the
4263         download stalls.
4264
4265         * retr.c (get_contents): Specify 0.95s read timeout, so that the
4266         progress gauge can be updated even when data arrives very slowly
4267         or stalls.
4268
4269 2003-11-08  Hrvoje Niksic  <hniksic@xemacs.org>
4270
4271         * utils.c (wtimer_allocate): Bless the use of wtimer_read on a
4272         timer that has merely been allocated because get_contents() does
4273         that.
4274         (wtimer_update): Abort if the timer is not initialized.
4275
4276 2003-11-08  Hrvoje Niksic  <hniksic@xemacs.org>
4277
4278         * retr.c (get_contents): Pass the timer to limit_bandwidth().
4279
4280         * utils.c (wtimer_update): New function instead of wget_elapsed;
4281         just update the timer, but don't return anything.
4282         (wtimer_read): Read and return the last known value of the timer.
4283
4284 2003-11-08  Hrvoje Niksic  <hniksic@xemacs.org>
4285
4286         * http.c (persistent_available_p): Instead of matching all the
4287         addresses of HOST and last host, determine the peer's IP address
4288         with socket_ip_address and see if that address is one of those
4289         HOST resolves to.
4290
4291         * host.c (address_list_match_all): Removed.
4292         (address_list_find): New function, finds an IP address in the
4293         address list.
4294
4295         * ftp.c (ftp_do_pasv): Get the peer's address here, and pass it to
4296         ftp_epsv so it doesn't need to call getpeername.
4297
4298         * ftp-basic.c (ftp_port): Use socket_ip_address instead of
4299         getpeername.
4300         (ftp_lprt): Ditto.
4301
4302         * connect.c (socket_ip_address): Replaces conaddr, generalized to
4303         either get peer's or local address.
4304         (sockaddr_get_data): Made local to this file.
4305
4306 2003-11-08  Hrvoje Niksic  <hniksic@xemacs.org>
4307
4308         * hash.c (HASH_POSITION): Explicitly accept the hash function.
4309         (grow_hash_table): Extract ht->hash_function outside the loop.
4310         (hash_table_remove): Ditto.
4311         (hash_table_clear): Fill entries with 0xff to clear them.
4312         (hash_table_remove): Mark entries as deleted with the correct
4313         marker.
4314
4315 2003-11-08  Hrvoje Niksic  <hniksic@xemacs.org>
4316
4317         * http.c (persistent_available_p): No reason for the host lookup
4318         to be silent -- it's a lookup like any other.
4319
4320 2003-11-08  Hrvoje Niksic  <hniksic@xemacs.org>
4321
4322         * connect.c (register_extended): Check that fd >= 0.
4323
4324 2003-11-07  Hrvoje Niksic  <hniksic@xemacs.org>
4325
4326         * connect.c (LAZY_RETRIEVE_INFO): Set LAST_INFO.
4327
4328 2003-11-07  Hrvoje Niksic  <hniksic@xemacs.org>
4329
4330         * hash.c (NON_EMPTY): Use the all-bit-set value as the marker that
4331         the field is empty.  This allows NULL pointer and 0 value to be
4332         used as keys, which is necessary for the connect.c code to work
4333         when fd==0.
4334         (hash_table_new): Fill mappings with 0xff.
4335         (grow_hash_table): Ditto.
4336
4337 2003-11-07  Hrvoje Niksic  <hniksic@xemacs.org>
4338
4339         * url.c (url_parse): Allow empty ports.
4340
4341 2003-11-07  Hrvoje Niksic  <hniksic@xemacs.org>
4342
4343         * main.c (print_help): Break the help string into multiple chunks.
4344         (cmdline_option): New option handler OPT_FUNCALL.  Generalized
4345         HANDLE_CMD to generic DATA.
4346         (option_data): Use the new OPT_FUNCALL feature.
4347
4348 2003-11-06  Hrvoje Niksic  <hniksic@xemacs.org>
4349
4350         * log.h: Declare log_init, log_close, and
4351         log_request_redirect_output here.
4352
4353 2003-11-05  Dennis Smit  <ds@nerds-incorporated.org>
4354
4355         * main.c: (main): added --preserve-permissions option.
4356
4357         * ftp.c (ftp_retrieve_list): added support for
4358         --preserve-permissions option.
4359
4360         * init.c: added support for --preserve-permission option.
4361
4362         * option.h: added support for --preserve-permission option.
4363
4364 2003-11-06  Hrvoje Niksic  <hniksic@xemacs.org>
4365
4366         * main.c (init_switches): New function.  Convert option_data to
4367         long_options and short_options, which can be fed to getopt_long.
4368         (main): Execute command-line options by consulting option_data.
4369
4370 2003-11-06  Hrvoje Niksic  <hniksic@xemacs.org>
4371
4372         * gen_sslfunc.c (ssl_read): Implement a more correct check for
4373         EINTR.
4374         (ssl_write): Ditto.
4375         (init_ssl): Use a global SSL context.
4376
4377 2003-11-06  Hrvoje Niksic  <hniksic@xemacs.org>
4378
4379         * connect.c (xclose): Free INFO even if it doesn't provide a
4380         closer.
4381
4382 2003-11-06  Hrvoje Niksic  <hniksic@xemacs.org>
4383
4384         * connect.c: Updated all callers of
4385         iread/ssl_iread/iwrite/ssl_iwrite to use xread and xwrite instead.
4386
4387         * rbuf.h (struct rbuf): Removed the SSL member because SSL is
4388         handled automatically by xread.
4389
4390         * hash.c (ptrhash): Made private.
4391         (ptrcmp): Ditto.
4392         (inthash): Removed.
4393
4394         * connect.c (select_fd): Don't set errno, leave it to the caller.
4395
4396         * gen_sslfunc.c (connect_ssl): Use register_extended to register
4397         SSL callbacks for communication with SSL-enabled endpoints.
4398         (ssl_read): New function.
4399         (ssl_write): Ditto.
4400         (ssl_poll): Ditto.
4401         (ssl_close): Ditto.
4402
4403         * connect.c (register_extended): New function -- register
4404         callbacks for basic socket operations.
4405         (xread): Ditto.
4406         (xwrite): Ditto.
4407         (xclose): Ditto.
4408         (sock_read): New function, default implementation for reading.
4409         (sock_write): Ditto for writing.
4410         (sock_poll): Ditto for polling.
4411         (sock_close): Ditto for closing.
4412
4413 2003-11-05  Hrvoje Niksic  <hniksic@xemacs.org>
4414
4415         * connect.c (bindport): Fix compilation under pre-C99 compilers.
4416
4417 2003-11-05  Hrvoje Niksic  <hniksic@xemacs.org>
4418
4419         * connect.c (connect_to_ip): More compact error checking.
4420         (bindport): Don't treat failed setsockopt as a fatal error.
4421
4422 2003-11-05  Hrvoje Niksic  <hniksic@xemacs.org>
4423
4424         * connect.c (resolve_bind_address): Use a more accurate error
4425         message -- we're not binding to ANY, we're disabling bind
4426         altogether.
4427
4428 2003-11-05  Hrvoje Niksic  <hniksic@xemacs.org>
4429
4430         * cookies.c (save_cookies_mapper): Respect the setting of
4431         keep-session-cookies.
4432         (cookie_jar_load): Import session cookies.
4433         Based on code submitted by Nicolas Schodet.
4434
4435         * utils.c (datetime_str): Use information in TM when it's
4436         non-NULL.
4437
4438         * main.c (main): New option `--keep-session-cookies'.
4439
4440 2003-11-04  Hrvoje Niksic  <hniksic@xemacs.org>
4441
4442         * Makefile.in (realclean): Delete config.h.in.
4443
4444 2003-11-04  Hrvoje Niksic  <hniksic@xemacs.org>
4445
4446         * config-post.h: New file, included from now autogenerated
4447         config.h.in.
4448
4449 2003-11-04  Hrvoje Niksic  <hniksic@xemacs.org>
4450
4451         * progress.c (progress_handle_sigwinch): Don't call
4452         determine_screen_width() from the signal handler.  Instead, just
4453         set a volatile variable.
4454         (bar_create): Check whether SIGWINCH was received.
4455         (bar_update): Ditto.
4456
4457         * sysdep.h: Define SYSTEM_FNMATCH only if HAVE_FNMATCH_H is true.
4458
4459 2003-11-03  Hrvoje Niksic  <hniksic@xemacs.org>
4460
4461         * utils.c (xsleep): New function.  Uses nanosleep where available,
4462         resuming sleeps interrupted by signals.  Updated callers of sleep
4463         and usleep to use xsleep.
4464
4465 2003-11-03  Hrvoje Niksic  <hniksic@xemacs.org>
4466
4467         * ftp-basic.c (ftp_login): Remove shadowing (and bogus)
4468         declaration of SEED.
4469
4470 2003-11-03  Hrvoje Niksic  <hniksic@xemacs.org>
4471
4472         * log.c (logvprintf): Documented better.  Renamed to
4473         log_vprintf_internal to avoid confusion with the public API
4474         functions logprintf and logputs.
4475
4476 2003-11-03  Hrvoje Niksic  <hniksic@xemacs.org>
4477
4478         * wget.h (N_): Don't parenthesize argument.
4479
4480 2003-11-03  Hrvoje Niksic  <hniksic@xemacs.org>
4481
4482         * host.h (ADDRESS_IPV4_DATA): Don't take the address of in.s_addr
4483         because that doesn't work on machines that define it as bitfield.
4484
4485 2003-11-03  Hrvoje Niksic  <hniksic@xemacs.org>
4486
4487         * connect.c (select_fd): Generalize the third argument into WAIT,
4488         so that the caller can request waiting for both read and write.
4489         Updated callers.
4490
4491 2003-11-02  Hrvoje Niksic  <hniksic@xemacs.org>
4492
4493         * html-url.c (cleanup_html_url): Destroy the hash tables, don't
4494         just call free on them.
4495         (init_interesting): Use hash_table_put instead of string_set_add
4496         because we don't need the strdup that the latter function
4497         performs.
4498
4499         * init.c (cleanup): Don't pass NULL to cookie_jar_delete.
4500
4501         * xmalloc.c (xfree_real): Abort when passed a NULL pointer.
4502         (xfree_debug): Print at the file and line of the offending call to
4503         free.
4504
4505 2003-11-02  Hrvoje Niksic  <hniksic@xemacs.org>
4506
4507         * wget.h: Retired the `boolean' type.  Moved the DEFAULT_LOGFILE
4508         define to log.h.  Moved the INFINITE_RECURSION define to recur.h.
4509
4510         * xmalloc.h: Renamed FREE_MAYBE to xfree_null and moved the
4511         definition from wget.h to xmalloc.h.
4512
4513 2003-11-02  Hrvoje Niksic  <hniksic@xemacs.org>
4514
4515         * html-parse.c (decode_entity): New function; split the decoding
4516         of entities here.
4517         (convert_and_copy): Use it to decode entities.
4518         (decode_entity): Handle the &apos entity.
4519         (decode_entity): Don't decode Latin 1 numeric entities.  Don't
4520         decode &#0.
4521
4522 2003-11-01  Hrvoje Niksic  <hniksic@xemacs.org>
4523
4524         * ftp-opie.c (calculate_skey_response): Use uint32_t instead of
4525         `unsigned long' for the cheksum array.  Document the function.
4526
4527 2003-11-01  Hrvoje Niksic  <hniksic@xemacs.org>
4528
4529         * connect.c (acceptport): Don't call select_fd when timeout is not
4530         requested.
4531
4532 2003-11-01  Hrvoje Niksic  <hniksic@xemacs.org>
4533
4534         * host.c: Removed the ip_default_family global variable.
4535
4536         * host.c (lookup_host): Document the function.  Fixed declaration
4537         of VEC.
4538
4539 2003-10-31  Hrvoje Niksic  <hniksic@xemacs.org>
4540
4541         * various: Use new macros xnew, xnew0, xnew_array, and xnew0_array
4542         in various places.
4543
4544 2003-10-31  Hrvoje Niksic  <hniksic@xemacs.org>
4545
4546         * wget.h: Move declarations of malloc and logging code to
4547         xmalloc.h and log.h respectively to unclutter this file.
4548         (STRDUP_ALLOCA): Made it side-effect free.
4549
4550         * xmalloc.h: New files.  Define macros xnew, xnew0, xnew_array,
4551         and xnew0_array.
4552
4553         * xmalloc.c: New file.  Move the xmalloc routines here.
4554
4555 2003-10-31  Hrvoje Niksic  <hniksic@xemacs.org>
4556
4557         * connect.c (sockaddr_set_data): Remove the broken code that
4558         checked for NULL address.
4559
4560 2003-10-31  Hrvoje Niksic  <hniksic@xemacs.org>
4561
4562         * host.c (address_list_from_single): Removed.
4563         (address_list_from_ipv4_addresses): Renamed from
4564         address_list_from_vector.
4565
4566 2003-10-31  Hrvoje Niksic  <hniksic@xemacs.org>
4567
4568         * sysdep.h (CLOSE): Don't call close on file descriptors less than
4569         0, i.e. on uncreated sockets.
4570
4571         * connect.c (resolve_bind_address): Work on struct sockaddr
4572         directly.
4573         (connect_to_host): Replacement for connect_to_many.  Resolve HOST
4574         and connect to any of its addresses.  If we can't connect and the
4575         host name lookup was cached, try to resolve it again.  This should
4576         fix problems with hosts behind dynamic DNS.  Updated all callers.
4577         (connect_to_ip): Replacement for connect_to_one.  Removed SILENT;
4578         added the argument PRINT instead.  Updated all callers.
4579         (set_connection_host_name): Removed.
4580
4581         * host.c (address_list_address_at): New function instead of
4582         address_list_copy_one. It returns a pointer to ip_address *, so
4583         it's not necessary to copy the data.
4584         (address_list_cached_p): New function.
4585         (forget_host_lookup): Ditto.
4586
4587         * connect.c: Got rid of the MSOCK global variable.  Made bindport
4588         return the local socket it creates.  Added a new argument to
4589         acceptport, the socket to call accept on.  Updated callers.
4590         (closeport): Removed.
4591
4592         * connect.c: Moved the sockaddr code from host.c to this file,
4593         because most of that stuff is used for connecting, and has nothing
4594         to do with host names anyway.
4595         (sockaddr_set_data, sockaddr_get_data): New functions, replace the
4596         old sockaddr_set_address, sockaddr_set_port, sockaddr_get_address,
4597         and sockaddr_get_port.
4598
4599 2003-10-30  Hrvoje Niksic  <hniksic@xemacs.org>
4600
4601         * sysdep.h: Use `S >= 8' rather than `S == 8' when looking for
4602         large integers.
4603
4604 2003-10-30  Hrvoje Niksic  <hniksic@xemacs.org>
4605
4606         * url.c (append_uri_pathel): New argument ESCAPED_P that says
4607         whether [B, E) is to be treated as URL-escaped or not.  If
4608         ESCAPED_P is false, don't unescape the region.
4609         (url_file_name): u->file is not URL-escaped.
4610
4611 2003-10-30  Hrvoje Niksic  <hniksic@xemacs.org>
4612
4613         * retr.c (retrieve_from_file): Use retrieve_tree for
4614         page-requisites.
4615
4616         * main.c (main): Don't define opt.recursive when -p is used.
4617         Instead, make sure that recursion is used for HTTP in that case.
4618
4619 2003-10-29  Hrvoje Niksic  <hniksic@xemacs.org>
4620
4621         * host.h: Defined accessors for elements of ip_address.  Updated
4622         all callers.
4623         (address_list_match_all): Use memcmp in the non-IPv6 case.
4624
4625         * wget.h (CONNECT_ERROR): Don't retry connecting if connect()
4626         returned EAFNOSUPPORT.
4627
4628 2003-10-27  Mauro Tortonesi <mauro@deepspace6.net>
4629
4630         * connect.h: changed bindport prototype and added the related
4631         BIND_ON_IPV4_ONLY and BIND_ON_IPV6_ONLY flags.
4632
4633         * connect.c: changed bindport and resolve_bind_address to allow
4634         protocol-version specific DNS resolution. modified conaddr,
4635         acceptport and connect_to_one to make use of struct
4636         sockaddr_storage and of the new ip_address structure.
4637
4638         * ftp-basic.c: added LPRT/LPSV (RFC1639) support, refactored
4639         PORT/PASV (RFC959) and EPRT/EPSV (RFC2428) support code.
4640
4641         * ftp.c: added the ftp_do_port and ftp_do_pasv functions to
4642         handle FTP over IPv6.
4643
4644         * ftp.h: changed prototype of ftp_epsv and added prototypes for
4645         ftp_lpsv, ftp_lprt and ftp_eprt.
4646
4647         * host.c: renamed the
4648         wget_sockaddr_set_address and wget_sockaddr_get_addr, and
4649         wget_sockaddr_{s,g}et_port couples to sockaddr_{s,g}et_address and
4650         sockaddr_{g,s}et_port respectively.  changed
4651         address_list_match_all, address_list_from_addrinfo sockaddr_len,
4652         pretty_print_address, lookup_host, sockaddr_{s,g}et_address and
4653         sockaddr_{g,s}et_port to make use of struct sockaddr_storage and
4654         of the new ip_address structure.  removed map_ipv4_to_ip and
4655         map_ip_to_ipv4.
4656
4657         * host.h: redefined structure ip_address and removed structure
4658         wget_sockaddr.
4659
4660 2003-10-26  Hrvoje Niksic  <hniksic@xemacs.org>
4661
4662         * sysdep.h: Include inttypes.h where available.
4663
4664         * host.c: Switch from u_int32_t to uint32_t.
4665
4666 2003-10-26  Hrvoje Niksic  <hniksic@xemacs.org>
4667
4668         * netrc.c (parse_netrc): Reset the QUOTE flag after the closing
4669         quote.
4670
4671 2003-10-25  Hrvoje Niksic  <hniksic@xemacs.org>
4672
4673         * url.c (is_valid_ipv6_address): Reformat to GNU coding style.
4674         Use enums for NS_IN* constants.  Use ISXDIGIT.
4675
4676         * convert.c (construct_relative): Document better how the function
4677         works.
4678
4679 2003-10-23  Hrvoje Niksic  <hniksic@xemacs.org>
4680
4681         * config.h.in: Deploy preprocessor magic to avoid Ultrix's
4682         <netdb.h> include <bitypes.h> which defines its own u_int32_t.
4683         Reported by Bernhard Simon.
4684
4685 2003-10-23  Hrvoje Niksic  <hniksic@xemacs.org>
4686
4687         * version.c: Bump version.
4688
4689 2003-10-23  Hrvoje Niksic  <hniksic@xemacs.org>
4690
4691         * url.c: Ditto.
4692
4693         * html-parse.c (advance_declaration): Don't use trailing comma in
4694         enum because older compilers don't support it.
4695
4696         * utils.c: Don't redefine HAVE_SIGSETJMP.
4697
4698 2003-10-16  Hrvoje Niksic  <hniksic@xemacs.org>
4699
4700         * convert.c (construct_relative): Don't handle absolute files
4701         specially -- for example, -P/tmp/foo shouldn't imply that
4702         converted files must refer to "/tmp/foo/..."!
4703
4704 2003-10-15  Hrvoje Niksic  <hniksic@xemacs.org>
4705
4706         * http.c: Consider status 307 a valid redirect.
4707
4708 2003-10-15  Philip Stadermann  <philip.stadermann@credativ.de>
4709
4710         * ftp.c (ftp_retrieve_glob): Correctly loop through the list whose
4711         elements might have been deleted.
4712
4713 2003-10-13  Hrvoje Niksic  <hniksic@xemacs.org>
4714
4715         * html-url.c (tag_handle_meta): Set the Refresh link to expect
4716         HTML.
4717         (append_one_url): Renamed to append_url.
4718
4719 2003-10-13  Hrvoje Niksic  <hniksic@xemacs.org>
4720
4721         * sysdep.h: Only define u_int32_t.
4722
4723 2003-10-11  Hrvoje Niksic  <hniksic@xemacs.org>
4724
4725         * utils.c (large_int_to_string): Use snprintf() to print the
4726         number.  This will work even on systems where libc doesn't
4727         understand %lld, but the compiler does, because it will use our
4728         snprintf replacement.
4729
4730         * init.c (parse_bytes_helper): New function.
4731         (cmd_bytes): Use it to parse bytes, but cast the result to long.
4732         (cmd_bytes_large): Ditto, but store the result to LARGE_INT.  Used
4733         for --quota so that --quota=10G works even on machines without
4734         long long.
4735
4736         * options.h (struct options): Declare quota as LARGE_INT.
4737
4738         * retr.c (downloaded_exceeds_quota): Removed.
4739         (downloaded_increase): Ditto.
4740         (total_downloaded_bytes): New variable, replaces opt.downloaded,
4741         which was the wrong place for it anyway.  Updated callers of
4742         downloaded_exceeds_quota and downloaded_increase to check this
4743         variable directly.
4744
4745         * sysdep.h: Get rid of VERY_LONG_TYPE.  Use LARGE_INT for the same
4746         purpose, defined as `long', `long long' or `double', depending on
4747         size of long and whether long long is available.
4748
4749 2003-10-11  Hrvoje Niksic  <hniksic@xemacs.org>
4750
4751         * sysdep.h: Also check size of short for int32_t.
4752
4753 2003-10-11  Hrvoje Niksic  <hniksic@xemacs.org>
4754
4755         * host.c (lookup_host): Use u_int32_t to store the result of
4756         inet_addr().  That removes the need for offset fiddling, caring
4757         about endian-ness, etc.
4758
4759         * sysdep.h: Define int32_t and u_int32_t if not available.
4760
4761 2003-10-11  Hrvoje Niksic  <hniksic@xemacs.org>
4762
4763         * ftp-basic.c (ftp_epsv): Use socklen_t * as the third argument to
4764         getpeername.
4765
4766         * config.h.in: Define socklen_t stub.
4767
4768         * host.c (sockaddr_len): Return socklen_t.
4769
4770         * connect.c (conaddr): Use socklen_t as the third argument to
4771         accept, getsockname, and connect.
4772
4773 2003-10-10  Hrvoje Niksic  <hniksic@xemacs.org>
4774
4775         * recur.c (retrieve_tree): Don't descend into documents that are
4776         not expected to contain HTML, regardless of their content-type.
4777
4778         * html-url.c (tag_url_attributes): Record which attributes are
4779         supposed to yield HTML links that can be followed.
4780         (tag_find_urls): Propagate that information to the caller through
4781         struct urlpos.
4782
4783 2003-10-10  Hrvoje Niksic  <hniksic@xemacs.org>
4784
4785         * hash.c (find_mapping): Return the next available mapping when
4786         the key is not found, not NULL.
4787         (hash_table_put): Use find_mapping to find the storage for the new
4788         data.
4789         (hash_table_put): Grow the table before exceeding maximum
4790         fullness, not afterwards.
4791
4792 2003-10-10  Hrvoje Niksic  <hniksic@xemacs.org>
4793
4794         * hash.c (hash_table_new): Slightly change the meaning of the
4795         first parameter.  Instead of being the minimum initial size, it is
4796         now the minimum number of items that the hash table can take
4797         without needing to resize.
4798
4799 2003-10-09  Hrvoje Niksic  <hniksic@xemacs.org>
4800
4801         * html-url.c (init_interesting): Initialize interesting_tags and
4802         interesting_attributes as hash tables.  This simplifies the code
4803         immensely because hash tables handle allocation and remove
4804         duplicates automatically.
4805         (find_tag): Removed.
4806         (collect_tags_mapper): Instead of calling find_tag, simply get the
4807         entry from interesting_tags hash table, which is both simpler and
4808         faster.
4809
4810 2003-10-09  Hrvoje Niksic  <hniksic@xemacs.org>
4811
4812         * hash.c (hash_table_get): Declare hash-table argument as const.
4813         (find_mapping): Ditto.
4814         (hash_table_get_pair): Ditto.
4815         (hash_table_contains): Ditto.
4816         (hash_table_count): Ditto.
4817
4818 2003-10-08  Hrvoje Niksic  <hniksic@xemacs.org>
4819
4820         * html-url.c (get_urls_html): Parse the appropriate flags to
4821         html-parse.c.
4822
4823         * html-parse.c (map_html_tags): Accept FLAGS from the caller
4824         instead of examining OPT.
4825
4826 2003-10-08  Hrvoje Niksic  <hniksic@xemacs.org>
4827
4828         * html-url.c (find_tag): Switch to binary search.
4829
4830 2003-10-08  Hrvoje Niksic  <hniksic@xemacs.org>
4831
4832         * main.c (print_help): Fix typo; stured -> stored.
4833
4834 2003-10-08  Hrvoje Niksic  <hniksic@xemacs.org>
4835
4836         * getopt.c: Add definitions of getopt_long and getopt_long_only.
4837
4838 2003-10-08  Hrvoje Niksic  <hniksic@xemacs.org>
4839
4840         * config.h.in: Renamed DEBUG to ENABLE_DEBUG.  ENABLE_DEBUG is, I
4841         think, a better name, because it implies that debugging output is
4842         merely possible, not "on by default", as might be construed from
4843         just DEBUG.
4844
4845 2003-10-08  Hrvoje Niksic  <hniksic@xemacs.org>
4846
4847         * ftp.c (has_insecure_name_p): Define it here.
4848
4849         * utils.c (has_wildcards_p): Define it here.
4850
4851         * sysdep.h: Declare fnmatch-related macros here, if not using
4852         system fnmatch().  Update .c files to not declare fnmatch.h
4853         directly.
4854
4855         * cmpt.c (fnmatch): Moved here.  Use it only under non-GNU libc.
4856
4857 2003-10-08  Hrvoje Niksic  <hniksic@xemacs.org>
4858
4859         * getopt.c: Newer version, imported from Free libit.
4860
4861 2003-10-07  Hrvoje Niksic  <hniksic@xemacs.org>
4862
4863         * cookies.c (struct cookie): Remove unused backpointer to cookie
4864         jar.
4865
4866 2003-10-07  Hrvoje Niksic  <hniksic@xemacs.org>
4867
4868         * cmpt.c (memmove): Comment out, since it's no longer used.
4869
4870         * cookies.c (cookie_jar_generate_cookie_header): Allocate room for
4871         chains in one pass.
4872         (find_chains_of_host): Assume that the caller has allocated DEST
4873         to be sufficiently large to take all the data.
4874         (eliminate_dups): Run through the array and eliminate dups on the
4875         fly instead of using memmove.
4876         (cookie_jar_process_set_cookie): Free cookie->domain before
4877         re-setting it.
4878
4879 2003-10-05  Gisle Vanem  <giva@bgnett.no>
4880
4881         * mswindows.c (set_sleep_mode): Fix type of
4882         _SetThreadExecutionState.
4883
4884 2003-10-05  Hrvoje Niksic  <hniksic@xemacs.org>
4885
4886         * utils.c (file_size): Return -1 if fopen() returns NULL.  Prior
4887         to this patch, wget --post-file=nosuchfile dumped core.
4888
4889 2003-10-04  Gisle Vanem  <giva@bgnett.no>
4890
4891         * mswindows.c (run_with_timeout): Use WaitForSingleObject to wait
4892         for thread termination.
4893
4894 2003-10-04  Hrvoje Niksic  <hniksic@xemacs.org>
4895
4896         * log.c: Use `...' in function definitions; ansi2knr will convert
4897         them to va_dcl.  This allowed removal of the ugly VA_START_1 and
4898         VA_START_2 macros.
4899
4900 2003-10-03  Gisle Vanem  <giva@bgnett.no>
4901
4902         * connect.c: And don't include them here.
4903
4904         * mswindows.h: Include winsock headers here.
4905
4906 2003-10-03  Hrvoje Niksic  <hniksic@xemacs.org>
4907
4908         * html-parse.c (convert_and_copy): Move variable declarations
4909         before statements.
4910
4911 2003-10-02  Gisle Vanem  <giva@bgnett.no>
4912         
4913         * mswindows.c (run_with_timeout): For Windows: Run the 'fun' in a
4914         thread via a helper function. Continually query the thread's
4915         exit-code until finished or timed out.
4916
4917 2003-10-02  Hrvoje Niksic  <hniksic@xemacs.org>
4918
4919         * wget.h (XMALLOC_ARRAY): Removed.
4920         (ALLOCA_ARRAY): Ditto.
4921
4922         * html-parse.c: Renamed alloca_p to resized.
4923         (GROW_ARRAY): Renamed DO_REALLOC_FROM_ALLOCA to GROW_ARRAY and
4924         returned it to html-parse.c, since nothing else was using it.
4925
4926 2003-10-02  Hrvoje Niksic  <hniksic@xemacs.org>
4927
4928         * retr.c (retrieve_url): Initialize DUMMY storage for DT.  Caught
4929         by valgrind.
4930
4931 2003-10-02  Hrvoje Niksic  <hniksic@xemacs.org>
4932
4933         * html-parse.c (convert_and_copy): Handle numeric entities in
4934         hexadecimal, &#xHH.
4935         (convert_and_copy): Copy the contents directly to the pool without
4936         a stack-allocated intermediary.
4937
4938 2003-10-02  Hrvoje Niksic  <hniksic@xemacs.org>
4939
4940         * utils.c (alarm_set): New function; use either setitimer or alarm
4941         to set up the alarm.
4942         (alarm_cancel): New function; cancel the alarm set up by
4943         alarm_set.
4944         (run_with_timeout): Use them.
4945
4946 2003-10-01  Hrvoje Niksic  <hniksic@xemacs.org>
4947
4948         * url.c (url_parse): Don't leak memory when a reencoded URL turns
4949         out to be invalid.
4950
4951         * url.c (parse_errors): Mark error messages for translation.
4952         (url_error): Translate error messages returned to the caller.
4953
4954 2003-10-01  Hrvoje Niksic  <hniksic@xemacs.org>
4955
4956         * ftp.c (ftp_loop_internal): Initialize TMRATE to NULL to shut up
4957         the compiler.
4958
4959 2003-09-26  Gisle Vanem  <giva@bgnett.no>
4960
4961         * src/mswindows.c: Added ws_percenttitle() showing progress in the
4962         window titlebar. Called from retr.c. Secured ws_mypath().
4963
4964         * windows/config.h.ms: alloca() prototype not needed.  Removed
4965         "#undef ENABLE_NLS"; should be in Makefile IMHO. Moved
4966         WGET_USE_STDARG from mswindows.h to config.ms.h because of #ifdef
4967         in log.c. (MSVC's vararg.h and stdarg.h are incompatible).
4968
4969 2003-09-29  Aaron Hawley <Aaron.Hawley@uvm.edu>
4970
4971         * ftp.c (getftp): --spider option should now work with FTP
4972         downloads.
4973         (ftp_loop_internal): quiet reports and calculations of downloads
4974         when --spider option set, nor try deleting when --delete-after
4975         also set.
4976         (ftp_loop): --spider will skip HTML-ification of .listing file.
4977
4978 2003-09-26  Gisle Vanem  <giva@bgnett.no>
4979
4980         * mswindows.c (read_registry): Removed.
4981         (set_sleep_mode): New function.
4982         (windows_main_junk): Call it.
4983
4984 2003-09-26  Gisle Vanem  <giva@bgnett.no>
4985
4986         * mswindows.c (read_registry): Fix invocation of registry
4987         functions.
4988
4989         * mswindows.c (read_registry): Condition definitions of sleep and
4990         usleep with not HAVE_SLEEP and HAVE_USLEEP respectively.  Define
4991         HAVE_SLEEP and HAVE_USLEEP under __DMC__.
4992
4993 2003-09-24  Hrvoje Niksic  <hniksic@xemacs.org>
4994
4995         * url.c (url_escape_1): Revert unintentional change to lowercase
4996         xdigit escapes.
4997         (url_escape_dir): Document that this function depends on the
4998         output of url_escape_1.
4999
5000 2003-09-23  Hrvoje Niksic  <hniksic@xemacs.org>
5001
5002         * progress.c (create_image): Print the current ETA if we're done
5003         with the download.
5004         (create_image): Change '-' display char to '+' in the progress bar.
5005
5006         * Makefile.in (clean): Remove .libs.
5007
5008 2003-09-23  Hrvoje Niksic  <hniksic@xemacs.org>
5009
5010         * cookies.c (struct cookie): New flag domain_exact.
5011         (update_cookie_field): Skip leading dot in domain.
5012         (find_matching_chains): Match numeric addresses exactly; don't
5013         needlessly copy HOST to the stack.
5014         (matching_cookie): Added argument HOST.  If cookie->domain_exact
5015         is set, check that HOST is equal to cookie->domain.
5016         (cookie_jar_load): Only use TAB as delimiter.  Document the
5017         meaning of DOMAIN-FLAG.  Skip leading dot in domain.
5018         (cookie_jar_load): Don't ignore DOMAIN-FLAG -- instead, set
5019         domain_exact to true if DOMAIN-FLAG is false.
5020         (save_cookies_mapper): If domain_exact is false, prepend the
5021         domain with dot, like Mozilla does.
5022
5023 2003-09-22  Hrvoje Niksic  <hniksic@xemacs.org>
5024
5025         * progress.c (create_image): Print the initial part of the
5026         download with '-' characters, analogous to how dot progress prints
5027         the initial part with ','.
5028
5029         * hash.c (ptrhash): New function.
5030         (ptrcmp): Ditto.
5031         (hash_table_new): Default to identity hash table.
5032
5033 2003-09-22  Hrvoje Niksic  <hniksic@xemacs.org>
5034
5035         * safe-ctype.h (_sch_test): The cast of BIT to unsigned char was
5036         broken -- _sch_istable bitmasks are 16-bit, not 8-bit!  Cast BIT
5037         to unsigned short instead.
5038
5039 2003-09-22  Hrvoje Niksic  <hniksic@xemacs.org>
5040
5041         * url.c (path_simplify): Instead of calls to memmove, handle "./"
5042         and "../" by advancing pointers.
5043
5044 2003-09-22  Hrvoje Niksic  <hniksic@xemacs.org>
5045
5046         * retr.c (getproxy): Moved from url.c.
5047
5048         * convert.c: Split off link conversion from url.c into separate
5049         file.  Also included the book-keeping stuff from recur.c.
5050
5051 2003-09-21  Hrvoje Niksic  <hniksic@xemacs.org>
5052
5053         * init.c: Improved documentation of functions.
5054         (cmd_boolean): Attempt to make code that tries to avoid calling
5055         strcmp for "speed" a bit more readable.
5056
5057         * init.c (simple_atof): Report error on encountering non-digit,
5058         non-"." character.
5059         (simple_atoi): Replacement for myatoi(), calling interface
5060         compatible with simple_atof.  Updated myatoi's callers.
5061
5062 2003-09-21  Bertrand Demiddelaer  <bert@b3rt.org>
5063
5064         * url.c (path_simplify): Would read two bytes past the end of the
5065         string in the "./" case.
5066
5067 2003-09-21  Matthew J. Mellon  <mellon@tymenet.com>
5068
5069         * http.c (gethttp): Recognize content-type "application/xhtml+xml"
5070         as what Wget considers "text/html".
5071
5072 2003-09-21  Hrvoje Niksic  <hniksic@xemacs.org>
5073
5074         * connect.c (connect_with_timeout): Made timeout type double.
5075
5076         * options.h (struct options): New members read_timeout,
5077         dns_timeout, and connect_timeout.
5078         Use them.
5079
5080 2003-09-21  Hrvoje Niksic  <hniksic@xemacs.org>
5081
5082         * init.c (simple_atof): New function.
5083         (cmd_time): Use it.
5084         (cmd_bytes): Accept things like "1.5k" and such.  Use simple_atof
5085         to parse decimals.
5086
5087         * retr.c (limit_bandwidth): Adjust each sleep by the error of the
5088         previous one.
5089
5090 2003-09-21  Hrvoje Niksic  <hniksic@xemacs.org>
5091
5092         * main.c (main): Use setoptval() for setting the options.  Use
5093         run_command for `-e'.
5094
5095         * init.c (parse_line): Rewritten to return COMIND right away.
5096         Changed linkage to static.
5097         (run_wgetrc): Use the available comind when calling setval, so it
5098         doesn't have to be computed twice.
5099         (setval_internal): New function, runs the command's action without
5100         any error checking.
5101         (setoptval): New function, does what setval used to do, but exits
5102         in case of error.
5103         (run_command): New function.
5104
5105 2003-09-21  Hrvoje Niksic  <hniksic@xemacs.org>
5106
5107         * connect.c (select_fd): Change MAXTIME's type to double.  Handle
5108         its decimal part.
5109
5110         * retr.c (sleep_between_retrievals): In the random-wait case, use
5111         random_float() to wait between 0 and 2*opt.wait seconds.
5112
5113         * utils.c (run_with_timeout): Accept `double' timeouts.  Correctly
5114         handle timeout values in (0, 1) range.
5115         (random_float): New function.
5116
5117         * options.h (struct options): Change the types of wait, waitretry,
5118         and timeout to double.
5119
5120         * init.c (cmd_time): Accept floating point time.
5121
5122 2003-09-20  Hrvoje Niksic  <hniksic@xemacs.org>
5123
5124         * retr.c (get_contents): Cosmetic fixes.
5125
5126 2003-09-20  Hrvoje Niksic  <hniksic@xemacs.org>
5127
5128         * url.c (uri_merge): Get rid of uri_merge_1.
5129         (uri_merge): Merge "foo//", "bar" as "foo//bar", not "foo///bar",
5130         i.e. don't add an extra slash merely because BASE ends with two
5131         slashes.
5132         (parse_credentials): Renamed from parse_uname.  Rewrittern in
5133         standard [beg, end) calling style.
5134         (url_skip_credentials): Renamed from url_skip_uname.  Made static.
5135         (url_skip_credentials): Include # and ; as terminators.  Old code
5136         would mistakenly consider "http://foo.com#hniksic@iskon.hr" to
5137         contain a username.
5138         (url_skip_scheme): Removed because it was unused.
5139         (url_has_scheme): Require "scheme" to be at least one char long.
5140
5141 2003-09-19  Hrvoje Niksic  <hniksic@xemacs.org>
5142
5143         * url.c (url_file_name): Expect NULL dir_prefix.
5144
5145         * init.c (cmd_file): Use a macro to prevent multiple #ifdef
5146         WINDOWS.
5147         (defaults): Set dir_prefix to NULL by default.
5148
5149 2003-09-19  Hrvoje Niksic  <hniksic@xemacs.org>
5150
5151         * safe-ctype.h (_sch_test): Cast BIT to unsigned char, like latest
5152         gcc does.
5153
5154 2003-09-19  Hrvoje Niksic  <hniksic@xemacs.org>
5155
5156         * wget.h (BOUNDED_TO_ALLOCA): Evaluate PLACE only once.
5157         (ARRAY_SIZE): Renamed to countof.  All callers updated.
5158
5159 2003-09-19  Hrvoje Niksic  <hniksic@xemacs.org>
5160
5161         * main.c (main): New option --strict-comments.
5162
5163         * html-parse.c (find_comment_end): New function: simple BM search
5164         for "-->".
5165         (map_html_tags): Use it if looking at a comment and not in strict
5166         comments mode.
5167
5168 2003-09-17  Aurelien Marchand  <artaxerxes@users.sf.net>
5169
5170         * ftp.h: Added OS400 system in enum
5171         * ftp-basic.c: recognize OS400 systems
5172         * ftp.c: don't prepend the CWD if talking to OS400, since it
5173         breaks the change in library
5174
5175 2003-09-18  Hrvoje Niksic  <hniksic@xemacs.org>
5176
5177         * retr.c (get_contents): Pass the correct argument to ssl_iread.
5178
5179 2003-09-18  Hrvoje Niksic  <hniksic@xemacs.org>
5180
5181         * safe-ctype.h: Don't #define ctype.h macros to errors because
5182         that loses when someone #include's ctype.h after safe-ctype.h.
5183
5184 2003-09-17  Hrvoje Niksic  <hniksic@xemacs.org>
5185
5186         * url.c: Undef U, W, C after use.
5187
5188 2003-09-17  Hrvoje Niksic  <hniksic@xemacs.org>
5189
5190         * init.c (cmd_spec_restrict_file_names): Allow the OS setting to
5191         be augmented by ",nocontrol" which means don't escape the control
5192         characters, but otherwise keep OS settings.
5193
5194         * url.c (file_unsafe_char): Deleted.
5195         (append_uri_pathel): Query filechr_table directly.
5196         (filechr_table): Separated Unix, Windows, and control-unsafe
5197         characters.
5198
5199 2003-09-17  Hrvoje Niksic  <hniksic@xemacs.org>
5200
5201         * url.c (url_escape_1): New function.
5202         (url_escape): Use it.
5203         (sync_path): Handle pathological cases where u->file and u->dir
5204         contain really strange characters.
5205         (ENCODE): Deleted.
5206         (REENCODE): Deleted.
5207
5208 2003-09-16  Hrvoje Niksic  <hniksic@xemacs.org>
5209
5210         * url.c (url_file_name): Don't reallocate FNAME if the file
5211         doesn't exist, as is usually the case.
5212
5213         * utils.c (unique_name): New flag allow_passthrough.
5214
5215 2003-09-16  Hrvoje Niksic  <hniksic@xemacs.org>
5216
5217         * utils.c (wtimer_sys_diff): Convert the time difference to signed
5218         __int64, then to double.  This works around MS VC++ 6 which can't
5219         convert unsigned __int64 to double directly.
5220
5221 2003-09-16  Hrvoje Niksic  <hniksic@xemacs.org>
5222
5223         * Makefile.in (clean): Also remove the core.<number> files
5224         produced by recent Linux systems.
5225
5226 2003-09-16  Hrvoje Niksic  <hniksic@xemacs.org>
5227
5228         * http.c (post_file): Don't pad the file if it's not large
5229         enough.  Bail out instead.
5230
5231 2003-09-15  Hrvoje Niksic  <hniksic@xemacs.org>
5232
5233         * retr.c (get_contents): Reduce the buffer size to the amount of
5234         data that may pass through for one second.  This prevents long
5235         sleeps when limiting bandwidth.
5236
5237         * connect.c (connect_to_one): Reduce the socket's RCVBUF when
5238         bandwidth limitation to small values is requested.
5239
5240 2003-09-15  Hrvoje Niksic  <hniksic@xemacs.org>
5241
5242         * progress.c (update_speed_ring): Moved the speed ring update to a
5243         separate function and documented it better.
5244
5245         * progress.c: Use `double' for most timers to support granularity
5246         smaller than 1ms.
5247
5248 2003-09-15  Hrvoje Niksic  <hniksic@xemacs.org>
5249
5250         * wget.h (XDIGIT_TO_XCHAR): Implement as index into a literal
5251         string.
5252         (XDIGIT_TO_xchar): Ditto.
5253
5254 2003-09-15  Hrvoje Niksic  <hniksic@xemacs.org>
5255
5256         * utils.c: Change the type of timer-related functions from long to
5257         double, for better precision.  On machines supporting gettimeofday
5258         the timers now work with granularity of less than one millisecond.
5259
5260 2003-09-15  Hrvoje Niksic  <hniksic@xemacs.org>
5261
5262         * cookies.c (parse_set_cookies): Fixed the parser to handle more
5263         edge conditions.
5264         (test_cookies): New function, contains a test suite for
5265         parse_set_cookies.
5266
5267 2003-09-15  Hrvoje Niksic  <hniksic@xemacs.org>
5268
5269         * url.c (strpbrk_or_eos): Implement as a macro under Gcc.
5270
5271 2003-09-15  Hrvoje Niksic  <hniksic@xemacs.org>
5272
5273         * cookies.c (parse_set_cookies): Allow trailing space in
5274         set-cookies header.  Also, allow any amount of whitespace, not
5275         only one character.  Allow empty set-cookies header without
5276         spewing an error.
5277
5278 2003-09-14  Hrvoje Niksic  <hniksic@xemacs.org>
5279
5280         * url.c (append_uri_pathel): Use opt.restrict_file_names when
5281         calling file_unsafe_char.
5282
5283         * init.c: New command restrict_file_names.
5284
5285         * main.c (main): New option --restrict-file-names[=windows,unix].
5286
5287         * url.c (url_file_name): Renamed from url_filename.
5288         (url_file_name): Add directory and hostdir prefix here, not in
5289         mkstruct.
5290         (append_dir_structure): New function, does part of the work that
5291         used to be in mkstruct.  Iterates over path elements in u->path,
5292         calling append_uri_pathel on each one to append it to the file
5293         name.
5294         (append_uri_pathel): URL-unescape a path element and reencode it
5295         with a different set of rules, more appropriate for handling of
5296         files.
5297         (file_unsafe_char): New function, uses a lookup table to decide
5298         whether a character should be escaped for use in file name.
5299         (append_string): New utility function.
5300         (append_char): Ditto.
5301         (file_unsafe_char): New argument restrict_for_windows, decide
5302         whether Windows file names should be escaped in run-time.
5303
5304         * connect.c: Include <stdlib.h> to get prototype for abort().
5305
5306 2003-09-14  Hrvoje Niksic  <hniksic@xemacs.org>
5307
5308         * utils.c (wtimer_sys_set): Extracted the code that sets the
5309         current time here.
5310         (wtimer_reset): Call it.
5311         (wtimer_sys_diff): Extracted the code that calculates the
5312         difference between two system times here.
5313         (wtimer_elapsed): Call it.
5314         (wtimer_elapsed): Don't return a value smaller than the previous
5315         one, which could previously happen when system time is set back.
5316         Instead, reset start time to current time and note the elapsed
5317         offset for future calculations.  The returned times are now
5318         guaranteed to be monotonically nondecreasing.
5319
5320 2003-09-10  Hrvoje Niksic  <hniksic@xemacs.org>
5321
5322         * host.c (lookup_host): Print the result of the DNS lookup.
5323
5324 2003-09-10  Hrvoje Niksic  <hniksic@xemacs.org>
5325
5326         * init.c (cmd_boolean): Accept yes/no along with on/off.
5327         (cmd_lockable_boolean): Ditto.
5328
5329 2003-09-10  Hrvoje Niksic  <hniksic@xemacs.org>
5330
5331         * init.c: New command dns_cache.
5332
5333         * main.c (main): New option --dns-cache[=off].
5334
5335 2003-09-09  Hrvoje Niksic  <hniksic@xemacs.org>
5336
5337         * config.h.in: Initialize HAVE_GETADDRINFO and ENABLE_IPV6.
5338
5339         * all: Use #ifdef ENABLE_IPV6 instead of the older INET6.  Use
5340         HAVE_GETADDRINFO for getaddrinfo-related stuff.
5341
5342 2003-09-09  Hrvoje Niksic  <hniksic@xemacs.org>
5343
5344         * url.c (url_parse): Return an error if the URL contains a [...]
5345         IPv6 numeric address and we don't support IPv6.
5346
5347 2003-09-05  Hrvoje Niksic  <hniksic@xemacs.org>
5348
5349         * url.c (is_valid_ipv6_address): Modified to not require
5350         zero-terminated strings.
5351         (is_valid_ipv4_address): Ditto.
5352
5353 2003-09-05  Mauro Tortonesi <mauro@deepspace6.net>
5354
5355         src/url.c: added RFC 2732 compliance for URL parsing. The
5356         functions is_*_address valid are a modified version of
5357         glibc 2.3.2 inet_pton's code.
5358
5359 2003-09-03  Ahmon Dancy  <dancy@dancysoft.com>
5360
5361         * main.c init.c options.h: Added --retry-connrefused option so
5362         that Connection Refused failures are treated as non-fatal (when
5363         trying to retrieve from busy servers).
5364
5365         * wget.h: New CONNECT_ERROR macro for encapsulating this
5366         modification.
5367
5368         * ftp.c http.c : Use CONNECT_ERROR macro in places where
5369         ECONNREFUSED was checked.
5370
5371 2003-01-11  Ian Abbott  <abbotti@mev.co.uk>
5372
5373         * ftp.c (ftp_retrieve_glob): Reject insecure filenames as determined
5374         by calling new function has_insecure_name_p.  This is based on a
5375         patch by Red Hat.
5376
5377         * fnmatch.c (has_insecure_name_p): New function: returns non-zero
5378         if filename starts with `/' or contains `../' and is therefore
5379         considered insecure.
5380
5381         * fnmatch.h: Declare has_insecure_name_p().
5382
5383 2002-08-03  Hrvoje Niksic  <hniksic@xemacs.org>
5384
5385         * init.c (cmd_file): Allocate RESULT correctly.
5386
5387 2002-07-24  Hrvoje Niksic  <hniksic@xemacs.org>
5388
5389         * recur.c (retrieve_tree): Check whether downloaded_html_set is
5390         non-NULL before using it.
5391
5392 2002-05-27  Hrvoje Niksic  <hniksic@arsdigita.com>
5393
5394         * html-parse.c (NAME_CHAR_P): Allow almost any character here.
5395
5396 2002-05-24  Hrvoje Niksic  <hniksic@arsdigita.com>
5397
5398         * progress.c (bar_set_params): Fall back to dot progress if the
5399         terminal type is "emacs".
5400
5401 2002-05-20  Hrvoje Niksic  <hniksic@arsdigita.com>
5402
5403         * log.c: Don't #undef WGET_USE_STDARG.
5404
5405 2002-05-16  Hrvoje Niksic  <hniksic@arsdigita.com>
5406
5407         * hash.c (prime_size): Store the offset of the prime number in the
5408         prime table.  When searching, start with the given offset.
5409         (hash_table_new): Pass the pointer to ht->prime_offset to
5410         prime_size.
5411         (grow_hash_table): Ditto.
5412         (prime_size): Make 13 the first prime to make empty hash tables
5413         slightly smaller.
5414
5415 2002-05-16  Ian Abbott  <abbotti@mev.co.uk>
5416
5417         * recur.c (download_child_p): Minor optimization to avoid an
5418         unnecessary additional call to schemes_are_similar_p function.
5419
5420 2002-05-16  Ian Abbott  <abbotti@mev.co.uk>
5421
5422         * url.c (schemes_are_similar_p): New function to test enumerated
5423         scheme codes for similarity.
5424
5425         * url.h: Declare it.
5426
5427         * recur.c (download_child_p): Use it to compare schemes.  This
5428         also fixes a bug that allows hosts to be spanned (without the
5429         -H option) when the parent scheme is https and the child's is
5430         http or vice versa.
5431
5432 2002-05-14  Bill Richardson  <bill@riverstonenet.com>
5433
5434         * ftp.c (getftp): Don't ftruncate stdout.
5435
5436         * http.c (gethttp): Don't ftruncate stdout.
5437
5438 2002-05-09  Ian Abbott  <abbotti@mev.co.uk>
5439
5440         * cmpt.c (strptime_internal): Synched with glibc-2.1.3.
5441         (get_number): Ditto.
5442         (get_alt_number): Ditto.
5443         (__isleap): New function-like macro used by strptime.
5444         (day_of_the_week): New function used by strptime.
5445         (day_of_the_year): Ditto.
5446         (__mon_yday): Now shared by mktime and strptime implementations.
5447
5448 2002-05-08  Hrvoje Niksic  <hniksic@arsdigita.com>
5449
5450         * cookies.c (check_domain_match): Use match_tail in case
5451         insensitive mode.
5452
5453         * utils.c (match_tail): Allow the caller to specify case
5454         insensitive mode.
5455
5456         * cookies.c (store_cookie): When expiry_time is 0, print it as
5457         undefined, not indefinite.
5458
5459 2002-05-07  Ian Abbott  <abbotti@mev.co.uk>
5460
5461         * cookies.c (cookie_jar_process_set_cookie): Do not store
5462         discarded cookie.
5463
5464 2002-04-21  Hrvoje Niksic  <hniksic@arsdigita.com>
5465
5466         * cookies.c (check_domain_match): Allow cookies to be set for
5467         subdomains of unknown top-level domains under some circumstances.
5468
5469 2002-04-21  Thomas Lussnig  <thomas.lussnig@bewegungsmelder.de>
5470
5471         * gen_ssl.c:
5472         - allow checking of server cert
5473         - allow defining client cert type
5474         - allow limit of ssl protocol
5475         - check more return values
5476         - added debug message on break
5477
5478 2002-04-21  Hrvoje Niksic  <hniksic@arsdigita.com>
5479
5480         * recur.c (download_child_p): Revert order of items in check
5481         number 6 for clarity.
5482
5483 2002-04-20  Hrvoje Niksic  <hniksic@arsdigita.com>
5484
5485         * init.c: Ditto.
5486
5487         * main.c: Ditto.
5488
5489         * http.c: Use the new interface.
5490
5491         * cookies.c: Provide an OO-style "cookie jar" interface to enable
5492         separate cookie jars.
5493
5494         * http.c (http_atotm): Declare argument as const.
5495
5496 2002-04-20  Hrvoje Niksic  <hniksic@arsdigita.com>
5497
5498         * cookies.c (cookie_new): Default to PORT_ANY.
5499         (find_cookie_chain_exact): Only search by DOMAIN.
5500         (find_matching_cookie): Also check that PORT matches.
5501         (store_cookie): Only match the domain.
5502         (set_cookie_header_cb): When a cookie "fakes" a domain, assume it
5503         is valid for that host rather than discarding it completely.
5504         (find_matching_chains): Don't search by PORT.
5505         (matching_cookie): Also match PORT.
5506         (load_cookies): Set the port if specified, otherwise leave it as
5507         ANY.
5508         (save_cookies_mapper): Save the port if specified, otherwise leave
5509         it empty.
5510
5511 2002-04-19  Thomas Lussnig  <thomas.lussnig@bewegungsmelder.de>
5512
5513         * init.c: The option `egdfile' was not in sort order.
5514
5515 2002-04-16  Hrvoje Niksic  <hniksic@arsdigita.com>
5516
5517         * ftp.c (getftp): Treat directories that begin with <letter>: as
5518         absolute.
5519         (getftp): Strip trailing slashes from con->id before merging it
5520         with TARGET.
5521
5522 2002-04-16  Hrvoje Niksic  <hniksic@arsdigita.com>
5523
5524         * http.c (gethttp): If Content-Type is not given, assume
5525         text/html.
5526
5527 2002-04-15  Hrvoje Niksic  <hniksic@arsdigita.com>
5528
5529         * recur.c (download_child_p): Don't ignore rejection of HTML
5530         documents that are themselves leaves of recursion.
5531
5532 2002-04-15  Ian Abbott  <abbotti@mev.co.uk>
5533
5534         Makefile.in: Updated several dependencies for object files to take
5535         account of nested include files.
5536
5537 2002-04-15  Ian Abbott  <abbotti@mev.co.uk>
5538
5539         Makefile.in: The target `connect$o' (connect.o) now depends on
5540         `utils.h'
5541
5542 2002-04-15  Ian Abbott  <abbotti@mev.co.uk>
5543
5544         * host.c (SET_H_ERRNO): New function-like macro to set `h_errno'.
5545         (gethostbyname_with_timeout): Use it.
5546
5547         * utils.c: Don't define `SETJMP()', `run_with_timeout_env' or
5548         `abort_run_with_timeout()' when `USE_SIGNAL_TIMEOUT' is undefined.
5549
5550 2002-04-15  Hrvoje Niksic  <hniksic@arsdigita.com>
5551
5552         * host.c (getaddrinfo_with_timeout): New function.
5553         (gethostbyname_with_timeout): Ditto.
5554         (lookup_host): Use them.
5555
5556 2002-04-14  Hrvoje Niksic  <hniksic@arsdigita.com>
5557
5558         * utils.c (number_to_string): Handle the case when n < -INT_MAX.
5559
5560 2002-04-14  Hrvoje Niksic  <hniksic@arsdigita.com>
5561
5562         * init.c (comind): Use a marginally faster implementation of
5563         binary search.  To quote Martin Buchholz, "a nanosecond saved is a
5564         nanosecond earned."
5565
5566 2002-04-14  Hrvoje Niksic  <hniksic@arsdigita.com>
5567
5568         * main.c (print_help): Document `--post-data' and `--post-file'.
5569
5570 2002-04-14  Hrvoje Niksic  <hniksic@arsdigita.com>
5571
5572         * http.c (gethttp): Ditto.
5573
5574         * retr.c (retrieve_url): Initialize variables to appease the
5575         compiler.
5576
5577         * gen_sslfunc.c (ssl_iread): Don't handle EINTR when calling
5578         select_fd.
5579         (ssl_iwrite): Ditto.
5580
5581         * connect.c (select_fd): Rewrite to handle EINTR.  Set errno to
5582         ETIMEDOUT in case of timeout.
5583         (iread): No need to handle EINTR when calling select_fd.
5584         (iwrite): Ditto.
5585
5586 2002-04-14  Hrvoje Niksic  <hniksic@arsdigita.com>
5587
5588         * retr.c (retrieve_url): Make sure that POST is not honored for
5589         redirections.
5590
5591         * http.c (gethttp): Send the POST data when requested.
5592         (post_file): New function.
5593         (gethttp): Use it.
5594
5595         * main.c (main): Ditto.
5596
5597         * init.c: Add new options.
5598
5599         * options.h (struct options): New options post_data and
5600         post_file_name.
5601
5602 2002-04-14  Hrvoje Niksic  <hniksic@arsdigita.com>
5603
5604         * connect.c (connect_with_timeout): Firing SIGALRM can result in
5605         connect() exiting with EINTR.  Treat EINTR the same as ETIMEDOUT.
5606
5607 2002-04-13  Hrvoje Niksic  <hniksic@arsdigita.com>
5608
5609         * connect.c (connect_with_timeout): Use it.
5610
5611         * utils.c (run_with_timeout): New function.
5612
5613 2002-04-13  Hrvoje Niksic  <hniksic@arsdigita.com>
5614
5615         * url.c (getproxy): Accept a struct url argument.  This obviates
5616         the need for USE_PROXY_P.
5617
5618         * retr.c (retrieve_url): Allow proxy to be a non-FTP URL.
5619
5620         * ftp.c (getftp): Recognize FWTK-style proxy.
5621
5622 2002-04-12  Hrvoje Niksic  <hniksic@arsdigita.com>
5623
5624         * config.h.in: Only define _VA_LIST when compiled with gcc.
5625
5626 2002-04012  Ian Abbott  <abbotti@mev.co.uk>
5627
5628         * http.c (http_loop): Compensate for MS Windows two-second
5629         granularity of file modification time when comparing timestamps.
5630
5631         * ftp.c (ftp_retrieve_list): Ditto.
5632
5633 2002-04-12  Ian Abbott  <abbotti@mev.co.uk>
5634
5635         * utils.c (has_html_suffix_p): New function to test filename for
5636         common html extensions.
5637
5638         * utils.h: Declare it.
5639
5640         * http.c (http_loop): Use it instead of previous test.
5641
5642         * retr.c (retrieve_url): Ditto.
5643
5644         * recur.c (download_child_p): Ditto.
5645
5646 2002-04-12  Hrvoje Niksic  <hniksic@arsdigita.com>
5647
5648         * config.h.in: Define _VA_LIST on Solaris to prevent stdio.h from
5649         declaring va_list.
5650         From Kevin Rodgers <kevinr@ihs.com>.
5651
5652 2002-04-12  Ian Abbott  <abbotti@mev.co.uk>
5653
5654         * Makefile.in: Specify libtool mode explicitly when linking.
5655
5656 2002-04-12  Hrvoje Niksic  <hniksic@arsdigita.com>
5657
5658         * connect.c (connect_with_timeout): New function.
5659         (connect_to_one): Use it.
5660
5661         * config.h.in: Add stubs for HAVE_SIGSETJMP, HAVE_SIGBLOCK, and
5662         HAVE_SETJMP_H.
5663
5664 2002-04-11  Hrvoje Niksic  <hniksic@arsdigita.com>
5665
5666         * log.c: Set WGET_USE_STDARG if __STDC__ is defined and stdarg.h
5667         is present.
5668
5669 2002-04-11  Hrvoje Niksic  <hniksic@arsdigita.com>
5670
5671         * progress.c (bar_create): If INITIAL is larger than TOTAL, fix
5672         TOTAL.
5673         (bar_finish): Likewise.
5674
5675 2002-04-11  Hrvoje Niksic  <hniksic@arsdigita.com>
5676
5677         * html-url.c (tag_handle_form): New function.  Pick up form
5678         actions and mark them for conversion only.
5679
5680 2002-04-11  Hrvoje Niksic  <hniksic@arsdigita.com>
5681
5682         * progress.c (struct progress_implementation): Use PARAMS when
5683         declaring the parameters of *create, *update, *finish, and
5684         *set_params.
5685
5686         * netrc.c: Ditto.
5687
5688         * http.c: Reformat some function definitions so that ansi2knr can
5689         read them.
5690
5691         * hash.c (struct hash_table): Use the PARAMS macro around
5692         parameters in the declaration of hash_function and test_function.
5693         (prime_size): Spell 2580823717UL and 3355070839UL as (unsigned
5694         long)0x99d43ea5 and (unsigned long)0xc7fa5177 respectively, so
5695         that pre-ANSI compilers can read them.
5696         (find_mapping): Use PARAMS when declaring EQUALS.
5697         (hash_table_put): Ditto.
5698
5699         * ftp.h: Wrap the parameters of ftp_index declaration in PARAMS.
5700
5701         * cookies.c (cookie_new): Use (unsigned long)0 instead of 0UL,
5702         which was unsupported by pre-ANSI compilers.
5703
5704         From Nelson H. F. Beebe <beebe@math.utah.edu>, for the most part.
5705
5706 2002-04-11  Hrvoje Niksic  <hniksic@arsdigita.com>
5707
5708         * url.c (url_filename): Use compose_file_name regardless of
5709         whether opt.dirstruct is set.
5710         (mkstruct): Don't handle the query and the reencoding of DIR; that
5711         is done in compose_file_name.
5712
5713 2002-04-10  Hrvoje Niksic  <hniksic@arsdigita.com>
5714
5715         * wget.h: Ditto for extern char *exec_name.
5716
5717         * options.h: Don't guard against OPTIONS_DEFINED_HERE -- it is
5718         perfectly legal to follow an `extern' with a non-`extern' ones,
5719         provided the types match.
5720
5721         * main.c: Don't define OPTIONS_DEFINED_HERE.
5722
5723 2002-04-10  Hrvoje Niksic  <hniksic@arsdigita.com>
5724
5725         * progress.c (create_image): Revert to calculating ETA based on
5726         average download speed.
5727         (create_image): Don't print ETA until the download has been active
5728         for at least 3 seconds.
5729         (create_image): When ETA is not available, don't print anything.
5730         The previous version would print --:--.
5731
5732 2002-04-10  Hrvoje Niksic  <hniksic@arsdigita.com>
5733
5734         * progress.c (bar_update): Keep updating a subinterval until it
5735         reaches or exceeds a watermark.  That way the measurement will be
5736         guaranteed to span a configurable minimum of time.  The current
5737         default is 3s in 30 100ms intervals.
5738
5739 2002-04-09  Hrvoje Niksic  <hniksic@arsdigita.com>
5740
5741         * progress.c (bar_update): Maintain an array of the time it took
5742         to perform previous 30 network reads.
5743         (create_image): Calculate the download speed and ETA based on the
5744         last 30 reads, not the entire download.
5745         (create_image): Make sure that the ETA is not changed more than
5746         once per second.
5747
5748 2002-04-09  Ian Abbott  <abbotti@mev.co.uk>
5749
5750         * mswindows.c (borland_utime): New function conditionally defined
5751         when `HACK_BCC_UTIME_BUG' is defined.  A reimplementation of
5752         `utime()' as Borland's `utime()' function is broken on Windows 9x
5753         systems.  (Original patch by Chin-yuan Kuo <sr1111111@yahoo.com.tw>.)
5754
5755 2002-04-08  Hrvoje Niksic  <hniksic@arsdigita.com>
5756
5757         * ftp.c (ftp_loop): Propagate the result of ftp_retrieve_glob.
5758
5759 2002-03-26  Ian Abbott  <abbotti@mev.co.uk>
5760
5761         * Makefile.in: Updated several dependencies for object files.
5762
5763 2002-03-20  Ian Abbott  <abbotti@mev.co.uk>
5764
5765         * mswindows.c: Include "utils.h".
5766
5767 2002-03-18  Ian Abbott  <abbotti@mev.co.uk>
5768
5769         * host.h: Don't include netdb.h on windows.
5770
5771 2002-02-19  Hrvoje Niksic  <hniksic@arsdigita.com>
5772
5773         * recur.c (retrieve_tree): Handle the case when start_url doesn't
5774         parse.
5775
5776 2002-02-19  Andreas Damm  <andreas-sourceforge@radab.org>
5777
5778         * wget.h (DO_REALLOC_FROM_ALLOCA): Multiply with sizeof(type) when
5779         calling xmalloc and memcpy.
5780
5781 2002-02-19  Hrvoje Niksic  <hniksic@arsdigita.com>
5782
5783         * host.h: Include Unix-specific includes #ifndef WINDOWS.
5784         Patch originally provided by Christian Lackas.
5785
5786 2002-02-11  Christian Lackas  <delta@lackas.net>
5787
5788         * recur.c: recurive downloading for https fixed.
5789
5790 2002-02-19  Alan Eldridge  <alane@geeksrus.net>
5791
5792         * host.h: Also include <netinet/in.h> and <sys/socket.h>.
5793
5794         * ftp-basic.c: Also include <netinet/in.h>.
5795
5796 2002-02-05  Ian Abbott  <abbotti@mev.co.uk>
5797
5798         * http.c (gethttp): when -c used, mark already fully retrieved
5799         file as successfully retrieved.
5800
5801 2002-02-19  Hrvoje Niksic  <hniksic@arsdigita.com>
5802
5803         * url.c (url_parse): Don't treat '?' as query string separator
5804         when parsing FTP URLs.
5805
5806 2002-02-01  Hrvoje Niksic  <hniksic@arsdigita.com>
5807
5808         * html-url.c (tag_handle_meta): Don't crash on <meta
5809         http-equiv=refresh> where content is missing.
5810
5811 2002-01-31  Herold Heiko  <Heiko.Herold@previnet.it>
5812
5813         * ftp-basic.c, host.c: don't include sys/socket.h, arpa/inet.h,
5814         netdb.h on windows.
5815
5816 2002-01-30  Hrvoje Niksic  <hniksic@arsdigita.com>
5817
5818         * retr.c (retrieve_url): Remove redirection cycle detection.  This
5819         is because some sites legitimately redirect the user back to the
5820         same location, e.g. after an authorization check performed by
5821         another page.  MAX_REDIRECTIONS is still used to prevent infinite
5822         redirection loops.
5823
5824 2002-01-26  Hrvoje Niksic  <hniksic@arsdigita.com>
5825
5826         * http.c (gethttp): Wrap host name in square brackets if it
5827         contains a colon.
5828
5829 2002-01-26  Hrvoje Niksic  <hniksic@arsdigita.com>
5830
5831         * url.c (url_parse): Allow all hex digits, not only decimal ones,
5832         to form an IP address.
5833
5834 2002-01-26  Hrvoje Niksic  <hniksic@arsdigita.com>
5835
5836         * url.c (urlchr_table): Make square braces reserved, so we can
5837         parse http://[::1]/.
5838         (url_parse): Handle host in braces.
5839         (url_string): If url->host contains colons, wrap it in braces.
5840
5841 2002-01-24  Hrvoje Niksic  <hniksic@arsdigita.com>
5842
5843         * connect.c (resolve_bind_address): New function.
5844         (connect_to_one): Use it.
5845         (bindport): Ditto.
5846
5847         * init.c: Don't resolve bind-address here.
5848
5849         * host.c (wget_sockaddr_set_address): Would bug out with ADDR == NULL.
5850
5851 2002-01-24  Hrvoje Niksic  <hniksic@arsdigita.com>
5852
5853         * host.c (lookup_host): Use sizeof(ip4_address) to calculate the
5854         offset.
5855         (address_list_new): Use map_ipv4_to_ip.
5856         (wget_sockaddr_set_address): Convert ADDR to IPv4 before using it
5857         in IPv4 context.
5858
5859 2002-01-24  Hrvoje Niksic  <hniksic@arsdigita.com>
5860
5861         * source: Integrated IPv6 support.
5862         Written by Thomas Lussnig <thomas.lussnig@bewegungsmelder.de>.
5863
5864 2002-01-15  Ian Abbott  <abbotti@mev.co.uk>
5865
5866         * init.c (cmd_file): Change `\' to `/' for Windows (yes, really!)
5867         (cmd_directory): New function. Like cmd_file(), but strips
5868         trailing directory separators.
5869         (commands): Change action for "dirprefix" from `cmd_file' to
5870         `cmd_directory'.
5871
5872         * utils.c (make_directory): Allow intermediate `mkdir' calls to
5873         fail, as not all path components that do not exist should be
5874         directory components, especially under Windows.
5875
5876 2002-01-17  Hrvoje Niksic  <hniksic@arsdigita.com>
5877
5878         * netrc.c (parse_netrc): Skip leading whitespace before testing
5879         whether the line is empty.  Empty lines still contain the line
5880         terminator.
5881
5882 2002-01-15  Hrvoje Niksic  <hniksic@arsdigita.com>
5883
5884         * gen_sslfunc.c (ssl_iread): Call select on the file descriptor
5885         only if no data is pending in SSL buffers.
5886         From tony@bluetail.com.
5887
5888 2002-01-14  Hrvoje Niksic  <hniksic@arsdigita.com>
5889
5890         * headers.c (header_get): Strip trailing whitespace from the
5891         header.
5892
5893 2002-01-14  Hrvoje Niksic  <hniksic@arsdigita.com>
5894
5895         * url.c (parse_uname): URL-decode *USER and *PASSWD.
5896
5897 2002-01-07  Ian Abbott <abbotti@mev.co.uk>
5898
5899         * url.c (uri_merge_1): Deal with "net path" relative URL (one that
5900         starts with "//").
5901
5902 2002-01-14  Hrvoje Niksic  <hniksic@arsdigita.com>
5903
5904         * http.c (gethttp): Invalidate SOCK if get_contents encountered an
5905         error.
5906
5907 2001-12-24  Hrvoje Niksic  <hniksic@arsdigita.com>
5908
5909         * version.c: Wget 1.8.1 is released.
5910
5911 2001-12-19  Hrvoje Niksic  <hniksic@arsdigita.com>
5912
5913         * version.c: Wget 1.8.1-pre3 is released.
5914
5915 2001-12-19  Hrvoje Niksic  <hniksic@arsdigita.com>
5916
5917         * recur.c (retrieve_tree): Enqueue the canonical representation of
5918         start_url, so that the test against dl_url_file_map works.
5919
5920 2001-12-19  Hrvoje Niksic  <hniksic@arsdigita.com>
5921
5922         * log.c (logputs): Check for requested verbosity before printing
5923         anything.
5924
5925 2001-12-19  Hrvoje Niksic  <hniksic@arsdigita.com>
5926
5927         * html-url.c (tag_handle_link): Treat the "shortcut icon" link as
5928         inline.
5929
5930 2001-12-18  Hrvoje Niksic  <hniksic@arsdigita.com>
5931
5932         * recur.c (retrieve_tree): Make a copy of file obtained from
5933         dl_url_file_map because the code calls xfree(file) later.
5934
5935 2001-12-18  Hrvoje Niksic  <hniksic@arsdigita.com>
5936
5937         * recur.c (register_html): Maintain a hash table of HTML files
5938         along with the list.  Disallow duplicates.
5939         (retrieve_tree): Use downloaded_html_set to check whether the file
5940         found in dl_url_file_map is an HTML file, and descend into it if
5941         so.
5942         (convert_all_links): Don't guard against duplicates in
5943         downloaded_html_list, since they are no longer possible.
5944
5945 2001-12-18  Ian Abbott  <abbotti@mev.co.uk>
5946
5947         * recur.c (retrieve_tree): Pass on referring URL when retrieving
5948         recursed URL.
5949
5950 2001-12-17  Hrvoje Niksic  <hniksic@arsdigita.com>
5951
5952         * version.c: Wget 1.8.1-pre2 is released.
5953
5954 2001-12-17  Hrvoje Niksic  <hniksic@arsdigita.com>
5955
5956         * retr.c (sleep_between_retrievals): Simplify indentation.
5957
5958 2001-12-17  Hrvoje Niksic  <hniksic@arsdigita.com>
5959
5960         * gen_sslfunc.c (ssl_init_prng): Use random_number to get a byte
5961         of "randomness" at a time.
5962         (ssl_init_prng): Don't seed the PRNG; random_number will do that.
5963
5964         * retr.c (sleep_between_retrievals): Use it.  Make sure that the
5965         random amount averages in opt.wait.
5966         (sleep_between_retrievals): Don't seed the PRNG; random_number
5967         will do that.
5968
5969         * utils.c (random_number): New function.
5970
5971 2001-12-14  Hrvoje Niksic  <hniksic@arsdigita.com>
5972
5973         * url.c (path_simplify): Move here from utils.c, and make static.
5974
5975 2001-12-13  Hrvoje Niksic  <hniksic@arsdigita.com>
5976
5977         * init.c (wgetrc_file_name): Print correct message when loading
5978         getenv("WGETRC") fails.
5979
5980 2001-12-13  Hrvoje Niksic  <hniksic@arsdigita.com>
5981
5982         * recur.c (register_download): Don't abort when one URL references
5983         two different files.
5984
5985 2001-12-13  Hrvoje Niksic  <hniksic@arsdigita.com>
5986
5987         * http.c (gethttp): Check for conn->scheme, not u->scheme, before
5988         calling ssl_iwrite.
5989
5990 2001-12-13  Hrvoje Niksic  <hniksic@arsdigita.com>
5991
5992         * version.c: Wget 1.8.1-pre1 is released.
5993
5994 2001-12-13  Hrvoje Niksic  <hniksic@arsdigita.com>
5995
5996         * res.c (matches): Fix broken URL in the docstring.
5997
5998 2001-12-13  Hrvoje Niksic  <hniksic@arsdigita.com>
5999
6000         * html-url.c (tag_url_attributes): Mark <embed href=...> as
6001         external.
6002
6003 2001-12-12  Hrvoje Niksic  <hniksic@arsdigita.com>
6004
6005         * url.c (get_urls_file): Cosmetic changes.
6006
6007 2001-12-12  Hrvoje Niksic  <hniksic@arsdigita.com>
6008
6009         * html-url.c (append_one_url): Resurrect warning when unable to
6010         resolve a relative link.
6011
6012 2001-12-12  Hrvoje Niksic  <hniksic@arsdigita.com>
6013
6014         * html-url.c (collect_tags_mapper): Break into several functions.
6015         (tag_url_attributes): Collect <embed href=...>.
6016
6017 2001-12-11  Hrvoje Niksic  <hniksic@arsdigita.com>
6018
6019         * host.c: New type ipv4_address.  Use it consistently instead of
6020         `unsigned char[4]' and `unsigned char *'.
6021         (pretty_print_address): Accept a `const void *', to require even
6022         less casting.
6023
6024 2001-12-11  Hrvoje Niksic  <hniksic@arsdigita.com>
6025
6026         * ftp-ls.c (ftp_parse_vms_ls): Fix obvious memory leaks.
6027
6028 2001-12-10  Hrvoje Niksic  <hniksic@arsdigita.com>
6029
6030         * main.c (main): Initialize progress after fork_to_background, so
6031         that it knows when to use dots.
6032
6033         * mswindows.c (ws_hangup): Call log_request_redirect_output.
6034
6035         * utils.c (fork_to_background): Print the PID of the child
6036         process.
6037
6038         * log.c (log_request_redirect_output): Set a flag that output
6039         redirection has been requested.  Doing anything else in a signal
6040         handler is unsafe.
6041         (check_redirect_output): New function: check whether redirection
6042         has been requested and, if so, call redirect_output().
6043         (logputs): Call check_redirect_output.
6044         (logprintf): Ditto.
6045         (debug_logprintf): Ditto.
6046         (redirect_output): Print clearer messages.
6047
6048         * main.c (redirect_output_signal): Don't call
6049         redirect_output_signal directly.  Instead, call
6050         log_request_redirect_output.
6051
6052         * utils.c (memfatal): Ditto.
6053
6054         * progress.c (display_image): Use it.
6055
6056         * log.c (log_set_save_context): New function: allow the caller to
6057         turn off saving log context lines.
6058
6059 2001-12-10  Hrvoje Niksic  <hniksic@arsdigita.com>
6060
6061         * host.c (address_list_set_faulty): Uncomment a sanity check.
6062
6063 2001-12-10  Hrvoje Niksic  <hniksic@arsdigita.com>
6064
6065         * utils.c (long_to_string): Return a pointer after where the
6066         number ends.
6067         (long_to_string): Rename to number_to_string.
6068
6069 2001-12-10  Hrvoje Niksic  <hniksic@arsdigita.com>
6070
6071         * utils.c (path_simplify): Correctly handle the unlikely case that
6072         b starts out as path + 1.
6073
6074 2001-12-10  Hrvoje Niksic  <hniksic@arsdigita.com>
6075
6076         * utils.c (path_simplify): Rewrite, with better comments, and
6077         without the use of strcpy to move overlapping blocks.
6078
6079 2001-12-09  Hrvoje Niksic  <hniksic@arsdigita.com>
6080
6081         * init.c (cmd_spec_progress): Resurrect.  Check whether VAL is a
6082         valid progress type before setting it.
6083
6084 2001-12-09  Hrvoje Niksic  <hniksic@arsdigita.com>
6085
6086         * main.c (main): Remove stray debugging message.
6087
6088 2001-12-09  Hrvoje Niksic  <hniksic@arsdigita.com>
6089
6090         * progress.c (create_image): Fix ETA padding when hours are prined.
6091
6092 2001-12-09  Hrvoje Niksic  <hniksic@arsdigita.com>
6093
6094         * version.c: Wget 1.8 is released.
6095
6096 2001-12-09  Hrvoje Niksic  <hniksic@arsdigita.com>
6097
6098         * url.c (reencode_string): Declare static.
6099
6100         * res.c (registered_specs): Declare static.
6101
6102         * progress.c (current_impl_locked): Declare static.
6103
6104         * log.c (flush_log_p): Declare static.
6105         (needs_flushing): Ditto.
6106
6107         * http.c (digest_authentication_encode): Declare static.
6108
6109         * html-url.c (init_interesting): Declare static.
6110
6111         * host.c (host_name_addresses_map): Declare static.
6112
6113         * cookies.c (find_matching_chains): Declare static.
6114
6115         * ftp-ls.c (ftp_parse_vms_ls): Warn about the memory leak
6116         indicated by lint.
6117
6118         * utils.c (path_simplify): Remove unused variable STUB_CHAR.
6119
6120         * host.c (address_list_set_faulty): Document that INDEX is
6121         currently unused.
6122
6123         * url.c (rewrite_shorthand_url): Remove unused variable PATH.
6124
6125 2001-12-08  Hrvoje Niksic  <hniksic@arsdigita.com>
6126
6127         * version.c: Wget 1.8-pre2 is released.
6128
6129 2001-12-06  Hrvoje Niksic  <hniksic@arsdigita.com>
6130
6131         * progress.c (progress_handle_sigwinch): Set up the signal again.
6132
6133         * utils.c: Include <sys/termios.h>, where Solaris defines
6134         TIOCGWINSZ.
6135
6136         * progress.c (bar_create): Don't use the last column on the screen.
6137         (create_image): Pad ETA to constant size.  Pad SIZE to nine digits
6138         only until it exceeded them.
6139
6140 2001-12-06  Hrvoje Niksic  <hniksic@arsdigita.com>
6141
6142         * version.c: Wget 1.8-pre1 is released.
6143
6144 2001-12-06  Hrvoje Niksic  <hniksic@arsdigita.com>
6145
6146         * progress.c (progress_create): Make sure that, when the output is
6147         redirected, the progress implementation gets changed to the
6148         fallback one.
6149         (bar_set_params): Set current_impl_locked to 1 when "force" is
6150         specified.
6151         (progress_create): Don't change the progress implementation if
6152         current_impl_locked is non-zero.
6153
6154         * main.c (redirect_output_signal): Call
6155         progress_schedule_redirect.
6156
6157         * progress.c (progress_schedule_redirect): New function.
6158
6159 2001-12-06  Hrvoje Niksic  <hniksic@arsdigita.com>
6160
6161         * log.c (logvprintf): Restructure to allow being called multiple
6162         times.
6163         (logprintf): Call logvprintf in a loop.
6164         (debug_logprintf): Ditto.
6165
6166 2001-12-06  Hrvoje Niksic  <hniksic@arsdigita.com>
6167
6168         * gen_sslfunc.c (ssl_init_prng): Allow the user to disable EGD by
6169         setting egd_file it to empty string.
6170
6171         * main.c (main): Change the option name from --sslegdsock to
6172         --egd-file.
6173
6174 2001-12-06  Hrvoje Niksic  <hniksic@arsdigita.com>
6175
6176         * gen_sslfunc.c (ssl_init_prng): Make the printed message
6177         translatable.
6178
6179 2001-12-06  Hrvoje Niksic  <hniksic@arsdigita.com>
6180
6181         * url.c (scheme_disable): New function.
6182
6183         * main.c (main): Call ssl_init_prng from here rather than from
6184         init_ssl, so that it has a chance to disable support for https
6185         before a URL has been resolved.
6186
6187         * gen_sslfunc.c (ssl_init_prng): Seed with rand() if all else
6188         failed.
6189         (ssl_init_prng): Disable support for https if seeding the PRNG
6190         fails.
6191
6192 2001-12-06  Hrvoje Niksic  <hniksic@arsdigita.com>
6193
6194         * utils.c (read_whole_line): Handle lines beginning with \0.
6195
6196 2001-12-05  Hrvoje Niksic  <hniksic@arsdigita.com>
6197
6198         * recur.c (convert_all_links): Guard against duplicates in
6199         downloaded_html_files.
6200         (register_download): Don't invalidate similar-looking URLs.
6201         (match_except_index): New function.
6202
6203 2001-12-05  Hrvoje Niksic  <hniksic@arsdigita.com>
6204
6205         * utils.c (path_simplify): Document with test cases.
6206
6207 2001-12-04  Hrvoje Niksic  <hniksic@arsdigita.com>
6208
6209         * gen_sslfunc.c: Ditto.
6210
6211         * rbuf.c: Include <string.h>.
6212
6213 2001-12-04  Hrvoje Niksic  <hniksic@arsdigita.com>
6214
6215         * recur.c (retrieve_tree): Check whether the URL was already
6216         downloaded before downloading it again.
6217         (descend_child_p): Renamed to download_child_p.
6218         (register_download): When one URL is downloaded to a file already
6219         "owned" by another URL, delete all references that map any URL to
6220         that file.
6221         (register_delete_file): New function.
6222         (retrieve_tree): Use it after deleting a file.
6223
6224         * url.c (url_parse): Re-canonicalize the URL also if the path is
6225         empty, so that e.g. "http://www.server.com" ->
6226         "http://www.server.com/".
6227         (lowercase_str): Use ISUPPER instead of !ISLOWER.
6228
6229         * retr.c (retrieve_url): Use the canonical URL form when calling
6230         register_download().
6231
6232 2001-12-04  Ian Abbott <abbotti@mev.co.uk>
6233
6234         * snprintf.c (dopr): Use `unsigned int' as the second argument to
6235         va_arg when casting to `unsigned short' is intended.
6236
6237 2001-12-04  Herold Heiko  <Heiko.Herold@previnet.it>
6238
6239         * gen_sslfunc.c: on windows provide ssl crypto random 
6240           initialization through RAND_screen(); could possibly
6241           be not enough for strong ssl communication (see the 
6242           relevant manual page from the openssl package).
6243
6244 2001-12-04  Hrvoje Niksic  <hniksic@arsdigita.com>
6245
6246         * url.c (local_quote_string): Reenable quoting of question marks,
6247         but only when `--html-extension' is used.
6248
6249 2001-12-03  Hrvoje Niksic  <hniksic@arsdigita.com>
6250
6251         * version.c: Wget 1.8-beta3 is released.
6252
6253 2001-12-03  Hrvoje Niksic  <hniksic@arsdigita.com>
6254
6255         * snprintf.c (dopr): Cast the result of va_arg to short int and
6256         short unsigned int where these types are expected to be used.
6257
6258 2001-12-03  Hrvoje Niksic  <hniksic@arsdigita.com>
6259
6260         * snprintf.c (dopr): Replace `short int' and `unsigned short int'
6261         with `int' when using it as the second argument to `va_arg'.
6262
6263 2001-12-03  Hrvoje Niksic  <hniksic@arsdigita.com>
6264
6265         * host.c (address_list_new_one): New function.
6266         (lookup_host): Use it.
6267
6268 2001-12-03  Andre Majorel  <amajorel@teaser.fr>
6269
6270         * host.c (lookup_host): Don't initialize TMPSTORE directly because
6271         it's not legal C.
6272
6273 2001-12-03  Hrvoje Niksic  <hniksic@arsdigita.com>
6274
6275         * ftp-basic.c (ftp_port): Don't return HOSTERR if we fail getting
6276         the socket data.
6277
6278         * ftp.c: Ditto.
6279
6280         * http.c: No need to declare h_errno.
6281
6282         * host.c: Declare h_errno.
6283
6284 2001-12-02  Hrvoje Niksic  <hniksic@arsdigita.com>
6285
6286         * utils.c (file_merge): If BASE doesn't contain a slash, just
6287         return a copy of FILE.
6288
6289 2001-12-02  Hrvoje Niksic  <hniksic@arsdigita.com>
6290
6291         * version.c: Wget 1.8-beta2 is released.
6292
6293 2001-12-01  Hrvoje Niksic  <hniksic@arsdigita.com>
6294
6295         * ftp.c (getftp): When PWD fails, assume "/".
6296
6297         * ftp-basic.c (ftp_syst): Fix indentation.
6298
6299 2001-12-01  Hrvoje Niksic  <hniksic@arsdigita.com>
6300
6301         * url.c (get_urls_file): If opt.base_href is specified, merge each
6302         URL with the base.
6303
6304 2001-12-01  Hrvoje Niksic  <hniksic@arsdigita.com>
6305
6306         * main.c (print_help): Don't document the removed `-nh'.
6307
6308 2001-12-01  Hrvoje Niksic  <hniksic@arsdigita.com>
6309
6310         * url.c (url_full_path): Document better.
6311
6312         * http.c (gethttp): Use the full path when creating digest
6313         authorization.
6314
6315 2001-12-01  Hrvoje Niksic  <hniksic@arsdigita.com>
6316
6317         * cookies.c (path_matches): Return 0 if PREFIX doesn't begin with
6318         '/'.
6319
6320 2001-12-01  Hrvoje Niksic  <hniksic@arsdigita.com>
6321
6322         * cookies.c (path_matches): FULL_PATH doesn't begin with '/', but
6323         PREFIX does.
6324
6325 2001-12-01  Hrvoje Niksic  <hniksic@arsdigita.com>
6326
6327         * cookies.c (check_domain_match): Reimplement to match Netscape's
6328         "preliminary specification" for cookies.
6329
6330 2001-12-01  Hrvoje Niksic  <hniksic@arsdigita.com>
6331
6332         * url.c (replace_attr_refresh_hack): New function.
6333         (convert_links): Call replace_attr_refresh_hack for Refresh
6334         links.  It will add the "TMOUT; URL=" junk before the link.
6335
6336         * html-url.c (collect_tags_mapper): Set ID to the ID of the
6337         "content" attribute, not "http-equiv".
6338         (collect_tags_mapper): Don't use OFFSET to hack the raw_* values;
6339         instead, store the information that this entry belongs to a
6340         "refresh" link.
6341
6342 2001-12-01  Hrvoje Niksic  <hniksic@arsdigita.com>
6343
6344         * version.c: Wget 1.8-beta1 is released.
6345
6346 2001-12-01  Hrvoje Niksic  <hniksic@arsdigita.com>
6347
6348         * recur.c (retrieve_tree): Allow -p retrievals to exceed maximum
6349         depth by more than one.
6350
6351 2001-11-30  Hrvoje Niksic  <hniksic@arsdigita.com>
6352
6353         * retr.c (retrieve_url): Don't allow more than 20 redirections.
6354
6355 2001-11-30  Hrvoje Niksic  <hniksic@arsdigita.com>
6356
6357         * recur.c (retrieve_tree): Skip the non-inline entries when
6358         enqueuing the children of a leaf HTML node in -p mode.
6359         (descend_url_p): Ignore opt.no_parent when in -p mode and UPOS is
6360         "inline".
6361
6362         * html-url.c (get_urls_html): Don't accept dash_p_leaf_HTML.
6363         (collect_tags_mapper): When an entry is "inline", mark it as such.
6364
6365         * recur.c (descend_url_p): Fix test when checking for
6366         acceptance/rejection rules.
6367
6368 2001-10-31 Daniel BODEA <dali@dali-designs.com>
6369
6370         * netrc.c (search_netrc): When slack_default is 0, still look for
6371         an account with matching password, just not the "default account".
6372         HTTP Authorization using .netrc should now work as expected.
6373
6374 2001-11-30  T. Bharath  <TBharath@responsenetworks.com>
6375
6376         * http.c (persistent_available_p): Call SHUTDOWN_SSL if
6377         test_socket_open fails.
6378
6379 2001-11-30  Hrvoje Niksic  <hniksic@arsdigita.com>
6380
6381         * progress.c (display_image): Just print one CR to reset the
6382         cursor position.
6383
6384 2001-11-30  Christian Fraenkel  <c.fraenkel@gmx.net>
6385
6386         * init.c: New command `ssl_egd_sock'.
6387
6388         * main.c (main): New option `--sslegdsock'.
6389
6390         * gen_sslfunc.c (ssl_init_prng): Seed the RNG using EGD.
6391
6392 2001-11-29  Hrvoje Niksic  <hniksic@arsdigita.com>
6393
6394         * cmpt.c (memmove): Include a simple memmove implementation.
6395
6396 2001-11-29  Hrvoje Niksic  <hniksic@arsdigita.com>
6397
6398         * headers: Guard against header files being included twice.
6399
6400 2001-11-29  Hrvoje Niksic  <hniksic@arsdigita.com>
6401
6402         * gen-md5.c: Use unsigned char * as the buffer argument to
6403         gen_md5_update.
6404
6405 2001-11-29  Hrvoje Niksic  <hniksic@arsdigita.com>
6406
6407         * connect.h: Declare select_fd.
6408
6409 2001-11-29  Hrvoje Niksic  <hniksic@arsdigita.com>
6410
6411         * recur.c (descend_url_p): When resolving no_parent, compare with
6412         start_url, not parent url.  Otherwise link from /a/b/ to /a/c/
6413         wouldn't be followed, although the download started from /a/.
6414
6415 2001-01-23  Herold Heiko  <Heiko.Herold@previnet.it>
6416
6417         * config.h.ms, mswindows.h: defined HAVE_ISATTY, use _isatty for
6418         MS VC; somebody with Borland compiler please check and provide
6419         patch if possible;
6420
6421         * cmpt.c: provided a usleep emulation.
6422
6423 2001-11-29  Hrvoje Niksic  <hniksic@arsdigita.com>
6424
6425         * host.c (address_list_new): Initialize al->faulty.
6426
6427 2001-11-29  Hrvoje Niksic  <hniksic@arsdigita.com>
6428
6429         * http.c (http_process_range): Accept the broken output of
6430         "JavaWebServer/1.1.1".
6431
6432 2001-11-28  Hrvoje Niksic  <hniksic@arsdigita.com>
6433
6434         * progress.c (dot_set_params): If PARAMS is unspecified, use
6435         dot_style, if available.
6436
6437         * init.c: Ditto.
6438
6439         * main.c (main): Resurect --dot-style.
6440
6441         * progress.c (dot_finish): Print the quantity if we're left at the
6442         beginning of a row.
6443
6444 2001-11-27  Hrvoje Niksic  <hniksic@arsdigita.com>
6445
6446         * cmpt.c (random): Removed.
6447
6448         * retr.c (sleep_between_retrievals): Use the more portable rand()
6449         instead of random().
6450
6451 2001-11-27  Ian Abbott <abbotti@mev.co.uk>
6452
6453         * retr.c (retrieve_from_file): Initialize `new_file' to NULL to
6454         prevent seg fault.
6455
6456 2001-11-27  Hrvoje Niksic  <hniksic@arsdigita.com>
6457
6458         * connect.c (connect_to_many): Use address_list_set_faulty to
6459         prevent the faulty address from being reused.
6460
6461         * host.c (address_list_set_faulty): New function.
6462         (address_list_get_bounds): New function, instead of
6463         address_list_count.
6464
6465 2001-11-27  Hrvoje Niksic  <hniksic@arsdigita.com>
6466
6467         * url.c (convert_links): Don't translate %d-%d.
6468
6469         * main.c (print_help): Remove stray HAVE_RANDOM code.
6470
6471 2001-11-27  Hrvoje Niksic  <hniksic@arsdigita.com>
6472
6473         * ftp.c (getftp): Improve output after sending PASV.  Don't
6474         attempt to "look up" the IP address we already know; call
6475         connect_to_one directly.
6476
6477 2001-11-27  Hrvoje Niksic  <hniksic@arsdigita.com>
6478
6479         * progress.c: Change the default progress implementation to "bar".
6480
6481 2001-11-27  Hrvoje Niksic  <hniksic@arsdigita.com>
6482
6483         * progress.c (bar_create): Print two newlines.
6484
6485 2001-11-27  Hrvoje Niksic  <hniksic@arsdigita.com>
6486
6487         * cmpt.c (random): New function, a simple-minded replacement for
6488         random() on systems that don't have it.
6489
6490 2001-11-26  Hrvoje Niksic  <hniksic@arsdigita.com>
6491
6492         * config.h.in: Put a HAVE_USLEEP stub.
6493
6494         * cmpt.c (usleep): Replacement implementation of usleep using
6495         select.
6496
6497         * init.c: New option init_rate.
6498
6499         * main.c (main): New option --limit-rate.
6500
6501         * retr.c (limit_bandwidth): New function.
6502         (get_contents): Call it to limit the bandwidth used when
6503         downloading.
6504
6505         * progress.c (dot_update): Would print the wrong download speed on
6506         rows other than the first one when the download was continued.
6507         (dot_finish): Ditto.
6508
6509 2001-11-26  Ian Abbott <abbotti@mev.co.uk>
6510
6511         * http.c (gethttp): fix undeclared variable 'err' when compiled
6512         with HAVE_SSL.
6513
6514 2001-11-26  Hrvoje Niksic  <hniksic@arsdigita.com>
6515
6516         * progress.c: Don't allocate new timers; use the timing data
6517         propagated from the caller.
6518
6519         * retr.c (get_contents): Allocate and use a timer.
6520
6521 2001-11-26  Hrvoje Niksic  <hniksic@arsdigita.com>
6522
6523         * http.c (last_host_ip): Made into an address_list.
6524         (invalidate_persistent): Release pc_last_host_ip.
6525         (register_persistent): Use lookup_host.
6526         (persistent_available_p): Check for equality of hosts using
6527         address_list_match_all.  Call address_list_release.
6528         (http_cleanup): New function.
6529
6530         * ftp.c (getftp): Use lookup_host and connect_to_many.
6531
6532         * http.c (gethttp): Use lookup_host and connect_to_many.
6533
6534         * connect.c (make_connection): Removed.
6535         (connect_to_one): New function.
6536         (connect_to_many): Ditto.
6537         (set_connection_host_name): Ditto.
6538
6539         * host.c (lookup_host): New function; new return type.
6540         (address_list_new): New function.
6541         (address_list_count): Ditto.
6542         (address_list_copy_one): Ditto.
6543         (address_list_delete): Ditto.
6544         (address_list_release): Ditto.
6545         (pretty_print_address): Ditto.
6546
6547 2001-11-26  Hrvoje Niksic  <hniksic@arsdigita.com>
6548
6549         * recur.c (retrieve_tree): In case of followed redirection,
6550         blacklist the pre-redirection URL.
6551
6552 2001-11-26  Hrvoje Niksic  <hniksic@arsdigita.com>
6553
6554         * recur.c (descend_redirect_p): New function.
6555         (retrieve_tree): Make sure redirections are not blindly followed.
6556
6557 2001-11-04  Alan Eldridge  <alane@geeksrus.net>
6558
6559         * config.h.in: added HAVE_RANDOM.
6560
6561         * options.h: added random_wait to struct options.
6562
6563         * main.c (print_help [HAVE_RANDOM], main): added arg parsing, help
6564         for --random-wait.
6565
6566         * retr.c (sleep_between_retrievals) [HAVE_RANDOM]: added
6567         implementation of random wait times.
6568
6569         * init.c (commands): added "randomwait" keyword.
6570
6571 2001-11-25  Hrvoje Niksic  <hniksic@arsdigita.com>
6572
6573         * recur.c (descend_url_p): Be more conservative with blacklisting
6574         URLs.
6575         (convert_all_links): Print how many files have been converted, and
6576         how long it took.
6577
6578         * progress.c (create_image): Place the number of downloaded bytes
6579         right after the progress bar.
6580
6581         * utils.c (suffix): Return a pointer into the string.
6582
6583 2001-11-25  Hrvoje Niksic  <hniksic@arsdigita.com>
6584
6585         * url.c (convert_links): Handle CO_NULLIFY_BASE.
6586
6587         * recur.c (retrieve_tree): Ignore download-ignorable children.
6588         (convert_all_links): Specify CO_NULLIFY_BASE when link_base_p.
6589
6590         * html-url.c (handle_link): Return the newly created urlpos.
6591         (collect_tags_mapper): When dealing with BASE, store the base
6592         reference and mark it as download-ignorable.
6593
6594 2001-11-25  Hrvoje Niksic  <hniksic@arsdigita.com>
6595
6596         * url.c (convert_links): Attempt to quote '?' as "%3F" when
6597         linking to local files.  Given up on the attempt, as it breaks
6598         local browsing.
6599
6600 2001-11-25  Hrvoje Niksic  <hniksic@arsdigita.com>
6601
6602         * main.c (private_initialize): Removed.
6603         (main): Don't call private_initialize.
6604
6605         * http.c: Call lookup_host.
6606
6607         * host.c (host_init): Removed.
6608         (add_host_to_cache): Initialize host_name_address_map here, on
6609         demand.
6610         (ngethostbyname): Commented out.
6611
6612         * connect.c (make_connection): Remove dead code; use lookup_host.
6613
6614         * host.c (store_hostaddress): Renamed to lookup_host and reversed
6615         the args.
6616         Removed host_address_name_map and host_slave_master_map.
6617
6618 2001-11-25  Hrvoje Niksic  <hniksic@arsdigita.com>
6619
6620         * progress.c (dot_create): Align the "[ skipping ... ]" string
6621         with the dots.
6622
6623         * retr.c (rate): Split into two functions: calc_rate and
6624         retr_rate.
6625
6626         * progress.c (create_image): Draw a dummy progress bar even when
6627         total size is unknown.
6628         (display_image): Place the text cursor at the end of the "image".
6629
6630 2001-11-25  Hrvoje Niksic  <hniksic@arsdigita.com>
6631
6632         * url.c (reencode_string): Use unsigned char, not char --
6633         otherwise the hex digits come out wrong for 8-bit chars such as
6634         nbsp.
6635         (lowercase_str): New function.
6636         (url_parse): Canonicalize u->url if needed.
6637         (get_urls_file): Parse each URL, and return only the valid ones.
6638         (free_urlpos): Call url_free.
6639         (mkstruct): Add :port if the port is non-standard.
6640         (mkstruct): Append the query string to the file name, if any.
6641         (urlpath_length): Use strpbrk_or_eos.
6642         (uri_merge_1): Handle the cases where LINK is an empty string,
6643         where LINK consists only of query, and where LINK consists only of
6644         fragment.
6645         (convert_links): Count and report both kinds of conversion.
6646         (downloaded_file): Use a hash table, not a list.
6647         (downloaded_files_free): Free the hash table.
6648
6649         * retr.c (retrieve_from_file): Ditto.
6650
6651         * main.c (main): Call either retrieve_url or retrieve_tree
6652         for each URL, not both.
6653
6654         * retr.c (register_all_redirections): New function.
6655         (register_redirections_mapper): Ditto.
6656         (retrieve_url): Register the redirections.
6657         (retrieve_url): Make the string "Error parsing proxy ..." 
6658         translatable.
6659
6660         * res.c (add_path): Strip leading slash from robots.txt paths so
6661         that the path representations are "compatible".
6662         (free_specs): Free each individual path, too.
6663         (res_cleanup): New function.
6664         (cleanup_hash_table_mapper): Ditto.
6665
6666         * recur.c (url_queue_new): New function.
6667         (url_queue_delete): Ditto.
6668         (url_enqueue): Ditto.
6669         (url_dequeue): Ditto.
6670         (retrieve_tree): New function, replacement for recursive_retrieve.
6671         (descend_url_p): New function.
6672         (register_redirection): New function.
6673
6674         * progress.c (create_image): Cosmetic changes.
6675
6676         * init.c (cleanup): Do all those complex cleanups only if
6677         DEBUG_MALLOC is defined.
6678
6679         * main.c: Removed --simple-check and the corresponding
6680         simple_host_check in init.c.
6681
6682         * html-url.c (handle_link): Parse the URL here, and propagate the
6683         parsed URL to the caller, who would otherwise have to parse it
6684         again.
6685
6686         * host.c (xstrdup_lower): Moved to utils.c.
6687         (realhost): Removed.
6688         (same_host): Ditto.
6689
6690 2001-11-24  Hrvoje Niksic  <hniksic@arsdigita.com>
6691
6692         * utils.c (path_simplify): Preserver the (non-)existence of
6693         leading slash.  Return non-zero if changes were made.
6694
6695 2001-11-24  Hrvoje Niksic  <hniksic@arsdigita.com>
6696
6697         * progress.c (bar_update): Don't modify bp->total_length if it is
6698         zero.
6699
6700 2001-11-24  Hrvoje Niksic  <hniksic@arsdigita.com>
6701
6702         * retr.c (retrieve_url): When the redirection URL doesn't parse,
6703         print the correct error message rather than "UNKNOWN".
6704
6705 2001-11-24  Hrvoje Niksic  <hniksic@arsdigita.com>
6706
6707         * progress.c (bar_finish): If the timer didn't record any time
6708         since the download beginning, fake 1ms.
6709
6710 2001-11-24  Hrvoje Niksic  <hniksic@arsdigita.com>
6711
6712         * recur.c (recursive_retrieve): Fix typo.
6713
6714 2001-11-23  Hrvoje Niksic  <hniksic@arsdigita.com>
6715
6716         * progress.c (create_image): Don't translate "%ld ".
6717
6718 2001-11-23  Hrvoje Niksic  <hniksic@arsdigita.com>
6719
6720         * progress.c (bar_set_params): Allow the user to force the use of
6721         the bar.
6722
6723 2001-11-23  Lemble Gregory  <gregory.lemble@st.com>
6724
6725         * gen_sslfunc.c (ssl_init_prng): New function; seed the SSL RNG.
6726
6727 2001-11-23  Hrvoje Niksic  <hniksic@arsdigita.com>
6728
6729         * progress.c: Renamed dp_* functions to dot_* for greater clarity
6730         and consistency with bar_*.
6731         (print_download_speed): Get rid of the unneeded '@' character.
6732         (create_image): Fix download rate geometry.
6733
6734         * progress.c (print_elapsed): Remove spurious space.
6735         (print_elapsed): Renamed to print_download_speed, since that's
6736         what it does.
6737
6738 2001-11-23  Hrvoje Niksic  <hniksic@arsdigita.com>
6739
6740         * progress.c (bar_update): If the downloaded amount becomes larger
6741         than the expected amount, adjust the expected amount accordingly.
6742
6743 2001-11-23  Hrvoje Niksic  <hniksic@arsdigita.com>
6744
6745         * utils.c (determine_screen_width): New function.
6746
6747         * main.c (main): New option `--progress=TYPE'.
6748         (main): Implement compatibility with the old option `--dot-style'.
6749
6750         * init.c: Removed cmd_spec_dotstyle -- that logic is now in
6751         dp_set_params.
6752         (cmd_spec_progress): New function.
6753
6754         * retr.c (get_contents): Use the progress_* functions instead of
6755         the old show_progress().
6756         (show_progress): Removed.
6757         (rate): Print "xxxx.xx K/s" instead of "KB/s".  Ditto for MB/s,
6758         etc.
6759
6760         * progress.c (set_progress_implementation): New function.
6761         (valid_progress_implementation_p): Ditto.
6762         (progress_create): Ditto.
6763         (progress_update): Ditto.
6764         (progress_finish): Ditto.
6765         (dp_create): Ditto.
6766         (dp_update): Ditto.
6767         (dp_finish): Ditto.
6768         (dp_set_params): Ditto.
6769         (print_elapsed): Ditto.
6770
6771 2001-11-22  Hrvoje Niksic  <hniksic@arsdigita.com>
6772
6773         * retr.c (show_progress): Use it.
6774
6775         * log.c (log_set_flush): New function.
6776
6777 2001-11-22  Hrvoje Niksic  <hniksic@arsdigita.com>
6778
6779         * utils.c (path_simplify): Don't remove trailing slashes.
6780
6781         * ftp.c (ftp_get_listing): Use it.
6782
6783         * utils.c (file_merge): New function.
6784
6785         * url.c (opt_url): Removed.
6786
6787         * recur.c (recursive_retrieve): Inline "opt_url" logic.
6788
6789         * main.c (main): Use xfree(), not free().
6790
6791         * url.c (rewrite_url_maybe): Renamed to rewrite_shorthand_url.
6792
6793         * ftp.c (ccon): Move `ccon' typedef here, since it's only used
6794         internally.
6795
6796         * config.h.in: Include a stub for HAVE_STRPBRK.
6797
6798         * cmpt.c (strpbrk): Include a replacement for systems without
6799         strpbrk().
6800
6801         * ftp.c: Use url_set_dir and url_set_file when modifying the URL.
6802
6803         * url.c (url_set_dir): New function.
6804         (url_set_file): Ditto.
6805
6806         * ftp-basic.c (ftp_process_type): Process FTP type here; the URL
6807         parser makes the URL "params" available, so we can do that in this
6808         function.
6809
6810         * retr.c: Ditto.
6811
6812         * ftp.c: Ditto; pass the local file information in `ccon'.
6813
6814         * http.c: Get rid of the ugly kludge that had URL being replaced
6815         with the proxy URL when proxy retrieval was requested.  Use a
6816         separate parameter to http_loop and gethttp for the proxy URL.
6817
6818         * http.c: Changed to reflect the fact that local file, proxy, and
6819         referer information are no longer stored in struct url.  The local
6820         file information is passed in `struct hstat' now.
6821
6822         * url.c: Reworked URL parsing to be more regular.  Reencode the
6823         URL using reencode_string.
6824         Removed non-URL-related information from struct url.  This
6825         includes fields `proxy', `local', and `referer'.
6826
6827 2001-11-22  Jochen Hein  <jochen@jochen.org>
6828
6829         * main.c (main): Split the copyright notice for easier
6830         translation.
6831
6832 2001-08-21  Dave Turner <dct25@hermes.cam.ac.uk>
6833
6834         * ftp-basic.c (ftp_size): New function to send non-standard SIZE
6835           command to server to request file size.
6836         * ftp.h (ftp_size): Export it.
6837         * ftp.c (getftp): Use new ftp_size function if restoring
6838           transfer of a file with unknown size.
6839
6840 2001-11-20  Hrvoje Niksic  <hniksic@arsdigita.com>
6841
6842         * url.c (parseurl): Don't depend on the now-obsolete TYPE.
6843
6844 2001-11-19  Hrvoje Niksic  <hniksic@arsdigita.com>
6845
6846         * url.c (getproxy): Handle URL shorthands.
6847
6848 2001-11-19  Hrvoje Niksic  <hniksic@arsdigita.com>
6849
6850         * main.c: Remove --wait / --waitretry backwards compatibility
6851         code.
6852         
6853 2001-11-19  Hrvoje Niksic  <hniksic@arsdigita.com>
6854
6855         * main.c (main): Use it.
6856
6857         * url.c (rewrite_url_maybe): New function.
6858
6859 2001-11-19  Hrvoje Niksic  <hniksic@arsdigita.com>
6860
6861         * url.c: Clean up handling of URL schemes.
6862
6863 2001-05-13  Hrvoje Niksic  <hniksic@arsdigita.com>
6864
6865         * url.c: Get rid of `protostrings'.
6866         (skip_proto): Don't use protostrings.
6867         (has_proto): Ditto.
6868
6869 2001-11-18  Hrvoje Niksic  <hniksic@arsdigita.com>
6870
6871         * Makefile.in: Conditionally compile getopt.o.
6872
6873 2001-11-18  Hrvoje Niksic  <hniksic@arsdigita.com>
6874
6875         * md5.h: Renamed to gnu-md5.h.
6876
6877         * md5.c: Renamed to gnu-md5.c.
6878
6879         * http.c: Ditto.
6880
6881         * ftp-opie.c: Use the new macros.
6882
6883         * sysdep.h: Define md5-related macros.
6884
6885         * config.h.in: Define HAVE_SOLARIS_MD5 or HAVE_BUILTIN_MD5
6886         depending on which md5 implementation is used.
6887
6888 2001-11-18  Hrvoje Niksic  <hniksic@arsdigita.com>
6889
6890         * res.c (res_register_specs): Initialize OLD and HP_OLD to appease
6891         the compiler.
6892
6893 2001-11-18  Hrvoje Niksic  <hniksic@arsdigita.com>
6894
6895         * http.c (gethttp): Print the whole response line when printing
6896         headers is requested.
6897
6898 2001-05-12  Hrvoje Niksic  <hniksic@arsdigita.com>
6899
6900         * res.c: New file.  Implement all RES-related code here.
6901
6902 2001-11-18  Hrvoje Niksic  <hniksic@arsdigita.com>
6903
6904         * version.c: Wget 1.7.1 is released.
6905
6906 2001-11-16  Hrvoje Niksic  <hniksic@arsdigita.com>
6907
6908         * headers.c (header_extract_number): Ignore trailing whitespace.
6909
6910 2001-08-24  Ian Abbott  <abbotti@mev.co.uk>
6911
6912         * html-url.c (collect_tags_mapper): Fix bug converting links
6913         with -k option for tags with multiple link attributes by
6914         handling links in the order they appear.
6915
6916 2001-08-15  Ian Abbott  <abbotti@mev.co.uk>
6917
6918         * ftp.c (ftp_loop_internal): Avoid a potential buffer overflow in
6919           the call to the 'rate' function by moving it past the error
6920           checking for the 'getftp' function return value.
6921
6922 2001-11-16  Hrvoje Niksic  <hniksic@arsdigita.com>
6923
6924         * html-parse.c (advance_declaration): Use 0x22 instead of '"' or
6925         '\"'.  Different compilers' assert macros are broken in different
6926         ways.
6927
6928 2001-09-29  Christian Fraenkel  <c.fraenkel@gmx.net>
6929
6930         * http.c (gethttp): print debug output for errors occuring during
6931         the ssl handshake.
6932
6933 2001-11-16  Chris Seawood  <cls@seawood.org>
6934
6935         * init.c: Ditto.
6936
6937         * host.c: Ditto.
6938
6939         * connect.c: Ditto.
6940
6941         * sysdep.h: Support compilation under BEOS.
6942
6943 2001-06-08  Edward J. Sabol  <sabol@alderaan.gsfc.nasa.gov>
6944
6945         * url.c (url_equal): Fix a memory leak when parseurl returns an
6946         error on the second URL. Also, since url_equal is not used at the
6947         moment, do not compile it.
6948
6949         * url.h: Ditto for the prototype of url_equal.
6950
6951 2001-11-16  Hrvoje Niksic  <hniksic@arsdigita.com>
6952
6953         * html-parse.c (map_html_tags): Support XML-style empty tags.
6954
6955 2001-06-26  Hrvoje Niksic  <hniksic@arsdigita.com>
6956
6957         * wget.h (DO_REALLOC_FROM_ALLOCA): Check for do_realloc_newsize in
6958         loop condition because we're no longer setting SIZEVAR here.
6959
6960 2001-06-26  Hrvoje Niksic  <hniksic@arsdigita.com>
6961
6962         * wget.h (DO_REALLOC_FROM_ALLOCA): Set SIZEVAR after the memcpy()
6963         call because it needs the old value.
6964
6965 2001-06-18  Hrvoje Niksic  <hniksic@arsdigita.com>
6966
6967         * cookies.c (ATTR_NAME_CHAR): Allow almost any character to be in
6968         an attribute name.
6969
6970 2001-06-18  Hrvoje Niksic  <hniksic@arsdigita.com>
6971
6972         * url.c (url_filename): Make sure that slashes that sneak in to
6973         u->file via query string get protected.
6974         (file_name_protect_query_string): New function.
6975
6976 2001-06-14  Hrvoje Niksic  <hniksic@arsdigita.com>
6977
6978         * recur.c (recursive_retrieve): Also check undesirable_urls with
6979         canonicalized URL.
6980
6981 2001-06-14  Hrvoje Niksic  <hniksic@arsdigita.com>
6982
6983         * http.c (gethttp): Search `.netrc' with real host, not the proxy
6984         one.
6985
6986 2001-06-14  Hrvoje Niksic  <hniksic@arsdigita.com>
6987
6988         * sysdep.h (MAP_FAILED): Provide MAP_FAILED for systems that don't
6989         define it.
6990
6991 2001-06-09  Jan Prikryl  <prikryl@cg.tuwien.ac.at>
6992
6993         * ftp.h: Provide correct prototype for ftp_parse_ls().
6994
6995 2001-06-04  Hrvoje Niksic  <hniksic@arsdigita.com>
6996
6997         * version.c: Wget 1.7 is released.
6998
6999 2001-06-03  Karl Eichwalder  <ke@suse.de>
7000
7001         * ftp-ls.c (ftp_parse_ls): Fix typo.
7002
7003 2001-05-27  Hrvoje Niksic  <hniksic@arsdigita.com>
7004
7005         * all: Update copyright information.
7006
7007 2001-05-26  Hrvoje Niksic  <hniksic@arsdigita.com>
7008
7009         * http.c (gethttp): Indicate that the continued download failed
7010         for *this* file.
7011
7012 2001-05-26  Hrvoje Niksic  <hniksic@arsdigita.com>
7013
7014         * version.c: Wget 1.7-pre1 is released.
7015
7016 2001-05-26  Hrvoje Niksic  <hniksic@arsdigita.com>
7017
7018         * version.c: Updated version to 1.7-pre1.
7019
7020 2001-05-14  Hrvoje Niksic  <hniksic@arsdigita.com>
7021
7022         * gen_sslfunc.c: Don't include <sys/time.h> directly.
7023
7024 2001-05-14  Hrvoje Niksic  <hniksic@arsdigita.com>
7025
7026         * http.c (gethttp): Use real URL data for cookies, not the proxy
7027         stuff.
7028
7029 2001-05-12  Hrvoje Niksic  <hniksic@arsdigita.com>
7030
7031         * main.c (print_help): Document `--no-http-keep-alive'.
7032
7033         * utils.c (numdigit): Handle negative numbers *correctly*.
7034
7035         * hash.c (make_nocase_string_hash_table): Use term "nocase" rather
7036         than the confusing "unsigned".
7037
7038         * utils.c (string_set_contains): Renamed from string_set_exists.
7039
7040         * hash.c (hash_table_contains): Renamed from hash_table_exists.
7041
7042         * cookies.c: Move case-insensitive hash tables to hash.c.
7043
7044 2001-05-09  Hrvoje Niksic  <hniksic@arsdigita.com>
7045
7046         * http.c (gethttp): Before concluding that the file is already
7047         fully retrieved, make sure that the file existed and `Range' was
7048         actually requested.
7049
7050 2001-05-09  Hrvoje Niksic  <hniksic@arsdigita.com>
7051
7052         * cookies.c (eliminate_dups): New function.
7053         (build_cookies_request): Use it.
7054         (build_cookies_request): Set chain_store_size after reallocating
7055         all_chains.
7056         (check_domain_match): Annotated for easier future debugging.
7057         (store_cookie): In the debug message, print whether the cookie is
7058         permanent.
7059
7060 2001-05-08  Hrvoje Niksic  <hniksic@arsdigita.com>
7061
7062         * http.c (http_loop): Reset no_truncate before deciding whether to
7063         set it.
7064         (gethttp): Further clarify "-c conflicts with existing file" error
7065         message, based on input from Herold Heiko.
7066
7067 2001-05-07  Hrvoje Niksic  <hniksic@arsdigita.com>
7068
7069         * http.c (http_loop): If restval is set, set no_truncate to 1
7070         unconditionally.
7071
7072 2001-05-02  Jan Prikryl  <prikryl@cg.tuwien.ac.at>
7073
7074         * ftp-ls.c (ftp_parse_winnt_ls): Assure months are being correctly
7075         converted. Pointed out by <Stefan.Weil@de.heidelberg.com>.
7076         (ftp_parse_vms_ls): Ditto.
7077
7078 2001-04-30  Hrvoje Niksic  <hniksic@arsdigita.com>
7079
7080         * init.c (cmd_address): Zero SIN before using it; apparently
7081         needed on *BSD.
7082
7083 2001-04-29  Hrvoje Niksic  <hniksic@arsdigita.com>
7084
7085         * ftp.c (ftp_loop_internal): Don't set NO_TRUNCATE if the file is
7086         empty.
7087
7088 2001-04-29  Hrvoje Niksic  <hniksic@arsdigita.com>
7089
7090         * main.c (main): Make `--cookies' respect its argument.
7091
7092 2001-04-28  Hrvoje Niksic  <hniksic@arsdigita.com>
7093
7094         * main.c (main): Removed undocumented option `--email-address'.
7095
7096         * netrc.c: Use the latest read_whole_line.
7097
7098         * init.c (defaults): Set opt.ftp_pass to "-wget@".
7099
7100         * mswindows.c (pwd_cuserid): Ditto.
7101
7102         * utils.c (pwd_cuserid): Removed.
7103
7104         * host.c (ftp_getaddress): Removed.
7105
7106 2001-04-28  Hrvoje Niksic  <hniksic@arsdigita.com>
7107
7108         (http_loop): Allocate space for filename_plus_orig_suffix with
7109         alloca; this is more efficient and removes the need to free it
7110         before each and every return.
7111
7112 2001-04-28  Hrvoje Niksic  <hniksic@arsdigita.com>
7113
7114         * http.c (gethttp): Return RETRUNNEEDED when the retrieval is
7115         unneeded because the file is already there and fully downloaded,
7116         and -c is specified.
7117         (http_loop): Handle RETRUNNEEDED.
7118
7119         * wget.h (uerr_t): New value RETRUNNEEDED.
7120
7121         * http.c (http_loop): Set no_truncate for files that both exist
7122         and are non-empty.
7123         (gethttp): Consider the download finished when restval >= contlen,
7124         not only when restval==contlen.
7125         (gethttp): Handle redirection before giving up due to -c.
7126         (gethttp): Clarify error message which explains that -c will not
7127         truncate the file.
7128         (gethttp): When returning CONTNOTSUPPORTED, don't forget to free
7129         the stuff that needs freeing and release the socket.
7130
7131 2001-04-27  Hrvoje Niksic  <hniksic@arsdigita.com>
7132
7133         * main.c (print_help): Wget booleans accept "off", not "no".
7134
7135 2001-04-27  Hrvoje Niksic  <hniksic@arsdigita.com>
7136
7137         * http.c (http_loop): If allow_cache is zero, always disable
7138         caching, not only when retrieving through proxy.
7139
7140         * init.c: Ditto.
7141
7142         * options.h (struct options): Rename proxy_cache to allow_cache.
7143
7144 2001-04-27  Hrvoje Niksic  <hniksic@arsdigita.com>
7145
7146         * http.c (mktime_from_utc): Improve documentation.
7147         (http_atotm): Put format strings into a separate array.
7148
7149 2001-04-27  Hrvoje Niksic  <hniksic@arsdigita.com>
7150
7151         * safe-ctype.h: Instead of throwing #error when isalpha is
7152         defined, redefine it to something that will throw a compile-time
7153         error if actually *used*.  Do the same for the rest of the
7154         standard C macros.
7155
7156 2001-04-26  Hrvoje Niksic  <hniksic@arsdigita.com>
7157
7158         * url.c (getproxy): Ignore empty proxy vars.
7159
7160 2001-04-25  Hrvoje Niksic  <hniksic@arsdigita.com>
7161
7162         * http.c (http_loop): Would load cookies every time.
7163
7164         * cookies.c (load_cookies): Handle cookies whose values contain
7165         embedded spaces.
7166
7167 2001-04-25  Hrvoje Niksic  <hniksic@arsdigita.com>
7168
7169         * utils.c: Define each DIGITS_* in one line.
7170
7171 2001-04-25  Roger L. Beeman  <beeman@cisco.com>
7172
7173         * http.c (http_atotm): Initialize t.tm_isdst to 0.
7174         (mktime_from_utc): Prevent mktime() from having discontinuities at
7175         DST transition points.
7176
7177 2001-04-25  Hrvoje Niksic  <hniksic@arsdigita.com>
7178
7179         * html-url.c (get_urls_html): Fix documentation.
7180
7181 2001-04-25  Hrvoje Niksic  <hniksic@arsdigita.com>
7182
7183         * url.c (UNSAFE_CHAR): Reimplement using a static table.
7184         (url_init): Removed.
7185         (init_unsafe_char_table): Removed.
7186
7187 2001-04-25  Hrvoje Niksic  <hniksic@arsdigita.com>
7188
7189         * snprintf.c (dopr): Replace ISDIGIT with '0' <= ch && ch <= '9'.
7190
7191 2001-04-25  Hrvoje Niksic  <hniksic@arsdigita.com>
7192
7193         * utils.c: Document timer functions.
7194
7195         * retr.c (rate): Use it.
7196         (rate): Print in GB/s if transfer rate exceeds 1 GB/s.
7197
7198         * utils.c (wtimer_granularity): New function.
7199
7200 2001-04-24  Hrvoje Niksic  <hniksic@arsdigita.com>
7201
7202         * retr.c (show_progress): Ditto.
7203
7204         * ftp.c (getftp): Ditto.
7205
7206         * http.c (gethttp): Use new timer functions.
7207
7208         * utils.c (wtimer_allocate): New function.
7209         (wtimer_new): Ditto.
7210         (wtimer_delete): Ditto.
7211         (wtimer_reset): Ditto.
7212         (wtimer_elapsed): Ditto.
7213
7214 2001-04-24  Hrvoje Niksic  <hniksic@arsdigita.com>
7215
7216         * utils.c (long_to_string): New, faster version.  Favors smaller
7217         numbers; much of the calculation is now done at compile-time.
7218
7219 2001-04-24  Hrvoje Niksic  <hniksic@arsdigita.com>
7220
7221         * utils.c (numdigit): Handle negative numbers.
7222
7223 2001-04-23  Hrvoje Niksic  <hniksic@arsdigita.com>
7224
7225         * retr.c (show_progress): Print the download rate even when the
7226         percentages are not available.
7227
7228 2001-04-21  Hrvoje Niksic  <hniksic@arsdigita.com>
7229
7230         * ftp.c (getftp): Adjust expected_bytes if the length is
7231         authoritative.
7232
7233 2001-04-14  Hrvoje Niksic  <hniksic@arsdigita.com>
7234
7235         * url.c: Don't declare `construct'.
7236
7237         * hash.c (grow_hash_table): Speed up rehashing; inline storing of
7238         mappings to new locations.
7239         (hash_table_new): Make resize_threshold a field in the hash table,
7240         so we don't have to recalculate it in each hash_table_put.
7241         (grow_hash_table): Update resize_threshold.
7242         (MAX): Remove unused macro.
7243         (prime_size): Made static.
7244
7245 2001-04-14  Hrvoje Niksic  <hniksic@arsdigita.com>
7246
7247         * retr.c (retrieve_url): Call uri_merge, not url_concat.
7248
7249         * html-url.c (collect_tags_mapper): Call uri_merge, not
7250         url_concat.
7251
7252         * url.c (mkstruct): Use encode_string instead of xstrdup followed
7253         by URL_CLEANSE.
7254         (path_simplify_with_kludge): Deleted.
7255         (contains_unsafe): Deleted.
7256         (construct): Renamed to uri_merge_1.
7257         (url_concat): Renamed to uri_merge.
7258
7259 2001-04-13  Hrvoje Niksic  <hniksic@arsdigita.com>
7260
7261         * url.c (str_url): Use encode_string instead of the unnecessary
7262         CLEANDUP.
7263         (encode_string_maybe): New function, returns input string if no
7264         encoding is needed.
7265         (encode_string): Call encode_string_maybe to do the dirty work,
7266         xstrdup if no work needed.
7267
7268 2001-04-13  Hrvoje Niksic  <hniksic@arsdigita.com>
7269
7270         * wget.h (XDIGIT_TO_xchar): Define here.
7271
7272         * url.c (decode_string): Use new name.
7273         (encode_string): Ditto.
7274
7275         * http.c (XDIGIT_TO_xchar): Rename HEXD2asc to XDIGIT_TO_xchar.
7276         (dump_hash): Use new name.
7277
7278         * wget.h: Rename ASC2HEXD and HEXD2ASC to XCHAR_TO_XDIGIT and
7279         XDIGIT_TO_XCHAR respectively.
7280
7281 2001-04-13  Hrvoje Niksic  <hniksic@arsdigita.com>
7282
7283         * init.c: Include cookies.h.
7284
7285         * cookies.h: Declare cookies_cleanup.
7286
7287         * cookies.c (check_domain_match): Remove unused variable.
7288         (save_cookies): Remove extraneous argument from debug statement.
7289
7290         * host.c (same_host): Don't call skip_url.
7291
7292         * url.c (skip_url): Removed.  Removed its calls from various
7293         functions in url.c.
7294
7295 2001-04-13  Hrvoje Niksic  <hniksic@arsdigita.com>
7296
7297         * cookies.c (unsigned_string_hash): Use the new code in
7298         string_hash as reference.
7299
7300         * hash.c (hash_table_map): Allow deletion and change of the
7301         element processed by MAPFUN.
7302         (string_hash): Use the function from glib.
7303
7304 2001-04-12  Hrvoje Niksic  <hniksic@arsdigita.com>
7305
7306         * config.h.in: Include #undef stub.
7307
7308         * hash.c (hash_table_remove): Rewrite to actually clear deleted
7309         entries instead of just marking them as deleted.
7310
7311 2001-04-12  Hrvoje Niksic  <hniksic@arsdigita.com>
7312
7313         * hash.h: Declare hash_table_get_pair and hash_table_count.
7314
7315 2001-04-12  Hrvoje Niksic  <hniksic@arsdigita.com>
7316
7317         * cookies.c: Declare http_atotm.
7318
7319 2001-04-12  Hrvoje Niksic  <hniksic@arsdigita.com>
7320
7321         * ftp-ls.c (ftp_parse_unix_ls): Use octal constants for
7322         permissions.  A compiler that doesn't accept octal constants is
7323         seriously broken and shouldn't be used -- octal constants were
7324         present in K&R C!
7325
7326 2001-01-20  Karl Eichwalder  <ke@suse.de>
7327
7328         * Makefile.in: Provide and use DESTDIR according to the Coding
7329         Standards.
7330
7331 2001-04-12  Hrvoje Niksic  <hniksic@arsdigita.com>
7332
7333         * ftp-ls.c (ftp_parse_vms_ls): Make seconds optional in time
7334         specification.
7335
7336 2001-04-11  Hrvoje Niksic  <hniksic@arsdigita.com>
7337
7338         * url.c (parseurl): Don't strip trailing slash when u->dir is "/"
7339         because that strips the *leading* slash, thus forcing relative
7340         FTP retrieval.
7341
7342 2001-04-10  Jan Prikryl  <prikryl@cg.tuwien.ac.at>
7343
7344         * ftp.c (getftp): Convert initial FTP directory from VMS to UNIX
7345         notation for VMS servers. 
7346         (ftp_retrieve_dirs): Do not prepend '/' to f->name when
7347         odir is an empty string.
7348
7349 2001-04-10  Jan Prikryl  <prikryl@cg.tuwien.ac.at>
7350
7351         * ftp-ls.c (ftp_parse_winnt_ls): Made the fix for AM/PM more
7352         effective. Suggested by Edward J. Sabol.
7353
7354 2001-04-10  Hrvoje Niksic  <hniksic@arsdigita.com>
7355
7356         * cookies.c (build_cookies_request): Use and sort cookies from all
7357         matching domains.
7358         (build_cookies_request): Check for duplicates before generating
7359         the `Cookies' header.
7360
7361         * main.c (main): Don't load cookies here.
7362         (main): Make loadcookies and savecookies call the correct command.
7363
7364         * http.c (http_loop): Load cookies on-demand.
7365
7366 2001-04-09  Hrvoje Niksic  <hniksic@arsdigita.com>
7367
7368         * http.c (gethttp): Fix indentation of SSL ifdef.
7369
7370 2001-04-09  Hrvoje Niksic  <hniksic@arsdigita.com>
7371
7372         * ftp.c (ftp_retrieve_dirs): Don't forcibly prepend "/" to u->dir;
7373         that hack is no longer necessary.
7374         (getftp): Prepend initial directory to *non*-absolute u->dir's.
7375
7376 2001-04-09  Hrvoje Niksic  <hniksic@arsdigita.com>
7377
7378         * init.c (cmd_file): New function.
7379         (enable_tilde_expansion): New variable.
7380         (run_wgetrc): Use it.
7381         (cmd_file): Use it.
7382
7383 2001-04-08  Hrvoje Niksic  <hniksic@arsdigita.com>
7384
7385         * init.c: Include cookie-related options.
7386
7387         * main.c (main): Include cookie-specific options.
7388         (main): Load cookies before download is finished.
7389         (main): Save cookies when done.
7390
7391         * http.c (gethttp): Process the `Set-Cookie' header.
7392         (gethttp): Include cookies in the response.
7393
7394         * cookies.c: New file.
7395
7396 2001-04-08  Hrvoje Niksic  <hniksic@arsdigita.com>
7397
7398         * utils.c (datetime_str): New function.
7399
7400 2001-04-08  Jan Prikryl  <prikryl@cg.tuwien.ac.at>
7401
7402         * ftp-ls.c (ftp_parse_winnt_ls): The AM/PM change did assume
7403         12:01PM == 00:01, which was obviously wrong. Taken care of this
7404         anomaly.
7405
7406         * ChangeLog: Removed an excess conflict marker. Reformatted the
7407         entry by Philipp Thomas from 2001-03-09.
7408
7409         * ftp-ls.c (ftp_parse_winnt_ls): Ensure that adjusted PM hours lay
7410         between 0 and 23. Elminate unused variable `sec'.
7411
7412 2001-04-08  Hrvoje Niksic  <hniksic@arsdigita.com>
7413
7414         * hash.c (hash_table_count): New function.
7415
7416 2001-04-06  Hrvoje Niksic  <hniksic@arsdigita.com>
7417
7418         * utils.c (read_file): Cast MAP_FAILED to char *.  Enforced by
7419         Digital Unix cc.
7420
7421 2001-04-06  Hrvoje Niksic  <hniksic@arsdigita.com>
7422
7423         * config.h.in: Oops, do the namespace tweaks only on systems we
7424         know about.
7425
7426 2001-04-06  Hrvoje Niksic  <hniksic@arsdigita.com>
7427
7428         * hash.c: Include <string.h>.
7429
7430 2001-04-06  Hrvoje Niksic  <hniksic@arsdigita.com>
7431
7432         * config.h.in: Define "compilation environment" options that work
7433         under Linux and Solaris.  To be reviewed on other OS'es.
7434
7435 2001-04-06  Hrvoje Niksic  <hniksic@arsdigita.com>
7436
7437         * http.c (gethttp): Prepend literal newline with `\n\'.
7438
7439 2001-04-06  Hrvoje Niksic  <hniksic@arsdigita.com>
7440
7441         * sysdep.h: Don't define VERY_LONG_FORMAT.
7442
7443         * utils.c (very_long_to_string): New function.
7444         (legible_very_long): Use it; don't use VERY_LONG_FORMAT.
7445
7446 2001-04-04  Christian Fraenkel  <christian.fraenkel@gmx.net>
7447
7448         * url.c (parse_uname): Would run past the end of the string if the
7449         username was present, but the URL did not contain a slash, e.g.
7450         http://foo:bar@myhost.
7451
7452 2001-04-03  KOJIMA Hajime  <kjm@rins.ryukoku.ac.jp>
7453
7454         * http.c (http_atotm): Use %A instead of %a to match full
7455         weekday.  (On most systems there is no difference.)
7456
7457 2001-04-03  Paul Bludov  <paul@ozero.net>
7458
7459         * mswindows.c (sleep): Use SleepEx() instead of Sleep().
7460         (ws_changetitle): Use alloca() instead of malloc() to avoid memory
7461         leak.
7462         (ws_mypath): Use GetModuleFileName instead of argv[0].
7463         (ws_startup): Use data.wVersion for comparison.
7464
7465 2001-04-02  Hrvoje Niksic  <hniksic@arsdigita.com>
7466
7467         * http.c (http_loop): Ditto.
7468
7469         * ftp.c (ftp_loop_internal): Made the check whether to continue
7470         retrieval `-O'-friendly.
7471
7472 2001-04-02  Hrvoje Niksic  <hniksic@arsdigita.com>
7473
7474         * netrc.c (parse_netrc): Don't trim the line endings explicitly;
7475         they will be handled as whitespace.
7476         (parse_netrc): Correctly handle lines that end with whitespace.
7477
7478 2001-04-02  Hrvoje Niksic  <hniksic@arsdigita.com>
7479
7480         * retr.c (retrieve_url): New variable global_download_count used
7481         to identify first retrieval.
7482
7483         * ftp.c (getftp): Ditto.
7484
7485         * http.c (gethttp): Rewind opt.dfp only on first retrieval.
7486
7487 2001-04-02  Hrvoje Niksic  <hniksic@arsdigita.com>
7488
7489         * init.c (cmd_address): Heap-allocate the address that gets stored
7490         to CLOSURE.  Old code would simply assign an address on the stack.
7491
7492 2001-04-01  Nicolas Lichtmaier <nick@debian.org>
7493
7494         * ftp.c (ftp_get_listing): Propagate error status.
7495         (ftp_retrieve_glob): Use it.
7496         (ftp_loop): Ditto.
7497
7498 2001-04-01  Nicolas Lichtmaier <nick@debian.org>
7499
7500         * main.c (main): Add -C to the string that is the third arg to
7501         getopt_long().
7502
7503 2001-04-01  Hrvoje Niksic  <hniksic@arsdigita.com>
7504
7505         * ftp.c (getftp): Don't start the download from scratch if `-c'
7506         was specified, but the file is already fully downloaded.
7507
7508         * http.c (gethttp): Don't truncate a pre-existing file if `-c' was
7509         specified and the server doesn't support continued download.
7510         (gethttp): Don't start the download from scratch if `-c' was
7511         specified, but the file is already fully downloaded.
7512
7513 2001-03-31  Hrvoje Niksic  <hniksic@arsdigita.com>
7514
7515         (recursive_retrieve): Don't clear the hash tables at this point at
7516         all; it interferes with the normal operation of register_download.
7517
7518 2001-03-31  Hrvoje Niksic  <hniksic@arsdigita.com>
7519
7520         * recur.c (recursive_retrieve): Clear the hash tables only when
7521         they are defined.
7522
7523 2001-03-31  Hrvoje Niksic  <hniksic@arsdigita.com>
7524
7525         * http.c (gethttp): Make sure the socket is closed with
7526         CLOSE_INVALIDATE before we have drained the body.
7527
7528 2001-03-31  Hrvoje Niksic  <hniksic@arsdigita.com>
7529
7530         * retr.c (retrieve_url): Call register_download() for downloaded
7531         files and register_html() for downloaded HTML files.
7532
7533         * recur.c (register_download): New function; register here that a
7534         file has been downloaded, rather than in recursive_retrieve().
7535         (register_html): New function; enqueue the location of HTML files
7536         here rather than in recursive_retrieve().
7537
7538 2001-03-31  Hrvoje Niksic  <hniksic@arsdigita.com>
7539
7540         * main.c (print_help): Use multiple fputs instead of a single ugly
7541         printf().
7542         (main): Consistently assign numbers >128 to options without a
7543         corresponding character.
7544
7545 2001-03-09  Philipp Thomas  <pthomas@suse.de>
7546
7547         * safe-ctype.h: New file. Locale independent ctype.h replacement
7548         taken from libiberty.
7549
7550         * safe-ctype.c: New file. Tables for above.
7551
7552         * Makefile.in: Add safe-ctype$o to OBJS.  Add dependencies for
7553         safe-ctype$o.
7554
7555         * cmpt.c: Remove include of ctype.h. Use ISSPACE instead of
7556         isspace.
7557
7558         * ftp-basic.c: Don't include ctype.h.
7559
7560         * ftp-ls.c: Likewise.
7561
7562         * ftp.c: Likewise.
7563
7564         * headers.c: Likewise.
7565
7566         * host.c: Likewise.
7567
7568         * html-parse.c: Likewise.
7569
7570         * html-url.c: Likewise.
7571
7572         * http.c: Likewise.
7573
7574         * init.c: Likewise.
7575
7576         * main.c: Likewise. Set LC_CTYPE along with LC_MESSAGES.
7577
7578         * netrc.c: Likewise.
7579
7580         * recur.c: Likewise.
7581
7582         * retr.c: Likewise.
7583
7584         * snprintf.c: Replace ctype.h with safe-ctype.h. Use ISDIGIT
7585         instead of isdigit.
7586
7587         * sysdep.h: Remove defines of ctype macros as they aren't needed
7588         for safe-ctype-h.
7589
7590         * url.c: Don't include ctype.h.
7591
7592         * utils.c: Likewise.
7593
7594         * wget.h: Include safe-ctype.h.
7595
7596 2001-03-27  Dan Harkless  <wget@harkless.org>
7597
7598         * Makefile.in: Moved top_builddir out of "User configuration
7599         section" of top Makefile and analogous spot in this one.
7600
7601 2001-03-17  Dan Harkless  <wget@harkless.org>
7602
7603         * Makefile.in: Include @SSL_INCLUDES@ substition in INCLUDES.
7604         Define top_builddir.  Link wget with libtool so the user doesn't
7605         have to supply a bunch of custom environment variables to 
7606         correctly link with the OpenSSL shared libraries.
7607
7608 2001-03-06  Hack Kampbjorn  <hack@hackdata.com>
7609
7610         * http.c (gethttp): skip :port in host header if it is the
7611         DEFAULT_HTTPS_PORT when using SSL.
7612
7613         * url.c: move the #define of DEFAULT_HTTP_PORT, DEFAULT_FTP_PORT
7614         and DEFAULT_HTTPS_PORT to the header file so it can be use in the
7615         rest of the code. 
7616         * url.h: Ditto
7617
7618 2001-03-01  Jonas Jensen  <bones@huleboer.dk>
7619
7620         * retr.c (show_progress): Correctly calculate the number of bytes
7621         in the first line of the download that have been actually
7622         downloaded in this run.
7623
7624 2001-02-23  Dan Harkless  <wget@harkless.org>
7625
7626         * main.c (print_help): --help documentation for -N said it would
7627         re-download files if they had the _same_ timestamp on server.
7628         (print_help): -nr belongs in "FTP options" section of --help
7629         output, not "Recursive retrieval" section.  Alphabetized FTP
7630         options by long option name.
7631
7632 2001-02-16  Dan Harkless  <wget@harkless.org>
7633
7634         * init.c (commands): Hack Kampbjørn <hack@hackdata.com> discovered
7635         that "httpsproxy" had been inserted into commands[] out of
7636         alphabetical order, causing "BUG: unknown command `httpuser'".
7637
7638 2001-02-13  Jan Prikryl  <prikryl@cg.tuwien.ac.at>
7639
7640         * ftp-ls.c (ftp_parse_ls): Added support of ST_MACOS (Unix-like
7641         listing without correct permissons).
7642
7643         * ftp.h (stype): Added ST_MACOS to identify the NetPresenz MacOS
7644         FTP server. 
7645
7646         * ftp.c (ftp_retrieve_list): New mirroring logic: A remote file
7647         shall be donwloaded only when it's newer than the local copy or
7648         when it has the same timeestamp but its size is different. ST_VMS
7649         and ST_MACOS as special cases that lie about file size. 
7650
7651         * ftp-ls.c (ftp_parse_ls): Support for ST_MACOS.
7652
7653         * Makefile.in: Removed dependency on ftpparse library due to unclear
7654         copyright issues and absence of any feedback to our queries. 
7655
7656         * ftp-ls.c: Removed dependency on ftpparse library due to unclear
7657         copyright issues and absence of any feedback to our queries.   
7658         (ftp_parse_ls): Added a warning message when remote server system
7659         does not seem to be suported by wget. 
7660         (ftp_parse_vms_ls): New function for parsing VMS ftp
7661         server listing output.
7662         (clean_line): New function responsible for removing
7663         end-of-line characters from FTP listing texts.
7664
7665         * ftp.c (getftp): Global variables pwd and host_type are now
7666         member of the ccon structure under names ccon.id and ccon.rs. 
7667
7668         * ftp.h (struct ccon): Added formed global variables from ftp.c,
7669         enum stype rs (remote system identification) and char *id (initial
7670         working directory), as suggested by Hrvoje.
7671
7672         * url.c (parse_uname): Added support for passwords containing '@'
7673         characters.
7674         (skip_uname): Ditto.
7675
7676 2001-02-11  Hrvoje Niksic  <hniksic@arsdigita.com>
7677
7678         * ftp.c (ftp_loop): Reset con.
7679
7680 2001-01-06  Jan Prikryl  <prikryl@cg.tuwien.ac.at>
7681
7682         * url.c (parse_uname): Added support for passwords containing '@'
7683         characters.
7684         (skip_uname): Ditto.
7685
7686 2001-02-11  Hack Kampbjørn  <hack@hackdata.com>
7687
7688         * url.c (parseurl): Debug-print u->ftp_type.
7689
7690 2001-02-11  Hrvoje Niksic  <hniksic@arsdigita.com>
7691
7692         * ftp.c (ftp_loop_internal): Disable padding.
7693         (getftp): Ditto.
7694
7695         * http.c (http_loop): Disable padding.
7696
7697         * retr.c (show_progress): Use it to enable padding.
7698
7699         * retr.c (rate): Optional parameter PAD for padding the rate.
7700
7701 2001-02-10  Hrvoje Niksic  <hniksic@arsdigita.com>
7702
7703         * retr.c (show_progress): Make sure that the last output line
7704         includes progress.
7705
7706 2001-02-10  Jonas Jensen  <bones@huleboer.dk>
7707
7708         * retr.c (show_progress): Print the download rate along with the
7709         percentages.
7710         Along with Anders Thorsby <anders@thorsby.dk>.
7711
7712 2001-02-10  Tim Mooney  <mooney@dogbert.cc.ndsu.NoDak.edu>
7713
7714         * ftp.h: Rename enums `command' to `wget_ftp_command' and
7715         `fstatus' to `wget_ftp_status' because old names clash with Tru64
7716         net/if.h.
7717
7718 2001-02-08  Christian Fraenkel <christian.fraenkel@gmx.net>
7719
7720         * gen_sslfunc.c: verify_callback is now static
7721
7722         * gen_sslfunc.c (init_ssl): load certificate if specified
7723
7724         * gen_sslfunc.c (ssl_printerr): new function
7725
7726         * init.c: added new --sslcertfile and --sslcertkey switches
7727
7728         * main.c: ditto
7729
7730         * options.h: ditto
7731
7732         * http.c (gethttp): abort when init_ssl fails
7733
7734 2001-01-23  Herold Heiko  <Heiko.Herold@previnet.it>
7735
7736         * mswindows.h: Include <malloc.h>; it's needed for alloca().
7737
7738 2001-01-10  Dan Harkless  <wget@harkless.org>
7739
7740         * url.c (str_url): Clarified this function's comment header after
7741         Hrvoje answered my question on the list as to when hide != 1.
7742         Also Hrvoje pointed out I need to use xstrdup() on the string literal.
7743
7744 2001-01-06  Hrvoje Niksic  <hniksic@arsdigita.com>
7745
7746         * connect.c (bindport): Declare addrlen as int.  Diagnosed by
7747         Drazen Kacar <dave@arsdigita.com>.
7748         (conaddr): Ditto.
7749
7750 2001-01-09  Dan Harkless  <wget@harkless.org>
7751
7752         * html-url.c: A bunch of fixup of `--page-requisites'-related
7753         comments to reflect Hrvoje's changes to my code when transplanting
7754         it into this new file, to fix spelling mistakes, to clarify, etc.
7755
7756         * url.c (write_backup_file): Clarified a comment.
7757         (str_url): Henrik van Ginhoven pointed out on the list that we
7758         shouldn't give away the number of characters in the password by
7759         replacing each character with a 'x'.  Use "<password>" instead.
7760
7761         * ftp.c (ftp_retrieve_dirs): The bug where recursion into FTP
7762         directories didn't work if logging in put you in a directory other
7763         than "/" is fixed now.  Removed the comment here warning of the bug.
7764
7765         * main.c (print_help): --continue's description was misleading.
7766         We don't "restart", we "resume".  Also, better to say
7767         "partially-downloaded file" rather than just "existing file".
7768
7769 2001-01-06  Dan Harkless  <wget@harkless.org>
7770
7771         * ChangeLog: The '[Not in 1.6 branch.]'s were decided not to be
7772         the best way to go about my aim.  Removed them in favor of:
7773
7774         * ChangeLog-branches/1.6_branch.ChangeLog: New file.
7775
7776 2001-01-04  Hrvoje Niksic  <hniksic@arsdigita.com>
7777
7778         * url.c (replace_attr): New function, to be used by both
7779         TO_COMPLETE and TO_RELATIVE case in convert_links.
7780         (find_fragment): New function for finding URL fragments.
7781         (replace_attr): Better handle the case where the original string
7782         is not quoted.  Use find_fragment.
7783         (convert_links): Use replace_attr().
7784
7785 2000-12-31  Dan Harkless  <wget@harkless.org>
7786
7787         * ChangeLog: Since this flat file doesn't have multiple branches,
7788         looking at the dates would make you think that things went into
7789         1.6 that actually just went into the 1.7-dev branch.  Added "[Not
7790         in 1.6 branch.]" where appropriate to clarify.
7791         
7792 2000-12-30  Dan Harkless  <wget@harkless.org>
7793
7794         * ftp.c, http.c:  Applied Hack Kampbjørn <hack@hackdata.com>'s
7795         patch to deal with h_errno not being defined in netdb.h under Cygwin.
7796
7797 2000-12-18  Csaba Raduly  <csaba.raduly@sophos.com>
7798
7799         * sysdep.h: Include <malloc.h> and <io.h> under Watcom.
7800
7801 2000-12-17  Igor Khristophorov  <igor@atdot.org>
7802
7803         * http.c (check_end): Fix test for '+' or '-'.
7804
7805 2000-12-17  Hrvoje Niksic  <hniksic@arsdigita.com>
7806
7807         * url.c (parseurl): Rename inner loop var from i to ind to avoid
7808         clash with the function top-level-declared variable i.
7809         (str_url): Likewise, rename inner-loop i to j.
7810
7811         * recur.c (parse_robots): Don't declare LEN at top of function.
7812         (robots_match): Renamed parameter FORBIDDEN to avoid hiding of
7813         global variable.
7814
7815         * main.c (main): Change erroneous use of bitwise and to logical.
7816
7817         * init.c (cmd_address): Don't heap-allocate `sin'; it can be on
7818         the stack because it will be copied to closure.
7819
7820         Thanks to Csaba Raduly's run of PC-LINT over the sources.
7821
7822 2000-12-17  Hrvoje Niksic  <hniksic@arsdigita.com>
7823
7824         * http.c (basic_authentication_encode): Use xmalloc(), not
7825         malloc().  Thanks to Csaba Raduly's run of PC-LINT over the
7826         sources.
7827
7828 2000-12-17  Csaba Raduly  <csaba.raduly@sophos.com>
7829
7830         * sysdep.h: Test for __EMX__ rather than for EMXOS2 for OS/2
7831         compilation.
7832
7833 2000-12-17  Hrvoje Niksic  <hniksic@arsdigita.com>
7834
7835         * mswindows.c: Include <errno.h>.
7836
7837         * gen_sslfunc.c: Include <errno.h>.
7838
7839         * ftp-basic.c: Don't attempt to declare errno or h_errno because
7840         they're not used.
7841
7842         * main.c: Include <errno.h> because errno is used.
7843
7844         * ftp.c: Ditto.
7845
7846         * http.c: Include <netdb.h> for h_errno.
7847
7848 2000-12-13  Hrvoje Niksic  <hniksic@arsdigita.com>
7849
7850         * html-parse.c (advance_declaration): MSVC assert() chokes on
7851         '\"'.  Use '"' instead.
7852
7853 2000-12-11  Hrvoje Niksic  <hniksic@arsdigita.com>
7854
7855         * utils.c (xfree_real): Removed.
7856         (xfree_debug): Just call free().
7857
7858         * wget.h (xfree): Make it an alias for free.
7859
7860 2000-12-11  Hrvoje Niksic  <hniksic@arsdigita.com>
7861
7862         * http.c (http_loop): Furthermore, touch output_document only if
7863         it is known to be an existing regular file.
7864
7865 2000-12-11  Hrvoje Niksic  <hniksic@arsdigita.com>
7866
7867         * ftp.c (ftp_retrieve_list): Ditto.
7868
7869         * http.c (http_loop): Touch output_document if that is used for
7870         output.
7871
7872 2000-12-06  Hrvoje Niksic  <hniksic@arsdigita.com>
7873
7874         * http.c: Include gen_sslfunc.h after including Wget's headers.
7875         (persistent_available_p): Needed coma before `int ssl'.
7876
7877 2000-12-06  Hrvoje Niksic  <hniksic@arsdigita.com>
7878
7879         * ftp.c (ftp_loop_internal): Ditto.
7880
7881         * http.c (http_loop): Use it.
7882
7883         * retr.c (sleep_between_retrievals): New function that handles the
7884         logic of opt.wait and opt.waitretry.
7885
7886 2000-12-06  Hrvoje Niksic  <hniksic@arsdigita.com>
7887
7888         * rbuf.h: Implement only a single version of RBUF_READCHAR, using
7889         rbuf_read_bufferful when the buffer is depleted.
7890
7891         * rbuf.c (rbuf_read_bufferful): New function.
7892
7893 2000-12-06  Hrvoje Niksic  <hniksic@arsdigita.com>
7894
7895         * gen_sslfunc.h: Use ansi2knr style function declarations.
7896
7897         * gen_sslfunc.c: Reformat according to the GNU coding standards.
7898         More should be done.
7899
7900         * http.c (persistent_available_p): Place the cheap SSL test nearer
7901         the top of the function.
7902         (CLOSE_FINISH, CLOSE_INVALIDATE): Define only one version of each.
7903
7904 2000-12-05  Hrvoje Niksic  <hniksic@arsdigita.com>
7905
7906         * url.c (init_unsafe_char_table): Reinstate space as an unsafe
7907         char.
7908
7909 2000-12-03  Christian Fraenkel <christian.fraenkel@gmx.net>
7910
7911         * Makefile.in: added gen_sslfunc object
7912         * config.h.in: added HAVE_SSL define
7913         * connect.c: changed select_fd from static int to int
7914         * connect.h: ditto
7915         * gen_sslfunc.h: New file
7916         * gen_sslfunc.c: ditto
7917         * http.c: added HTTPS fuctionality
7918         * retrc.c: ditto
7919         * url.c: ditto
7920         * init.c: added opt.httpsproxy
7921         * options.h: ditto
7922         * rbuf.h: added alternate rbuf struct
7923         * wget.h: added CONSSLERR
7924         * rbuf.c: ditto
7925
7926         * http.c: Added HTTPS fuctionality.
7927
7928         * retrc.c: Ditto.
7929
7930         * url.c: Ditto.
7931
7932         * init.c: Added opt.httpsproxy.
7933
7934         * options.h: Ditto.
7935
7936         * rbuf.h: Added alternate rbuf struct.
7937
7938         * wget.h: Added CONSSLERR.
7939
7940         * rbuf.c: Ditto.
7941
7942 2000-11-30  Jan Prikryl  <prikryl@cg.tuwien.ac.at>
7943
7944         * ftp-ls.c (ftp_parse_unix_ls): Added second parameter
7945         "ignore_perms" to ignore file and directory permissions for
7946         Windows NT FTP server listings.
7947         (ftp_parse_winnt_ls): New function.
7948         (ftp_parse_ls): Parses UNIX and Windows NT listings
7949         separately. Simple heuristics for distinguishing between UNIX and
7950         MS-DOS-like FTP listing provided by Windows NT FTP service.
7951
7952 2000-11-18  Jan Prikryl  <prikryl@cg.tuwien.ac.at>
7953
7954         * ftpparse.c, ftpparse.h: New files.
7955
7956         * ftp-ls.c (ftp_parse_ls): Use ftp_parse_unix_ls for UNIX servers
7957         only. Use ftp_parse_nonunix_ls otherwise.
7958         (ftp_parse_nonunix_ls): Stub to the ftpparse library handling all
7959         exotic FTP servers.
7960
7961         * ftp.h (stype): New enum, distinguishes UNIX, VMS, and "other"
7962         FTP servers.
7963
7964         * ftp.c: New static wariables host_type, pwd, and pwd_len. 
7965         (getftp): Support for VMS. Support for FTP servers that do not
7966         place you in the root directory after login.
7967         (ftp_retrieve_list): VMS is silent about the real file size, issue
7968         a more appropriate message.
7969         (ftp_get_listing): Pass host_type to ftp_parse_ls.
7970
7971         * ftp-basic.c (ftp_pwd, ftp_syst): New functions.
7972
7973 2000-11-30  Jan Prikryl  <prikryl@cg.tuwien.ac.at>
7974
7975         * ftp-ls.c (ftp_parse_unix_ls): Added second parameter
7976         "ignore_perms" to ignore file and directory permissions for
7977         Windows NT FTP server listings.
7978         (ftp_parse_winnt_ls): New function.
7979         (ftp_parse_ls): Parses UNIX and Windows NT listings
7980         separately. Simple heuristics for distinguishing between UNIX
7981         and MS-DOS-like FTP listing provided by Windows NT FTP service.
7982
7983 2000-11-29  John Summerfield  <summer@OS2.ami.com.au>
7984
7985         * netrc.c (parse_netrc): Get rid of line ending.
7986
7987 2000-11-25  Hrvoje Niksic  <hniksic@arsdigita.com>
7988
7989         * ftp.c (ftp_retrieve_list): Undo typo "fix" until resolution by
7990         Dan.
7991
7992 2000-11-24  Karl Eichwalder  <ke@suse.de>
7993
7994         * main.c (print_help): Untabify.
7995
7996 2000-11-23  Hrvoje Niksic  <hniksic@arsdigita.com>
7997
7998         * utils.c (xrealloc_debug): Do the unregister/register thing only
7999         if the pointer has actually changed.
8000         (xmalloc_real): Declare `static' in DEBUG_MALLOC builds.
8001         (xfree_real): Ditto.
8002         (xrealloc_real): Ditto.
8003         (xstrdup_real): Ditto.
8004
8005 2000-11-22  Hrvoje Niksic  <hniksic@arsdigita.com>
8006
8007         * ftp.c (getftp): ftp_getaddress() returns a malloc'ed copy of the
8008         string; no need to strdup() it.
8009         (getftp): Make pwd_len a local variable.
8010         (ftp_loop): Free PWD before returning.
8011
8012         * init.c (cleanup): Free opt.ftp_pass only if it's non-NULL.
8013
8014 2000-11-22  Hrvoje Niksic  <hniksic@arsdigita.com>
8015
8016         * all: Use xfree() instead of free.
8017
8018         * utils.c (xfree): New function.
8019
8020 2000-11-21  Hrvoje Niksic  <hniksic@arsdigita.com>
8021
8022         * url.c (convert_links): HTML-quote the converted string.
8023
8024         * utils.c (html_quote_string): Move here from ftp-ls.c
8025         (html_quote_string): Make non-static; declare in utils.h.
8026         (html_quote_string): Convert SP to &#32;.
8027
8028 2000-11-21  Hrvoje Niksic  <hniksic@arsdigita.com>
8029
8030         * ftp.c (getftp): Reformat Jan's code according to GNU coding
8031         standards; remove (debugging?) printf's; use '\0' for the ASCII
8032         zero character.  Use alloca() instead of malloc() for
8033         inter-function temporary allocations.
8034
8035 2000-11-18  Jan Prikryl  <prikryl@cg.tuwien.ac.at>
8036
8037         * ftpparse.c, ftpparse.h: New files.
8038
8039         * ftp-ls.c (ftp_parse_ls): Use ftp_parse_unix_ls for UNIX servers
8040         only. Use ftp_parse_nonunix_ls otherwise.
8041         (ftp_parse_nonunix_ls): Stub to the ftpparse library handling all
8042         exotic FTP servers.
8043
8044         * ftp.h (stype): New enum, distinguishes UNIX, VMS, and "other"
8045         FTP servers.
8046
8047         * ftp.c: New static wariables host_type, pwd, and pwd_len. 
8048         (getftp): Support for VMS. Support for FTP servers that do not
8049         place you in the root directory after login.
8050         (ftp_retrieve_list): VMS is silent about the real file size, issue
8051         a more appropriate message.
8052         (ftp_get_listing): Pass host_type to ftp_parse_ls.
8053
8054         * ftp-basic.c (ftp_pwd, ftp_syst): New functions.
8055
8056 2000-11-21  Hrvoje Niksic  <hniksic@arsdigita.com>
8057
8058         * hash.c (hash_table_put): Don't overwrite deleted mappings.
8059
8060 2000-11-21  Hrvoje Niksic  <hniksic@arsdigita.com>
8061
8062         * hash.c (find_mapping): New function.
8063         (hash_table_get): Use it.
8064         (hash_table_get_pair): Ditto.
8065         (hash_table_exists): Ditto.
8066         (hash_table_remove): Ditto.
8067         (hash_table_remove): Really delete the entry if the mapping
8068         following LOCATION is empty.
8069
8070         * utils.c (string_set_add): Check whether the element has existed
8071         before.
8072
8073         * hash.c (hash_table_get_pair): New function.
8074
8075 2000-11-20  Hrvoje Niksic  <hniksic@arsdigita.com>
8076
8077         * http.c (http_process_type): Ignore trailing whitespace; use
8078         strdupdelim().
8079
8080         * recur.c (recursive_retrieve): Use the new `convert' field.
8081         (convert_all_links): Ditto.
8082         (convert_all_links): Don't respect meta_disallow_follow.
8083
8084         * html-url.c (handle_link): Fill out link_relative_p and
8085         link_complete_p.
8086
8087         * url.h (struct _urlpos): Make elements more readable.
8088
8089         * recur.c (recursive_retrieve): Call slist_prepend instead of
8090         slist_append.
8091         (convert_all_links): Call slist_nreverse before iterating through
8092         urls_html.
8093
8094         * utils.c (slist_prepend): New function.
8095         (slist_nreverse): Ditto.
8096
8097 2000-11-20  Hrvoje Niksic  <hniksic@arsdigita.com>
8098
8099         * http.c (check_end): Constify.
8100
8101 2000-11-20  Hrvoje Niksic  <hniksic@arsdigita.com>
8102
8103         * http.c (http_loop): If username and password are known, try the
8104         `Basic' authentication scheme by default.
8105
8106         * connect.h: Declare test_socket_open.
8107
8108 2000-11-20  Hrvoje Niksic  <hniksic@arsdigita.com>
8109
8110         * version.c: Bump version from 1.5.3+dev to 1.7-dev.
8111
8112 2000-11-20  Hrvoje Niksic  <hniksic@arsdigita.com>
8113
8114         * http.c (gethttp): Don't use the return value of sprintf().
8115         (gethttp): Inhibit keep-alive if opt.http_keep_alive is 0.
8116
8117 2000-11-20  Hrvoje Niksic  <hniksic@arsdigita.com>
8118
8119         * recur.c (recursive_retrieve): Print the "so we don't load"
8120         debugging message only if we really don't load.
8121
8122         * http.c (gethttp): Inhibit keep-alive if proxy is being used.
8123         (gethttp): Don't request keep-alive if keep-alive is inhibited.
8124
8125 2000-11-19  Hrvoje Niksic  <hniksic@arsdigita.com>
8126
8127         * http.c (gethttp): Make the HTTP persistent connections more
8128         robust.
8129
8130 2000-11-19  Hrvoje Niksic  <hniksic@arsdigita.com>
8131
8132         * retr.c (get_contents): If use_expected, make sure that the
8133         appropriate amount of data is being read.
8134
8135         * http.c (gethttp): Check for both `Keep-Alive: ...' and
8136         `Connection: Keep-Alive'.
8137
8138         * wget.h (DEBUGP): Call debug_logprintf only if opt.debug is
8139         turned on.
8140
8141 2000-11-19  Hrvoje Niksic  <hniksic@arsdigita.com>
8142
8143         * http.c (connection_available_p): Use it.
8144
8145         * connect.c (test_socket_open): New function.
8146
8147         * http.c (gethttp): Support persistent connections.  Based on the
8148         ideas, and partly on code, by Sam Horrocks <sam@daemoninc.com>.
8149         (register_persistent): New function.
8150         (connection_available_p): Ditto.
8151         (invalidate_connection): Ditto.
8152
8153 2000-11-19  Hrvoje Niksic  <hniksic@arsdigita.com>
8154
8155         * url.c (convert_links): Handle UREL2ABS case.
8156
8157         * recur.c (recursive_retrieve): Instead of the list
8158         urls_downloaded, use hash tables dl_file_url_map and
8159         dl_url_file_map.
8160         (convert_all_links): Use them to retrieve data.
8161
8162         * host.c (clean_hosts): Free the hash tables.
8163
8164         * main.c (private_initialize): Call host_init().
8165
8166         * host.c (store_hostaddress): Use a saner, hash table-based data
8167         model.
8168         (realhost): Ditto.
8169         (host_init): Initialize the hash tables.
8170
8171 2000-11-18  Hrvoje Niksic  <hniksic@arsdigita.com>
8172
8173         * utils.c (slist_append): Eviscerate NOSORT.  Hash tables are now
8174         used for what the sorted slists used to be used for.
8175         (slist_contains): Don't rely on the list being sorted.
8176         (slist_append): Simplify the code.
8177
8178         * recur.c (recursive_cleanup): Use free_string_set.
8179
8180         * utils.c (string_set_add, string_set_exists, string_set_free):
8181         New functions for easier freeing of hash tables whose keys are
8182         strdup'ed strings.
8183
8184         * recur.c (recursive_retrieve): Use the hash table functions for
8185         storing undesirable URLs.
8186
8187         * hash.c: New file.
8188
8189 2000-11-17  Hrvoje Niksic  <hniksic@arsdigita.com>
8190
8191         * main.c (private_initialize): Call url_init.
8192         (main): Call private_initialize.
8193
8194         * url.c (unsafe_char_table): New table.
8195         (UNSAFE_CHAR): Use it.
8196         (init_unsafe_char_table): New function.
8197         (url_init): New function; call init_unsafe_char_table.
8198
8199 2000-11-16  Hrvoje Niksic  <hniksic@arsdigita.com>
8200
8201         * mswindows.h: Define snprintf and vsnprintf to _snprintf and
8202         _vsnprintf respectively.
8203
8204 2000-11-15  Hrvoje Niksic  <hniksic@arsdigita.com>
8205
8206         * config.h.in: Do the _XOPEN_SOURCE and _SVID_SOURCE things only
8207         on Linux.
8208
8209 2000-11-15  Hrvoje Niksic  <hniksic@arsdigita.com>
8210
8211         * html-url.c (handle_link): Handle HTML fragment identifiers.
8212
8213         * recur.c (recursive_retrieve): If norobot info is respected and
8214         the file is specified not to be followed by robots, respect that.
8215
8216         * html-url.c (collect_tags_mapper): Handle <meta name=robots
8217         content=X>.  For us the important cases are where X is NONE or
8218         where X contains NOFOLLOW.
8219         (get_urls_html): Propagate that information to the caller.
8220
8221 2000-11-13  Hrvoje Niksic  <hniksic@arsdigita.com>
8222
8223         * url.c (convert_links): Unlink the file we might be reading from
8224         before writing to it.
8225         (convert_links): Use alloca instead of malloc for
8226         filename_plus_orig_suffix.
8227
8228 2000-11-12  Hrvoje Niksic  <hniksic@arsdigita.com>
8229
8230         * host.c (realhost): Add HOST to the list with quality==0 only if
8231         it wasn't already there.
8232         Based on analysis by Lu Guohan <feng@public.bjnet.edu.cn>.
8233
8234 2000-11-10  Hrvoje Niksic  <hniksic@arsdigita.com>
8235
8236         * url.c (get_urls_file): Ditto.
8237         (convert_links): Ditto.
8238
8239         * html-url.c (get_urls_html): Use read_file() instead of
8240         load_file().
8241
8242         * utils.c (read_file): New function, instead of the old
8243         load_file().
8244         (read_file_free): Ditto.
8245
8246         * url.c (findurl): Search only for the supported protocols.
8247         (convert_links): Use fwrite() when writing out a region of
8248         characters.
8249
8250 2000-11-10  Hrvoje Niksic  <hniksic@arsdigita.com>
8251
8252         * ftp-ls.c: Move html_quote_string and ftp_index here.
8253
8254         * url.c: Remove get_urls_html, since that's now in html-url.c.
8255
8256         * html-url.c: New file.
8257
8258         * html-parse.c: New file.
8259
8260 2000-11-10  Hrvoje Niksic  <hniksic@arsdigita.com>
8261
8262         * init.c (run_wgetrc): Don't bother killing off '\r' since
8263         pars_line() skips whitespace at end of line anyway.
8264         (parse_line): Oops, it didn't.  Now it does.
8265
8266         * recur.c (parse_robots): Ditto here.
8267
8268         * ftp-ls.c (ftp_parse_unix_ls): Kill off the newline character
8269         manually because read_whole_line no longer does.
8270
8271         * utils.c (read_whole_line): Rewrite to: a) use less memory
8272         (reallocates to needed size after work), b) work faster -->
8273         fgets() instead of getc, c) be more correct --> doesn't kill the
8274         newline character at the end of line.
8275
8276 2000-11-10  Hrvoje Niksic  <hniksic@arsdigita.com>
8277
8278         * init.c (comind): Initialize MAX to array size - 1.
8279
8280 2000-11-08  Hrvoje Niksic  <hniksic@arsdigita.com>
8281
8282         * url.c (construct): Changed last_slash[-1] to *(last_slash - 1).
8283         Suggested by Edward J. Sabol.
8284
8285 2000-11-08  Hrvoje Niksic  <hniksic@arsdigita.com>
8286
8287         * url.c (construct): Handle the case where host name is not
8288         followed by a slash.
8289
8290 2000-11-06  Hrvoje Niksic  <hniksic@arsdigita.com>
8291
8292         * init.c: commands[] need to be sorted!  ("base" wasn't.)
8293
8294 2000-11-05  Hrvoje Niksic  <hniksic@arsdigita.com>
8295
8296         * wget.h (DO_REALLOC_FROM_ALLOCA): Use braces to disambiguate
8297         `if'.
8298
8299 2000-11-05  Hrvoje Niksic  <hniksic@arsdigita.com>
8300
8301         * url.c (construct): Insert unneeded initialization for the
8302         compiler to shut up.
8303
8304         * config.h.in: Define _XOPEN_SOURCE to 500 to get the prototype
8305         for strptime() (*duh*).  Define _SVID_SOURCE to get S_IFLNK which
8306         otherwise gets lost when you define _XOPEN_SOURCE.
8307
8308         * utils.c (touch): Include the file name in the error message.
8309         From Debian.
8310
8311 2000-11-05  Hrvoje Niksic  <hniksic@arsdigita.com>
8312
8313         * log.c (logvprintf): Use vsnprintf() in all cases.  If necessary,
8314         resize the buffer to fit the formated message.  That way, messages
8315         of arbitrary size may be printed.
8316         (logvprintf): Use saved_append() to optionally log the last
8317         several lines of output.
8318         (logputs): Ditto.
8319         (log_close): Adapt to new data structures.
8320         (log_dump): Ditto.
8321         (redirect_output): Print messages to stderr, not to stdout.
8322
8323         * log.c (saved_append_1): New function.  Replaces the old logging
8324         system ("log all output until 10M characters") with a new, much
8325         more reasonable one ("log last screenful of text").
8326         (saved_append): New function; call saved_append_1.
8327         (free_log_line): New function.
8328
8329 2000-11-05  Hrvoje Niksic  <hniksic@arsdigita.com>
8330
8331         * url.c (construct): Fix comment.
8332         (find_last_char): Document.
8333
8334 2000-11-04  Hrvoje Niksic  <hniksic@arsdigita.com>
8335
8336         * snprintf.c: New file.
8337
8338 2000-11-03  Hrvoje Niksic  <hniksic@arsdigita.com>
8339
8340         * wget.h: If HAVE_STDARG_H is not defined, don't declare argument
8341         types to logprintf() and debug_logprintf().
8342
8343 2000-11-02  Hrvoje Niksic  <hniksic@arsdigita.com>
8344
8345         * ftp.c (ftp_loop_internal): Hide the password from the URL when
8346         printing non-verbose.  Problem spotted by Dariusz Mlynarczyk
8347         <darekm@bydg.lomac.com.pl>.
8348
8349 2000-11-02  Junio Hamano  <junio@twinsun.com>
8350
8351         * ftp-basic.c (ftp_login): Make comparison case-insensitive.
8352
8353 2000-11-02  Tyler Riddle  <triddle@liquidmarket.com>
8354
8355         * http.c (known_authentication_scheme_p): Recognize NTML
8356         authentication.
8357         (create_authorization_line): Treat NTML the same as `Basic'.
8358
8359 2000-11-02  Hrvoje Niksic  <hniksic@arsdigita.com>
8360
8361         * retr.c (retrieve_url): Free url before returning.
8362         (retrieve_url): Free mynewloc before returning.
8363         Spotted by Mark A. Mankins <Mankins_Mark@prc.com>.
8364
8365 2000-11-02  Hrvoje Niksic  <hniksic@arsdigita.com>
8366
8367         * url.c (parseurl): Remove possible reading past the end of
8368         sup_protos[].  Spotted by Mark A. Mankins <Mankins_Mark@prc.com>.
8369
8370 2000-11-01  Hrvoje Niksic  <hniksic@arsdigita.com>
8371
8372         * main.c (main): In case of opt.downloaded overflowing, print
8373         <overflow> instead of a totally bogus random value.
8374
8375         * retr.c (retrieve_from_file): Ditto.
8376
8377         * recur.c (recursive_retrieve): Ditto.
8378
8379         * main.c (main): Ditto.
8380
8381         * http.c (http_loop): Ditto.
8382
8383         * ftp.c (ftp_loop_internal): Use downloaded_increase() instead of
8384         `+=', and downloaded_exceeds_quota() instead of the simple-minded
8385         check.
8386         (ftp_retrieve_list): Ditto.
8387         (ftp_retrieve_dirs): Ditto.
8388         (ftp_retrieve_glob): Ditto.
8389
8390         * retr.c (downloaded_increase): New function.  Notice overflows of
8391         opt.downloaded.
8392         (downloaded_exceeds_quota): Make sure that opt.downloaded is not
8393         used if it overflowed.
8394
8395         * options.h (struct options): New member downloaded_overflow.
8396
8397 2000-11-01  Hrvoje Niksic  <hniksic@arsdigita.com>
8398
8399         * wget.h (enum): Remove extra space after last enumeration.
8400
8401 2000-11-01  Hrvoje Niksic  <hniksic@arsdigita.com>
8402
8403         * main.c (main): Use legible_very_long() for printing
8404         opt.downloaded.
8405
8406         * utils.c (legible_1): New function that operates on strings and
8407         does the brunt of legible()'s work.
8408         (legible): Use legible_1().
8409         (legible_very_long): New function; dump the argument with
8410         sprintf(), and call legible_1().
8411
8412         * options.h (struct options): Use VERY_LONG_TYPE for
8413         opt.downloaded.
8414
8415         * sysdep.h (VERY_LONG_TYPE): Define it to have a 64-bit or greater
8416         type.
8417
8418         * config.h.in: Make sure that SIZEOF_LONG and SIZEOF_LONG_LONG get
8419         defined.  Define HAVE_LONG_LONG if long long is available.
8420
8421 2000-11-01  Hrvoje Niksic  <hniksic@arsdigita.com>
8422
8423         * utils.c (long_to_string): Update with a later, better version.
8424
8425 2000-11-01  Hrvoje Niksic  <hniksic@arsdigita.com>
8426
8427         * url.c (path_simplify_with_kludge): New function.
8428         (path_simplify_with_kludge): Disable it.  Instead...
8429         (parse_dir): ...make sure that at this point the right thing is
8430         done, i.e. that "query" part of the URL (?...) is always assigned
8431         to the file, never to the directory portion of the path.
8432
8433 2000-11-01  Hrvoje Niksic  <hniksic@arsdigita.com>
8434
8435         * retr.c (retrieve_url): Detect redirection cycles.
8436
8437 2000-11-01  Hrvoje Niksic  <hniksic@arsdigita.com>
8438
8439         * url.c (get_urls_html): Decode HTML entities using
8440         html_decode_entities.
8441
8442         * html.c (htmlfindurl): Don't count the `#' in numeric entities
8443         (&#NNN;) as an HTML fragemnt.
8444         (html_decode_entities): New function.
8445
8446 2000-11-01  Hrvoje Niksic  <hniksic@arsdigita.com>
8447
8448         * html.c (htmlfindurl): Fix recognition of # HTML fragments.
8449
8450 2000-11-01  Hrvoje Niksic  <hniksic@arsdigita.com>
8451
8452         * url.c (construct): Rewritten for clarity.  Avoids the
8453         unnecessary copying and stack-allocation the old version
8454         performed.
8455
8456 2000-10-31  Hrvoje Niksic  <hniksic@arsdigita.com>
8457
8458         * ftp.c (getftp): Ditto.
8459
8460         * http.c (gethttp): Rewind the stream when retrying from scratch.
8461
8462 2000-10-31  Hrvoje Niksic  <hniksic@arsdigita.com>
8463
8464         * retr.c (retrieve_url): Use url_concat() to handle relative
8465         redirections instead of /ad hoc/ code.
8466
8467         * url.c (url_concat): New function encapsulating weird
8468         construct().
8469         (urllen_http_hack): New function.
8470         (construct): When constructing new URLs, recognize that `?' does
8471         not form part of the file name in HTTP.
8472
8473 2000-10-13  Adrian Aichner  <adrian@xemacs.org>
8474
8475         * retr.c: Add msec timing support for WINDOWS.
8476         * retr.c (reset_timer): GetSystemTime() on WINDOWS.
8477         * retr.c (elapsed_time): Calculate delta time to msec on WINDOWS.
8478
8479 2000-10-27  Dan Harkless  <wget@harkless.org>
8480
8481         * retr.c (retrieve_url): Manually applied T. Bharath
8482         <TBharath@responsenetworks.com>'s patch to get wget to grok
8483         illegal relative URL redirects.  Reformatted and re-commented it.
8484
8485 2000-10-23  Dan Harkless  <wget@harkless.org>
8486
8487         * connect.c (make_connection and bindport): Manually applied Rob
8488         Mayoff <mayoff@dqd.com>'s 1.5.3 patch to add --bind-address,
8489         changing coding style to GNU's.
8490
8491         * ftp.c (ftp_loop_internal): --delete-after wasn't implemented for
8492         files downloaded via FTP.  Per a comment, .listing files were not
8493         counted towards number of bytes and files downloaded because they're 
8494         deleted anyway.  Well, they aren't under -nr, so count them then.
8495
8496         * init.c: Manually applied Rob Mayoff's 1.5.3 patch to add
8497         --bind-address, alphabetizing, changing coding style to GNU's,
8498         commenting, and renaming cmd_ip_address() to cmd_address() to
8499         imply hostnames also okay.
8500                 
8501         * main.c (main): --delete-after didn't delete the root of the
8502         tree.  Ignore --convert-links if --delete-after was specified.
8503         Manually applied Rob Mayoff's 1.5.3 patch to add --bind-address,
8504         fixing duplicate use of added-since-1.5.3 case value.
8505         (print_help): Clarified that --delete-after deletes local files.
8506         Rob forgot to add a line for his new --bind-address option.
8507                 
8508         * options.h (struct options): Manually applied Rob Mayoff's patch
8509         to add --bind-address (bind_address structure member).
8510                 
8511         * recur.c (recursive_retrieve): Improved comment; added DEBUGP().
8512         Ignore --convert-links if --delete-after was specified.
8513                 
8514         * retr.c (retrieve_from_file): Just added a DEBUGP().
8515                 
8516 2000-10-19  Dan Harkless  <wget@harkless.org>
8517
8518         * ftp.c (ftp_loop_internal): downloaded_file() enumerators changed.
8519         (getftp): Applied Piotr Sulecki <Piotr.Sulecki@ios.krakow.pl>'s
8520         patch to work around FTP servers that incorrectly respond to the
8521         "REST" command with the remaining size rather than the total file size.
8522                 
8523         * http.c (gethttp): Improved a comment and added code to tack on
8524         ".html" to text/html files without that extension when -E specified.
8525         (http_loop): Use new downloaded_file() enumerators and deal with
8526         the case of gethttp() called xrealloc() on u->local.
8527
8528         * init.c (commands): Added new "htmlextension" command.
8529         Also renamed John Daily's cmd_quad() to the more descriptive
8530         cmd_lockable_boolean(), alpha-sorted the CMD_DECLARE()s and
8531         removed duplicate cmd_boolean() declaration.
8532
8533         * main.c (print_help): Added my new -E / --html-extension option.
8534         (main): Undocumented --email-address option previously used -E synonym.
8535         Stole it away for the much more deserving --html-extension's use.
8536
8537         * options.h (struct options): Added html_extension field.
8538
8539         * url.c (convert_links): URL X that we saved as X.html locally due
8540         to -E needs to be backed up as X.orig, not X.html.orig.  Added comments.
8541         (downloaded_file): Now remembers if we added .html extension to a file.
8542
8543         * url.h (downloaded_file_t): Added extra enumerators to support above.
8544         (downloaded_file): Now takes and returns a downloaded_file_t.
8545
8546         * wget.h (unnamed "dt" enum): Added ADDED_HTML_EXTENSION enumerator.
8547         
8548 2000-10-09  Dan Harkless  <wget@harkless.org>
8549
8550         * html.c (htmlfindurl): Added unneeded initialization to quiet warning.
8551                 
8552         * main.c (print_help): Clarified what --retr-symlinks does.
8553         
8554 2000-09-15  John Daily  <jdaily@cyberdude.com>
8555
8556         * init.c: Add support for "always" and "never" values to allow
8557         .wgetrc to override commandline (useful e.g. with .pm files
8558         calling `wget --passive-ftp' when your firewall doesn't allow that).
8559
8560         * ftp.c (getftp): passive_ftp is first option to support always/never.
8561
8562 2000-08-30  Dan Harkless  <wget@harkless.org>
8563
8564         * ftp.c (ftp_retrieve_list): Use new INFINITE_RECURSION #define.
8565         
8566         * html.c: htmlfindurl() now takes final `dash_p_leaf_HTML' parameter.
8567         Wrapped some > 80-column lines.  When -p is specified and we're at a 
8568         leaf node, do not traverse <A>, <AREA>, or <LINK> tags other than 
8569         <LINK REL="stylesheet">.
8570         
8571         * html.h (htmlfindurl): Now takes final `dash_p_leaf_HTML' parameter.
8572         
8573         * init.c: Added new -p / --page-requisites / page_requisites option.
8574
8575         * main.c (print_help): Clarified that -l inf and -l 0 both allow
8576         infinite recursion.  Changed the unhelpful --mirrior description
8577         to simply give the options it's equivalent to.  Added new -p option.
8578         (main): Added some comments; handle new -p / --page-requisites.
8579         
8580         * options.h (struct options): Added new page_requisites field.
8581
8582         * recur.c: Changed "URL-s" to "URLs" and "HTML-s" to "HTMLs".
8583         Calculate and pass down new `dash_p_leaf_HTML' parameter to
8584         get_urls_html().  Use new INFINITE_RECURSION #define.
8585
8586         * retr.c: Changed "URL-s" to "URLs".  get_urls_html() now takes
8587         final `dash_p_leaf_HTML' parameter.
8588
8589         * url.c: get_urls_html() and htmlfindurl() now take final
8590         `dash_p_leaf_HTML' parameter.
8591
8592         * url.h (get_urls_html): Now takes final `dash_p_leaf_HTML' parameter.
8593
8594         * wget.h: Added some comments and new INFINITE_RECURSION #define.
8595         
8596 2000-08-23  Dan Harkless  <wget@harkless.org>
8597
8598         * main.c (print_help): -B / --base was not mentioned.
8599
8600 2000-08-22  Dan Harkless  <wget@harkless.org>
8601
8602         * main.c (print_help): Modified -nc description to mention that it
8603         also prevents the creation of multiple versions of the same file
8604         with ".<number>" suffixes.
8605
8606 2000-07-14  Jan Prikryl  <prikryl@cg.tuwien.ac.at>
8607
8608         * retr.c (retrieve_url): Consistently strdup opt.referer when
8609         setting u->referer.
8610
8611 2000-06-09  Dan Harkless  <wget@harkless.org>
8612
8613         * main.c (print_help): --help output for --waitretry was over 80 cols.
8614
8615 2000-06-09  Hrvoje Niksic  <hniksic@iskon.hr>
8616
8617         * url.c (encode_string): Fix comment.
8618         Suggested by Herold Heiko <Heiko.Herold@previnet.it>.
8619
8620 2000-06-01  Const Kaplinsky  <const@ce.cctpu.edu.ru>
8621
8622         * ftp.c (ftp_retrieve_list): Change permissions only on plain
8623         files.
8624
8625 2000-06-01  Hrvoje Niksic  <hniksic@iskon.hr>
8626
8627         * url.c (str_url): Print the port number only if it's different
8628         from the default port number for that protocol.
8629
8630 2000-05-22  Dan Harkless  <wget@harkless.org>
8631
8632         * main.c (print_help): Added --help line for Damir Dzeko
8633         <ddzeko@zesoi.fer.hr>'s until-now-undocumented --referer option.
8634         Removed comments that --referer and --waitretry were undocumented.
8635         Changed "`.wgetrc' command" to "`.wgetrc'-style command" on --help
8636         line for --execute.
8637
8638 2000-05-18  Hrvoje Niksic  <hniksic@iskon.hr>
8639
8640         * ftp.c (getftp): Ditto.
8641
8642         * http.c (gethttp): Check for return value of fclose/fflush.
8643
8644 2000-04-12  Hrvoje Niksic  <hniksic@iskon.hr>
8645
8646         * host.c (store_hostaddress): Instead of shifting ADDR, start
8647         copying from the correct address.
8648
8649 2000-04-12  Hrvoje Niksic  <hniksic@iskon.hr>
8650
8651         * http.c (gethttp): Don't free REQUEST -- it was allocated with
8652         alloca().
8653         Pointed out by Gisle Vanem <gvanem@eunet.no>.
8654
8655 2000-04-04  Dan Harkless  <wget@harkless.org>
8656
8657         * host.c (store_hostaddress): R. K. Owen's patch introduces a
8658         "left shift count >= width of type" warning on 32-bit
8659         architectures.  Got rid of it by tricking the compiler w/ a variable.
8660         
8661         * url.c (UNSAFE_CHAR): The macro didn't include all the illegal
8662         characters per RFC1738, namely everything above '~'.  It also
8663         generated a warning on OSes where char =~ unsigned char.  Fixed.
8664         
8665 1998-10-17  Hrvoje Niksic  <hniksic@srce.hr>
8666
8667         * http.c (http_process_type): Removed needless strdup(), a memory
8668         leak.
8669
8670 1998-09-25  Hrvoje Niksic  <hniksic@srce.hr>
8671
8672         * html.c (htmlfindurl): Set PH to the first occurrence of `#'.
8673
8674 1998-09-25  Simon Munton  <simonm@m4data.co.uk>
8675
8676         * init.c (wgetrc_file_name): Don't free HOME under Windows.
8677
8678 1998-12-01  "R. K. Owen"  <rkowen@Nersc.GOV>
8679
8680         * host.c (store_hostaddress): Fix for big endian 64-bit machines.
8681
8682 1998-12-01  Hrvoje Niksic  <hniksic@srce.hr>
8683
8684         * url.c (UNSAFE_CHAR): New macro.
8685         (contains_unsafe): Use it.
8686         (encode_string): Ditto.
8687
8688 1998-12-01  Hrvoje Niksic  <hniksic@srce.hr>
8689
8690         * main.c (i18n_initialize): Use LC_MESSAGES only if available.
8691
8692 2000-03-31  Hrvoje Niksic  <hniksic@srce.hr>
8693
8694         * Use TOUPPER/TOLOWER.
8695
8696 1998-12-22  Alexander V. Lukyanov  <lav@yars.free.net>
8697
8698         * ftp-opie.c (btoe): Zero-terminate OSTORE.
8699
8700 2000-03-21  Hrvoje Niksic  <hniksic@iskon.hr>
8701
8702         * wget.h (DO_REALLOC_FROM_ALLOCA): Ditto.
8703
8704         * sysdep.h (ISALNUM): New macro.
8705         (TOLOWER): Ditto.
8706         (TOUPPER): Ditto.
8707
8708 2000-03-10  Dan Harkless  <wget@harkless.org>
8709
8710         * html.c (idmatch): Implemented checking of my new --follow-tags
8711         and --ignore-tags options.
8712         
8713         * init.c (commands): Added comment reminding people adding new
8714         entries doing allocation to add corresponding freeing in cleanup().
8715         (commands): Added new followtags and ignoretags commands.
8716         (cleanup): Free storage for new followtags and ignoretags.
8717         
8718         * main.c: Use of "comma-separated list" was random -- normalized
8719         it.  Did some alphabetization.  Added comments pointing out
8720         "Options without arguments" and "Options accepting an argument"
8721         sections of long_options[].  Added new options --follow-tags and
8722         -G / --ignore-tags.  Added comment that Damir's --referer is
8723         currently undocumented.  Added comment that Heiko's --waitretry is
8724         partially undocumented (mentioned in --help but not in
8725         wget.texi).  Moved improperly sorted 24, 129, and 'G' cases.
8726         
8727         * options.h (struct options): Added new fields follow_tags and
8728         ignore_tags. 
8729         
8730         * wget.h: Added "#define EQ 0" so we can say "strcmp(a, b) == EQ".
8731         
8732 2000-03-02  Dan Harkless  <wget@harkless.org>
8733
8734         * ftp.c (ftp_loop_internal): Heiko introduced "suggest explicit
8735         braces to avoid ambiguous `else'" warnings.  Eliminated them.
8736         
8737         * http.c (gethttp): Dan Berger's query string patch is totally
8738         bogus.  If you have two different URLs, gen_page.cgi?page1 and
8739         get_page.cgi?page2, they'll both be saved as get_page.cgi and the
8740         second will overwrite the first.  Also, parameters to implicit
8741         CGIs, like "http://www.host.com/db/?2000-03-02" cause the URLs to
8742         be printed with trailing garbage characters, and could seg fault.
8743         Backing out the patch, which Dan B. informed me by email was just
8744         a kludge to download StarOffice from Sun made necessary due to
8745         wget's unconditional escaping of certain characters (room for an
8746         option there?).
8747         (http_loop): Heiko introduced "suggest explicit braces to avoid
8748         ambiguous `else'" warnings.  Eliminated them.
8749         
8750         * main.c: Heiko's --wait / --waitretry backwards compatibility
8751         code looks to have been totally untested -- automatic variable
8752         'wr' was used without being initialized, and a long int was passed
8753         into setval()'s char* val parameter.
8754         
8755         * recur.c (parse_robots): Applied Edward J. Sabol
8756         <sabol@alderaan.gsfc.nasa.gov>'s patch for Guan Yang's reported
8757         problem with "User-agent:<space>*<space>" lines in robots.txt.
8758         
8759         * url.c (parseurl, str_url): Removing Dan Berger's code (see
8760         http.c above for explanation).
8761         
8762 1999-08-25  Heiko Herold  <Heiko.Herold@previnet.it>
8763
8764         * ftp.c: Respect new option waitretry.
8765
8766 2000-01-30  Damir Dzeko  <ddzeko@zesoi.fer.hr>
8767
8768         * http.c (gethttp): Send custom Referer, if required.
8769
8770 1999-09-24  Charles G Waldman  <cgw@fnal.gov>
8771
8772         * netrc.c (parse_netrc): Allow passwords to contain spaces.
8773
8774         * netrc.c (parse_netrc): New function.
8775
8776 1999-09-17  Dan Berger  <dberger@ix.netcom.com>
8777
8778         * http.c (gethttp): Send it.
8779
8780         * url.c (parseurl): Detect query string in HTTP URL-s.
8781         (str_url): Print it.
8782
8783 2000-03-02  HIROSE Masaaki  <hirose31@t3.rim.or.jp>
8784
8785         * html.c (html_allow): Add <link href=...> and <script src=...>.
8786
8787 1999-05-02  andrew deryabin  <djsf@softhome.net>
8788
8789         * http.c (gethttp): Specify port in `Host' header only if it's
8790         different from 80.
8791
8792 1998-11-03  Edward J. Sabol  <sabol@alderaan.gsfc.nasa.gov>
8793
8794         * recur.c (recursive_retrieve): If a finite maximum depth is
8795         specified, and we're are already at that depth, don't download the
8796         HTML file for parsing.
8797
8798 2000-03-01  Dan Harkless  <wget@harkless.org>
8799
8800         * ftp.c (ftp_loop_internal): Call new downloaded_file() function,
8801         even though we don't do conversion on HTML files retrieved via
8802         FTP, so _current_ usage of downloaded_file() makes this call unneeded. 
8803         (ftp_retrieve_list): Added a comment saying where we need to
8804         stat() a .orig file if FTP'd HTML file conversion is ever implemented.
8805         (ftp_retrieve_list): "Local file '%s' is more recent," is sometimes
8806         a lie -- reworded as "Server file no newer than local file '%s' --".
8807         
8808         * http.c (http_loop): Fixed a typo and clarified a comment.
8809         (http_loop): When -K and -N are specified together, compare size
8810         and timestamp of server file X against local file X.orig (if
8811         extant) rather than converted local file X.
8812         (http_loop): "Local file '%s' is more recent," is sometimes a lie
8813         -- reworded as "Server file no newer than local file '%s' --".
8814         (http_loop): Call new downloaded_file() function to prevent
8815         wrongful overwriting of .orig file when -N is specified.
8816         
8817         * url.c (convert_links): When -K specified, only rename X to
8818         X.orig if downloaded_file() returns TRUE.  Otherwise when we skip
8819         file X due to -N, we clobber an X.orig from a previous invocation.
8820         (convert_links): Call the failsafe xstrdup(), not the real strdup().
8821         (convert_links): Added a note asking anyone who understands how
8822         multiple URLs can correspond to a single file to comment it.
8823         (downloaded_file): Added this new function.
8824         
8825         * url.h (downloaded_file): Added prototype for this new function
8826         as well as its downloaded_file_t enum type.
8827
8828         * wget.h (boolean): Added this new typedef and TRUE and FALSE #defines.
8829
8830 2000-02-29  Dan Harkless  <wget@harkless.org>
8831
8832         * version.c: Upped version to developer-only "1.5.3+dev".
8833
8834 2000-02-18  Dan Harkless  <wget@harkless.org>
8835
8836         * init.c (backup_converted): Added this new option.
8837
8838         * main.c (-K / --backup-converted): Added this new option.
8839
8840         * options.h (backup_converted): Added this new option.
8841
8842         * url.c (convert_links): When backup_converted is specified, save
8843         file X as X.orig before converting.
8844
8845         * url.h (urlpos): Fixed typo -- said "Rekative" instead of "Relative".
8846
8847 1998-09-21  Hrvoje Niksic  <hniksic@srce.hr>
8848
8849         * version.c: Wget 1.5.3 is released.
8850
8851 1998-09-21  Hrvoje Niksic  <hniksic@srce.hr>
8852
8853         * host.c (ftp_getaddress): Don't warn when reverse-lookup of local 
8854         address doesn't yield FQDN.
8855
8856 1998-09-21  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
8857
8858         * cmpt.c (strerror): Fix declaration of sys_errlist.
8859
8860 1998-09-11  Hrvoje Niksic  <hniksic@srce.hr>
8861
8862         * main.c (main): Don't use an array subscript as the first
8863         argument to STRDUP_ALLOCA.
8864         From Kaveh R. Ghazi.
8865
8866 1998-09-11  Szakacsits Szabolcs  <szaka@sienet.hu>
8867
8868         * html.c (htmlfindurl): Download table background.
8869
8870 1998-09-11  Hans Grobler  <grobh@conde.ee.sun.ac.za>
8871
8872         * init.c (parse_line): Would free *com before allocating it.
8873         (parse_line): Would free com instead of *com.
8874
8875 1998-09-10  Howard Gayle  <howard@fjst.com>
8876
8877         * url.c (get_urls_html): Would drop the last character of the
8878         link.
8879
8880 1998-09-10  Hrvoje Niksic  <hniksic@srce.hr>
8881
8882         * http.c (http_loop): Don't print status code if quiet.
8883
8884 1998-09-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8885
8886         * log.c: Use <stdarg.h> only when __STDC__.
8887
8888 1998-09-10  Adam D. Moss  <adam@foxbox.org>
8889
8890         * html.c (htmlfindurl): Download <layer src=...>.
8891
8892 1998-09-10  Howard Gayle  <howard@fjst.com>
8893
8894         * ftp.c (ftp_retrieve_list): Don't update the time stamp of a file 
8895         not retrieved.
8896
8897 1998-06-27  Hrvoje Niksic  <hniksic@srce.hr>
8898
8899         * utils.c: Include <libc.h> on NeXT.
8900
8901 1998-06-26  Heinz Salzmann  <heinz.salzmann@intermetall.de>
8902
8903         * url.c (get_urls_html): Fix calculation of URL position.
8904
8905 1998-06-23  Hrvoje Niksic  <hniksic@srce.hr>
8906
8907         * version.c: Wget 1.5.2 is released.
8908
8909 1998-06-23  Dave Love  <d.love@dl.ac.uk>
8910
8911         * ftp.c, init.c, netrc.c: Include errno.h.
8912
8913         * http.c: Include errno.h and time header.
8914
8915         * Makefile.in (exext): Define.
8916         (install.bin, uninstall.bin): Use it.
8917
8918 1998-06-21  Hrvoje Niksic  <hniksic@srce.hr>
8919
8920         * http.c (http_loop): Don't attempt to compare local and remote
8921         sizes if the remote size is unknown.
8922
8923 1998-06-16  Hrvoje Niksic  <hniksic@srce.hr>
8924
8925         * url.c (get_urls_html): Use malloc() instead of alloca in the
8926         loop.
8927
8928 1998-06-13  Hrvoje Niksic  <hniksic@srce.hr>
8929
8930         * version.c: Wget 1.5.2-b4 is released.
8931
8932 1998-06-13  Hrvoje Niksic  <hniksic@srce.hr>
8933
8934         * url.c (get_urls_html): Ignore spaces before and after the URI.
8935
8936 1998-06-08  Wanderlei Antonio Cavassin  <cavassin@conectiva.com.br>
8937
8938         * ftp.c (getftp): Translate `done'.
8939
8940 1998-06-06  Hrvoje Niksic  <hniksic@srce.hr>
8941
8942         * version.c: Wget 1.5.2-b3 is released.
8943
8944 1998-06-06  Alexander Kourakos  <awk@bnt.com>
8945
8946         * init.c (cleanup): Close dfp, don't free it.
8947
8948 1998-06-06  Hrvoje Niksic  <hniksic@srce.hr>
8949
8950         * utils.c (make_directory): Twiddle.
8951
8952         * config.h.in: Added template for access().
8953
8954 1998-06-05  Mathieu Guillaume  <mat@cythere.com>
8955
8956         * html.c (htmlfindurl): Download <input src=...>
8957
8958 1998-06-03  Hrvoje Niksic  <hniksic@srce.hr>
8959
8960         * utils.c (file_exists_p): Use access() with two arguments.
8961
8962 1998-05-27  Martin Kraemer  <Martin.Kraemer@mch.sni.de>
8963
8964         * netrc.c (parse_netrc): Correct logic.
8965
8966 1998-05-27  Hrvoje Niksic  <hniksic@srce.hr>
8967
8968         * ftp.c (getftp): Added `break'; suggested by Lin Zhe Min
8969         <ljm@ljm.wownet.net>.
8970
8971 1998-05-24  Hrvoje Niksic  <hniksic@srce.hr>
8972
8973         * version.c: Wget 1.5.2-b2 is released.
8974
8975 1998-05-18  Juan Jose Rodriguez  <jcnsoft@jal1.telmex.net.mx>
8976
8977         * mswindows.h: Don't translate mkdir to _mkdir under Borland.
8978
8979 1998-05-17  Hrvoje Niksic  <hniksic@srce.hr>
8980
8981         * retr.c (elapsed_time): Return correct value when
8982         HAVE_GETTIMEOFDAY is undefined.
8983
8984 1998-05-13  Hrvoje Niksic  <hniksic@srce.hr>
8985
8986         * version.c: Wget 1.5.2-b1 is released.
8987
8988 1998-05-08  Hrvoje Niksic  <hniksic@srce.hr>
8989
8990         * getopt.c (_getopt_internal): Use exec_name instead of argv[0].
8991         (_getopt_internal): Don't translate `#if 0'-ed strings.
8992
8993 1998-05-06  Douglas E. Wegscheid  <wegscd@whirlpool.com>
8994
8995         * mswindows.c (ws_handler): Use fork_to_background().
8996
8997 1998-05-05  Hrvoje Niksic  <hniksic@srce.hr>
8998
8999         * version.c: Wget 1.5.1 is released.
9000
9001 1998-05-05  Hrvoje Niksic  <hniksic@srce.hr>
9002
9003         * http.c (parse_http_status_line): Avoid `minor' and `major'
9004         names.
9005
9006 1998-05-02  Hrvoje Niksic  <hniksic@srce.hr>
9007
9008         * utils.c (mkdirhier): Renamed to make_directory.
9009
9010 1998-05-01  Hrvoje Niksic  <hniksic@srce.hr>
9011
9012         * mswindows.c (fork_to_background): Define under Windows.
9013
9014         * utils.c (fork_to_background): New function.
9015
9016         * html.c (htmlfindurl): Removed rerdundant casts.
9017
9018 1998-05-01  Douglas E. Wegscheid  <wegscd@whirlpool.com>
9019
9020         * mswindows.c (ws_mypath): Cache the path.
9021
9022 1998-04-30  Douglas E. Wegscheid  <wegscd@whirlpool.com>
9023
9024         * ftp.h: Prefix enum ftype members with FT_.
9025
9026         * ftp-ls.c, ftp.c, html.h: Adjust accordingly.
9027
9028         * mswindows.h: Use stat under Borland, _stat under MSVC.
9029
9030 1998-04-28  Hrvoje Niksic  <hniksic@srce.hr>
9031
9032         * http.c (known_authentication_scheme_p): New function.
9033         (gethttp): Handle authorization more correctly.
9034
9035         * ftp-basic.h: Removed.
9036
9037         * cmpt.h: Removed.
9038
9039         * utils.c: Include <unistd.h> before <pwd.h>; needed under SunOS
9040         with gcc 2.8.
9041         (numdigit): Use `while' loop.
9042
9043         * http.c (create_authorization_line): Detect authentication
9044         schemes case-insensitively.
9045
9046         * http.c (extract_header_attr): Use strdupdelim().
9047         (digest_authentication_encode): Move declaration of local
9048         variables to smaller scope.
9049         (digest_authentication_encode): Reset REALM, OPAQUE and NONCE.
9050         (create_authorization_line): Detect authentication schemes
9051         case-insensitively.
9052
9053         * utils.c (touch): Constify.
9054
9055         * http.c (gethttp): Report a nicer error when no data is received.
9056
9057         * rbuf.h (RBUF_READCHAR): Ditto.
9058
9059         * ftp-basic.c (ftp_response): Use sizeof.
9060
9061 1998-04-27  Hrvoje Niksic  <hniksic@srce.hr>
9062
9063         * retr.c (print_percentage): EXPECTED is long, not int.
9064         (print_percentage): Use floating-point arithmetic to avoid
9065         overflow with large files' sizes multiplied with 100.
9066
9067 1998-04-27  Gregor Hoffleit  <flight@mathi.uni-heidelberg.de>
9068
9069         * config.h.in: Added pid_t stub.
9070
9071         * sysdep.h (S_ISREG): Moved here from mswindows.h (NeXT doesn't
9072         define it).
9073
9074 1998-04-20  Hrvoje Niksic  <hniksic@srce.hr>
9075
9076         * version.c: Wget 1.5.0 is released.
9077
9078 1998-04-18  Hrvoje Niksic  <hniksic@srce.hr>
9079
9080         * url.c (str_url): Ditto.
9081
9082         * ftp-basic.c (ftp_rest): Use new name.
9083
9084         * utils.c (long_to_string): Renamed from prnum().
9085
9086 1998-04-16  Hrvoje Niksic  <hniksic@srce.hr>
9087
9088         * version.c: Wget 1.5-b17 is released.
9089
9090 1998-04-08  Hrvoje Niksic  <hniksic@srce.hr>
9091
9092         * headers.c (header_get): New argument FLAGS.
9093
9094         * http.c (gethttp): If request is malformed, bail out of the
9095         header loop.
9096         (gethttp): Check for empty header *after* the status line checks.
9097         (gethttp): Disallow continuations for status line.
9098
9099 1998-04-08  Hrvoje Niksic  <hniksic@srce.hr>
9100
9101         * version.c: Wget 1.5-b16 is released.
9102
9103 1998-04-08  Hrvoje Niksic  <hniksic@srce.hr>
9104
9105         * init.c (commands): Renamed `always_rest' to `continue'.
9106
9107 1998-04-05  Hrvoje Niksic  <hniksic@srce.hr>
9108
9109         * all: Use it.
9110
9111         * log.c (logputs): New argument.
9112         (logvprintf): Ditto.
9113         (logprintf): Ditto.
9114
9115 1998-04-04  Hrvoje Niksic  <hniksic@srce.hr>
9116
9117         * http.c (http_atotm): Update comment.
9118
9119         * main.c (i18n_initialize): Set LC_MESSAGES, not LC_ALL.
9120
9121         * wget.h: Renamed ENABLED_NLS to HAVE_NLS.
9122
9123         * main.c (i18n_initialize): New function.
9124         (main): Use it.
9125
9126         * log.c: Include <unistd.h>.
9127
9128         * retr.c (show_progress): Cast alloca to char *.
9129
9130 1998-04-04  Hrvoje Niksic  <hniksic@srce.hr>
9131
9132         * version.c: Wget 1.5-b15 is released.
9133
9134 1998-04-04  Hrvoje Niksic  <hniksic@srce.hr>
9135
9136         * utils.h: Declare file_non_directory_p().
9137
9138 1998-04-03  Hrvoje Niksic  <hniksic@srce.hr>
9139
9140         * main.c (main): It's `tries', not `numtries' now.
9141
9142 1998-04-01  Hrvoje Niksic  <hniksic@srce.hr>
9143
9144         * init.c (getperms): Removed.
9145
9146 1998-04-01  Tim Charron  <tcharron@interlog.com>
9147
9148         * log.c (logvprintf): Don't use ARGS twice.
9149
9150 1998-04-01  John  <john@futuresguide.com>
9151
9152         * mswindows.c: Cleaned up.
9153
9154 1998-04-01  Hrvoje Niksic  <hniksic@srce.hr>
9155
9156         * version.c: Wget 1.5-b14 is released.
9157
9158 1998-04-01  Hrvoje Niksic  <hniksic@srce.hr>
9159
9160         * ftp-opie.c (STRLEN4): New macro.
9161         (btoe): Use it.
9162
9163 1998-04-01  Junio Hamano  <junio@twinsun.com>
9164
9165         * http.c: Document all the Digest functions.
9166
9167 1998-04-01  Hrvoje Niksic  <hniksic@srce.hr>
9168
9169         * utils.c (file_non_directory_p): Renamed from isfile().
9170
9171         * mswindows.h (S_ISREG): New macro, suggested by Tim Adam.
9172
9173 1998-03-31  Hrvoje Niksic  <hniksic@srce.hr>
9174
9175         * utils.c (mkdirhier): Use 0777 instead of opt.dirmode.
9176
9177         * init.c (cmd_spec_dotstyle): Use 48 dots per line for binary
9178         style.
9179         (cmd_permissions): Removed.
9180
9181         * config.h.in: Add template for WORDS_BIGENDIAN.
9182
9183 1998-03-31  Junio Hamano  <junio@twinsun.com>
9184
9185         * http.c (HEXD2asc): New macro.
9186         (dump_hash): Use it.
9187
9188 1998-03-31  Hrvoje Niksic  <hniksic@srce.hr>
9189
9190         * version.c: Wget 1.5-b13 is released.
9191
9192 1998-03-31  Hrvoje Niksic  <hniksic@srce.hr>
9193
9194         * main.c (main): Don't try to use `com'.
9195
9196 1998-03-30  Hrvoje Niksic  <hniksic@srce.hr>
9197
9198         * init.c (cmd_permissions): New function.
9199
9200 1998-03-30  Hrvoje Niksic  <hniksic@srce.hr>
9201
9202         * version.c: Wget 1.5-b12 is released.
9203
9204 1998-03-30  Hrvoje Niksic  <hniksic@srce.hr>
9205
9206         * init.c (commands): Renamed `numtries' to `tries'.
9207         (cmd_spec_debug): Removed.
9208         (home_dir): Under Windows, return `C:\' if HOME is undefined.
9209
9210 1998-03-29  Hrvoje Niksic  <hniksic@srce.hr>
9211
9212         * config.h.in: Define _XOPEN_SOURCE.
9213
9214         * init.c (check_user_specified_header): New function.
9215         (cmd_spec_header): Use it.
9216         (cmd_spec_useragent): New function.
9217
9218 1998-03-29  Hrvoje Niksic  <hniksic@srce.hr>
9219
9220         * version.c: Wget 1.5-b11 is released.
9221
9222 1998-03-28  Hrvoje Niksic  <hniksic@srce.hr>
9223
9224         * wget.h: Include <libintl.h> only if NLS is enabled.
9225
9226 1998-03-26  Hrvoje Niksic  <hniksic@srce.hr>
9227
9228         * options.h (struct options): Made `wait' a long.
9229         (struct options): Ditto for `timeout'.
9230
9231 1998-03-19  Hrvoje Niksic  <hniksic@srce.hr>
9232
9233         * utils.c (exists): Renamed to file_exists_p.
9234         (file_exists_p): Use access() if available.
9235
9236 1998-03-17  Hrvoje Niksic  <hniksic@srce.hr>
9237
9238         * utils.c (memfatal): Set save_log_p to 0 to avoid potential
9239         infloop.
9240
9241         * log.c: do_logging -> save_log_p.
9242
9243         * config.h.in: Added template for HAVE_VSNPRINTF.
9244
9245 1998-03-16  Hrvoje Niksic  <hniksic@srce.hr>
9246
9247         * init.c: Ditto.
9248
9249         * http.c: Protect declaration against non-ANSI compiler.
9250
9251         * log.c (logvprintf): Use vsnprintf() if available.
9252
9253         * getopt.c (main): Don't translate test stuff.
9254
9255 1998-03-16  Hrvoje Niksic  <hniksic@srce.hr>
9256
9257         * version.c: Wget 1.5-b10 is released.
9258
9259 1998-03-11  Hrvoje Niksic  <hniksic@srce.hr>
9260
9261         * ftp.c (getftp): Don't translate "CWD %s".
9262
9263         * wget.h (GCC_FORMAT_ATTR): Renamed from FORMAT_ATTR.
9264
9265 1998-03-07  Hrvoje Niksic  <hniksic@srce.hr>
9266
9267         * ftp-opie.c (btoe): Use memcpy() instead of strncat().
9268
9269         * log.c (logputs): New function.
9270         (logvprintf): Renamed from vlogmsg; use logputs().
9271
9272         * retr.c (show_progress): Print `[100%]' when the retrieval is
9273         finished.
9274
9275         * init.c (run_wgetrc): Use FILE, not PATH.
9276         (wgetrc_file_name): Ditto.
9277
9278 1998-03-07  Tim Adam  <tma@osa.com.au>
9279
9280         * recur.c (parse_robots): Correctly reset `entries' on empty
9281         disallow.
9282
9283 1998-03-07  Hrvoje Niksic  <hniksic@srce.hr>
9284
9285         * init.c (cmd_spec_debug): Use cmd_boolean().
9286
9287 1998-02-23  Hrvoje Niksic  <hniksic@srce.hr>
9288
9289         * http.c (gethttp): Create proxy-authorization correctly.
9290
9291 1998-02-22  Hrvoje Niksic  <hniksic@srce.hr>
9292
9293         * md5.c: Ditto.
9294
9295         * getopt.c: Use ANSI function definitions.
9296
9297         * ftp-opie.c: New file.
9298
9299         * options.h: Don't redefine EXTERN.
9300
9301         * init.c: Sort it correctly.
9302
9303 1998-02-22  Hrvoje Niksic  <hniksic@srce.hr>
9304
9305         * version.c: Wget 1.5-b9 is released.
9306
9307 1998-02-22  Hrvoje Niksic  <hniksic@srce.hr>
9308
9309         * recur.c (recursive_retrieve): Reset `first_time'.
9310
9311         * ftp.c (getftp): Added `default' clause to switches of uerr_t.
9312
9313         * rbuf.c (rbuf_peek): Simplified.
9314         (rbuf_flush): Use MINVAL.
9315
9316         * wget.h (MINVAL): Moved from url.h.
9317
9318         * rbuf.h (RBUF_FD): New macro.
9319
9320         * url.c (add_url): Add to the head of the list.
9321
9322         * ftp.c (ftp_retrieve_list): Set the permissions to downloaded
9323         file.
9324         (getftp): Set the default permissions to 0600.
9325
9326 1998-02-21  Hrvoje Niksic  <hniksic@srce.hr>
9327
9328         * url.c (get_urls_html): Ditto.
9329         (convert_links): Ditto.
9330
9331         * recur.c (parse_robots): Ditto.
9332
9333         * html.c (ftp_index): Ditto.
9334
9335         * ftp-ls.c (ftp_parse_unix_ls): Open file as binary.
9336
9337         * init.c (defaults): Initialize `opt' to zero via memset.
9338
9339         * http.c (digest_authentication_encode): goto considered harmful.
9340
9341 1998-02-19  Hrvoje Niksic  <hniksic@srce.hr>
9342
9343         * ftp.c (delelement): Simplify and fix leak.
9344
9345 1998-02-18  Hrvoje Niksic  <hniksic@srce.hr>
9346
9347         * http.c (dump_hash): Use HEXD2ASC instead of home-grown stuff.
9348
9349         * url.h (HEXD2ASC): Removed warning.
9350
9351         * init.c (comind): Use binary search.
9352         (commands): Reorganized.
9353         (setval): Ditto.
9354         (cmd_boolean): New function.
9355         (cmd_number): Ditto.
9356         (cmd_number_inf): Ditto.
9357         (cmd_string): Ditto.
9358         (cmd_vector): Ditto.
9359         (cmd_directory_vector): Ditto.
9360         (cmd_bytes): Ditto.
9361         (cmd_time): Ditto.
9362         (cmd_spec_debug): Ditto.
9363         (cmd_spec_dirmode): Ditto.
9364         (cmd_spec_dirstruct): Ditto.
9365         (cmd_spec_dotstyle): Ditto.
9366         (cmd_spec_header): Ditto.
9367         (cmd_spec_htmlify): Ditto.
9368         (cmd_spec_mirror): Ditto.
9369         (cmd_spec_outputdocument): Ditto.
9370         (cmd_spec_recursive): Ditto.
9371         (settime): Merged with cmd_time().
9372         (setbytes): Merged with cmd_bytes().
9373         (setonoff): Merged with cmd_boolean().
9374         (onoff): Ditto.
9375
9376 1998-02-17  Hrvoje Niksic  <hniksic@srce.hr>
9377
9378         * Makefile.in (distclean): Remove `config.h'.
9379
9380 1998-02-17  Hrvoje Niksic  <hniksic@srce.hr>
9381
9382         * version.c: Wget 1.5-b8 is released.
9383
9384 1998-02-17  Hrvoje Niksic  <hniksic@srce.hr>
9385
9386         * http.c (digest_authentication_encode): New function.
9387         (create_authorization_line): Use it.
9388         (dump_hash): New function.
9389         (digest_authentication_encode): Use it.
9390
9391         * fnmatch.c: Renamed from `mtch.c'.
9392
9393 1998-02-15  Karl Eichwalder  <ke@suse.de>
9394
9395         * main.c (main): Tag "Written by..." string as translatable.
9396
9397 1998-02-15  Hrvoje Niksic  <hniksic@srce.hr>
9398
9399         * wget.h (FREE_MAYBE): New macro.
9400
9401         * http.c (create_authorization_line): Don't use ANSI C string
9402         concatenation feature.
9403         (basic_authentication_encode): Use alloca() for temporary
9404         variables.
9405
9406         * recur.h: Ditto.
9407
9408         * http.c: Ditto.
9409
9410         * headers.h: Ditto.
9411
9412         * ftp-basic.c: Protect declaration against non-ANSI compiler.
9413
9414         * http.c (create_authorization_line): Cast `unsigned char *' to
9415         `char *' for sprintf, to shut up the noisy Digital Unix cc.
9416
9417 1998-02-15  Hrvoje Niksic  <hniksic@srce.hr>
9418
9419         * version.c: Wget 1.5-b7 is released.
9420
9421 1998-02-15  Hrvoje Niksic  <hniksic@srce.hr>
9422
9423         * cmpt.c (strstr): Synched with glibc-2.0.6.
9424
9425         * ftp-basic.c (calculate_skey_response): Ditto.
9426         (calculate_skey_response): Use alloca().
9427
9428         * http.c (create_authorization_line): Work with FSF's version of
9429         md5.c.
9430
9431         * md5.c: New file, from GNU libc.
9432
9433 1998-02-14  Hrvoje Niksic  <hniksic@srce.hr>
9434
9435         * url.h (URL_CLEANSE): Name the temporary variable more carefully.
9436
9437 1998-02-13  Hrvoje Niksic  <hniksic@srce.hr>
9438
9439         * http.c (basic_authentication_encode): New function, instead of
9440         the macro.
9441
9442 1998-02-13  Junio Hamano  <junio@twinsun.com>
9443
9444         * http.c: Add HTTP-DA support.
9445         * ftp-basic.c: Add Opie/S-key support.
9446         * config.h.in, Makefile.in: Add HTTP-DA and Opie/S-key support.
9447         * md5.c, md5.h: New files.
9448
9449 1998-02-13  Hrvoje Niksic  <hniksic@srce.hr>
9450
9451         * http.c (http_process_range): Renamed from hprocrange().
9452         (http_process_range): Parse the whole header.
9453
9454         * headers.c: New file.
9455         (header_process): New function.
9456         (header_get): Renamed from fetch_next_header.
9457
9458         * all: Include utils.h only where necessary.
9459
9460         * wget.h: Declare xmalloc(), xrealloc() and xstrdup() here.
9461
9462         * wget.h: Add provisions for dmalloc.
9463
9464 1998-02-12  Hrvoje Niksic  <hniksic@srce.hr>
9465
9466         * version.c: Wget 1.5-b6 is released.
9467
9468 1998-02-12  Hrvoje Niksic  <hniksic@srce.hr>
9469
9470         * ftp.c (ftp_loop): Determine `filename' more precisely.
9471
9472         * init.c (setval): Don't set `opt.quiet' if output-document is
9473         `-'.
9474
9475         * log.c (log_init): Print to STDERR instead of STDOUT.
9476         (vlogmsg): Use STDERR by default.
9477         (logflush): Ditto.
9478
9479 1998-02-11  Simon Josefsson  <jas@pdc.kth.se>
9480
9481         * host.c: Use addr_in again.
9482
9483 1998-02-08  Karl Eichwalder  <karl@suse.de>
9484
9485         * http.c (gethttp): Fixed typo.
9486
9487 1998-02-08  Hrvoje Niksic  <hniksic@srce.hr>
9488
9489         * version.c: Wget 1.5-b5 is released.
9490
9491 1998-02-08  Hrvoje Niksic  <hniksic@srce.hr>
9492
9493         * retr.c (show_progress): Use it.
9494
9495         * log.c (logflush): New function.
9496
9497         * wget.h: Utilize __attribute__ if on gcc.
9498
9499 1998-02-07  Hrvoje Niksic  <hniksic@srce.hr>
9500
9501         * http.c (base64_encode_line): New argument LENGTH.
9502         (BASIC_AUTHENTICATION_ENCODE): Use it.
9503         (BASIC_AUTHENTICATION_ENCODE): Take length of HEADER into account.
9504
9505         * main.c (main): Fixed fprintf() format mismatch.
9506
9507 1998-02-06  Hrvoje Niksic  <hniksic@srce.hr>
9508
9509         * version.c: Wget 1.5-b4 is released.
9510
9511 1998-02-03  Simon Josefsson  <jas@pdc.kth.se>
9512
9513         * host.c: use sockaddr_in instead of addr_in.
9514
9515 1998-02-04  Hrvoje Niksic  <hniksic@srce.hr>
9516
9517         * init.c (cleanup): Use it.
9518
9519         * recur.c (recursive_cleanup): New function.
9520
9521         * retr.c (retrieve_from_file): Ditto.
9522
9523         * main.c (main): Use it.
9524
9525         * recur.c (recursive_reset): New function.
9526
9527         * retr.c (retrieve_from_file): Ditto.
9528
9529         * main.c (main): Simplify call to recursive_retrieve().
9530
9531         * recur.c (recursive_retrieve): Removed FLAGS argument.
9532
9533         * http.c (gethttp): Changed call to iwrite().
9534
9535 1998-02-03  Hrvoje Niksic  <hniksic@srce.hr>
9536
9537         * url.c (get_urls_html): Ditto.
9538         (free_urlpos): Ditto.
9539         (mkstruct): Ditto.
9540         (construct): Ditto.
9541
9542         * retr.c (retrieve_url): Move declaration of local variables to
9543         smaller scope.
9544
9545         * url.c (urlproto): Use it.
9546         (parseurl): Ditto.
9547         (str_url): Ditto.
9548         (get_urls_html): Ditto.
9549
9550         * utils.h (ARRAY_SIZE): New macro.
9551
9552         * url.c (proto): Moved from url.h.
9553
9554         * url.h (URL_CLEANSE): Reformatted.
9555         (USE_PROXY_P): Renamed from USE_PROXY.
9556
9557         * ftp-basic.c: Adjust to the new interface of iwrite().
9558
9559         * ftp-basic.c (ftp_port): Use alloca().
9560
9561 1998-02-03  Hrvoje Niksic  <hniksic@srce.hr>
9562
9563         * version.c: Wget 1.5-b3 is released.
9564
9565         * host.c (ftp_getaddress): Don't print to stderr directly.
9566
9567         * init.c (setbytes): Support `g' for gigabytes.
9568         (cmdtype): New specification CTIME.
9569         (setval): Use it with settime().
9570         (commands): Use it for WAIT and TIMEOUT.
9571
9572 1998-02-02  Hrvoje Niksic  <hniksic@srce.hr>
9573
9574         * http.c (BASIC_AUTHENTICATION_ENCODE): New macro.
9575         (gethttp): Use it.
9576
9577         * utils.c (unique_name_1): Moved from url.c.
9578         (unique_name): Ditto.
9579
9580         * url.c (url_filename): Ditto.
9581
9582         * log.c (redirect_output): Changed call to unique_name().
9583
9584         * url.c (unique_name_1): Renamed from unique_name().
9585         (unique_name): Changed interface.
9586
9587         * init.c (enum cmdid): Moved from init.h.
9588         (cmdtype): Ditto.
9589         (struct cmd): Ditto.
9590
9591         * main.c (main): Use it.
9592         (main): Moved `--backups' to not have a short option.
9593
9594         * options.h (struct options): New member BACKGROUND.
9595
9596         * main.c (print_help): Rearranged.
9597         (main): New long options for -n* short options: --no-directories,
9598         --no-host-directories, --non-verbose, --no-host-lookup and
9599         --dont-remove-listing.
9600
9601 1998-02-01  Hrvoje Niksic  <hniksic@srce.hr>
9602
9603         * main.c (main): Use log_close().
9604
9605         * log.c: New variable LOGFP.
9606         (vlogmsg): Use it.
9607         (redirect_output): Don't open /dev/null; set LOGFP to stdin
9608         instead.
9609         (log_close): New function.
9610
9611         * options.h (struct options): Removed LFILE.
9612
9613         * log.c (log_enable): Removed.
9614
9615         * main.c (main): Use it.
9616
9617         * log.c (log_init): New function.
9618
9619         * url.c (get_urls_html): Removed needless assignment to BASE.
9620
9621         * host.c (add_hlist): Don't set CMP needlessly.
9622
9623         * utils.c (match_backwards): Ditto.
9624         (in_acclist): Ditto.
9625
9626         * url.c (findurl): Ditto.
9627
9628         * netrc.c (parse_netrc): Ditto.
9629
9630         * log.c (log_dump): Ditto.
9631
9632         * html.c (html_quote_string): Ditto.
9633
9634         * ftp-basic.c (ftp_request): Made static.
9635
9636         * connect.c: Made global variables static.
9637
9638         * url.c (construct): Ditto.
9639
9640         * init.c (init_path): Avoid assignment inside `if'-condition.
9641
9642         * ftp.c: Don't include in.h or winsock.h.
9643
9644         * ftp.c (ftp_loop): Use SZ.
9645
9646         * connect.c (bindport): Cast &addrlen to int *.
9647         (conaddr): Ditto.
9648
9649         * init.c (initialize): Don't use SYSTEM_WGETRC unconditionally.
9650
9651 1998-01-31  Hrvoje Niksic  <hniksic@srce.hr>
9652
9653         * ftp.c (getftp): Initialize opt.ftp_pass here.
9654         (ftp_retrieve_dirs): Use alloca().
9655
9656         * init.c (defaults): Don't initialize opt.ftp_pass.
9657
9658         * sysdep.h (S_ISLNK): Declare for OS/2; ditto for lstat.
9659         From Ivan F. Martinez <ivanfm@ecodigit.com.br>.
9660
9661 1998-01-31  Hrvoje Niksic  <hniksic@srce.hr>
9662
9663         * recur.c (parse_robots): Check for comments more correctly.
9664
9665         * host.c (ftp_getaddress): Use STRDUP_ALLOCA.
9666         (ftp_getaddress): Add diagnostics when reverse-lookup yields only
9667         hostname.
9668
9669 1998-01-31  Hrvoje Niksic  <hniksic@srce.hr>
9670
9671         * version.c: Wget 1.5-b2 is released.
9672
9673         * netrc.c (NETRC_FILE_NAME): Moved from netrc.h.
9674
9675         * utils.c (proclist): Pass FNM_PATHNAME to fnmatch().
9676
9677         * ftp-basic.c (ftp_pasv): Avoid unnecessary casting to unsigned
9678         char.
9679
9680         * log.c: Don't attempt to hide arguments from ansi2knr.
9681
9682         * cmpt.c: Synched strptime() and mktime() with glibc-2.0.6.
9683
9684         * ansi2knr.c: Use a later version, from fileutils-3.16l alpha.
9685
9686         * ftp.c (getftp): Ditto.
9687
9688         * http.c (gethttp): Use it.
9689
9690         * retr.c (get_contents): New argument EXPECTED; pass it to
9691         show_progress().
9692         (show_progress): New argument EXPECTED; use it to display
9693         percentages.
9694
9695         * init.c (setval): Ditto.
9696
9697         * http.c (gethttp): Ditto.
9698         (http_loop): Ditto.
9699
9700         * ftp.c (getftp): Ditto.
9701         (ftp_loop_internal): Ditto.
9702
9703         * ftp-ls.c (ftp_parse_unix_ls): Use abort() instead of assert(0).
9704
9705         * sysdep.h (CLOSE): Simplify; use DEBUGP.
9706
9707         * netrc.c (search_netrc): Use alloca().
9708
9709         * init.c (defaults): Initialize no_flush.
9710
9711         * log.c (vlogmsg): Don't flush if no_flush.
9712
9713         * options.h (struct options): New variable no_flush.
9714
9715         * main.c (main): Don't play games with buffering.
9716
9717         * log.c (vlogmsg): Flush the output after every message.
9718
9719 1998-01-31  Hrvoje Niksic  <hniksic@srce.hr>
9720
9721         * init.c (parse_line): Ditto.
9722
9723         * url.c (get_urls_html): Ditto.
9724
9725         * main.c (main): Don't cast to unsigned char.
9726
9727         * init.c (run_wgetrc): Don't cast to unsigned char.
9728         (parse_line): Accept char instead of unsigned char.
9729
9730         * html.c (htmlfindurl): Use char instead of unsigned char.
9731
9732         * all: Use them.
9733
9734         * sysdep.h: Add wrappers to ctype macros to make them
9735         eight-bit-clean:
9736
9737 1998-01-30  Hrvoje Niksic  <hniksic@srce.hr>
9738
9739         * html.c (htmlfindurl): Download <img lowsrc=...>
9740
9741         * main.c (main): Ignore SIGPIPE.
9742
9743         * connect.c (select_fd): New argument WRITEP.
9744         (iwrite): Call select_fd().
9745
9746 1997-02-27  Fila Kolodny <fila@ibi.com>
9747
9748         * ftp.c (ftp_retrieve_list): If retrieving symlink and the proper
9749         one already exists, just skip it.
9750
9751 1998-01-30  Hrvoje Niksic  <hniksic@srce.hr>
9752
9753         * http.c (gethttp): Cosmetic changes.
9754
9755         * http.c (check_end): Allow `+D...' instead of `GMT'.
9756         From Fabrizio Pollastri <pollastri@cstv.to.cnr.it>.
9757
9758         * url.c (process_ftp_type): New function.
9759         (parseurl): Use it.
9760
9761         * connect.c (iwrite): Allow writing in a few chunks.
9762         (bindport): Made SRV static, so addr can point to it.
9763         (select_fd): Removed HPUX kludge.
9764
9765         * host.c (free_hlist): Incorporated into clean_hosts().
9766
9767 1998-01-29  Hrvoje Niksic  <hniksic@srce.hr>
9768
9769         * host.c (hlist): Made static.
9770         (search_address): Cosmetic change.
9771
9772 1998-01-29  Hrvoje Niksic  <hniksic@srce.hr>
9773
9774         * version.c: Wget v1.5-b1 is released.
9775
9776         * http.c (hgetlen): Use sizeof() to get the header length.
9777         (hgetrange): Ditto.
9778         (hgettype): Ditto.
9779         (hgetlocation): Ditto.
9780         (hgetmodified): Ditto.
9781         (haccepts_none): Ditto.
9782
9783         * main.c (main): Updated `--version' and `--help' output, as per
9784         Francois Pinard's suggestions.
9785
9786         * main.c: Include locale.h; call setlocale(), bindtextdomain() and 
9787         textdomain().
9788
9789         * config.h.in: Define stubs for I18N3.
9790
9791         * wget.h: Include libintl.h.
9792
9793 1998-01-28  Hrvoje Niksic  <hniksic@srce.hr>
9794
9795         * url.c (mkstruct): Check for opt.cut_dirs.
9796         (mkstruct): alloca()-te more, xmalloc() less.
9797
9798         * utils.c (load_file): Check for ferror().
9799
9800         * url.c (get_urls_file): Close only the files we opened.
9801         (get_urls_html): Ditto.
9802         (count_slashes): New function.
9803
9804         * http.h: Removed.
9805
9806         * http.c (gethttp): Respect username and password provided by
9807         proxy URL.
9808         (base64_encode_line): Write into an existing buffer instead of
9809         malloc-ing a new one.
9810         (struct http_stat): Moved from http.h
9811
9812         * retr.c (retrieve_url): Free SUF.
9813
9814         * all: Removed lots of unnecessary .h dependencies.
9815
9816         * html.c (global_state): Made static.
9817
9818         * utils.h (ALLOCA_ARRAY): New macro.
9819
9820         * main.c (main): New option `--cut-dirs'.
9821
9822         * url.c (construct): Use alloca() for T.
9823
9824         * utils.c (mkdirhier): Use STRDUP_ALLOCA.
9825
9826         * host.c (_host_t): Moved from host.h.
9827         (struct host): Renamed from _host_t.
9828         (store_hostaddress): Use STRDUP_ALLOCA for INET_S.
9829         (realhost): Ditto.
9830
9831         * host.h: Don't include url.h.
9832
9833         * ftp.c (LIST_FILENAME): Moved from ftp.h.
9834
9835         * init.c (DEFAULT_FTP_ACCT): Moved from ftp.h.
9836
9837         * main.c (main): Enable log if the output goes to a TTY.
9838
9839         * connect.h: Removed unused constant `BACKLOG'.
9840
9841         * config.h.in: Check for isatty().
9842
9843         * Makefile.in (LINK): Use CFLAGS when linking.
9844
9845 1998-01-27  Hrvoje Niksic  <hniksic@srce.hr>
9846
9847         * mswindows.c (ws_hangup): Use redirect_output().
9848
9849         * main.c (redirect_output_signal): New function; use
9850         redirect_output().
9851
9852         * log.c (redirect_output): New function, based on hangup(), which
9853         is deleted.
9854
9855         * log.c (vlogmsg): New function.
9856
9857         * wget.h (DEBUGP): Use debug_logmsg().
9858
9859         * main.c (hangup): Use it.
9860
9861         * log.c (log_dump): New function.
9862
9863         * utils.h (DO_REALLOC): Use `long' for various sizes.
9864
9865         * http.c (hskip_lws): Use `while', for clarity.
9866         (HTTP_DYNAMIC_LINE_BUFFER): New constant.
9867         (fetch_next_header): Use it instead of DYNAMIC_LINE_BUFFER.
9868
9869         * ftp-basic.c (FTP_DYNAMIC_LINE_BUFFER): New constant.
9870         (ftp_response): Use it instead of DYNAMIC_LINE_BUFFER.
9871
9872         * utils.c (DYNAMIC_LINE_BUFFER): Moved from utils.c.
9873         (LEGIBLE_SEPARATOR): Ditto.
9874         (FILE_BUFFER_SIZE): Ditto.
9875
9876         * retr.c (BUFFER_SIZE): Moved from retr.h.
9877
9878         * log.c: New file.
9879         (logmsg): Moved from utils.c.
9880         (debug_logmsg): New function.
9881
9882         * mswindows.h: Include it here.
9883
9884         * init.c: Ditto.
9885
9886         * utils.c: Don't include <windows.h>.
9887
9888 1998-01-25  Hrvoje Niksic  <hniksic@srce.hr>
9889
9890         * host.c (ftp_getaddress): Ditto.
9891
9892         * main.c (main): Use it.
9893
9894         * utils.h (STRDUP_ALLOCA): New macro.
9895
9896         * init.c: Prepend `wget: ' to error messages printed on stderr.
9897
9898         * utils.c (mkdirhier): Renamed from mymkdir.
9899         (touch): Renamed from my_touch.
9900         (pwd_cuserid): Renamed from my_cuserid().
9901
9902 1998-01-24  Andy Eskilsson  <andy.eskilsson@telelogic.se>
9903
9904         * utils.c (accdir): Process wildcards.
9905         (proclist): New function.
9906         (accdir): Use it to avoid code repetition.
9907
9908 1998-01-24  Hrvoje Niksic  <hniksic@srce.hr>
9909
9910         * recur.c (parse_robots): Respect opt.useragent; use alloca().
9911
9912         * http.c (gethttp): Construct useragent accordingly.
9913
9914         * version.c: Changed version string to numbers-only.
9915
9916         * main.c (print_help): List all the options.
9917
9918         * mswindows.c (windows_main_junk): Initialize argv0 here.
9919
9920 1998-01-24  Karl Heuer  <kwzh@gnu.org>
9921
9922         * netrc.c (search_netrc): Initialize `l' only after processing
9923         netrc.
9924
9925         * main.c (main): Don't trap SIGHUP if it's being ignored.
9926
9927 1998-01-24  Hrvoje Niksic  <hniksic@srce.hr>
9928
9929         * all: Use logmsg().
9930
9931         * utils.c (time_str): Moved from retr.c.
9932         (logmsg): New function.
9933         (logmsg_noflush): Ditto.
9934
9935         * rbuf.c: New file, moved buf_* functions here.
9936
9937         * ftp.c (ftp_expected_bytes): Moved from ftp-basic.c.
9938
9939         * ftp-basic.c (ftp_rest): Use prnum().
9940
9941         * ftp-basic.c: Ditto.
9942
9943         * ftp.c: Use the new reading functions and macros.
9944
9945         * retr.c (buf_initialize): New function.
9946         (buf_initialized_p): Ditto.
9947         (buf_uninitialize): Ditto.
9948         (buf_fd): Ditto.
9949
9950         * http.c (fetch_next_header): Use the BUF_READCHAR macro for
9951         efficiency.
9952         (gethttp): Use alloca() where appropriate.
9953
9954         * retr.c (buf_readchar): Use it.
9955         (buf_peek): Use rstreams.
9956
9957         * retr.h (BUF_READCHAR): New macro.
9958
9959         * init.c (home_dir): Rewritten for clarity.
9960         (init_path): Ditto.
9961
9962         * mswindows.c (ws_backgnd): Made static.
9963         (read_registry): Ditto.
9964         (ws_cleanup): Ditto.
9965         (ws_handler): Ditto.
9966
9967 1998-01-23  Hrvoje Niksic  <hniksic@srce.hr>
9968
9969         * alloca.c: New file.
9970
9971         * Makefile.in (ALLOCA): Define.
9972
9973         * mswindows.c (ws_help): Constify.
9974         (ws_help): Use alloca.
9975
9976         * mswindows.c: Reformat.
9977
9978         * all: Added _(...) annotations for I18N snarfing and translation.
9979
9980         * host.c (ftp_getaddress): Nuke SYSINFO.
9981         (ftp_getaddress): Don't use getdomainname().
9982         (ftp_getaddress): Use uname(), where available.
9983
9984         * http.c (gethttp): Protect a stray fprintf().
9985
9986         * init.c (settime): New function.
9987         (setval): Treat WAIT specially, allowing suffixes like `m' for
9988         minutes, etc.
9989
9990 1998-01-21  Hrvoje Niksic  <hniksic@srce.hr>
9991
9992         * url.c (get_urls_html): Use alloca() for TEMP.
9993
9994 1998-01-21  Jordan Mendelson  <jordy@wserv.com>
9995
9996         * url.c (rotate_backups): New function.
9997
9998         * http.c (gethttp): Ditto.
9999
10000         * ftp.c (getftp): Rotate backups.
10001
10002 1997-12-18  Hrvoje Niksic  <hniksic@srce.hr>
10003
10004         * all: Renamed nmalloc(), nrealloc() and nstrdup() to xmalloc(),
10005         xrealloc() and xstrdup().  Use the new functions.
10006
10007         * url.c (decode_string): Made static.
10008         (has_proto): Ditto.
10009         (parse_dir): Ditto.
10010         (parse_uname): Ditto.
10011         (mkstruct): Ditto.
10012         (construct): Ditto.
10013         (construct_relative): Ditto.
10014
10015         * retr.c (show_progress): Made static.
10016
10017         * recur.c (robots_url): Made static.
10018         (retrieve_robots): Ditto.
10019         (parse_robots): Ditto.
10020         (robots_match): Ditto.
10021
10022         * main.h: Removed.
10023
10024         * main.c (printhelp): Made static.
10025         (hangup): Ditto.
10026
10027         * init.c (comind): Made static.
10028         (defaults): Ditto.
10029         (init_path): Ditto.
10030         (run_wgetrc): Ditto.
10031         (onoff): Ditto.
10032         (setonoff): Ditto.
10033         (setnum): Ditto.
10034         (myatoi): Ditto.
10035         (getperms): Ditto.
10036         (setbytes): Ditto.
10037
10038         * http.c (fetch_next_header): Made static.
10039         (hparsestatline): Ditto.
10040         (hskip_lws): Ditto.
10041         (hgetlen): Ditto.
10042         (hgetrange): Ditto.
10043         (hgettype): Ditto.
10044         (hgetlocation): Ditto.
10045         (hgetmodified): Ditto.
10046         (haccepts_none): Ditto.
10047         (gethttp): Ditto.
10048         (base64_encode_line): Ditto.
10049         (mktime_from_utc): Ditto.
10050         (http_atotm): Ditto.
10051
10052         * html.c (idmatch): Made static.
10053
10054         * host.c (search_host): Made static.
10055         (search_address): Ditto.
10056         (free_hlist): Ditto.
10057
10058         * ftp.c (getftp): Made static.
10059         (ftp_loop_internal): Ditto.
10060         (ftp_get_listing): Ditto.
10061         (ftp_retrieve_list): Ditto.
10062         (ftp_retrieve_dirs): Ditto.
10063         (ftp_retrieve_glob): Ditto.
10064         (freefileinfo): Ditto.
10065         (delelement): Ditto.
10066
10067         * ftp-ls.c (symperms): Made static.
10068         (ftp_parse_unix_ls): Ditto.
10069
10070         * connect.c (select_fd): Made static.
10071
10072         * utils.c (xmalloc): Renamed from nmalloc.
10073         (xrealloc): Renamed from nrealloc.
10074         (xstrdup): Renamed from nstrdup.
10075
10076         * getopt.c (exchange): Use alloca.
10077
10078         * mswindows.c (mycuserid): Use strncpy.
10079
10080         * New files mswindows.c, mswindows.h, sysdep.h.  winjunk.c,
10081         systhings.h, windecl.h and winjunk.h removed.
10082
10083         * mswindows.c (sleep): New function.
10084
10085         * utils.c: Include <windows.h> under Windows.
10086
10087 1997-06-12  Darko Budor  <dbudor@zesoi.fer.hr>
10088
10089         * url.h (URL_UNSAFE): Change default under Windows.
10090
10091         * retr.c (retrieve_from_file): Respect opt.delete_after.
10092
10093         * main.c (main): Call ws_help on Windows.
10094
10095         * winjunk.c (windows_main_junk): New function.
10096
10097         * main.c (main): Junk-process argv[0].
10098
10099         * http.c (mktime_from_utc): Return -1 if mktime failed.
10100
10101         * http.c (http_loop): Ditto.
10102
10103         * ftp.c (ftp_loop_internal): Change title on Windows when using a
10104         new URL.
10105
10106         * winjunk.c (getdomainname): Lots of functions.
10107
10108 1997-06-12  Hrvoje Niksic  <hniksic@srce.hr>
10109
10110         * cmpt.c (strptime_internal): Handle years more correctly for
10111         `%y'.
10112
10113 1997-06-09  Mike Thomas <mthomas@reality.ctron.com>
10114
10115         * http.c (gethttp): Allocate enough space for
10116         `Proxy-Authorization' header.
10117
10118 1997-05-10  Hrvoje Niksic  <hniksic@srce.hr>
10119
10120         * version.c: Wget/1.4.5 is released.
10121
10122 1997-05-10  Hrvoje Niksic  <hniksic@srce.hr>
10123
10124         * retr.c (get_contents): Check return value of fwrite more
10125         carefully.
10126
10127 1997-03-30  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
10128
10129         * cmpt.c (strptime_internal) [case 'Y']: Always subtract 1900 from
10130         year, regardless of century.
10131
10132 1997-03-30  Hrvoje Niksic  <hniksic@srce.hr>
10133
10134         * utils.c (isfile): Use `lstat' instead of `stat'.
10135
10136 1997-03-29  Hrvoje Niksic  <hniksic@srce.hr>
10137
10138         * utils.c (numdigit): Use explicit test.
10139
10140 1997-03-21  Hrvoje Niksic  <hniksic@srce.hr>
10141
10142         * http.c (http_loop): Always use `url_filename' to get u->local.
10143
10144 1997-03-20  Hrvoje Niksic  <hniksic@srce.hr>
10145
10146         * url.c: Recognize https.
10147
10148 1997-03-13  Hrvoje Niksic  <hniksic@srce.hr>
10149
10150         * recur.c (recursive_retrieve): Lowercase just the host name.
10151
10152 1997-03-09  Hrvoje Niksic  <hniksic@srce.hr>
10153
10154         * url.c (get_urls_file): Use the correct test.
10155         (get_urls_html): Ditto.
10156
10157 1997-03-07  Hrvoje Niksic  <hniksic@srce.hr>
10158
10159         * connect.c: Reverted addrlen to int.
10160
10161         * init.c (parse_line): Check for -1 instead of NONE.
10162
10163         * version.c: Changed version to 1.4.5.
10164
10165 1997-02-17  Hrvoje Niksic  <hniksic@srce.hr>
10166
10167         * init.c: New option netrc.
10168         (initialize): Don't parse .netrc.
10169
10170         * cmpt.c (recursive): Return rp.
10171         (strptime_internal): Match the long strings first, the abbreviated
10172         second.
10173
10174 1997-02-16  Hrvoje Niksic  <hniksic@srce.hr>
10175
10176         * http.c (check_end): New function.
10177         (http_atotm): Use it.
10178
10179 1997-02-13  gilles Cedoc  <gilles@cedocar.fr>
10180
10181         * http.c (gethttp): Use them.
10182
10183         * init.c: New options proxy_user and proxy_passwd.
10184
10185 1997-02-14  Hrvoje Niksic  <hniksic@srce.hr>
10186
10187         * ftp.c (ftp_retrieve_list): Create links even if not relative.
10188
10189 1997-02-10  Hrvoje Niksic  <hniksic@srce.hr>
10190
10191         * recur.c (recursive_retrieve): Lowercase the host name, if the
10192         URL is not "optimized".
10193
10194         * host.c (realhost): Return l->hostname, even if it matches with
10195         host.
10196
10197 1997-02-10  Marin Purgar  <pmc@asgard.hr>
10198
10199         * connect.c: Make addrlen size_t instead of int.
10200         (conaddr): Ditto.
10201
10202 1997-02-09  Gregor Hoffleit  <flight@mathi.uni-heidelberg.DE>
10203
10204         * systhings.h: Define S_ISLNK on NeXT too.
10205
10206 1997-02-09  Hrvoje Niksic  <hniksic@srce.hr>
10207
10208         * version.c: Released 1.4.3.
10209
10210         * url.c: Futher update to list of protostrings.
10211         (skip_proto): Skip `//' correctly for FTP and HTTP.
10212
10213         * url.c (get_urls_html): Handle bogus `http:' things a little
10214         different.
10215
10216         * main.c (main): Removed `follow-ftp' from `f'.
10217         (main): Dumped the `prefix-files' and `file-prefix' options and
10218         features; old and bogus.
10219         (main): Exit on failed setval() in `-e'.
10220
10221         * http.c (fetch_next_header): Use it to detect header continuation
10222         correctly.
10223
10224         * retr.c (buf_peek): New function.
10225
10226 1997-02-08  Hrvoje Niksic  <hniksic@srce.hr>
10227
10228         * wget.h: Include time.h and stuff.
10229
10230 1997-02-08  Roger Beeman  <beeman@cisco.com>
10231
10232         * ftp.c: Include <time.h>
10233
10234 1997-02-07  Hrvoje Niksic  <hniksic@srce.hr>
10235
10236         * url.c (findurl): Would read over buffer limits.
10237
10238 1997-02-06  Hrvoje Niksic  <hniksic@srce.hr>
10239
10240         * ftp-ls.c (ftp_parse_unix_ls): Allow spaces in file names.
10241
10242 1997-02-05  Hrvoje Niksic  <hniksic@srce.hr>
10243
10244         * http.c (http_atotm): Initialize tm.is_dst.
10245
10246 1997-02-02  Hrvoje Niksic  <hniksic@srce.hr>
10247
10248         * http.c (gethttp): Don't print the number of retrieved headers.
10249
10250         * main.c (main): New option `--no-clobber', alias for `-nc'.
10251
10252         * url.c: Recognize `https://'.
10253
10254 1997-02-01  Hrvoje Niksic  <hniksic@srce.hr>
10255
10256         * host.c (herrmsg): Don't use h_errno.
10257
10258 1997-01-30  Hrvoje Niksic  <hniksic@srce.hr>
10259
10260         * host.c (accept_domain): Use it.
10261
10262         * main.c (main): New option `--exclude-domains'.
10263
10264         * retr.c (retrieve_url): Use it.
10265         (retrieve_url): Bail out when an URL is redirecting to itself.
10266
10267         * url.c (url_equal): New function.
10268
10269 1997-01-29  Hrvoje Niksic  <hniksic@srce.hr>
10270
10271         * connect.c: Include arpa/inet.h instead of arpa/nameser.h.
10272
10273         * http.c (mk_utc_time): New function.
10274         (http_atotm): Use it; handle time zones correctly.
10275
10276 1997-01-28  Hrvoje Niksic  <hniksic@srce.hr>
10277
10278         * http.c: Ditto.
10279
10280         * ftp-basic.c: Use it instead of WRITE.
10281
10282         * connect.c (iwrite): New function.
10283
10284 1997-01-27  Hrvoje Niksic  <hniksic@srce.hr>
10285
10286         * cmpt.c (mktime): New function.
10287
10288         * netrc.c: Include <sys/types.h>.
10289
10290         * main.c (main): Wouldn't recognize --spider.
10291
10292         * retr.c (rate): Use `B', `KB' and `MB'.
10293         (reset_timer,elapsed_time): Moved from utils.c.
10294
10295         * ftp.c (ftp_retrieve_list): Ditto.
10296
10297         * http.c (http_loop): Don't touch the file if opt.dfp.
10298
10299 1997-01-24  Hrvoje Niksic  <hniksic@srce.hr>
10300
10301         * cmpt.c: New file.
10302
10303         * ftp.c (ftp_retrieve_glob): New argument semantics.
10304         (ftp_retrieve_dirs): Use it.
10305         (ftp_loop): Ditto.
10306
10307         * html.c (htmlfindurl): Recognize `'' as the quote char.
10308
10309 1997-01-23  Hrvoje Niksic  <hniksic@srce.hr>
10310
10311         * ftp.c (ftp_loop_internal): Use it.
10312
10313         * utils.c (remove_link): New function.
10314
10315 1997-01-22  Hrvoje Niksic  <hniksic@srce.hr>
10316
10317         * retr.c (retrieve_url): Require STRICT redirection URL.
10318
10319         * url.c (parseurl): New argument STRICT.
10320
10321         * http.c (hparsestatline): Be a little-bit less strict about
10322         status line format.
10323
10324 1997-01-21  Hrvoje Niksic  <hniksic@srce.hr>
10325
10326         * http.c (gethttp): Use it.
10327
10328         * main.c (main): Don't use '<digit>' as options.
10329
10330         * init.c: New option ignore_length.
10331
10332         * http.c (gethttp): Ditto.
10333         (http_loop): Check for redirection without Location:.
10334         (gethttp): Don't print Length unless RETROKF.
10335
10336         * ftp.c (getftp): Use it.
10337
10338         * url.c (mkalldirs): New function.
10339
10340         * utils.c (mymkdir): Don't check for existing non-directory.
10341
10342         * url.c (mkstruct): Don't create the directory.
10343
10344 1997-01-20  Hrvoje Niksic  <hniksic@srce.hr>
10345
10346         * init.c (setval): Removed NO_RECURSION checks.
10347
10348 1997-01-19  Hrvoje Niksic  <hniksic@srce.hr>
10349
10350         * version.c: "Released" 1.4.3-pre2.
10351
10352         * recur.c (recursive_retrieve): Bypass host checking only if URL
10353         is ftp AND parent URL is not ftp.
10354
10355         * ftp-basic.c (ftp_request): Print out Turtle Power.
10356
10357         * ftp.c (ftp_loop): Call ftp_retrieve_glob with 0 if there's no
10358         wildcard.
10359         (ftp_retrieve_glob): Call ftp_loop_internal even on empty list, if
10360         not glob.
10361
10362         * http.c (gethttp): Be a little bit smarter about status codes.
10363
10364         * recur.c (recursive_retrieve): Always reset opt.recursive when
10365         dealing with FTP.
10366
10367 1997-01-18  Hrvoje Niksic  <hniksic@srce.hr>
10368
10369         * retr.c (retrieve_url): New variable location_changed; use it for
10370         tests instead of mynewloc.
10371         (retrieve_url): Allow heuristic adding of html.
10372
10373         * url.c (url_filename): Don't use the `%' in Windows file names.
10374
10375         * http.c (http_loop): Always time-stamp the local file.
10376
10377         * http.c (http_loop): Ditto.
10378
10379         * ftp.c (ftp_retrieve_list): Use it.
10380
10381         * utils.c (my_touch): New function.
10382
10383         * ftp.c (ftp_retrieve_list): Use #ifdef HAVE_STRUCT_UTIMBUF
10384         instead of #ifndef NeXT.
10385
10386         * utils.c (strptime): New version, by Ulrich Drepper.
10387
10388 1997-01-17  Hrvoje Niksic  <hniksic@srce.hr>
10389
10390         * http.c (haccepts_none): Renamed from `haccepts_bytes'.
10391         (gethttp): If haccepts_none(), disable ACCEPTRANGES.
10392         (http_loop): Would remove ACCEPTRANGES.
10393
10394         * ftp.c (getftp): Call ftp_list with NULL.
10395
10396 1997-01-15  Hrvoje Niksic  <hniksic@srce.hr>
10397
10398         * html.c (ftp_index): Don't print minutes and seconds if we don't
10399         know them; beautify the output.
10400
10401         * ftp.c (getftp): Don't close the socket on FTPNSFOD.
10402
10403 1997-01-14  Hrvoje Niksic  <hniksic@srce.hr>
10404
10405         * utils.c (strptime): New function.
10406         (strptime): Don't use get_alt_number.
10407         (strptime): Don't use locale.
10408         (match_string): Made it a function.
10409
10410 1997-01-12  Hrvoje Niksic  <hniksic@srce.hr>
10411
10412         * http.c (http_atotm): New function.
10413         (http_loop): Use it.
10414
10415         * atotm.c: Removed from the distribution.
10416
10417         * http.c (base64_encode_line): Rewrite.
10418
10419 1997-01-09  Hrvoje Niksic  <hniksic@srce.hr>
10420
10421         * ftp.c (getftp): Use ftp_expected_bytes; print size.
10422
10423         * ftp-basic.c (ftp_response): Use ftp_last_respline.
10424         (ftp_expected_bytes): New function.
10425
10426         * ftp.c (getftp): Print the unauthoritative file length.
10427
10428         * ftp-ls.c: Renamed from ftp-unix.c.
10429         (ftp_parse_ls): Moved from ftp.c.
10430         (ftp_parse_unix_ls): Recognize seconds in time spec.
10431         (ftp_parse_unix_ls): Recognize year-less dates of the previous
10432         year.
10433
10434 1997-01-08  Hrvoje Niksic  <hniksic@srce.hr>
10435
10436         * ftp-basic.c: Don't declare errno if #defined.
10437
10438         * host.c (ftp_getaddress): Check for sysinfo legally.
10439
10440 1997-01-08  Darko Budor  <dbudor@diana.zems.fer.hr>
10441
10442         * connect.c (iread): Use READ.
10443
10444 1996-12-23  Hrvoje Niksic  <hniksic@srce.hr>
10445
10446         * url.c: Recognize finger, rlogin, tn3270, mid and cid as valid
10447         schemes.
10448
10449 1996-12-22  Hrvoje Niksic  <hniksic@srce.hr>
10450
10451         * host.c (ftp_getaddress): Allow `.' in hostname.
10452
10453 1996-12-26  Darko Budor <dbudor@zems.fer.hr>
10454
10455         * wget.h: READ and WRITE macros for use instead of read and write
10456         on sockets, grep READ *.c, grep WRITE *.c
10457
10458         * wsstartup.c: new file - startup for winsock
10459
10460         * wsstartup.h: new file
10461
10462         * win32decl.h: new file - fixup for <errno.h> and winsock trouble
10463
10464         * configure.bat: Configure utility for MSVC
10465
10466         * src/Makefile.ms,config.h.ms: new files for use with MSVC 4.x
10467
10468 1996-12-22  Hrvoje Niksic  <hniksic@srce.hr>
10469
10470         * version.c: Released 1.4.3-pre.
10471
10472         * utils.c (prnum): Accept long.
10473         (legible): Use prnum().
10474
10475         * connect.c (make_connection): Accept port as short.
10476         (bindport): Ditto.
10477
10478         * http.c (gethttp): Use search_netrc.
10479
10480 1996-12-21  Hrvoje Niksic  <hniksic@srce.hr>
10481
10482         * ftp.c (getftp): Use search_netrc.
10483
10484         * netrc.c (free_netrc): New function.
10485
10486         * init.c (home_dir): New function.
10487
10488         * url.c (convert_links): Allow REL2ABS changes.
10489
10490 1996-12-21  Gordon Matzigkeit  <gord@gnu.ai.mit.edu>
10491
10492         * netrc.c: New file.
10493         (parse_netrc, maybe_add_to_list): New functions.
10494
10495 1996-12-17  Hrvoje Niksic  <hniksic@srce.hr>
10496
10497         * retr.c (retrieve_url): Reset opt.recursion before calling
10498         ftp_loop if it is reached through newloc.
10499
10500         * init.c (run_wgetrc): Print the wgetrc path too, when reporting
10501         error; don't use "Syntax error", since we don't know if it is
10502         really a syntax error.
10503
10504 1996-12-16  Hrvoje Niksic  <hniksic@srce.hr>
10505
10506         * utils.c (acceptable): Extract the filename part of the path.
10507
10508         * recur.c (recursive_retrieve): Call acceptable() with the right
10509         argument; would bug out on wildcards.
10510
10511         * init.c (parse_line): Likewise.
10512
10513         * html.c (htmlfindurl): Cast to char * when calling stuff.
10514
10515 1996-12-15  Hrvoje Niksic  <hniksic@srce.hr>
10516
10517         * ftp.c (getftp): Use ftp_pasv.
10518
10519         * ftp-basic.c (ftp_request): Accept NULL value.
10520         (ftp_pasv): New function.
10521
10522         * options.h (struct options): Add passive FTP option.
10523
10524 1996-12-15  Hrvoje Niksic  <hniksic@srce.hr>
10525
10526         * url.c (parseurl): Debug output.
10527
10528         * utils.c (path_simplify): New one, adapted from bash's
10529         canonicalize_pathname().
10530
10531 1996-12-14  Hrvoje Niksic  <hniksic@srce.hr>
10532
10533         * ftp.c (getftp): Don't discard the buffer.
10534
10535         * retr.c (get_contents): New parameter nobuf.
10536
10537 1996-12-13  Shawn McHorse  <riffraff@txdirect.net>
10538
10539         * html.c (htmlfindurl): Recognize <meta contents="d; URL=...".
10540
10541         * init.c (setval): Strip the trailing slashes on CVECDIR.
10542
10543 1996-12-13  Hrvoje Niksic  <hniksic@srce.hr>
10544
10545         * init.c: Make excludes and includes under CVECDIR instead of
10546         CVEC.
10547
10548 1996-12-13  Shawn McHorse  <riffraff@txdirect.net>
10549
10550         * url.c (get_urls_html): Skip "http:".
10551
10552 1996-12-13  Hrvoje Niksic  <hniksic@srce.hr>
10553
10554         * utils.c (strcasecmp): From glibc.
10555         (strncasecmp): Also.
10556         (strstr): Also.
10557
10558         * url.c: Added javascript: to the list of URLs prefixes.
10559
10560 1996-12-12  Shawn McHorse  <riffraff@txdirect.net>
10561
10562         * recur.c (retrieve_robots): Print the warning message only if
10563         verbose.
10564
10565 1996-12-12  Gregor Hoffleit  <flight@mathi.uni-heidelberg.DE>
10566
10567         * ftp.c (ftp_retrieve_list): Use NeXT old utime interface.
10568
10569 1996-12-12  Hrvoje Niksic  <hniksic@srce.hr>
10570
10571         * systhings.h: New file.
10572
10573         * ../configure.in: Check for utime.h
10574
10575         * ftp.c: Check whether we have unistd.h.
10576
10577 1996-11-27  Hrvoje Niksic  <hniksic@srce.hr>
10578
10579         * recur.c (recursive_retrieve): Send the canonical URL as referer.
10580         (recursive_retrieve): Call get_urls_html with the canonical URL.
10581
10582 1996-12-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10583
10584         * (configure.in, config.h.in, src/Makefile.in, src/*.[ch]): Add
10585         ansi2knr support for compilers which don't support ANSI style
10586         function prototypes and signatures.
10587
10588         * (aclocal.m4, src/ansi2knr.c, src/ansi2knr.1): New files.
10589
10590 1996-11-26  Hrvoje Niksic  <hniksic@srce.hr>
10591
10592         * url.c: Use it; Recognize paths ending with "." and ".." as
10593         directories.
10594         (url_filename): Append .n whenever file exists and could be a
10595         directory.
10596
10597         * url.h (ISDDOT): New macro.
10598
10599         * init.c (parse_line): Use unsigned char.
10600
10601         * url.c (get_urls_html): Cast to unsigned char * when calling
10602         htmlfindurl.
10603
10604         * html.c (htmlfindurl): Use unsigned char.
10605
10606         * version.c: Changed version to 1.4.3.
10607
10608 1996-11-25  Hrvoje Niksic  <hniksic@srce.hr>
10609
10610         * version.c: Released 1.4.2.
10611
10612         * ftp.c (getftp): Simplified assertion.
10613         (ftp_loop_internal): Remove symlink before downloading.
10614         (ftp_retrieve_list): Unlink the symlink name before attempting to
10615         create a symlink!
10616
10617         * options.h (struct options): Renamed print_server_response to
10618         server_response.
10619
10620         * ftp.c (rel_constr): Removed.
10621         (ftp_retrieve_list): Don't use it.
10622         (ftp_retrieve_list): Use opt.retr_symlinks.
10623
10624 1996-11-24  Hrvoje Niksic  <hniksic@srce.hr>
10625
10626         * main.c (main): New option retr_symlinks.
10627
10628         * url.c (convert_links): Print verbose message.
10629
10630 1996-11-24  Hrvoje Niksic  <hniksic@srce.hr>
10631
10632         * http.c (http_loop): Reset newloc in the beginning of function;
10633         would cause FMR in retrieve_url.
10634
10635 1996-11-23  Hrvoje Niksic  <hniksic@srce.hr>
10636
10637         * recur.c (convert_all_links): Find the URL of each HTML document,
10638         and feed it to get_urls_html; would bug out.
10639         (convert_all_links): Check for l2 instead of dl; removed dl.
10640
10641         * url.c (convert_links): Don't refer to freed newname.
10642
10643         * recur.c (recursive_retrieve): Add this_url to urls_downloaded.
10644
10645         * main.c (main): Print the OS_TYPE in the debug output, too.
10646
10647         * recur.c (recursive_retrieve): Check for opt.delete_after.
10648
10649         * main.c (main): New option delete-after.
10650
10651         * init.c (setval): Cleaned up.
10652
10653 1996-11-21  Hrvoje Niksic  <hniksic@srce.hr>
10654
10655         * Makefile.in (wget): Make `wget' the default target.
10656
10657         * ftp.c (ftp_loop_internal): Move noclobber checking out of the
10658         loop.
10659         (ftp_retrieve_list): Warn about non-matching sizes.
10660
10661         * http.c (http_loop): Made -nc non-dependent on opt.recursive.
10662
10663         * init.c (setnum): Renamed from setnuminf; New argument flags.
10664         (setval): Use it.
10665
10666         * main.c (main): Sorted the options.
10667         (main): New option --wait.
10668
10669 1996-11-21  Shawn McHorse  <riffraff@txdirect.net>
10670
10671         * html.c (htmlfindurl): Reset s->in_quote after getting out of
10672         quotes.
10673
10674 1996-11-20  Hrvoje Niksic  <hniksic@srce.hr>
10675
10676         * version.c: Changed version to 1.4.2.
10677
10678 1996-11-20  Hrvoje Niksic  <hniksic@srce.hr>
10679
10680         * version.c: Released 1.4.1.
10681
10682         * html.c (html_quote_string): New function.
10683         (ftp_index): Use it.
10684         (htmlfindurl): A more gentle ending debug message.
10685
10686         * ftp.c (ftp_loop): Check for opt.htmlify.
10687
10688         * init.c: New command htmlify.
10689
10690         * ftp.c (getftp): Nicer error messages, with `'-encapsulated
10691         strings.
10692         (ftp_loop): Print size of index.html.
10693
10694         * init.c (setval): Implement "styles".
10695
10696         * main.c (main): New option dotstyle.
10697
10698 1996-11-19  Hrvoje Niksic  <hniksic@srce.hr>
10699
10700         * ftp.c (getftp): Close the master socket in case of errors, after
10701         bindport().
10702
10703         * connect.c (bindport): Initialize msock to -1.
10704
10705         * ftp.c (getftp): Initialize dtsock to -1.
10706
10707         * connect.c (closeport): Don't close sock if sock == -1.
10708
10709 1996-11-18  Hrvoje Niksic  <hniksic@srce.hr>
10710
10711         * init.c (setnuminf): Nuked default value -- just leave unchanged.
10712         (setval): Don't send default values.
10713         (defaults): Use DEFAULT_TIMEOUT -- aaargh.
10714
10715         * options.h (struct options): Use long for dot_bytes.
10716
10717         * init.c (setquota): Renamed to setbytes.
10718         (setval): Use setbytes on DOTBYTES.
10719
10720 1996-11-17  Hrvoje Niksic  <hniksic@srce.hr>
10721
10722         * ftp.c (getftp): Initialize con->dltime.
10723
10724         * recur.c (recursive_retrieve): Use same_host instead of
10725         try_robots; simply load robots_txt whenever the host is changed.
10726         (recursive_retrieve): Free forbidden before calling parse_robots.
10727
10728 1996-11-16  Hrvoje Niksic  <hniksic@srce.hr>
10729
10730         * retr.c (show_progress): Use them.
10731
10732         * options.h (struct options): New options dot_bytes, dots_on_line
10733         and dot_spacing.
10734
10735 1996-11-16  Mark Boyns  <boyns@sdsu.edu>
10736
10737         * recur.c (recursive_retrieve): Retrieve directories regardless of
10738         acc/rej rules; check for empty u->file.
10739
10740 1996-11-14  Hrvoje Niksic  <hniksic@srce.hr>
10741
10742         * init.c (setval): Use it.
10743
10744         * utils.c (merge_vecs): New function.
10745
10746         * init.c (setval): Reset the list-type functions when encountering
10747         "".
10748
10749 1996-11-14  Shawn McHorse  <riffraff@txdirect.net>
10750
10751         * recur.c (recursive_retrieve): Use base_url instead of this_url
10752         for no_parent.
10753
10754 1996-11-14  Shawn McHorse  <riffraff@txdirect.net>
10755
10756         * html.c (htmlfindurl): Reset s->in_quote after exiting the quote.
10757
10758 1996-11-13  Hrvoje Niksic  <hniksic@srce.hr>
10759
10760         * utils.c (sepstring): Rewrote; don't use strtok.
10761
10762         * recur.c (recursive_retrieve): Enter assorted this_url to slist
10763         when running the first time.
10764         (retrieve_robots): Warn to ignore errors when robots are loaded.
10765
10766         * utils.c (load_file): Moved from url.c.
10767
10768         * http.c: Made static variables const too in h* functions.
10769
10770         * main.c (main): Renamed --continue-ftp to --continue.
10771
10772         * recur.c (recursive_retrieve): Use it.
10773
10774         * utils.c (frontcmp): New function.
10775
10776         * url.c (accdir): New function.
10777
10778         * html.c (htmlfindurl): Recognize <area href=...>.
10779
10780         * ftp.c (ftp_retrieve_dirs): Implemented opt.includes.
10781
10782         * init.c (setval): Free the existing opt.excludes and
10783         opt.includes, if available.
10784
10785         * main.c (main): New option -I.
10786
10787 1996-11-12  Hrvoje Niksic  <hniksic@srce.hr>
10788
10789         * ftp.c (ftp_retrieve_glob): Do not weed out directories.
10790
10791         * version.c: Changed version to 1.4.1.
10792
10793 1996-11-11  Hrvoje Niksic  <hniksic@srce.hr>
10794
10795         * version.c: Released 1.4.0.
10796
10797 1996-11-10  Hrvoje Niksic  <hniksic@srce.hr>
10798
10799         * main.c (main): Free com and val after parse_line.
10800         (printhelp): Reorder the listing.
10801
10802         * http.c: More robust header parsing.
10803
10804         * http.c: Allow any number of spaces, or no spaces, precede ':'.
10805         (hskip_lws): New function.
10806         (haccepts_bytes): New function.
10807         (gethttp): Use it.
10808
10809         * init.c (setval): Check header sanity.
10810         (setval): Allow resetting of headers.
10811
10812 1996-11-10  Hrvoje Niksic  <hniksic@srce.hr>
10813
10814         * http.c (http_loop): Don't use has_wildcards.
10815
10816         * http.c (gethttp): Free all_headers -- would leak.
10817
10818         * recur.c (recursive_retrieve): Initialize depth to 1 instead of
10819         0 -- this fixes a long-standing bug in -rl.
10820
10821 1996-11-09  Hrvoje Niksic  <hniksic@srce.hr>
10822
10823         * ftp.c: Use -1 as "impossible" value for con->fd.
10824
10825         * url.h (URL_SEPARATOR): Don't treat `*' and `+' as separators.
10826
10827         * init.c (parse_line): Use isalpha.
10828
10829         * ftp-unix.c: Use HAVE_UNISTD_H.
10830
10831         * mtch.c (has_wildcards): Don't match \.
10832
10833         * http.c (http_loop): Warn on HTTP wildcard usage.
10834
10835 1996-11-08  Hrvoje Niksic  <hniksic@srce.hr>
10836
10837         * url.c (url_filename): Do not create numbered suffixes if
10838         opt.noclobber -- would bug out on -nc.
10839
10840 1996-11-07  Hrvoje Niksic  <hniksic@srce.hr>
10841
10842         * recur.c (parse_robots): Don't chuck out the commands without
10843         arguments (`Disallow:<empty>' didn't work).
10844         (parse_robots): Compare versions lowercase.
10845         (parse_robots): Match on base_version, not version_string!
10846         (parse_robots): Handle comments properly.
10847         (parse_robots): Match versions in a sane way.
10848
10849         * init.c: Print nicer error messages.
10850
10851         * version.c: Changed version to 1.4.0.
10852
10853 1996-11-06  Hrvoje Niksic  <hniksic@srce.hr>
10854
10855         * version.c: Released 1.4.0-test2.
10856
10857         * init.c (run_wgetrc): Close fp.
10858
10859         * ftp.c (ftp_retrieve_dirs): Allocate the correct length for
10860         u->dir.
10861
10862 1996-11-06  Hrvoje Niksic  <hniksic@srce.hr>
10863
10864         * init.c (setquota): Allow inf as quota specification.
10865
10866 1996-11-05  Hrvoje Niksic  <hniksic@srce.hr>
10867
10868         * ftp.c (ftp_retrieve_dirs): Return QUOTEXC if quota exceeded.
10869         (ftp_retrieve_glob): Return QUOTEXC on quota exceeded.
10870
10871         * main.c (main): Check for quota by comparison with downloaded
10872         stuff, not from status.
10873
10874         * connect.c (select_fd): Should compile on HPUX without warnings now.
10875
10876         * ftp.c (ftp_get_listing): Check whether ftp_loop_internal
10877         returned RETROK.
10878
10879 1996-11-04  Hrvoje Niksic  <hniksic@srce.hr>
10880
10881         * ftp.c (ftp_retrieve_glob): Print the pattern nicely.
10882         (getftp): Return FTPRETRINT on control connection error.
10883
10884         * html.c (htmlfindurl): Recognize <embed src=...> and
10885         <bgsound src=...>.
10886         (ftp_index): Handle username and password correctly.
10887
10888         * main.c (main): Made `-np' a synonim for --no-parent.
10889
10890 1996-11-02  Hrvoje Niksic  <hniksic@srce.hr>
10891
10892         * ftp.c (ftp_loop): Check for opt.ftp_glob too before calling
10893         ftp_retrieve_glob.
10894
10895         * version.c: Changed version to 1.4.0-test2.
10896
10897 1996-11-02  Hrvoje Niksic  <hniksic@srce.hr>
10898
10899         * version.c: Released 1.4.0-test1.
10900
10901         * url.c (str_url): Don't use sprintf when creating %2F-prefixed
10902         directory.
10903         (convert_links): Removed definition of make_backup.
10904
10905         * http.h: Removed definition of MAX_ERROR_LENGTH.
10906
10907         * host.c (ftp_getaddress): Check for "(none)" domains.
10908
10909         * ftp.c (ftp_retrieve_dirs): Docfix.
10910
10911         * http.c (gethttp): Use ou->referer instead of u->referer.
10912
10913         * retr.c (retrieve_url): Reset u to avoid freeing pointers twice;
10914         this was known to cause coredumps on Linux.
10915
10916         * html.c (ftp_index): Cast the argument to local_time to time_t *.
10917
10918 1996-11-01  Hrvoje Niksic  <hniksic@srce.hr>
10919
10920         * connect.c (select_fd): Use exceptfds -- once and for all.
10921
10922         * retr.c (retrieve_from_file): Free filename after
10923         recursive_retrieve.
10924         (retrieve_from_file): Send RFIRST_TIME to recursive_retrieve on
10925         first-time retrieval.
10926         (retrieve_from_file): Return uerr_t; new argument, count.
10927         (retrieve_from_file): Break on QUOTEXC.
10928
10929         * init.c (setquota): Fixed a bug that caused rejection of
10930         non-postfixed values..
10931
10932 1996-10-30  Hrvoje Niksic  <hniksic@srce.hr>
10933
10934         * version.c: Changed name to wget.
10935
10936         * connect.c (iread): Smarter use of select.
10937         (select_fd): Set errno on timeout.  If not timeout, return 1
10938         instead of 0.
10939
10940 1996-10-29  Hrvoje Niksic  <hniksic@srce.hr>
10941
10942         * ftp.c (ftp_loop_internal): Don't use con->cmd before
10943         establishing it.
10944
10945 1996-10-26  Hrvoje Niksic  <hniksic@srce.hr>
10946
10947         * http.c (gethttp): Send correct referer when using proxy.
10948         (gethttp): Use struct urlinfo ou to access the relevant data; send
10949         correct authorization in all cases.
10950
10951         * host.c (same_host): Use skip_uname to skip username and
10952         password.
10953
10954         * url.c (skip_uname): New function.
10955         (parseurl): Use it.
10956
10957         * host.c (same_host): Do not assume HTTP -- same_host should now
10958         be totally foolproof.
10959
10960         * url.c (skip_proto): New function.
10961         (parse_uname): Use it.
10962
10963         * http.c (gethttp): Create local user and passwd from what is
10964         given.
10965
10966         * url.c (parseurl): Check for HTTP username and password too.
10967
10968 1996-10-25  Hrvoje Niksic  <hniksic@srce.hr>
10969
10970         * config.h.in: Removed #define gethostbyname R...
10971
10972 1996-10-22  Hrvoje Niksic  <hniksic@srce.hr>
10973
10974         * version.c: Changed version to 1.4.0-test1.
10975
10976 1996-10-21  Hrvoje Niksic  <hniksic@srce.hr>
10977
10978         * version.c: "Released" 1.4b29.
10979
10980         * recur.c (recursive_retrieve): Check for no_parent.
10981
10982         * init.c (setval): Option update.
10983
10984         * main.c (main): New option no-parent.
10985
10986         * options.h (struct options): New variable no_parent.
10987
10988         * recur.c (recursive_retrieve): Only files are checked for
10989         opt.accepts and opt.rejects.
10990         (recursive_retrieve): Check directories for opt.excludes.
10991         (recursive_retrieve): Make the dir absolute when checking
10992         opt.excludes.
10993
10994         * html.c (htmlfindurl): Recognize <applet code=...> and <script
10995         src=...>
10996
10997 1996-10-18  Hrvoje Niksic  <hniksic@srce.hr>
10998
10999         * ftp.c (getftp): Do not line-break assert entries at all.
11000         (ftp_retrieve_dirs): docfix.
11001
11002         * connect.c (select_fd): Use fd + 1 as nfds.
11003
11004         * version.c: Changed version to 1.4b29.
11005
11006 1996-10-18  Hrvoje Niksic  <hniksic@srce.hr>
11007
11008         * version.c: "Released" 1.4b28.
11009
11010         * ftp.c (ftp_loop_internal): Check whether f->size == len and
11011         don't continue the loop if it is.
11012         (ftp_get_listing): Remove list_filename on unsuccesful loop.
11013
11014 1996-10-17  Hrvoje Niksic  <hniksic@srce.hr>
11015
11016         * ftp.c (ftp_loop_internal): Use strcpy to initialize tmp.
11017         (getftp): Do not use multiline assert.
11018
11019         * http.c (hparsestatline): Use mjr and mnr instead of major and
11020         minor, which don't compile on Ultrix.
11021         (http_loop): Use strcpy() to initialize tmp.
11022
11023         * all: Geturl -> Fetch
11024
11025 1996-10-17  Hrvoje Niksic  <hniksic@srce.hr>
11026
11027         * recur.c (parse_robots): Fixed an off-by-one bug when looking for
11028         ':'.
11029
11030         * html.c (htmlfindurl): Fixed several possible off-by-one bugs by
11031         moving `bufsize &&' to the beginning of each check in for-loops.
11032
11033         * recur.c (parse_robots): Close fp on exit.
11034
11035         * url.c (mymkdir): Check for each directory before creating.
11036
11037 1996-10-16  Hrvoje Niksic  <hniksic@srce.hr>
11038
11039         * version.c: Changed version to 1.4b28.
11040
11041 1996-10-16  Hrvoje Niksic  <hniksic@srce.hr>
11042
11043         * version.c: "Released" 1.4b27.
11044
11045         * init.c (parse_line): Use isspace.
11046         (parse_line): Free *com on all errors.
11047
11048         * ftp.c (ftp_loop): Change FTPOK to RETROK before exiting.
11049         (delelement): Use next instead of f->next and prev instead of
11050         f->prev.
11051         (delelement): Free the members of the deleted element.
11052
11053         * http.c (http_loop): Do not return RETROK on code != 20x.
11054
11055         * init.c (cleanup): Free opt.user_header.
11056         (cleanup): Free opt.domains.
11057
11058         * url.c (freelists): Moved to cleanup().
11059
11060         * http.c (hparsestatline): Docfix.
11061
11062         * main.c (main): Return with error status on unsuccesful
11063         retrieval.
11064
11065         * init.c (setval): Do not remove listing when mirroring.
11066
11067         * url.c (url_filename): Use opt.fileprefix.
11068
11069         * ftp.c (ftp_get_listing): Use url_filename to get filename for
11070         .listing.
11071
11072         * main.c (main): New option: -rn.
11073
11074 1996-10-15  Hrvoje Niksic  <hniksic@srce.hr>
11075
11076         * Makefile.in (RM): Added RM = rm -f.
11077
11078         * host.c (clean_hosts): New function.
11079         (free_hlist): Just free the list, no reset.
11080
11081         * version.c: Changed version to 1.4b27.
11082
11083 1996-10-13  Hrvoje Niksic  <hniksic@srce.hr>
11084
11085         * version.c: "Released" 1.4b26.
11086
11087         * retr.c (retrieve_from_file): If call get_urls_html with
11088         opt.spider to make it silent in spider mode.
11089
11090         * url.c (str_url): Use CLEANDUP instead of URL_CLEANSE.
11091
11092         * url.h (CLEANDUP): New macro.
11093
11094         * http.c (gethttp): Fixed a bug that freed location only when it
11095         was NULL.
11096
11097         * retr.c (retrieve_url): Free url if it will not be stored,
11098         i.e. newloc is NULL.
11099
11100         * html.c (htmlfindurl): Handle exiting from quotes correctly; the
11101         old version would bug out on <a href="x#a"href="y">.
11102
11103         * html.h (state_t): New member in_quote.
11104
11105         * html.c (htmlfindurl): Free s->attr at the beginning of
11106         attr-loop.
11107
11108         * recur.c (recursive_retrieve): Recognize RCLEANUP.
11109         (tried_robots): Make hosts a global variable.
11110         (recursive_retrieve): Free constr after URL host optimization.
11111         (tried_robots): Free urlinfo before exiting.
11112
11113         * utils.c (free_slist): New function.
11114
11115         * recur.c (recursive_retrieve): Use flags to add cleanup
11116         possibility.
11117
11118         * main.c (main): Free filename after recursive_retrieve.
11119
11120         * http.c (gethttp): Store successful responses too.
11121
11122 1996-10-12  Hrvoje Niksic  <hniksic@srce.hr>
11123
11124         * all: Constified the whole source.  This required some minor
11125         changes in many functions in url.c, possibly introducing bugs -- I
11126         hope not.
11127
11128         * ftp-basic.c: Removed last_respline.
11129
11130         * http.c (gethttp): Free type.
11131
11132         * host.c (same_host): Free real1 and real2.
11133
11134         * main.c (main): New option --spider.
11135
11136         * retr.c (get_contents): Don't reset errno.
11137
11138         * main.c (main): Sorted the options.
11139
11140         * connect.c (iread): Set errno to ETIMEDOUT only if it was left
11141         uninitialized by select().
11142
11143         * http.c (http_loop): Print the time when the connection is
11144         closed.
11145         (gethttp): Debug-print the HTTP request.
11146
11147 1996-10-11  Hrvoje Niksic  <hniksic@srce.hr>
11148
11149         * connect.c (iread): Do not try reading after timeout.
11150
11151         * main.c (main): Would bug out on -T.
11152
11153         * connect.c (select_fd): Do not use exceptfds.
11154         (iread): Set ETIMEDOUT on select_fd <= 0.
11155
11156         * version.c: Changed version to 1.4b26.
11157
11158 1996-10-10  Hrvoje Niksic  <hniksic@srce.hr>
11159
11160         * version.c: "Released" 1.4b25.
11161
11162         * ftp-unix.c (ftp_parse_unix_ls): Ignore lines without file name
11163         or link name.
11164
11165         * http.c (gethttp): Add errcode to struct hstat.
11166         (http_loop): Use it.
11167
11168         * url.c (no_proxy_match): Simplify using char** for no_proxy.
11169
11170         * options.h (struct options): Make opt.no_proxy a vector.
11171
11172         * utils.c (sepstring): Use !*s instead of !strlen(s).
11173
11174         * init.c (setval): Set opt.maxreclevel to 0 on --mirror.
11175         (getperms): Use ISODIGIT instead of isdigit.
11176
11177         * ftp.c (getftp): Print time.
11178
11179         * main.c (main): Use legible output of downloaded quantity.
11180
11181         * ftp.c (getftp): Use elapsed_time().
11182         (ftp_loop_internal): Use rate().
11183
11184         * http.c (http_loop): Add download ratio output; Use rate().
11185
11186         * utils.c (rate): New function.
11187
11188 1996-10-09  Hrvoje Niksic  <hniksic@srce.hr>
11189
11190         * http.c (http_loop): Use timer.
11191
11192         * ftp.c: Split to ftp-basic.c and ftp.c
11193
11194         * utils.c (reset_timer): New function.
11195         (elapsed_time): New function.
11196
11197         * retr.c (show_progress): Make bytes_in_line and offs long; should
11198         work on 16-bit machines.
11199
11200 1996-10-08  Hrvoje Niksic  <hniksic@srce.hr>
11201
11202         * url.c (in_acclist): New argument backward.
11203
11204         * ftp.c (ftp_retrieve_glob): Use acceptable() to determine whether
11205         a file should be retrieved according to suffix.
11206         (ftp_get_listing): Check the return value of unlink; Do not call
11207         ftp_retrieve_dirs if depth reached maxreclevel.
11208         (ftp_retrieve_dirs): Check whether the directory is in
11209         exclude-list.
11210
11211         * main.c (main): Print the version number at the beginning of
11212         DEBUG output.
11213         (main): Use strrchr when creating exec_name.
11214
11215         * ftp.c (ftp_retrieve_glob): Do not close control connection.
11216
11217         * version.c: Changed version to 1.4b25.
11218
11219 1996-10-07  Hrvoje Niksic  <hniksic@srce.hr>
11220
11221         * version.c: "Released" 1.4b24.
11222
11223         * Makefile.in: Rewrite.
11224
11225         * ftp.c (ftp_loop_internal): Likewise.
11226
11227         * retr.c (time_str): Check for failed time().
11228
11229         * html.c (htmlfindurl): Recognize <fig src> and <overlay src> from
11230         HTML3.0.
11231
11232         * retr.c (time_str): Return time_t *.
11233
11234         * connect.c (bindport): Close msock on unsuccesful bind.
11235         (bindport): The same for getsockname and listen.
11236
11237         * retr.c (retrieve_url): Allow any number of retries on
11238         proxy.
11239
11240         * http.c (gethttp): Do not treat errno == 0 as timeout.
11241         (http_loop): Likewise.
11242         (http_loop): Cosmetic changes.
11243
11244         * connect.c (iread): Set errno to ETIMEDOUT in case of timeout.
11245
11246         * retr.c (get_contents): Reset errno.
11247
11248         * ftp.c (getftp): Minor fixes.
11249
11250 1996-10-06  Hrvoje Niksic  <hniksic@srce.hr>
11251
11252         * http.c: Do not use backups.
11253
11254         * geturl.1 (WARNING): Warn that man-page could be obsolete.
11255
11256         * getopt.c (getopt_long): Moved to getopt.c
11257
11258         * geturl.texi: Enhanced.
11259
11260         * main.c (main): Use it.
11261
11262         * recur.c (convert_all_links): New function.
11263
11264         * utils.c (add_slist): New argument flags.
11265
11266         * recur.c (recursive_retrieve): Update a list of downloaded URLs.
11267         (parse_robots): Do not chuck out empty value fields.
11268         (parse_robots): Make yourself welcome on empty Disallow.
11269
11270         * version.c: Changed version to 1.4b24.
11271
11272 1996-10-06  Hrvoje Niksic  <hniksic@srce.hr>
11273
11274         * version.c: "Released" 1.4b23.
11275
11276         * ftp.c (ftp_loop_internal): Get the time after getftp.
11277
11278         * Makefile.in (install.info): New target.
11279         (install): Use it.
11280
11281         * http.c (http_loop): Fix output when doing -O.
11282
11283 1996-10-05  Hrvoje Niksic  <hniksic@srce.hr>
11284
11285         * geturl.texi: New file.
11286
11287         * main.c (main): Do not print the warnings and download summary if
11288         opt.quiet is set.
11289
11290         * version.c: Changed version to 1.4b23.
11291
11292 1996-10-05  Hrvoje Niksic  <hniksic@srce.hr>
11293
11294         * "Released" 1.4b22.
11295
11296         * atotm.c (atotm): Use True and False instead of TRUE and FALSE,
11297         to avoid redefinition warnings.
11298
11299         * host.c (store_hostaddress): Use memcpy() to copy the address
11300         returned by inet_addr.
11301
11302         * version.c: Changed version to 1.4b22.
11303
11304 1996-10-04  Hrvoje Niksic  <hniksic@srce.hr>
11305
11306         * version.c: "Released" 1.4b21.
11307
11308         * ftp-unix.c (ftp_parse_ls): Renamed to ftp_parse_unix_ls.
11309
11310         * ftp.c (ftp_port): Use conaddr.
11311         (getftp): Print the file length.
11312         (ftp_retrieve_list): Check the stamps of plain files only.
11313
11314         * connect.c (closeport): Do not call shutdown().
11315         (conaddr): New function.
11316
11317         * html.c (ftp_index): Made it dfp-aware.
11318
11319         * init.c (cleanup): New name of freemem. Close opt.dfp.
11320
11321         * ftp.c (getftp): Use opt.dfp if it is set.
11322
11323         * ftp-unix.c (ftp_parse_ls): Recognize time in h:mm format.
11324
11325         * ftp.c (ftp_retrieve_dirs): Fixed a bug that caused incorrect
11326         CWDs to be sent with recursive FTP retrievals.
11327
11328 1996-10-03  Hrvoje Niksic  <hniksic@srce.hr>
11329
11330         * recur.c (parse_robots): Made it more compliant with "official"
11331         specifications.
11332
11333         * http.c: New function.
11334
11335         * ftp-unix.c (ftp_parse_ls): Added better debug output.
11336
11337         * ftp.c (getftp): Print out the LIST in case of
11338         opt.print_server_response.
11339
11340         * version.c: Changed version to 1.4b21.
11341
11342 1996-10-01  Hrvoje Niksic  <hniksic@srce.hr>
11343
11344         * version.c: "Released" 1.4b20.
11345
11346         * README: Update.
11347
11348         * http.c (gethttp): Preset lengths of various headers instead of
11349         calculating them dynamically.
11350         (gethttp): Check for 206 partial contents.
11351
11352 1996-09-30  Hrvoje Niksic  <hniksic@srce.hr>
11353
11354         * configure.in: Set SYSTEM_GETURLRC to $libdir/geturlrc
11355
11356         * http.c (gethttp): Send the port number in the Host: header.
11357
11358 1996-09-29  Hrvoje Niksic  <hniksic@srce.hr>
11359
11360         * http.c (gethttp): Send host: header.
11361         (gethttp): Add the possibility of user-defined headers.
11362         (gethttp): Move decision about pragma: no-cache to http_loop,
11363         where it belongs.
11364         (gethttp): Pass a struct instead of enormous argument list.
11365         (http_loop): Use a new, fancier display format.
11366         (ftp_loop): Likewise.
11367
11368         * main.c: (hangup): Turn off buffering of the new log file.
11369
11370         * install-sh: Likewise.
11371
11372         * config.sub: Replace with the one in autoconf-2.10
11373
11374         * geturl.1: Update.
11375
11376         * init.c: New options httpuser and httppasswd.
11377
11378         * http.c: (base64_encode_line): New function.
11379         (gethttp): Send authentication.
11380
11381         * connect.c (make_connection): Use store_hostaddress.
11382
11383 1996-09-28  Hrvoje Niksic  <hniksic@srce.hr>
11384
11385         * host.c (store_hostaddress): New function.
11386
11387         * NEWS: Update.
11388
11389         * http.c (hgetrange): New function.
11390         (gethttp): Use ranges.
11391
11392         * utils.c (numdigit): Accept long instead of int.
11393
11394         * http.c (http_loop): Add restart capabilities.
11395
11396         * ftp.c (ftp_retrieve_glob): Fixed a bug that could cause matchres
11397         being used uninitialized.
11398         (ftp_retrieve_list): Similar fix.
11399
11400         * host.c (add_hlist): Fixed a bug that could cause cmp being used
11401         uninitialized.
11402
11403         * url.c (construct_relative): New function.
11404
11405         * recur.c (recursive_retrieve): Use it.
11406
11407         * retr.c (convert_links): New function.
11408
11409 1996-09-27  Hrvoje Niksic  <hniksic@srce.hr>
11410
11411         * url.c (free_urlpos): New function.
11412
11413         * recur.c (recursive_retrieve): Adapt.
11414
11415         * url.c (get_urls_html): Return a linked list instead of a vector.
11416
11417         * url.c (get_urls_file): Return a linked list instead of a vector.
11418
11419         * geturl.1: Update.
11420
11421         * http.c (gethttp): Implement it.
11422
11423         * init.c (setval): New option: SAVEHEADERS
11424
11425         * ftp.c (ftp_loop_internal): Do not set restval if listing is to
11426         be retrieved. Lack of this test caused bugs when the connection
11427         was lost during listing.
11428
11429         * retr.c (retrieve_url): Fixed a bug that caused
11430         coredumps. *newloc is now reset by default.
11431         (retrieve_url): Lift the twenty-tries limit on proxies.
11432
11433         * version.c: Changed version to 1.4b20.
11434
11435 1996-09-20  Hrvoje Niksic  <hniksic@srce.hr>
11436
11437         * version.c: "Released" 1.4b19.
11438
11439 1996-09-19  Hrvoje Niksic  <hniksic@srce.hr>
11440
11441         * ftp.c (ftp_loop_internal): Renamed from ftp_1fl_loop.
11442         (getftp): Changed prototype to accept ccon *.
11443
11444 1996-09-17  Hrvoje Niksic  <hniksic@srce.hr>
11445
11446         * ftp.c (ftp_retrieve_list): Fixed a bug that caused setting
11447         incorrect values to files pointed to by symbolic links.
11448         (ftp_1fl_loop): Do not count listings among the downloaded URL-s.
11449
11450 1996-09-16  Hrvoje Niksic  <hniksic@srce.hr>
11451
11452         * url.c (mkstruct): Do not prepend "./" in front of a pathname.
11453
11454         * main.c (main): New option: --user-agent.
11455
11456         * geturl.1: Ditto.
11457
11458         * init.h: Ditto.
11459
11460         * init.c (setval): Ditto.
11461
11462         * main.c (main): Rename "server-headers" to "server-response".
11463
11464         * ftp-unix.c (ftp_parse_ls): Check for asterisks at the end of
11465         executables in 'ls -F' listings.
11466
11467 1996-09-15  Hrvoje Niksic  <hniksic@srce.hr>
11468
11469         * url.c (parseurl): Remove realloc() and sprintf().
11470         (str_url): Get rid of sprintf().
11471
11472         * recur.c (recursive_retrieve): Enable FTP recursion through proxy
11473         servers.
11474
11475         * url.h (URL_CLEANSE): Made it else-resistant.
11476         (USE_PROXY): New macro.
11477
11478 1996-09-14  Hrvoje Niksic  <hniksic@srce.hr>
11479
11480         * NEWS: Update.
11481
11482         * version.c: Changed version to 1.4b19.
11483
11484 1996-09-14  Hrvoje Niksic  <hniksic@srce.hr>
11485
11486         * version.c: "Released" 1.4b18.
11487
11488         * url.c: Made it reallocate space exponentially.
11489
11490 1996-09-14  Drazen Kacar  <dave@fly.cc.fer.hr>
11491
11492         * html.c (htmlfindurl): Added <frame src> and <iframe src> among
11493         the list of stuff to fetch.
11494
11495 1996-09-13  Hrvoje Niksic  <hniksic@srce.hr>
11496
11497         * url.c (get_urls_html): Fixed a bug that caused SIGSEGV's with
11498         -Fi.
11499
11500         * html.c (htmlfindurl): Rewrite.
11501
11502         * http.c (gethttp): Use opt.proxy_cache.
11503
11504         * main.c (main): Added --cache option.
11505
11506         * ftp.c (ftp_response): Print server response if opt.print_server
11507         response is set.
11508         (getftp): Print newlines after each request if the server response
11509         is to be printed.
11510         (ftp_response): Copy the last response line to last_respline.
11511
11512         * http.c (gethttp): Add Pragma: nocache for retried
11513         proxy-retrievals.
11514
11515         * ftp.c (getftp): Use it.
11516
11517         * retr.c (buf_discard): New function.
11518
11519         * ftp.c (ftp_response): Use buf_readchar().
11520         (getftp): Flush the control connection buffer before calling
11521         get_contents().
11522
11523         * retr.c (buf_readchar): New function.
11524         (buf_flush): New function.
11525         (get_contents): Use buf_readchar() instead of read(x, x, 1).
11526         (get_contents): Use buf_flush.
11527
11528 1996-09-12  Hrvoje Niksic  <hniksic@srce.hr>
11529
11530         * ftp.c: Incorporate changes to ftp_response.
11531
11532         * ftp.c (ftp_response): Allocate the server response dynamically,
11533         as in read_whole_line and fetch_next_header.
11534
11535         * utils.c (read_whole_line): Fixed a bug that prevented reading
11536         the last line if it is not \n-terminated. Also fixed a possible
11537         memory overflow.
11538
11539         * http.c (fetch_next_header): Return malloc-ed string as large as
11540         needed.
11541         (gethttp): Use new fetch_next_header.
11542
11543 1996-09-12  Hrvoje Niksic  <hniksic@srce.hr>
11544
11545         * http.c (hgetlen): Compute the header length the first time only.
11546         (hgettype): Ditto.
11547         (hgetlocation): Ditto.
11548         (hgetmodified): Ditto.
11549
11550 1996-09-11  Hrvoje Niksic  <hniksic@srce.hr>
11551
11552         * sample.geturlrc: Update.
11553
11554 1996-09-10  Hrvoje Niksic  <hniksic@srce.hr>
11555
11556         * http.c (http_loop): Ditto.
11557
11558         * ftp.c (getftp): Open the output file as binary.
11559
11560         * version.c: Changed version to 1.4b18.
11561
11562 1996-09-10  Hrvoje Niksic  <hniksic@srce.hr>
11563
11564         * version.c: "Released" 1.4b17.
11565
11566         * ftp-unix.c (ftp_parse_ls): If unable to open file, return NULL
11567         instead of failed assertion.
11568
11569 1996-09-09  Hrvoje Niksic  <hniksic@srce.hr>
11570
11571         * ftp.c (ftp_get_listing): Add a numbered suffix to LIST_FILENAME
11572         if a file of that name already exists.
11573
11574 1996-09-05  Hrvoje Niksic  <hniksic@srce.hr>
11575
11576         * ftp.c (ftp_1fl_loop): Handler FTPPORTERR and FOPENERR correctly.
11577
11578         * config.h.in: Define gethostbyname as Rgethostbyname when using
11579         Socks.
11580
11581         * configure.in: Check for -lresolv if using Socks.
11582
11583         * version.c: Changed version to 1.4b17.
11584
11585 1996-07-15  Hrvoje Niksic  <hniksic@srce.hr>
11586
11587         * version.c: "Released" 1.4b16.
11588
11589         * http.c (gethttp): More intelligent check for first line of HTTP
11590         response.
11591         (gethttp): Would bug out on time-stamping.
11592
11593         * version.c: Changed version to 1.4b16.
11594
11595 1996-07-11  Hrvoje Niksic  <hniksic@srce.hr>
11596
11597         * version.c: Released 1.4b15.
11598
11599         * http.c (http_loop): Print \n after the loop entry, not before.
11600
11601         * url.c (url_filename): Use ISDOT.
11602
11603         * url.h (ISDOT): New macro.
11604
11605         * recur.c (recursive_retrieve): Change only opt.recursive for
11606         following FTP.
11607
11608 1996-07-11  Antonio Rosella <antonio.rosella@agip.it>
11609
11610         * socks/geturl.cgi: Fixed version No.
11611
11612         * socks/download-netscape.html: Ditto.
11613
11614         * socks/download.html: Changed socks.html to download.html.
11615
11616 1996-07-11  Hrvoje Niksic  <hniksic@srce.hr>
11617
11618         * url.c (url_filename): Check for opt.dirstruct instead for
11619         opt.recursive && opt.dirstruct.
11620
11621         * init.c (defaults): Ditto.
11622         (defaults): Reset dirstruct by default.
11623         (setval): Set opt.dirstruct whenever setting recursive.
11624
11625         * init.h: Removed FORCEDIRHIER.
11626
11627         * INSTALL: Added -L to socks-description.
11628
11629         * version.c: Changed version to 1.4b15.
11630
11631 1996-07-10  Hrvoje Niksic  <hniksic@srce.hr>
11632
11633         * version.c: "Released" 1.4b14.
11634
11635         * geturl.1: Update AUTHOR to include Rosella as contributor.
11636
11637         * NEWS: Update.
11638
11639         * socks/geturl.cgi: Simplified command creation, nuked <blink>.
11640
11641         * socks/geturl.cgi: Wrap nutscape extensions within if $netscape.
11642         (cal_time): Fix == to eq.
11643
11644         * socks/geturl.cgi: GPL-ized with permission of A. Rosella.
11645
11646         * geturl.1 (hostname): Moved URL CONVENTIONS to the beginning.
11647
11648         * Makefile.in: Use @VERSION@.
11649
11650         * configure.in: Check version from version.c.
11651
11652         * socks/geturl.cgi: Changed /pub/bin/perl to /usr/bin/perl.
11653
11654         * socks/download.html: Created from download-netscape.html, made
11655         HTML-2.0 compliant.
11656
11657         * recur.c (recursive_retrieve): Set opt.force_dir_hier when
11658         following FTP links from recursions.
11659
11660 1996-07-09  Hrvoje Niksic  <hniksic@srce.hr>
11661
11662         * url.c (mymkdir): Fixed a bug that prevented mymkdir() to create
11663         absolute directories correctly.
11664
11665         * version.c: Changed version to 1.4b14.
11666
11667 1996-07-09  Hrvoje Niksic  <hniksic@srce.hr>
11668
11669         * version.c: "Released" 1.4b13.
11670
11671         * url.c (make_backup): New function.
11672
11673         * http.c (http_loop): Make a backup copy of the local file (using
11674         rename(2)) before opening it.
11675
11676         * main.c (main): Added --backups.
11677
11678         * host.c (ftp_getaddress): Bail out on failed mycuserid().
11679         (ftp_getaddress): Check for leading dot on MY_DOMAIN.
11680         (ftp_getaddress): Check for empty, null or (null) domain.
11681
11682         * url.c (get_urls_html): If this_url is NULL, the base must have a
11683         protocol.
11684         (parseurl): Use has_proto.
11685
11686         * retr.c (retrieve_url): Warn when proxy is used with more than 20
11687         retries.
11688
11689         * url.c (mkstruct): Create the directory (calling mymkdir()) only
11690         if it is not already there.
11691         (has_proto): New function.
11692         (get_urls_html): Eliminate the remaining call to findurl -- use
11693         has_proto.
11694
11695         * geturl.1: Ditto.
11696
11697         * main.c: Change -X to -x.
11698
11699         * url.c (url_filename): Simplify creation of filename if
11700         prefix_files is set.
11701         (url_filename): Simplify everything. And I do mean *everything*.
11702         (mkstruct): Add dir_prefix before hostname.
11703         (path_simplify): Fixed a bug that caused writing outside the path
11704         string in case of "." and ".." path strings.
11705
11706 1996-07-06  Hrvoje Niksic  <hniksic@srce.hr>
11707
11708         * init.c: Added --mirror.
11709
11710         * main.c (main): Added -X to force saving of directory hierarchy.
11711
11712         * ftp.c (ftp_retrieve_list): Added recursion depth counter.
11713         (ftp_retrieve_list): Check whether quota is exceeded.
11714
11715         * url.c (get_urls_html): Skip leading blanks for absolute URIs.
11716
11717         * http.c (gethttp): Use referer if present.
11718
11719         * recur.c (recursive_retrieve): Set u->referer before calling
11720         retrieve_url.
11721
11722         * url.c (newurl): Use memset to nullify the struct members.
11723         (freeurl): Free the referer field too.
11724
11725         * url.h: Added referer to urlinfo.
11726
11727         * geturl.1: Updated the manual to document some of the new features.
11728
11729         * utils.c (numdigit): Moved from url.c.
11730
11731         * README: Rewritten.
11732
11733         * config.h.in: Add the support for socks.
11734
11735         * configure.in: Add the support for socks.
11736
11737         * url.c (url_filename): If the dir_prefix is ".", work with just
11738         the file name.
11739         (url_filename): Do not look for .n extensions if timestamping if
11740         turned on.
11741
11742         * retr.c (show_progress): Skip the over-abundant restval data, and
11743         print the rest of it with ',' instead of '.'.
11744
11745 1996-07-05  Hrvoje Niksic  <hniksic@srce.hr>
11746
11747         * retr.c (show_progress): Changed second arg. to long (as it
11748         should be).
11749         (show_progress): Moved to retr.c.
11750         (get_contents): Moved to retr.c.
11751
11752         * version.c: Change version to 1.4b13.
11753
11754 1996-07-05  Hrvoje Lacko <hlacko@fly.cc.fer.hr>
11755
11756         * url.c (in_acclist): Would return after the first suffix.
11757
11758 1996-07-04  Hrvoje Niksic  <hniksic@srce.hr>
11759
11760         * version.c: "Released" 1.4b12.
11761
11762         * url.c (path_simplify): More kludgifications.
11763         (get_urls_html): Use new parameters for htmlfindurl.
11764
11765         * html.c: Removed memorizing "parser states", since the new
11766         organization does not require them.
11767
11768         * init.c (run_geturlrc): Use read_whole_line.
11769
11770         * ftp-unix.c (ftp_parse_ls): Use read_whole_line.
11771
11772         * recur.c (parse_robots): Use read_whole_line.
11773
11774         * utils.c (read_whole_line): New function.
11775
11776         * recur.c (tried_robots): Use add_slist/in_slist, *much* cleaner.
11777
11778         * host.c (ngethostbyname): Call inet_addr just once. Yet to be
11779         tested on OSF and Ultrix.
11780         (add_hlist): New function.
11781         (free_hlist): New function.
11782         (search_host): New function.
11783         (search_address): New function.
11784         (realhost): Use search_host, search_address and add_hlist.
11785         (same_host): Replaced realloc() with strdupdelim(), made
11786         case-insensitive, fixed a memory leak.
11787
11788         * html.c (ftp_index): Fixed tm_min and tm_sec to be tm_hour and
11789         tm_min, like intended.
11790
11791         * version.c: Change user agent information to
11792         Geturl/version.
11793
11794 1996-07-03  Hrvoje Niksic  <hniksic@srce.hr>
11795
11796         * utils.c: Renamed nmalloc.c to utils.c, .h likewise.
11797
11798         * url.c (acceptable): Always accept directories.
11799
11800         * ftp-unix.c (ftp_parse_ls): Support brain-damaged "ls -F"-loving
11801         servers by stripping trailing @ from symlinks and trailing / from
11802         directories.
11803
11804         * ftp.c (ftp_loop): Debugged the "enhanced" heuristics. :-)
11805
11806         * url.c (skip_url): Use toupper instead of UCASE.
11807
11808         * host.c (sufmatch): Made it case-insensitive.
11809
11810         * url.c (match_backwards_or_pattern): Fixed i == -1 to j == -1.
11811         (match_backwards): New function, instead of
11812         match_backwards_or_pattern.
11813
11814         * recur.c (recursive_retrieve): Increased performance by
11815         introducing inl, which reduces number of calls to in_slist to only
11816         one.
11817
11818         * ftp.c (ftp_loop): Enhanced the heuristics that decides which
11819         routine to use.
11820
11821         * main.c (printhelp): Removed the warranty stuff.
11822
11823 1996-07-02  Hrvoje Niksic  <hniksic@srce.hr>
11824
11825         * url.c (add_slist): Simplify.
11826         (match_backwards_or_pattern): New function.
11827         (in_acclist): Use match_backwards_or_pattern.
11828         (matches): Remove.
11829
11830 1996-06-30  Hrvoje Niksic  <hniksic@srce.hr>
11831
11832         * ftp.c (ftp_loop): Call ftp_index on empty file names, if not
11833         recursive.
11834
11835         * html.c (ftp_index): Fixed to work. Beautified the output.
11836
11837         * ftp.c (ftp_retrieve_glob): Another argument to control whether
11838         globbing is to be used.
11839         (ftp_retrieve_list): Compare the time-stamps of local and remote
11840         files to determine whether to download.
11841
11842 1996-06-29  Hrvoje Niksic  <hniksic@srce.hr>
11843
11844         * ftp.c (rel_constr): New function.
11845
11846         * retr.c (retrieve_from_file): Check for text/html before
11847         retrieving recursively.
11848
11849         * main.c (main): Check whether the file is HTML before going into
11850         recursive HTML retrieving.
11851
11852         * ftp.c (ftp_retrieve_list): Manage directories.
11853         (ftp_retrieve_glob): Pass all the file-types to ftp_retrieve_list.
11854         (ftp_1fl_loop): Fixed a bug that caused con->com to be incorrectly
11855         initialized, causing bugchecks in getftp to fail.
11856
11857         * configure.in: Check for symlink.
11858
11859         * ftp.c (ftp_retrieve_list): Added support for symlinks.
11860
11861         * version.c: "Released" 1.4b10.
11862
11863         * atotm.c (atotm): Redeclared as time_t.
11864
11865         * init.c: New variable "timestamping".
11866
11867         * main.c (main): New option 'N'.
11868
11869         * http.c (hgetlocation): Case-insensitive match.
11870         (hgetmodified): New function.
11871         (http_loop): Implement time-stamping.
11872
11873 1996-06-28  Hrvoje Niksic  <hniksic@srce.hr>
11874
11875         * version.c: Changed version to 1.4b10
11876
11877         * atotm.c: New file, from phttpd.
11878
11879         * options.h (struct options): New parameter timestamping.
11880
11881         * version.c: 1.4b9 "released".
11882
11883         * recur.c (recursive_retrieve): Used linked list (ulist) for
11884         faster storing of URLs.
11885
11886         * url.c (get_urls_html): Removed the old kludge with comparing the
11887         outputs of htmlfindurl and findurl.
11888         (get_urls_html): Added better protocol support here.
11889         (create_hash): Removed, as well as add_hash and in_hash.
11890         (addslist): New function.
11891         (in_slist): ditto
11892
11893         * version.c: Released 1.4b8, changed version to b9.
11894
11895 1996-06-27  Hrvoje Niksic  <hniksic@srce.hr>
11896
11897         * ftp.c (freefileinfo): New function.
11898         (delelement): New function.
11899
11900         * everywhere: GPL!
11901
11902         * ftp.c (ftp_loop): Use ccon.
11903         (ftp_retrieve_glob): Likewise.
11904
11905         * ftp.h: Define ccon, to define status of control connection.
11906
11907         * ftp.c (ftp_get_listing): New function.
11908         (ftp_retrieve_more): New function.
11909         (ftp_retrieve_glob): New function.
11910
11911 1996-06-25  Hrvoje Niksic  <hniksic@srce.hr>
11912
11913         * configure.in: Removed the search for cuserid().
11914
11915         * init.c (getmode): Renamed to getperms.
11916
11917 1996-06-24  Hrvoje Niksic  <hniksic@srce.hr>
11918
11919         * version.c: New version.
11920
11921         * main.c (hangup): New function, that handles hangup. Hangup
11922         signal now causes geturl to stop writing on stdout, and to write
11923         to a log file.
11924
11925         * ftp.c (getftp): "Released" 1.4b7.
11926
11927         * html.c (htmlfindurl): Ignore everything inside <head>...</head>.
11928         (ftp_index): Use fileinfo/urlinfo.
11929
11930         * ftp-unix.c (ftp_parse_ls): New function.
11931         (symperms): New function.
11932
11933         * ftp.c (ftp_1fl_loop): New function, to handle 1-file loops.
11934
11935         * retr.c (retrieve_url): Added FTP support.
11936
11937 1996-06-23  Hrvoje Niksic  <hniksic@srce.hr>
11938
11939         * geturl.h: Removed NOTFTP2HTML enum.
11940         Added DO_LOGIN, DO_CWD and DO_LIST. LIST_ONLY is obsolete.
11941
11942         * ftp.c (getftp): Resynched with urlinfo.
11943         (getftp): Removed HMTL-ization of index.html from getftp.
11944
11945         * version.c: 1.4b6 "released".
11946
11947         * options.h (options): New struct, to keep options in.
11948
11949         * http.c (http_loop,gethttp): Synched with proxy.
11950
11951         * retr.c (retrieve_url): Implemented proxy retrieval.
11952
11953         * main.c (main): Use retrieve_from_file.
11954
11955 1996-06-22  Hrvoje Niksic  <hniksic@srce.hr>
11956
11957         * retr.c (retrieve_from_file): New function.
11958
11959         * url.c (parseurl): Modified to return URLOK if all OK. Protocol
11960         can be found in u->proto.
11961
11962         * ftp.c (ftp_response): Fixed to accept multi-line responses as
11963         per RFC 959.
11964
11965         * recr.c (recursive_retrieve): Take newloc from retrieve_url.
11966
11967         * url.c (mymkdir): Removed the file of the same name, if one
11968         exists.
11969         (isfile): New function.
11970         (mkstruct): Fixed the '/' glitches.
11971         (path_simplify): Hacked to treat something/.. correctly.
11972
11973 1996-06-21  Hrvoje Niksic  <hniksic@srce.hr>
11974
11975         * http.c (gethttp): Close the socket after error in headers.
11976         (http_loop): HEOF no longer a fatal header.
11977
11978         * loop.c (retrieve_url): When dt is NULL, do not modify it. This
11979         simplifies the syntax of calling retrieve_url.
11980
11981         * recr.c (recursive_retrieve): Modified to use get_urls_html.
11982
11983         * url.c (get_urls_file): New function.
11984         (get_urls_html): New function.
11985
11986         * recr.c (recursive_retrieve): Patched up to conform to the
11987         standards.
11988
11989         * http.c (gethttp): Synched with the rest...
11990         (gethttp): Treat only CONREFUSED specially, with connection
11991         errors.
11992
11993         * init.c,geturl.1,http.c (http_loop): Removed kill_error.
11994
11995 1996-06-20  Hrvoje Niksic  <hniksic@srce.hr>
11996
11997         * http.c (http_loop): New function.
11998
11999         * loop.c: Removed *lots* of stuff from retrieve_url.
12000
12001         * url.c (parseurl): Changed to work with urlinfo. Integrated
12002         username finding and path parsing.
12003         (newurl): New function.
12004         (freeurl): New function.
12005         (mkstruct): Removed the old bogosities, made it urlinfo-compliant.
12006         (url_filename): Likewise.
12007         (path_simplify): Accept relative paths too.
12008         (opt_url): Made urlinfo-compliant, removed bogosities.
12009         (path_simplify): Expanded to accept relative paths.
12010         (str_url): A replacement for hide_url
12011         (decode_string): Fixed a bug that caused malfunctioning when
12012         encountering an illegal %.. combination.
12013         (opt_url): Removed the argument. Dot-optimizations are now default.
12014
12015         * nmalloc.c (strdupdelim): New function.
12016
12017         * url.h: Added the urlinfo structure
12018
12019 1996-06-19  Hrvoje Niksic  <hniksic@srce.hr>
12020
12021         * url.c (hide_url): Thrown out the protocol assertion. Do not
12022         change the URL if the protocol if not recognized.
12023         (findurl): Put continue instead of break.
12024
12025 1996-06-18  Hrvoje Niksic  <hniksic@srce.hr>
12026
12027         * sample.geturlrc: Changed the defaults to be commented out and
12028         harmless (previous defaults caused pains if copied to
12029         ~/.geturlrc).
12030
12031         * http.c (gethttp): Print the HTTP request in debug mode.
12032
12033         * connect.c (iread): Added EINTR check loop to select-ing
12034         too. EINTR is now correctly handled with select().
12035
12036         * TODO: new file
12037
12038 1996-05-07  Hrvoje Niksic  <hniksic@srce.hr>
12039
12040         * host.c (same_host): Made the function a little bit more
12041         intelligent regarding diversified URL syntaxes.
12042
12043         * url.c (skip_url): Spaces are now skipped after URL:
12044
12045         * Released 1.3.1 with the patch to prevent crashing when sending
12046         NULL to robot* functions and the patch to compile "out of the box"
12047         on AIX.
12048
12049         * recr.c (recursive_retrieve): Added checking whether this_url is
12050         NULL when calling the robot functions.
12051
12052         * ChangeLog: New file.