]> sjero.net Git - wget/blob - src/ChangeLog
ChangeLog entry for Alex's aprintf changes.
[wget] / src / ChangeLog
1 2008-04-10  Alexander Dergachev  <cy6erbr4in@gmail.com>
2
3         * xmalloc.c, xmalloc.h (memfatal): Now exported; accepts an
4         "unknown" value for the attempted allocation size.
5         * utils.c (aprintf): Now calls memfatal, instead of aborting.
6
7 2008-03-19  Micah Cowan  <micah@cowan.name>
8
9         * utils.c (test_dir_matches_p): More tests related for
10         dir_matches_p.
11
12 2008-03-17  Micah Cowan  <micah@cowan.name>
13
14         * connect.c: Include sys/time.h to support use of the select
15         function on older systems.
16
17 2008-02-11  Benno Schulenberg  <bensberg@justemail.net>
18
19         * http.c: More accurate and descriptive messages for when a file
20         won't be retrieved during spider-mode.
21
22 2008-02-10  Micah Cowan  <micah@cowan.name>
23
24         * http.c: Added existence_checked member to the http_stat
25         struct.
26         (gethttp): Mark hs->existence_checked when we've checked whether
27         a file-to-download exists; so we don't check it again if the
28         connection gets lost (and potentially pick a new "unique" name).
29         This fixes bug 22251.
30         * progress.c (create_image): Add space for an extra column in
31         the "eta" portion of the progress bar image; to deal with
32         too-long Czech translation.
33         * main.c, http.c, init.c: Added --auth-no-challenge option, to
34         bring back 1.10.2 unsafe auth behavior when needed. This fixes
35         bug #22242.
36
37 2008-02-07  Micah Cowan  <micah@cowan.name>
38
39         * progress.c (create_image): Remove assertion on exceeding
40         screen width, which given the less-than-robust code there, can
41         be broken by a number of factors (such as large file downloads).
42
43 2008-02-06  Micah Cowan  <micah@cowan.name>
44
45         * progress.c (countcols): Use strlen() when mbtowc or wcwidth
46         not available (or not using NLS).
47         * utils.c: Ensure we use single-byte separators when not doing
48         NLS progress-bars.
49         * wget.h: Determine whether to use NLS for progress-bars, based
50         on whether wcwidth and mbtowc are available.
51
52 2008-02-03  Micah Cowan  <micah@cowan.name>
53
54         * progress.c (create_image): Use number of characters/columns
55         consumed, rather than number of bytes, to determine how much of
56         a line we've used. Fixes assertion errors and field alignment
57         bugs (#22161, #20481)
58         (get_eta, count_cols): Added to support the changes for
59         create_image.
60         * http.c (http_loop): Put no-clobber logic back into http_loop,
61         before starting to fetch, for when we're not doing
62         content-disposition.
63
64 2008-01-31  Micah Cowan  <micah@cowan.name>
65
66         * http.c (gethttp): Don't derive hs->contlen from possibly
67         invalid/missing Content-Length; instead, get the appropriate
68         value from the Content-Range header values.
69         (parse_content_range): Handle '*' instance-length field.
70
71 2008-01-25  Micah Cowan  <micah@cowan.name>
72
73         * main.c: Added notes to translators regarding (C), diacritics
74         in names.
75         * Makefile.am, cmpt.c, connect.c, connect.h, convert.c,
76         cookies.c, cookies.h, ftp-basic.c, ftp-ls.c, ftp-opie.c, ftp.c,
77         ftp.h, gen-md5.c, gen-md5.h, gnutls.c, hash.c, hash.h, host.c,
78         host.h, html-parse.c, html-parse.h, html-url.c, http-ntlm.c,
79         http-ntlm.h, http.c, http.h, init.c, init.h, log.c, log.h,
80         main.c, mswindows.c, mswindows.h, netrc.c, netrc.h, openssl.c,
81         options.h, progress.c, progress.h, ptimer.c, ptimer.h, recur.c,
82         recur.h, res.c, res.h, retr.c, retr.h, spider.c, spider.h,
83         ssl.h, sysdep.h, test.c, test.h, url.c, url.h, utils.c,
84         utils.h, wget.h, xmalloc.c, xmalloc.h: Updated copyright year.
85
86 2007-12-10  Micah Cowan  <micah@cowan.name>
87
88         * main.c: The option is --content-disposition, not
89         --no-content-disposition (at the moment).
90
91 2007-12-08  Hrvoje Niksic  <hniksic@xemacs.org>
92
93         * ftp.c (ftp_retrieve_glob): Print both arguments of fnmatch in
94         fnmatch error message.
95         (ftp_retrieve_glob): Don't match with fnmatch if we're only
96         supposed to get one file.
97
98 2007-12-07  Micah Cowan  <micah@cowan.name>
99
100         * Makefile.am: Plug in vars to include stuff from
101         $(top_srcdir)/md5 when appropriate.
102
103 2007-12-05  Micah Cowan  <micah@cowan.name>
104
105         * utils.c (subdir_p): Handle the case where d1 is "".
106         * convert.c (convert_all_links): Don't return without
107         deallocating timer.
108
109 2007-11-28  Micah Cowan  <micah@cowan.name>
110
111         * Makefile.am, cmpt.c, connect.c, connect.h, convert.c,
112         convert.h, cookies.c, cookies.h, ftp-basic.c, ftp-ls.c,
113         ftp-opie.c, ftp.c, ftp.h, gen-md5.c, gen-md5.h, gnutls.c,
114         hash.c, hash.h, host.c, host.h, html-parse.c, html-parse.h,
115         html-url.c, http-ntlm.c, http-ntlm.h, http.c, http.h, init.c,
116         init.h, log.c, log.h, main.c, mswindows.c, mswindows.h,
117         netrc.c, netrc.h, openssl.c, options.h, progress.c, progress.h,
118         ptimer.c, ptimer.h, recur.c, recur.h, res.c, res.h, retr.c,
119         retr.h, safe-ctype.c, safe-ctype.h, spider.c, spider.h, ssl.h,
120         sysdep.h, test.c, test.h, url.c, url.h, utils.c, utils.h,
121         wget.h, xmalloc.c, xmalloc.h: Updated license exception for
122         OpenSSL, per the SFLC.
123
124 2007-10-30  Micah Cowan  <micah@cowan.name>
125
126         * main.c (main): Declare argv parameter as char **argv, rather
127         than char *const *argv. This fixes usage of getopt_long,
128         regardless of whether getopt_long has a constified argv or not.
129
130 2007-10-22  Gisle Vanem  <gvanem@broadpark.no>
131
132         * mswindows.c: Move INHIBIT_WRAP macro definition up with wget.h
133         inclusion.
134
135 2007-10-18  Steven Schweda  <sms@antinode.org>
136
137         * sysdep.h: #include <stdint.h> as well as <inttypes.h>, to work
138         around a glitch on Tru64 systems.
139
140 2007-10-18  Micah Cowan  <micah@cowan.name>
141
142         * Makefile.am: version.c should not be distributed. Removed
143         config-post.h. Add version.c dependency and gnulib include path
144         for libunittest.a.
145         * sysdep.h: Got contents of config-post.h
146         * config-post.h: Removed.
147         * wget.h: #include "config.h".
148         * alloca.c, cmpt.c, connect.c, convert.c, cookies.c,
149         ftp-basic.c, ftp-ls.c, ftp-opie.c, ftp.c, gen-md5.c, gnutls.c,
150         hash.c, host.c, html-parse.c, html-url.c, http-ntlm.c, http.c,
151         init.c, log.c, main.c, mswindows.c, netrc.c, openssl.c,
152         progress.c, ptimer.c, recur.c, res.c, retr.c, spider.c, url.c,
153         utils.c, xmalloc.c: Use wget.h at very top, and instead of
154         config.h.
155
156 2007-10-15  Micah Cowan  <micah@cowan.name>
157
158         * Makefile.am: Remove intermediary hg-id file generation, make
159         version.c-generation more portable.
160
161 2007-10-14  Micah Cowan  <micah@cowan.name>
162
163         * cmpt.c, cookies.c, ftp-basic.c, ftp-ls.c, ftp.c, hash.c,
164         host.c, html-parse.c, html-url.c, http-ntlm.c, http.c, init.c,
165         log.c, main.c, netrc.c, openssl.c, res.c, url.c, utils.c,
166         wget.h: Replace uses of ISSPACE, etc with c_isspace, etc.
167         * gnu-md5.c, gnu-md5.h: Removed, in deference to gnulib.
168         * Makefile.am: Removed gnu-md5.h from wget_SOURCES.
169         * gen-md5.c: Changed #inclusion of gnu-md5.h to md5.h (gnulib's).
170         * recur.c (download_child_p): Print error if unlink of
171         robots.txt fails.
172         * main.c (main): --spider or --delete-after now implies
173         --no-directories (thanks, Josh Williams).
174
175 2007-10-14  Joshua David Williams  <yurimxpxman@gmail.com>
176
177         * recur.c (download_child_p): Remove robots.txt if
178         --delete-after or --spider is on.
179
180 2007-10-13  Micah Cowan  <micah@cowan.name>
181
182         * Makefile.am: Make version.c depend on Wget dependencies (source
183         files, plus such things as LIBOBJS so we get things like
184         http-ntlm.c). Removed getopt.[ch], as we're now using gnulib for
185         these.
186
187 2007-10-10  Micah Cowan  <micah@cowan.name>
188
189         * http-ntlm.c: Include openssl/opensslv.h explicitly, instead of
190         hoping it'll be included by accident in openssl/des.h.
191
192 2007-10-09  Gisle Vanem  <gvanem@broadpark.no>
193
194         * mswindows.c: 'argc' and 'argv' in 'windows_main()' are no longer
195         needed.  Hence simply the prototype. Free 'exec_name' at exit.
196
197 2007-10-09  Micah Cowan  <micah@cowan.name>
198
199         * gettext.h: Imported from /usr/share/gettext, fuller handling
200         of --disable-nls.
201         * wget.h: Remove logic for handling lack of NLS (now in
202         gettext.h).
203         * main.c: Use gettext's ENABLE_NLS rather than HAVE_NLS.
204         * Makefile.am: added @LIBINTL@ to LIBS (though it probably
205         belongs in LDADD, along with everything else currently assigned
206         to LIBS).
207
208 2007-10-08  Micah Cowan  <micah@cowan.name>
209
210         * http.c (http_loop): Add send_head_first conditional back
211         around code that needs it, but not around the last-modified
212         header-parsing stuff this time. Removed no-longer-useful (was it
213         ever?) restart_loop boolean, continuing unconditionally at end
214         of send_head_first conditional block (if we haven't jumped out).
215
216 2007-10-04  Micah Cowan  <micah@cowan.name>
217
218         * http.c (http_loop): We've got_name if content_disposition
219         support isn't on; make sure we continue properly in that case,
220         even though we're not sending HEAD.
221         * Makefile.in: Removed, replaced by Makefile.am.
222         * Makefile.am: Converted from Makefile.in.
223
224 2007-10-02  Gisle Vanem  <gvanem@broadpark.no>
225         
226         * ftp.c: Use "_listing" for MSDOS (".listing" is illegal).
227
228         * url.c: Update comment for 'filechr_not_windows'.
229
230         * utils.c: Include <process.h> for 'getpid()' on Watcom.
231
232 2007-10-02  Micah Cowan  <micah@cowan.name>
233
234         * ftp.c (getftp, ftp_loop_internal), http.c (http_loop), main
235         (main): Use datetime_str instead of time_str, for those who have
236         potentially long-running sessions. Based on suggestions by Saso
237         Tomat <miskox@hotmail.com> and Steven M. Schweda
238         <sms@antinode.org>.
239         * http.c (gethttp): Warn about host lookup failures. Adjusted
240         from Stephen Gildea's patch.
241
242 2007-10-02  Stephen Gildea  <stepheng+wget@gildea.com>
243
244         * connect.c (connect_to_host): Warn about host lookup failures.
245
246 2007-09-25  Micah Cowan  <micah@cowan.name>
247
248         * Makefile.in: Use EXEEXT instead of exeext.
249
250 2007-09-24  Gisle Vanem  <giva@bgnett.no>
251
252         * connect.c, init.c, main.c, openssl.c, options.h, sysdep.h,
253         url.c, utils.c: Added support for building on MS-DOS.
254
255 2007-09-24  Jochen Roderburg  <roderburg@uni-koeln.de>
256
257         * http.c (http_zero): Remove no-longer-used local_size variable.
258         Fixes bug #21057.
259
260 2007-09-12  Micah Cowan  <micah@cowan.name>
261
262         * http.c (http_loop): Remove send_head_first from condition for
263         parsing timestamp.
264
265 2007-08-29  Micah Cowan  <micah@cowan.name>
266
267         * openssl.c (ssl_init): Re un-const-ified the meth local
268         variable, to match current versions of openssl.
269         * spider.c: Removed visited_url function, as it may be very
270         inefficient.
271         (print_broken_links): Removed traversal of referrers, until such
272         time as a more efficient implementation can be written.
273         * spider.h: Replaced declaration of visited_url with an
274         empty-bodied, function-like macro.
275
276 2007-08-27  Gisle Vanem  <giva@bgnett.no>
277
278         * mswindows.c (run_with_timeout): Ensure that the correct
279         conversion specification is used for the return result of
280         the GetLastError function.
281         * getopt.c: Fix missing (but, accidentally, legal) comment
282         delimiter after licensing text.
283         * recur.c (retrieve_tree): Inserted missing cast for strip_auth.
284         Includes adjustment by Ralf Wildenhues.
285         * openssl.c (ssl_init): const-ified the meth local variable.
286         * main.c: Include all the static function definitions in the
287         "#ifndef TESTING" clause, leaving just the definitions for
288         exec_name (not set), and opt.
289         * utils.c (run_with_timeout): Now returns bool, to align with
290         declaration in utils.h.
291
292 2007-08-27  Micah Cowan  <micah@cowan.name>
293
294         * wget.h: Added macro replacement for ngettext, for environs
295         that lack NLS.
296
297 2007-08-26  Micah Cowan  <micah@cowan.name>
298
299         * spider.c (print_broken_links): Fixed incorrect plurals msgid
300         usage, switched to use ngettext function.
301
302 2007-08-24  Micah Cowan  <micah@cowan.name>
303
304         * http.c (http_loop): Introduced time_came_from_head boolean
305         flag, to help avoid parsing the same Last-Modified header twice.
306         Replaced spidering returns of RETRUNNEEDED for some situations,
307         to RETROK, as otherwise it will be interpreted as an error.
308         RETRUNNEEDED appears never to be referenced outside of
309         http.c (and wget.h), and, when returned by gethttp, is
310         translated by http_loop to RETROK.
311         * url.c (are_urls_equal): Don't call getchar_from_escaped_string
312         if u2 is shorter than u1.
313         (getchar_from_escaped_string): Don't decode reserved characters.
314         Handle illegally appearing '%'s as literal '%'s. Ensure hex
315         digits before attempting to decode.
316         (test_are_urls_equal): Added tests to handle u2 shorter than u1,
317         and %2f not treated the same as /.
318         * spider.c (in_url_list_p): Don't call are_urls_equal if one of
319         them is NULL.
320
321 2007-08-23  Joshua David Williams  <yurimxpxman@gmail.com>
322
323         * spider.c (in_url_list_p): Removed the bool verbose argument
324
325 2007-08-22  Mauro Tortonesi  <mauro@ferrara.linux.it>
326
327         * http.c (http_loop): Fall back to GET if HEAD fails with a 500 or 501
328         error code.
329
330 2007-08-21  Mauro Tortonesi  <mauro@ferrara.linux.it>
331         
332         * http.c (http_loop): Send preliminary HEAD request if -N is given and
333         the destination file exists already.
334
335 2007-08-10  Mauro Tortonesi  <mauro@ferrara.linux.it>
336
337         * http.c (http_loop): Fixed HTTP HEAD requests logic when --spider is
338         given.
339
340 2007-08-10  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
341
342         * url.c (append_uri_pathel): Do not assume dest string to be
343         zero-terminated.
344         (test_append_uri_pathel): Terminate string to fix test failure.
345
346 2007-08-09  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
347
348         * url.c (url_string): Use comparison, not assignment, in
349         check for auth_mode == URL_AUTH_HIDE_PASSWD.
350
351 2007-08-09  Micah Cowan  <micah@cowan.name>
352
353         * http.c (http_loop): If we got a HEAD and then a GET, and the
354         GET had a timestamp, use that one, not any we may have gotten
355         from the HEAD.
356
357 2007-08-08  Micah Cowan  <micah@cowan.name>
358
359         * init.c (defaults): Content disposition will not be default,
360         since it currently results in extra round-trips.
361
362 2007-07-31  Micah Cowan  <micah@cowan.name>
363
364         * http.c (gethttp): Set contlen = -1 when we encounter a
365         negative-valued Content-Length header, so we don't consider it
366         an internal error later on and call abort().
367
368 2007-07-29  Micah Cowan  <micah@cowan.name>
369
370         * url.h, url.c (url_string): Replaced bool arg of the url_string
371         function with enum url_auth_mode, with added option to
372         completely remove user/pass auth information.
373         * http.c, ftp.c, url.c, recur.c: Adapted call to url_string
374         function to fit new usage.
375         * recur.c (retrieve_tree): Remove auth info from Referer header.
376
377 2007-07-28  Micah Cowan  <micah@cowan.name>
378
379         * options.h, init.c, retr.c, main.c: renamed opt maxredirect
380         field to max_redirect, for improved consistency.
381         * init.c: changed max_redirect parser from cmd_number_inf to
382         cmd_number, as infinite redirects may not be appropriate.
383         Alternatively, if cmd_number_inf should be used, then
384         opt.max_redirect's value should be checked a bit differently in
385         retr.c, to allow for the "infinite" meaning of zero.
386
387 2007-07-25  Micah Cowan  <micah@cowan.name>
388
389         * http.c (create_authorization_line)
390         (basic_authentication_encode, known_authentication_scheme_p)
391         (load_cookies): Moved declarations up.
392         (basic_authed_hosts): Added. Tracks what hosts have issued Basic
393         challenge and been given the global username, password.
394         (maybe_send_basic_creds): Added. Sends Basic creds for hosts that
395         have issued Basic challenges.
396         (register_basic_auth_host): Added. Instantiates
397         basic_authed_hosts if necessary, then registers the host that
398         has issued a challenge.
399         (gethttp) <auth>: Only send authentication credentials after
400         we've received a challenge from that host. This is a stop-gap
401         fix until a proper fix can be implemented; still isn't quite
402         right, as we should only be sending credentials automatically
403         for authenticated paths and below, and not for the entire host.
404
405 2007-07-16  Joshua David Williams  <yurimxpxman@gmail.com>
406
407         * options.h: added maxredirect to options struct
408         * init.c: added maxredirect to list of variables
409         * retr.c (retrieve_url): replaced MAX_REDIRECTIONS with opt.maxredirect
410         * main.c: added option --max-redirect
411
412 2007-07-16  Joshua David Williams  <yurimxpxman@gmail.com>
413
414         * test.h: tests made more verbose; now displays the name
415         of each test run.
416
417 2007-07-10  Mauro Tortonesi  <mauro@ferrara.linux.it>
418
419         * http.c (http_loop): Fixed the HTTP requests logic. Now it skips the 
420         preliminary HEAD request if either -O or --no-content-disposition are 
421         given, and neither --spider and -N are given.
422
423 2007-07-05  Micah Cowan  <micah@cowan.name>
424
425         * cmpt.c, connect.c, connect.h, convert.c, convert.h:
426         * cookies.c, cookies.h, ftp-basic.c, ftp.c, ftp.h, ftp-ls.c:
427         * ftp-opie.c, gen-md5.c, gen-md5.h, getopt.c, getopt.h, gnu-md5.c:
428         * gnu-md5.h, gnutls.c, hash.c, hash.h, host.c, host.h:
429         * html-parse.c, html-parse.h, html-url.c, http.c, http.h:
430         * http-ntlm.c, http-ntlm.h, init.c, init.h, log.c, log.h, main.c:
431         * Makefile.in, mswindows.c, mswindows.h, netrc.c, netrc.h:
432         * openssl.c, options.h, progress.c, progress.h, ptimer.c:
433         * ptimer.h, recur.c, recur.h, res.c, res.h, retr.c, retr.h:
434         * safe-ctype.c, safe-ctype.h, spider.c, spider.h, ssl.h, sysdep.h:
435         * test.c, test.h, url.c, url.h, utils.c, utils.h, wget.h:
436         * xmalloc.c, xmalloc.h:
437         Updated GPL reference to version 3 or later, removed FSF
438         address.
439
440 2007-07-04  Mauro Tortonesi  <mauro@ferrara.linux.it>
441
442         * http.c (http_loop): Skip HEAD request and start immediately with GET
443         if -O is given.
444
445 2007-02-02  Hrvoje Niksic  <hniksic@xemacs.org>
446
447         * http.c (print_server_response): Escape non-printable characters
448         in server respone.
449
450 2007-02-02  Hrvoje Niksic  <hniksic@xemacs.org>
451
452         * netrc.c: Don't make netrc_list static, as it prevents
453         compilation with DEBUG_MALLOC.
454
455         * utils.c (aprintf): Don't use vasprintf when DEBUG_MALLOC is
456         requested because, in that case, we want the calls to malloc to be
457         coming from us.
458
459 2007-01-23  Hrvoje Niksic  <hniksic@xemacs.org>
460
461         * cookies.c (parse_set_cookie): Would erroneously discard cookies
462         with unparsable expiry time.
463
464 2007-01-23  Hrvoje Niksic  <hniksic@xemacs.org>
465
466         * progress.c (create_image): Check for ETA overflow.
467         (print_row_stats): Ditto.
468
469 2007-01-09  Mauro Tortonesi  <mauro@ferrara.linux.it>
470
471         * init.c (cmd_spec_prefer_family): Small fix to get rid of a gcc
472         warning about strict-aliasing violation.
473
474 2007-01-09  Steven M. Schweda  <sms@antinode.org>
475
476         * ftp-basic.c (ftp_syst): Fixed segfault if response text is missing.
477
478 2006-12-29  Gisle Vanem  <giva@bgnett.no>
479
480         * mswindows.c: Avoid a warning if 'ws_hangup()' is unused.
481
482 2006-12-27  Mauro Tortonesi  <mauro@ferrara.linux.it>
483
484         * http.c (parse_content_disposition): Consider directory prefix, if
485         specified.
486
487 2006-11-21  Hrvoje Niksic  <hniksic@xemacs.org>
488
489         * retr.c (retrieve_from_file): Ditto.
490         (url_uses_proxy): New function.
491
492         * main.c (main): Don't check for opt.use_proxy when deciding
493         whether to call retrieve_url or retrieve_tree; check whether the
494         proxy would be used for *this* URL.
495
496 2006-10-17  Mike Grant  <mggr@pml.ac.uk>
497
498         * ftp.c (ftp_loop_internal): Would incorrectly skip changing
499         working directory when retrying after a failed FTP attempt.
500         Originally reported by Nate Eldredge.
501
502 2006-10-12  Mauro Tortonesi  <mauro@ferrara.linux.it>
503
504         * convert.c (downloaded_file): Fixed bug which used to break -E -k -K 
505         mode.
506
507 2006-08-28  Mauro Tortonesi  <mauro@ferrara.linux.it>
508
509         * http.c: #include'd spider.h to get rid of compiler warnings.
510
511         * main.c: Ditto.
512
513         * recur.c: Ditto.
514
515 2006-08-24  Mauro Tortonesi  <mauro@ferrara.linux.it>
516
517         * Makefile.in: Added spider.c to the list of files to compile and
518         spider.h to the list of header files. Updated copyright information.
519
520         * http.c: Major changes to recursive spider mode. Now for every
521         resource we are supposed to check, we send a HEAD request to find out
522         if it exists. If the resource is a HTML file, we retrieve it and parse
523         it to discover links to other resources.
524
525         * recur.c: Ditto.
526
527         * res.c (res_retrieve_file): Disable opt.timestamping and opt.spider
528         when retrieving robots.txt. Updated copyright information.
529
530         * convert.c: Moved code tracking broken links to spider.c.
531
532         * convert.h: Ditto.
533
534         * spider.c: Created new file to keep track of visited URLs in spider
535         mode.
536
537         * spider.h: Ditto.
538
539 2006-08-21  Mauro Tortonesi  <mauro@ferrara.linux.it>
540
541         * http.c: Fixed timestamping-related bug.
542
543 2006-08-16  Mauro Tortonesi  <mauro@ferrara.linux.it>
544
545         * http.c: Fixed bug which broke --continue feature. Now if -c is
546         given, http_loop sends a HEAD request to find out the destination
547         filename before resuming download.
548
549 2006-08-08  Hrvoje Niksic  <hniksic@xemacs.org>
550
551         * utils.c (datetime_str): Avoid code repetition with time_str.
552
553 2006-07-21  Hrvoje Niksic  <hniksic@xemacs.org>
554
555         * init.c (commands): Correctly place "contentdisposition".
556
557 2006-07-14  Mauro Tortonesi  <mauro@ferrara.linux.it>
558         
559         * sysdep.h: If intptr_t isn't defined, simply typedef it to long.
560
561         * http.c: Added explicit cast to int in logprintf call to remove
562         compiler warnings on 64-bit platforms.
563
564         * connect.c: Added a few casts to intptr_t to remove compiler warnings
565         on 64-bit platforms.
566         
567         * main.c: Disable -r, -p and -N when -O is used. Disable -k when -O is
568         used and multiple URLs are given. Update maintainer information.
569         
570         * all: Update copyright information.
571         
572 2006-07-10  KJKHyperion  <hackbunny@reactos.com>
573
574         * url.c (filechr_table): Mark DEL (0x7f) as a control character
575         and | as a character Windows can't handle.
576
577 2006-06-28  Mauro Tortonesi  <mauro@ferrara.linux.it>
578
579         * res.c: Implemented is_robots_txt_url function for detection of
580         robots.txt URLs and related test routine.
581
582         * res.h: Ditto.
583
584         * url.c: Implemented are_urls_equal function for URL comparison and
585         related testing routine.
586
587         * url.h: Ditto.
588
589         * convert.c: Fixes for recursive spider mode: don't consider
590         non-existing robots.txt as a broken link, and use are_urls_equal
591         instead of strcasecmp for referrer URLs comparison.
592
593         * test.c: Call tests routines for are_urls_equal and 
594         is_robots_txt_url.
595
596 2006-06-26  Hrvoje Niksic  <hniksic@xemacs.org>
597
598         * wget.h (wgint): Typedef to any 64-bit (or larger) type we can
599         find, not necessarily off_t or long.
600
601 2006-06-26  Hrvoje Niksic  <hniksic@xemacs.org>
602
603         * cmpt.c (strtoll): Check for overflow and underflow without
604         relying on (technically) undefined behavior.  Don't assume that
605         strtoll_type is 64 bits wide.
606
607 2006-06-21  Hrvoje Niksic  <hniksic@xemacs.org>
608
609         * utils.c (base64_encode): Cast void pointer to char * before
610         doing arithmetic.
611
612 2006-06-20  Hrvoje Niksic  <hniksic@xemacs.org>
613
614         * utils.c (base64_encode): Made TBL const.
615         (base64_decode): Made the base64_char_to_value table const.
616
617 2006-06-19  Hrvoje Niksic  <hniksic@xemacs.org>
618
619         * utils.c (base64_encode): Made the DATA pointer void * so the
620         callers can pass it any kind of pointer (including both signed and
621         unsigned char pointers).
622         (base64_decode): Ditto for DEST.
623
624 2006-06-19  Hrvoje Niksic  <hniksic@xemacs.org>
625
626         * utils.c (base64_encode): Would read past end of STR.
627         Reported by rick@eckle.org.
628
629 2006-06-13  Mauro Tortonesi  <mauro@ferrara.linux.it>
630
631         * options.h (struct options): Introduced member restrict_files_case to
632         keep track of preferences on character case restrictions for
633         filenames.
634
635         * init.c: Modified defaults and cmd_spec_restrict_file_names to
636         support character case restrictions for filenames. Added
637         test_cmd_spec_restrict_file_names unit test.
638
639         * url.c: Modified append_uri_pathel to support character case
640         restrictions for filenames. Added test_append_uri_pathel unit test.
641
642         * test.c: Added test_cmd_spec_restrict_file_names and
643         test_append_uri_pathel to the list of unit tests to run.
644
645 2006-06-12  Mauro Tortonesi  <mauro@ferrara.linux.it>
646
647         * retr.c (retrieve_from_file): Use retrieve_tree and automatically
648         turn on opt.follow_ftp in case of recursive FTP retrieval through HTTP
649         proxy.
650
651         * main.c: Automatically turn on opt.follow_ftp in case of recursive
652         FTP retrieval through HTTP proxy.
653
654 2006-06-12  Tony Lewis  <tlewis@exelana.com>
655
656         * main.c: Improved CHEN Peng's patch by proposing a simpler logic.
657
658 2006-06-12  CHEN Peng  <chenpeng@alumni.nus.edu.sg>
659
660         * main.c: Use retrieve_tree in case of recursive FTP retrieval through
661         HTTP proxy.
662
663 2006-05-25  Mauro Tortonesi  <mauro@ferrara.linux.it>
664
665         * convert.c: Added mechanisms to keep track broken links.
666
667         * convert.h: Ditto.
668
669         * wget.h: Reordered and enumerated uerr_t constants.
670
671         * recur.c: Fixes to support recursive spider mode.
672
673         * http.c: Ditto.
674
675         * main.c: Print broken links in case of recursive spider mode.
676
677         * retr.c: Changed interface of retrieve_url.
678
679         * retr.h: Ditto.
680
681         * ftp.c: Changed interface of ftp_loop.
682
683         * ftp.h: Ditto.
684
685         * res.c: Minor change to reflect changes in interface of retrieve_url.
686
687 2006-05-18  Lawrence Jones  <lawrence.jones@ugs.com>
688
689         * ftp-ls.c (ftp_parse_unix_ls): Correct size parsing, add size
690         and filename debugging output.
691
692 2006-04-28  Mauro Tortonesi  <mauro@ferrara.linux.it>
693
694         * http.c: If Content-Disposition header is present, allow unique
695         filename generation unless -nc is given. Permit to disable parsing of
696         Content-Disposition header.
697
698         * options.h: Added option --no-content-disposition to disable parsing
699         of HTTP Content-Disposition header.
700
701         * init.c: Ditto.
702         
703         * main.c: Ditto.
704
705 2006-04-11  Hrvoje Niksic  <hniksic@xemacs.org>
706
707         * hash.c (TOLOWER): Wrap macro arg in parentheses.
708
709 2006-04-08  Hrvoje Niksic  <hniksic@xemacs.org>
710
711         * http.c (parse_content_disposition): Doc fix.
712
713 2006-03-15  Mauro Tortonesi  <mauro@ferrara.linux.it>
714
715         * utils.c: Restricted operational semantics of frontcmp and proclist
716         from generic strings to directory names and them to subdir_p and
717         dir_matches_p respectively.  Applied George Ogata's one line patch to
718         restrict algorithm of subdir_p to full directory name matching.  Added
719         testcases for subdir_p and dir_matches_p.
720
721         * utils.h: Changed all frontcmp occurrences to subdir_p.
722         
723         * recur.c: Ditto.
724         
725         * test.c: Changed type returned by test functions from char * to const
726         char *.  Added test_subdir_p and test_dir_matches_p to the list of
727         tests to run.
728
729         * http.c (test_parse_content_disposition): Changed return type from
730         char * to const char *. 
731
732 2006-03-14  Mauro Tortonesi  <mauro@ferrara.linux.it>
733
734         * recur.c (struct queue_element): Changed type of html_allowed member
735         to bool.
736         
737 2006-03-09  Mauro Tortonesi  <mauro@ferrara.linux.it>
738
739         * ftp.c (ftp_list): Try `LIST -a' command first and revert to `LIST'
740         in case of failure.
741
742 2006-03-06  Hrvoje Niksic  <hniksic@xemacs.org>
743
744         * hash.c (TOLOWER): Fix definition when STANDALONE.
745         Reported by Beni Serfaty.
746
747 2006-03-02  Mauro Tortonesi  <mauro@ferrara.linux.it>
748
749         * http.c (http_loop): Fixed recursive HTTP retrieval.
750
751 2006-02-28  Hrvoje Niksic  <hniksic@xemacs.org>
752
753         * http.c (extract_param): Declare extern so it can be used from
754         other files.
755         (extract_param): Return error for empty name.
756
757 2006-02-28  Hrvoje Niksic  <hniksic@xemacs.org>
758
759         * url.c (find_last_char): Define in terms of memrchr.
760
761         * cmpt.c (memrchr): Define it on systems that don't have it.
762
763         * http.c (extract_param): New function for parsing header values
764         with parameters.
765         (parse_content_disposition): Use it.  Don't allow slashes and
766         backslashes in the file name.
767
768 2006-02-27  Hrvoje Niksic  <hniksic@xemacs.org>
769
770         * url.c (path_simplify): Don't preserve ".." at beginning of path.
771         Suggested by Frank McCown.
772
773 2006-02-25  Hrvoje Niksic  <hniksic@xemacs.org>
774
775         * http.c (gethttp): Only use FILE.N.html if FILE.html exists.
776
777 2006-02-09  Hrvoje Niksic  <hniksic@xemacs.org>
778
779         * mswindows.c (run_with_timeout): Made thread_hnd non-static.
780
781 2006-02-05  Hrvoje Niksic  <hniksic@xemacs.org>
782
783         * retr.c (sleep_between_retrievals): Sleep at a minimum of 1/2 of
784         the specified wait period.
785
786 2006-02-03  Hrvoje Niksic  <hniksic@xemacs.org>
787
788         * utils.c (number_to_string): Don't use sprintf for printing
789         WGINT_MIN; simply divide n by 10 and defer printing the last
790         digit.
791         (number_to_string): Removed the SPRINTF_WGINT macro.
792
793 2006-02-03  Mauro Tortonesi  <mauro@ferrara.linux.it>
794
795         * http.c: Fixed support for Content-Disposition header.
796
797         * test.c: Added test_parse_content_disposition to the list of unit
798         tests to run.
799
800 2006-02-02  Hrvoje Niksic  <hniksic@xemacs.org>
801
802         * hash.c: Don't define countof if it's already defined.
803
804         * hash.c: Obtain the definition of uintptr_t when standalone.
805
806 2006-01-30  Mauro Tortonesi  <mauro@ferrara.linux.it>
807
808         * http.c: Changed output format. Removed excessively verbose debugging
809         output.
810
811 2005-12-07  Mauro Tortonesi  <mauro@ferrara.linux.it>
812
813         * http.c: Fixed pre-download verbose output which was broken by 
814         HTTP code refactoring.
815
816 2005-11-23  Mauro Tortonesi  <mauro@ferrara.linux.it>
817
818         * http.c: Refactored HTTP code.  If -O is not used, the new code
819         delays the choice of the file name where the downloaded resource
820         will be saved until the HTTP headers have been retrieved.
821         Added support for Content-Disposition header. 
822
823 2005-11-19  Hrvoje Niksic  <hniksic@xemacs.org>
824
825         * hash.c (INVALID_PTR): Use uintptr_t instead of unsigned long.
826         (hash_pointer): Don't assume a pointer fits in `unsigned long'.
827
828 2005-11-02  Mauro Tortonesi  <mauro@ferrara.linux.it>
829
830         * Makefile.in: Removed support for unit testing (now it is in
831         tests/Makefile.in).
832
833 2005-10-27  Mauro Tortonesi  <mauro@ferrara.linux.it>
834
835         * Makefile.in: Added basic support for unit testing.
836
837         * test.c: Ditto.
838         
839         * test.h: Ditto.
840         
841 2005-10-13  Daniel Stenberg  <daniel@haxx.se>
842
843         * http-ntlm.c (ntlm_output): Fixed buffer overflow vulnerability.
844
845 2005-10-09  Russ Allbery  <rra@stanford.edu>
846
847         * snprintf.c: Remove round to round_int and pow10 to pow10_int, to
848         avoid warnings from GCC 4.0.
849
850 2005-10-05  Mauro Tortonesi  <mauro@ferrara.linux.it>
851
852         * retr.c: Changed semantics of no_proxy_match.
853
854 2005-09-17  Hrvoje Niksic  <hniksic@xemacs.org>
855
856         * main.c (main): Don't print the summary if nothing has been downloaded.
857
858 2005-09-17  Hrvoje Niksic  <hniksic@xemacs.org>
859
860         * retr.c (retr_rate): Rename parameter from MSECS to SECS since it
861         no longer holds milliseconds.
862
863 2005-09-01  Hrvoje Niksic  <hniksic@xemacs.org>
864
865         * progress.c: Introduce symbolic constants for "magic" values of
866         0.2 and 0.9, REFRESH_INTERVAL and ETA_REFRESH_INTERVAL.
867
868 2005-08-27  Hrvoje Niksic  <hniksic@xemacs.org>
869
870         * cmpt.c (strtoll): Correctly handle strtoll("0x", ptr, 0) and
871         strtoll("0x<nonhexchar>", ptr, 0) -- in both cases *ptr must be
872         set to the position of 'x', not after it.
873
874 2005-08-27  Hrvoje Niksic  <hniksic@xemacs.org>
875
876         * hash.c (hash_table_map): Rename to hash_table_for_each and
877         update callers.
878         Document the meaning of the callback's return value.
879         (hash_table_iterate): New function.
880         (hash_table_iter_next): Likewise.
881         Update most places that used hash_table_for_each to use the
882         iteration, which doesn't require a temporary function with
883         explicit state management.
884
885 2005-08-26  Albert Chin  <wget@mlists.thewrittenword.com>
886
887         * Makefile.in: Use @datadir@.  Define localedir as $(datadir)/locale.
888
889 2005-08-26  Jeremy Shapiro  <jnshapiro@gmail.com>
890
891         * openssl.c (ssl_init): Set SSL_MODE_AUTO_RETRY.
892
893 2005-08-23  Hrvoje Niksic  <hniksic@xemacs.org>
894
895         * host.c (address_list_from_ipv4_addresses): Use IP_INADDR_DATA.
896
897 2005-08-12  Hrvoje Niksic  <hniksic@xemacs.org>
898
899         * wget.h: Renamed strtoll_return to strtoll_type.
900
901 2005-08-11  Hrvoje Niksic  <hniksic@xemacs.org>
902
903         * progress.c (eta_to_human_short): Switch to days when printing
904         more than 48h rather than 100h.  (It's not immediately apparent
905         how many days there are in 83h.)
906
907 2005-08-11  Hrvoje Niksic  <hniksic@xemacs.org>
908
909         * cmpt.c (strtoll): Define it if missing on the system and if Wget
910         needs it.
911
912         * mswindows.c (str_to_int64): Move to cmpt.c and rename to strtoll.
913
914 2005-08-10  Hrvoje Niksic  <hniksic@xemacs.org>
915
916         * host.c (print_address): Always use inet_ntop when IPv6 is
917         enabled.
918
919         * host.h (ip_address): Simplify the data union.
920
921 2005-08-09  Hrvoje Niksic  <hniksic@xemacs.org>
922
923         * mswindows.c (inet_ntop): Also handle IPv4 addresses for
924         completeness.
925
926 2005-08-09  Hrvoje Niksic  <hniksic@xemacs.org>
927
928         * http.c (gethttp): Don't read more than the amount of data
929         specified by the content-length header.
930
931 2005-08-09  Vasil Dimov  <vd@datamax.bg>
932
933         * ftp.c (getftp): Don't free RESPLINE if ftp_response returns a
934         status other than FTPOK.
935
936 2005-08-04  Giuseppe Bonacci  <g.bonacci@libero.it>
937
938         * ftp-ls.c (ftp_parse_unix_ls): Remember the position of the
939         previous token instead of backtracking back to it.
940
941 2005-07-08  Gisle Vanem  <giva@bgnett.no>
942
943         * mswindows.h: Include process.h to get getpid() declaration.
944
945 2005-07-08  Hrvoje Niksic  <hniksic@xemacs.org>
946
947         * utils.c (aprintf): Use vasprintf where available.
948
949 2005-07-08  Hrvoje Niksic  <hniksic@xemacs.org>
950
951         * url.c (rewrite_shorthand_url): Simplify code using aprintf and
952         strspn.
953
954 2005-07-07  Hrvoje Niksic  <hniksic@xemacs.org>
955
956         * gnutls.c (ssl_check_certificate): Check for the validity of the
957         presented X509 certificate.
958
959 2005-07-07  Hrvoje Niksic  <hniksic@xemacs.org>
960
961         * openssl.c (ssl_check_certificate): Print custom error messages
962         for frequent X509 certificate problems.
963
964 2005-07-07  Hrvoje Niksic  <hniksic@xemacs.org>
965
966         * mswindows.h: Define an alias for stat and fstat, as requested by
967         config-compiler.h.
968         (gai_strerror): Define to windows_strerror if NEED_GAI_STRERROR is
969         defined.
970
971 2005-07-06  Hrvoje Niksic  <hniksic@xemacs.org>
972
973         * mswindows.h: Use strtoll where available.
974
975 2005-07-06  Hrvoje Niksic  <hniksic@xemacs.org>
976
977         * sysdep.h: Add a full declaration of fnmatch.h.
978
979 2005-07-06  Hrvoje Niksic  <hniksic@xemacs.org>
980
981         * utils.c: Unconditionally include <setjmp.h>.
982
983 2005-07-06  Hrvoje Niksic  <hniksic@xemacs.org>
984
985         * utils.c (fnmatch_nocase): New function.
986         (proclist): Use it instead of fnmatch when opt.ignore_case is
987         requested.
988         (in_acclist): Respect opt.ignore_case.
989         (frontcmp): Respect opt.ignore_case.
990
991         * options.h (struct options): New flag opt.ignore_case.
992
993 2005-07-06  Hrvoje Niksic  <hniksic@xemacs.org>
994
995         * ptimer.c: Measure time in seconds rather than milliseconds.
996         Adjusted all callers.
997
998 2005-07-06  Hrvoje Niksic  <hniksic@xemacs.org>
999
1000         * http.c (gethttp): When freeing MESSAGE, take into account that
1001         it can be NULL.
1002
1003 2005-07-05  Hrvoje Niksic  <hniksic@xemacs.org>
1004
1005         * cmpt.c (timegm): Handle years after 2099.
1006
1007 2005-07-05  Hrvoje Niksic  <hniksic@xemacs.org>
1008
1009         * cmpt.c (timegm): Remove unused variable.
1010
1011 2005-07-05  Hrvoje Niksic  <hniksic@xemacs.org>
1012
1013         * cmpt.c (timegm): Don't call mktime; simply count the seconds
1014         between 1970-01-01 and the specified date.
1015
1016 2005-07-05  Hrvoje Niksic  <hniksic@xemacs.org>
1017
1018         * wget.h (or): Define HAVE_SSL when either HAVE_OPENSSL or
1019         HAVE_GNUTLS are defined.
1020
1021         * gnutls.c: New file.
1022
1023 2005-07-05  Hrvoje Niksic  <hniksic@xemacs.org>
1024
1025         * http.c (gethttp): Don't print the request write error message
1026         twice.
1027
1028 2005-07-04  Hrvoje Niksic  <hniksic@xemacs.org>
1029
1030         * openssl.c (openssl_errstr): Instead of always using a large
1031         static buffer, only allocate the error string when there is an
1032         actual error.
1033
1034 2005-07-04  Hrvoje Niksic  <hniksic@xemacs.org>
1035
1036         * xmalloc.c (debugging_free): Prefix hex pointer value with "0x"
1037         when printing.
1038
1039 2005-07-04  Hrvoje Niksic  <hniksic@xemacs.org>
1040
1041         * utils.c (NEXT_BASE64_CHAR): Rename to NEXT_CHAR and simplify to
1042         get the next non-whitespace character.
1043
1044 2005-07-04  Hrvoje Niksic  <hniksic@xemacs.org>
1045
1046         * utils.c (base64_decode): Don't silently tolerate non-base64
1047         non-white-space characters in the base64 stream.
1048
1049 2005-07-04  Hrvoje Niksic  <hniksic@xemacs.org>
1050
1051         * connect.c (LAZY_RETRIEVE_INFO): Make last_tick unsigned to match
1052         transport_map_modified_tick.
1053
1054 2005-07-04  Hrvoje Niksic  <hniksic@xemacs.org>
1055
1056         * config-post.h (alloca): Updated declaration to not enumerate all
1057         Windows compilers.
1058
1059 2005-07-04  Hrvoje Niksic  <hniksic@xemacs.org>
1060
1061         * openssl.c (openssl_errstr): Separate error messages with "; ".
1062
1063 2005-07-03  Hrvoje Niksic  <hniksic@xemacs.org>
1064
1065         * ftp.c (getftp): Ditto.
1066
1067         * http.c (gethttp): Use fd_errstr.
1068
1069         * connect.c (fd_register_transport): Restructure parameters to
1070         include only a single structure that describes transport
1071         implementation.
1072
1073         * openssl.c (openssl_errstr): New function: dump SSL error strings
1074         into a static buffer and return a pointer to the buffer.
1075
1076         * connect.c (fd_errstr): New function; returns transport-specific
1077         error message, or strerror(errno) if transport doesn't supply one.
1078
1079 2005-07-03  Hrvoje Niksic  <hniksic@xemacs.org>
1080
1081         * mswindows.h: Also wrap accept() and listen().
1082
1083 2005-07-03  Hrvoje Niksic  <hniksic@xemacs.org>
1084
1085         * url.c (path_end): Skip separators appropriate for the scheme.
1086         (strpbrk_or_eos): Remove gcc-specific version, as the optimization
1087         it tried to perform no longer applies.
1088
1089 2005-07-02  Hrvoje Niksic  <hniksic@xemacs.org>
1090
1091         * host.c: Don't include "connect.h" now that we no longer have
1092         socket_has_inet6.
1093
1094 2005-07-02  Hrvoje Niksic  <hniksic@xemacs.org>
1095
1096         * host.c: Remove extraneous definition of netdb.h.
1097
1098 2005-07-02  Hrvoje Niksic  <hniksic@xemacs.org>
1099
1100         * http.c (gethttp): Skip error message body in the keep-alive
1101         case.
1102
1103 2005-07-02  Hrvoje Niksic  <hniksic@xemacs.org>
1104
1105         * url.c (url_parse): Would crash when parsing fragments.  Support
1106         fragments for FTP URLs too.
1107
1108 2005-07-02  Hrvoje Niksic  <hniksic@xemacs.org>
1109
1110         * version.c: Don't use "cvs" in version name, since we're not
1111         using CVS anymore.
1112
1113 2005-07-02  Hrvoje Niksic  <hniksic@xemacs.org>
1114
1115         * progress.c (create_image): Ditto.
1116
1117         * retr.c (retr_rate): Display smaller rate numbers with greater
1118         precision.
1119
1120 2005-07-02  Hrvoje Niksic  <hniksic@xemacs.org>
1121
1122         * http.c (response_head_terminator): Minor optimization.
1123
1124         * retr.c (fd_read_hunk): Call terminator with pointer to the start
1125         of the data and the pointer to the current data.  Changed all
1126         callers.
1127
1128 2005-07-01  Hrvoje Niksic  <hniksic@xemacs.org>
1129
1130         * url.c (url_parse): Make sure u->params is not initialized for
1131         http/https URLs.
1132         (url_parse): Don't crash on garbage following []-delimited IPv6
1133         addresses.
1134
1135 2005-07-01  Hrvoje Niksic  <hniksic@xemacs.org>
1136
1137         * main.c (print_help): Don't refer to the non-existent -nr in
1138         description of --mirror.
1139
1140 2005-06-30  Hrvoje Niksic  <hniksic@xemacs.org>
1141
1142         * host.c (pretty_print_address): Renamed to just print_address.
1143         Clarify documentation.
1144
1145 2005-06-30  Hrvoje Niksic  <hniksic@xemacs.org>
1146
1147         * http.c (gethttp): Explicitly document the different cases when
1148         generating the Host header.
1149
1150 2005-06-30  Hrvoje Niksic  <hniksic@xemacs.org>
1151
1152         * host.c (pretty_print_address): Handle error result from
1153         inet_ntop.
1154
1155 2005-06-30  Gisle Vanem  <giva@bgnett.no>
1156
1157         * mswindows.c (inet_ntop): New function.  Print IPv6 addresses
1158         using WSAAddressToString.
1159
1160 2005-06-27  Hrvoje Niksic  <hniksic@xemacs.org>
1161
1162         * progress.c (dot_update): Remove unused variable row_qty.
1163
1164 2005-06-29  Hrvoje Niksic  <hniksic@xemacs.org>
1165
1166         * main.c: Check for both SIGHUP and SIGUSR1 before using them.
1167
1168 2005-06-29  Hrvoje Niksic  <hniksic@xemacs.org>
1169
1170         * utils.c: Unconditionally include locale.h.
1171
1172 2005-06-29  Hrvoje Niksic  <hniksic@xemacs.org>
1173
1174         * ptimer.c: Include sys/time.h to get struct timeval.
1175
1176 2005-06-29  Hrvoje Niksic  <hniksic@xemacs.org>
1177
1178         * wget.h: Remove obsolete definition of with_thousand_seps_sum.
1179
1180 2005-06-29  Hrvoje Niksic  <hniksic@xemacs.org>
1181
1182         * gnu-md5.h: Unconditionally include limits.h.
1183
1184 2005-06-29  Hrvoje Niksic  <hniksic@xemacs.org>
1185
1186         * utils.c (random_number): Use lrand48 if available.
1187         (random_float): Use drand48 if available.
1188
1189 2005-06-29  Hrvoje Niksic  <hniksic@xemacs.org>
1190
1191         * main.c (secs_to_human_time): Use print_decimal when printing
1192         total download time in seconds.
1193
1194         * progress.c (print_row_stats): Use it to print total download
1195         time at the end of the download.
1196         (create_image): Ditto.
1197
1198         * utils.c (print_decimal): New function; print small decimal
1199         numbers with more precision than large ones.
1200
1201         * progress.c (print_row_stats): New function.  Print ETA after the
1202         download rate at the end of each row.
1203
1204 2005-06-28  Hrvoje Niksic  <hniksic@xemacs.org>
1205
1206         * init.c (parse_line): Check for alphanumerics.
1207
1208 2005-06-28  Hrvoje Niksic  <hniksic@xemacs.org>
1209
1210         * (dot_create): Remove unnecessary casts.
1211
1212 2005-06-28  Hrvoje Niksic  <hniksic@xemacs.org>
1213
1214         * ftp.c (getftp): Delete trailing newlines from LIST output so
1215         lines don't come out with trailing \015\012 with -S.
1216
1217 2005-06-27  Hrvoje Niksic  <hniksic@xemacs.org>
1218
1219         * mswindows.h: Remove superfluous includes.
1220
1221 2005-06-27  Hrvoje Niksic  <hniksic@xemacs.org>
1222
1223         * config-post.h (alloca): Amend alloca declaration to take care of
1224         all Win32 compilers, not just MSVC and MinGW.
1225
1226 2005-06-27  Hrvoje Niksic  <hniksic@xemacs.org>
1227
1228         * utils.c (get_grouping_data): Force separator to "." rather than
1229         " " when "," is taken.
1230
1231 2005-06-27  Hrvoje Niksic  <hniksic@xemacs.org>
1232
1233         * wget.h (PTR_FORMAT): Cast the result of sizeof to int before
1234         passing it to printf's %*.
1235
1236         * retr.h: Declare output_stream and output_stream_regular.
1237
1238         * ftp.h: Declare ftp_last_respline.
1239
1240         * convert.h: Declare dl_url_file_map.
1241
1242         * http.h: New file.
1243
1244 2005-06-27  Hrvoje Niksic  <hniksic@xemacs.org>
1245
1246         * cookies.c: Make cookies_now static.
1247
1248 2005-06-27  Hrvoje Niksic  <hniksic@xemacs.org>
1249
1250         * utils.c (human_readable): Remove intermediary cast to long; MSVC
1251         has problems casting *unsigned* __int64 to double.
1252
1253 2005-06-27  Hrvoje Niksic  <hniksic@xemacs.org>
1254
1255         * sysdep.h: Use the system-provided fnmatch by default.
1256
1257 2005-06-27  Hrvoje Niksic  <hniksic@xemacs.org>
1258
1259         * http.c (mktime_from_utc): Renamed to timegm and moved to cmpt.c.
1260         Don't compile it if GNU timegm is available.
1261         (http_atotm): Use timegm.
1262
1263 2005-06-27  Hrvoje Niksic  <hniksic@xemacs.org>
1264
1265         * http.c (http_atotm): Correctly query the old locale value.
1266
1267 2005-06-27  Hrvoje Niksic  <hniksic@xemacs.org>
1268
1269         * config-post.h (alloca): Don't #define alloca under MinGW32,
1270         which defines it in malloc.h, included from mswindows.h.
1271
1272 2005-06-27  Hrvoje Niksic  <hniksic@xemacs.org>
1273
1274         * utils.c (get_grouping_data): Force the use of separators in C
1275         locale.
1276
1277 2005-06-27  Hrvoje Niksic  <hniksic@xemacs.org>
1278
1279         * main.c (i18n_initialize): Set all locale categories.
1280
1281         * http.c (http_atotm): Temporarily set locale to "C".
1282
1283 2005-06-27  Hrvoje Niksic  <hniksic@xemacs.org>
1284
1285         * http.c (gethttp): Improve "POST data file missing" error
1286         message.
1287
1288 2005-06-27  Hrvoje Niksic  <hniksic@xemacs.org>
1289
1290         * progress.c (set_progress_implementation): Type COLON as const
1291         char *.
1292
1293 2005-06-27  Hrvoje Niksic  <hniksic@xemacs.org>
1294
1295         * utils.c (with_thousand_seps): Handle negative numbers.
1296
1297 2005-06-26  Hrvoje Niksic  <hniksic@xemacs.org>
1298
1299         * progress.c (create_image): Mark the "eta" string for translation.
1300
1301 2005-06-26  Hrvoje Niksic  <hniksic@xemacs.org>
1302
1303         * html-url.c (get_urls_file): Don't explicitly set entry->next to
1304         NULL since entry is already zeroed out.
1305
1306 2005-06-26  Gisle Vanem  <giva@bgnett.no>
1307
1308         * mswindows.h: Define gai_strerror under MinGW.
1309
1310 2005-06-26  Hrvoje Niksic  <hniksic@xemacs.org>
1311
1312         * utils.c (with_thousand_seps): Correctly implement thousand seps
1313         consisting of more than one character.
1314
1315 2005-06-26  Hrvoje Niksic  <hniksic@xemacs.org>
1316
1317         * main.c (secs_to_human_time): Ditto.
1318
1319         * progress.c (create_image): Print more exact duration of very
1320         short downloads.
1321
1322         * main.c (secs_to_human_time): Don't translate time suffixes "h",
1323         "m", and "s", which are not strictly SI, but are "accepted for use
1324         with SI".
1325         (secs_to_human_time): Print really small intervals as 0s, not
1326         0.00s.
1327
1328 2005-06-26  Hrvoje Niksic  <hniksic@xemacs.org>
1329
1330         * config-post.h: Replace the alloca declaration with the one from
1331         the latest Autoconf manual.  This should remove a warning with GCC
1332         on AIX.
1333
1334 2005-06-26  Hrvoje Niksic  <hniksic@xemacs.org>
1335
1336         * ftp.c (getftp): Always invoke SIZE, not only when continuing a
1337         download.
1338
1339         * main.c (main): Ditto here.
1340
1341         * progress.c (create_image): When the download is finished, print
1342         how long it took.
1343
1344 2005-06-26  Hrvoje Niksic  <hniksic@xemacs.org>
1345
1346         * main.c (main): Print the downloaded and quota amounts with the
1347         "human_readable" function.
1348
1349         * ftp.c (print_length): Ditto.
1350
1351         * http.c (gethttp): Don't display thousand separators.
1352
1353         * utils.c (with_thousand_seps): Rewritten to respect locale
1354         settings and to be type size agnostic.
1355
1356 2005-06-25  Hrvoje Niksic  <hniksic@xemacs.org>
1357
1358         * utils.c (human_readable): Divide with 1024 instead of shifting
1359         so the operation can work with non-integer N.
1360
1361 2005-06-25  Hrvoje Niksic  <hniksic@xemacs.org>
1362
1363         * progress.c (eta_to_human): New logic for more human-readable
1364         ETA.
1365
1366 2005-06-25  Hrvoje Niksic  <hniksic@xemacs.org>
1367
1368         * utils.c (with_thousand_seps_sum): Decrease buffer size so it
1369         cannot overrun add_thousand_seps's buffer.
1370
1371 2005-06-25  Hrvoje Niksic  <hniksic@xemacs.org>
1372
1373         * utils.c (SPRINTF_WGINT): The correct format is %I64d, not just
1374         %I64.
1375
1376 2005-06-25  Hrvoje Niksic  <hniksic@xemacs.org>
1377
1378         * http.c (http_loop): Don't warn about wildcards in HTTP URLs if
1379         globbing isn't requested in the first place.
1380
1381         * retr.c (retrieve_url): Temporarily turn off globbing when
1382         processing HTTP->FTP redirects.
1383
1384 2005-06-25  Hrvoje Niksic  <hniksic@xemacs.org>
1385
1386         * utils.c (with_thousand_seps_sum): Now defined only if
1387         SUM_SIZE_INT is double.
1388
1389         * wget.h (SUM_SIZE_INT): Instead of bothering with long, long
1390         long, __int64, and friends, simply either use wgint or double, end
1391         of story.  Since we know how to print either, we no longer need
1392         LARGE_INT_FMT.
1393
1394         * sysdeps.h (LARGE_INT): Renamed to SUM_SIZE_INT to better reflect
1395         its intent, and moved to wget.h.
1396
1397 2005-06-25  Hrvoje Niksic  <hniksic@xemacs.org>
1398
1399         * Makefile.in: No need to clean .libs.
1400
1401 2005-06-25  Hrvoje Niksic  <hniksic@xemacs.org>
1402
1403         * cookies.c (parse_set_cookies): Cast pointer subtraction to int
1404         before using it with %d; AIX compiler warns on this.
1405         Reported by Jens Schleusener.
1406
1407 2005-06-24  Hrvoje Niksic  <hniksic@xemacs.org>
1408
1409         * http.c (gethttp): Don't prepend / here.
1410
1411         * cookies.c (cookie_handle_set_cookie): Prepend / to PATH.
1412         (cookie_header): Ditto.
1413
1414 2005-06-24  Hrvoje Niksic  <hniksic@xemacs.org>
1415
1416         * init.c: opt.verbose must be declared as int.
1417
1418 2005-06-23  Hrvoje Niksic  <hniksic@xemacs.org>
1419
1420         * cmpt.c (strpbrk): Removed.
1421         (mktime): Removed.
1422         Include <time.h>.
1423
1424 2005-06-23  Hrvoje Niksic  <hniksic@xemacs.org>
1425
1426         * utils.c (read_file): Ditto.
1427
1428         * main.c (main): Use struct_fstat.
1429
1430         * mswindows.h (struct_fstat): Define a struct_fstat to deal with
1431         the fact that Borland 5.5 has 64-bit stat, but not 64-bit fstat!
1432
1433 2005-06-23  Hrvoje Niksic  <hniksic@xemacs.org>
1434
1435         * sysdep.h: Remove code that deals with Watcom.
1436
1437 2005-06-22  Hrvoje Niksic  <hniksic@xemacs.org>
1438
1439         * all: Use bool instead of int and false/true instead of 0/non-0
1440         for boolean variables and values.
1441
1442 2005-06-22  Hrvoje Niksic  <hniksic@xemacs.org>
1443
1444         * sysdep.h: Include the stdbool.h/_Bool/bool blurb from Autoconf.
1445
1446 2005-06-22  Hrvoje Niksic  <hniksic@xemacs.org>
1447
1448         * init.c (cmd_lockable_boolean): Removed.
1449
1450 2005-06-22  Hrvoje Niksic  <hniksic@xemacs.org>
1451
1452         * cookies.c (struct cookie): Use 1-bit bitfields for booleans
1453         which makes the structure takes less space at no cost in
1454         complexity.
1455
1456 2005-06-22  Hrvoje Niksic  <hniksic@xemacs.org>
1457
1458         * Makefile.in ($(OBJ)): Add the config.h dependency.
1459
1460 2005-06-22  Hrvoje Niksic  <hniksic@xemacs.org>
1461
1462         * openssl.c, connect.c, host.c: Replace instances of #ifdef
1463         ENABLE_DEBUG if (opt.debug) {...} #endif with IF_DEBUG {...}.
1464
1465         * main.c: Rename the IF_DEBUG defined here to WHEN_DEBUG.
1466
1467         * wget.h (IF_DEBUG): New macro.
1468         (DEBUGP): Define in terms of IF_DEBUG.
1469
1470 2005-06-22  Hrvoje Niksic  <hniksic@xemacs.org>
1471
1472         * http.c (gethttp): Only handle --set-cookies (and assert that
1473         cookie jar exists) if opt.cookies is true.  Failure to do so
1474         triggered the assert when --no-cookies was used and the server
1475         sent a Set-Cookie header.  Ouch!
1476
1477 2005-06-22  Hrvoje Niksic  <hniksic@xemacs.org>
1478
1479         * connect.c (select_fd): Expect select() to exist.
1480
1481         * utils.c (xsleep): Always use select() as sleep fallback on
1482         non-Windows platforms.
1483
1484         * ptimer.c: Delete the implementation of PTIMER_TIME.
1485
1486         * main.c: Assume existence of signal(), test for different signal
1487         names instead.
1488
1489         * cmpt.c: Better document reasons why certain functions are
1490         included.
1491
1492 2005-06-22  Hrvoje Niksic  <hniksic@xemacs.org>
1493
1494         * Makefile.in: Remove the manually maintained dependency list;
1495         make all object files depend on every header.
1496
1497 2005-06-20  Hrvoje Niksic  <hniksic@xemacs.org>
1498
1499         * hash.c: Rename "mapping" to "cell" to avoid confusion with the
1500         term "mapping" (or "map") sometimes being used for the entire hash
1501         table.  Also rename "non-empty" to "occupied" for easier reading
1502         of if (!NON_EMPTY (...)) ... .
1503
1504 2005-06-20  Hrvoje Niksic  <hniksic@xemacs.org>
1505
1506         * main.c, ptimer.c, sysdep.h, utils.c: Use #elif to simplify reading of
1507         chained if-else-else-else-... statements.
1508
1509 2005-06-20  Hrvoje Niksic  <hniksic@xemacs.org>
1510
1511         * all: Return type of signal handlers is `void'.  Include signal.h
1512         unconditionally.
1513
1514         * all: Don't explicitly cast values returned by malloc.  We no
1515         longer support ancient compilers that don't declare malloc, and we
1516         never supported C++ builds.
1517
1518 2005-06-19  Hrvoje Niksic  <hniksic@xemacs.org>
1519
1520         * all: Don't declare errno.  Include both time.h and sys/time.h,
1521         as long as sys/time.h exists.  Don't dereference function pointers
1522         when invoking the functions they point to.
1523
1524         * cmpt.c (memmove): Remove function mandated by C89.
1525         (strerror): Ditto.
1526         (strstr): Ditto.
1527
1528         * all: Undo the K&R-ization changes from 2005-05-03.
1529
1530         * all: Remove support for K&R compilers: use C89 function
1531         declarations, remove definition of PARAMS, remove support for
1532         varargs, and remove ansi2knr.  Assume the presence of time.h,
1533         string.h, and other headers mandated by C89.
1534
1535 2005-06-19  Hrvoje Niksic  <hniksic@xemacs.org>
1536
1537         * init.c (cmd_lockable_boolean): Don't recognize literal "2" and
1538         "-1" values; unlike 0 and 1, those should never be exposed to the
1539         user.  Update the error message to be more self-consistent, as
1540         proposed by Benno Schulenberg.
1541
1542 2005-06-18  Hrvoje Niksic  <hniksic@xemacs.org>
1543
1544         * http.c (gethttp): Don't free "head" before using it to save
1545         headers.
1546
1547 2005-06-18  Hrvoje Niksic  <hniksic@xemacs.org>
1548
1549         * http.c (gethttp): When -E is in use, check for file existence
1550         after appending ".html" to the name and modify the file name if
1551         necessary.
1552
1553 2005-06-17  Hrvoje Niksic  <hniksic@xemacs.org>
1554
1555         * connect.c (socket_has_inet6): Removed.
1556
1557         * host.c (lookup_host): Don't use the AI_ADDRCONFIG getaddrinfo
1558         hint.
1559
1560 2005-06-16  Hrvoje Niksic  <hniksic@xemacs.org>
1561
1562         * init.c (cmd_lockable_boolean): Improve the error message so it
1563         lists the more useful values first.
1564
1565 2005-06-15  Hrvoje Niksic  <hniksic@xemacs.org>
1566
1567         * http.c (gethttp): Also report the system error when the POST
1568         data file is missing.
1569
1570 2005-06-15  Benno Schulenberg  <benno@nietvergeten.nl>
1571
1572         * ftp.c, http.c, connect.c, cookies.c, html-url.c, init.c, res.c:
1573         Gettext-ize messages that were previously missed.
1574
1575 2005-06-15  Hrvoje Niksic  <hniksic@xemacs.org>
1576
1577         * host.h (ip_address): Remove the trailing comma from the type
1578         enum in the no-IPv6 case.
1579
1580         * main.c (struct cmdline_option): Remove the trailing comma from
1581         the enum.
1582
1583         Reported by Jens Schleusener.
1584
1585 2005-05-30  Hrvoje Niksic  <hniksic@xemacs.org>
1586
1587         * url.c (strpbrk_or_eos): Check for a recent GCC version before
1588         using the statement-as-expression extension.
1589
1590 2005-05-30  Hrvoje Niksic  <hniksic@xemacs.org>
1591
1592         * http.c (gethttp): Don't attempt to "skip short body" if we're
1593         issuing a HEAD request (in which case the response head is not
1594         followed by a body).
1595
1596 2005-05-30  Hrvoje Niksic  <hniksic@xemacs.org>
1597
1598         * init.c (cmd_spec_header): Don't split the string along the
1599         commas using cmd_vector; just append the new value using
1600         vec_append instead.
1601
1602         * utils.c (vec_append): New function.
1603
1604 2005-05-27  Andreas Beckmann  <debian@abeckmann.de>
1605
1606         * html-url.c (tag_handle_link): Mark the content from the <link
1607         src="..."> tag as expecting HTML.
1608
1609 2005-05-24  Hrvoje Niksic  <hniksic@xemacs.org>
1610
1611         * http.c (http_atotm): Document the origin of the "cookie date"
1612         format.
1613
1614 2005-05-21  Hrvoje Niksic  <hniksic@xemacs.org>
1615
1616         * init.c (setval_internal): Report exact command name alongside
1617         the "display name".
1618
1619 2005-05-18  Hrvoje Niksic  <hniksic@xemacs.org>
1620
1621         * cookies.c (update_cookie_field): Explicitly cast -1 to time_t to
1622         cope with systems where time_t is unsigned.
1623
1624         * cookies.c: Remove unnecessary casts to time_t from values
1625         already of that type.
1626
1627 2005-05-17  Hrvoje Niksic  <hniksic@xemacs.org>
1628
1629         * ftp.c (ftp_loop_internal): Same here.
1630
1631         * http.c (http_loop): Don't clobber the file when -c is specified
1632         and the first attempt to retrieve the file fails.
1633
1634 2005-05-16  Hrvoje Niksic  <hniksic@xemacs.org>
1635
1636         * openssl.c (ssl_check_certificate): Print all issues with a
1637         certificate.
1638
1639 2005-05-16  Hrvoje Niksic  <hniksic@xemacs.org>
1640
1641         * ftp-basic.c: Don't xfree() the line returned by ftp_response if
1642         the returned code is not FTPOK.
1643
1644 2005-05-16  Hrvoje Niksic  <hniksic@xemacs.org>
1645
1646         * init.c (cleanup): Don't free the non-existent opt.ftp_acc.  Free
1647         the SSL-related stuff.
1648
1649 2005-05-16  Hrvoje Niksic  <hniksic@xemacs.org>
1650
1651         * ftp.c (print_length): Consistently print \n at end of the
1652         "Length" line.
1653
1654 2005-05-14  Hrvoje Niksic  <hniksic@xemacs.org>
1655
1656         * openssl.c (ssl_connect): Announce the beginning and the end of
1657         the SSL handshake when in debug mode.
1658
1659         * wget.h (PTR_FORMAT): New macro for easier printing of pointer
1660         values.  Use %0*lx along with PTR_FORMAT instead of %p.
1661
1662 2005-05-14  Hrvoje Niksic  <hniksic@xemacs.org>
1663
1664         * http.c (gethttp): Would forget to close the connection when
1665         keep_alive was not used.
1666
1667 2005-05-13  Hrvoje Niksic  <hniksic@xemacs.org>
1668
1669         * openssl.c (pattern_match): Document the code that decides
1670         whether "*" matches ".".
1671
1672 2005-05-12  Hrvoje Niksic  <hniksic@xemacs.org>
1673
1674         * ftp-ls.c (ftp_index): Use %d to print the port number, which is
1675         now int.
1676         From Steven M. Schweda's VMS patches.
1677
1678 2005-05-12  Hrvoje Niksic  <hniksic@xemacs.org>
1679
1680         * url.c (rewrite_shorthand_url): Don't rewrite "https://host" to
1681         "ftp://https//host" when SSL is not used.
1682
1683 2005-05-11  Hrvoje Niksic  <hniksic@xemacs.org>
1684
1685         * openssl.c (ssl_check_server_identity): Renamed to
1686         ssl_check_certificate because it does more than just checking the
1687         server's identity.
1688         (ssl_check_certificate): Tell the user about
1689         --no-check-certificate.
1690
1691 2005-05-11  Hrvoje Niksic  <hniksic@xemacs.org>
1692
1693         * openssl.c (ssl_init): Always use SSL_VERIFY_NONE, so that the
1694         handshake finishes even if the certificate is invalid.  That way
1695         ssl_check_server_identity can provide better diagnostics on why
1696         the verification failed.
1697
1698 2005-05-11  Hrvoje Niksic  <hniksic@xemacs.org>
1699
1700         * openssl.c (pattern_match): New function.
1701         (ssl_check_server_identity): Treat peer certificate common name as
1702         wildcard.
1703
1704 2005-05-10  Hrvoje Niksic  <hniksic@xemacs.org>
1705
1706         * openssl.c (ssl_check_server_identity): Print certificate subject
1707         and issuer.
1708
1709 2005-05-10  Hrvoje Niksic  <hniksic@xemacs.org>
1710
1711         * res.c (res_register_specs): Correctly pass pointers to
1712         hash_table_get_pair.
1713
1714 2005-05-10  Hrvoje Niksic  <hniksic@xemacs.org>
1715
1716         * http.c (gethttp): Call ssl_check_server_identity.
1717
1718         * openssl.c (ssl_check_server_identity): New function, verifies
1719         that the host name in the certificate matches the actual host
1720         name.
1721         (verify_cert_callback): Removed, since it didn't do anything
1722         except returning the preverify_ok argument.
1723
1724         * connect.c (fd_transport_context): Allow retrieval of the context
1725         pointer registered with fd_register_transport.
1726
1727 2005-05-09  Hrvoje Niksic  <hniksic@xemacs.org>
1728
1729         * openssl.c (verify_cert_callback): Renamed from verify_callback.
1730         Always return the received "ok" value.  Print the X509 name in
1731         debug mode.
1732         (ssl_init): Enable partial writes in SSL context.
1733
1734 2005-05-08  Hrvoje Niksic  <hniksic@xemacs.org>
1735
1736         * http.c (http_loop): Check for wildcards in the URL path
1737         component, not in the whole URL.
1738
1739         * ftp.c (ftp_loop): Check for wildcards in URL path before
1740         unescaping, so the users can escape globbing metacharacters with %
1741         escapes.
1742
1743 2005-05-08  Hrvoje Niksic  <hniksic@xemacs.org>
1744
1745         * init.c (run_command): Correctly interpret the return value of
1746         parse_line.
1747         (commands): Re-alphabetize.
1748
1749 2005-05-08  Hrvoje Niksic  <hniksic@xemacs.org>
1750
1751         * netrc.c (parse_netrc): Explicitly check for assignment != NULL
1752         to silence warning from Borland C.
1753
1754         * url.c (sync_path): Don't unnecessarily increment p.
1755         (url_parse): Don't unnecessarily set url_encode to NULL just
1756         prior to return from the function.
1757
1758 2005-05-08  Hrvoje Niksic  <hniksic@xemacs.org>
1759
1760         * log.c (escnonprint_internal): Place variable declarations
1761         before other statements.
1762
1763 2005-05-08  Hrvoje Niksic  <hniksic@xemacs.org>
1764
1765         * html-url.c: Include recur.h.
1766
1767         * http.c (request_new): Define as accepting no args.
1768
1769 2005-05-07  Hrvoje Niksic  <hniksic@xemacs.org>
1770
1771         * url.c (strpbrk_or_eos): Made inline.  Use strchr(s, '\0') for
1772         finding the NUL char position.
1773
1774 2005-05-07  Hrvoje Niksic  <hniksic@xemacs.org>
1775
1776         * url.c (decide_copy_method): Renamed to char_needs_escaping.
1777         Since it now returns only two possible values, change it to return
1778         boolean (int).
1779
1780 2005-05-07  Hrvoje Niksic  <hniksic@xemacs.org>
1781
1782         * ftp-basic.c (ftp_request): Prevent newlines in VALUE causing
1783         inadvertent sending of multiple FTP commands.
1784
1785 2005-05-07  Hrvoje Niksic  <hniksic@xemacs.org>
1786
1787         * url.c (decide_copy_method): Never cause reencode_escapes to
1788         decode % escapes; it is too intrusive and breaks some servers.
1789
1790 2005-05-07  Hrvoje Niksic  <hniksic@xemacs.org>
1791
1792         * http.c (gethttp): When tunnelling SSL traffic over proxy with
1793         CONNECT, we're really talking to the remote server directly.
1794         Because of this, the request-line argument must be the URL path
1795         rather than the whole URL, as it would be when using regular
1796         proxies.
1797         Reported by Charles Lane.
1798
1799 2005-05-06  Hrvoje Niksic  <hniksic@xemacs.org>
1800
1801         * init.c (cmd_spec_useragent): Allow empty User-Agent.
1802
1803         * http.c (gethttp): Don't print "unknown authentication scheme"
1804         for failed Basic authentication.
1805         (SET_USER_AGENT): Don't set user-agent if opt.useragent is empty.
1806         (gethttp): Use alloca for allocation of www_authenticate.
1807
1808 2005-05-06  Hrvoje Niksic  <hniksic@xemacs.org>
1809
1810         * main.c (print_help): Fix wording of --secure-protocol help text.
1811
1812 2005-05-06  Hrvoje Niksic  <hniksic@xemacs.org>
1813
1814         * cmpt.c (strstr): Updated from glibc 2.3.5.
1815
1816 2005-05-05  Hrvoje Niksic  <hniksic@xemacs.org>
1817
1818         * http.c (http_atotm): Zero out the whole struct tm being passed
1819         to strptime.
1820
1821 2005-05-05  Hrvoje Niksic  <hniksic@xemacs.org>
1822
1823         * main.c (main): Propagate option name to setoptval.
1824
1825         * init.c (setoptval): Accept another argument, OPTNAME.  Propagate
1826         that argument as the option name independently of the actual
1827         command, determined by command_by_name(com).
1828
1829 2005-05-05  Hrvoje Niksic  <hniksic@xemacs.org>
1830
1831         * init.c (parse_line): Make the return value indicate whether
1832         there was a syntax error or a setter failed.
1833         (run_wgetrc): Return an indication on whether an error has been
1834         encountered.
1835         (initialize): Abort if there have been errors running either
1836         .wgetrc file.
1837
1838 2005-05-05  Hrvoje Niksic  <hniksic@xemacs.org>
1839
1840         * log.c (copy_and_escape): Slightly reduce code repetition between
1841         the two loops.
1842
1843 2005-05-05  Charles C.Fu  <ccwf@bacchus.com>
1844
1845         * utils.c (proclist): Strip leading slash when calling fnmatch
1846         too, otherwise wildcard comparisons always fail.
1847
1848 2005-05-05  Hrvoje Niksic  <hniksic@xemacs.org>
1849
1850         * utils.c (touch): Set access time to current time.
1851
1852 2005-05-05  Hrvoje Niksic  <hniksic@xemacs.org>
1853
1854         * url.c (url_unescape): Don't unescape %00, it effectively
1855         truncates the string.
1856
1857 2005-05-05  Hrvoje Niksic  <hniksic@xemacs.org>
1858
1859         * log.c (copy_and_escape): Replace the FOR_URI argument with a
1860         slightly more general mechanism for specifying different kinds of
1861         escape.
1862
1863 2005-05-05  Hrvoje Niksic  <hniksic@xemacs.org>
1864
1865         * ftp-basic.c (ftp_response): Fix printing FTP server response.
1866
1867 2005-05-05  Hrvoje Niksic  <hniksic@xemacs.org>
1868
1869         * retr.c (limit_bandwidth_reset): Reset sleep_adjust.
1870         (limit_bandwidth): Don't allow huge "adjustment" values that
1871         result from being suspended for a while.
1872
1873 2005-05-04  Hrvoje Niksic  <hniksic@xemacs.org>
1874
1875         * wget.h: If gettext was found but libtintl.h wasn't, declare
1876         gettext's return type to avoid type mismatches.
1877
1878 2005-05-03  Hrvoje Niksic  <hniksic@xemacs.org>
1879
1880         * url.c (url_parse): Rename label `error' to avoid conflict with
1881         identifier.
1882
1883         * retr.c (fd_read_body): Rename label `out' to avoid conflict with
1884         identifier.
1885         (fd_read_hunk): Use explicit double constant.
1886         (retrieve_from_file): Don't use string concatenation.
1887         (sleep_between_retrievals): Make sure xsleep is called with a
1888         `double' argument.
1889         (no_proxy_match): Define as static, like it is declared.
1890
1891         * progress.c (bar_create): Use 0.0 instead of 0 because K&R
1892         compilers can't automatically promote it.
1893
1894         * http-ntlm.c (ntlm_output): Replace \xHH sequences with \OOO for
1895         the sake of old compilers.
1896
1897         * ftp.c (ftp_loop_internal): Don't use string concatenation.
1898
1899         * http.c (request_send): Use explicit double constants when
1900         calling fd_read and fd_write.
1901         (post_file): Ditto.
1902         (gethttp): Ditto.
1903         (skip_short_body): Ditto.
1904
1905         * ftp-basic.c: When calling fd_write, specify the last argument as
1906         a `double' constant for the sake of K&R compilers which don't see
1907         the prototype and therefore can't promote it to double
1908         automatically.
1909
1910         * cookies.c (cookie_jar_load): Rename abort label to abort_cookie
1911         to avoid name conflict in K&R compilers.
1912
1913 2005-04-29  Hrvoje Niksic  <hniksic@xemacs.org>
1914
1915         * ptimer.c (posix_init): Since we allow _POSIX_MONOTONIC_CLOCK==0,
1916         it is not enough to check for _POSIX_MONOTONIC_CLOCK-0, we must
1917         also check for defined(_POSIX_MONOTONIC_CLOCK).
1918
1919 2005-04-28  Hrvoje Niksic  <hniksic@xemacs.org>
1920
1921         * ftp.c, hash.c, connect.c, host.c, http.c: Remove unreached code,
1922         such as "break" following return or abort.
1923
1924 2005-04-28  Hrvoje Niksic  <hniksic@xemacs.org>
1925
1926         * init.c (commands): Wrap the use of opt.random_file in #ifdef
1927         HAVE_SSL.
1928
1929 2005-04-28  Hrvoje Niksic  <hniksic@xemacs.org>
1930
1931         * http.c (gethttp): Correctly set the user agent.
1932
1933 2005-04-27  Hrvoje Niksic  <hniksic@xemacs.org>
1934
1935         * init.c (cmd_spec_useragent): Free the old value of
1936         opt.useragent before setting the new one.
1937
1938 2005-04-27  Mauro Tortonesi  <mauro@ferrara.linux.it>
1939
1940         * main.c: Map --ftp-password, --http-password and --proxy-password to
1941         the new ftppassword, httppassword and proxypassword commands
1942         respectively.  Document the --user and --password options in the help
1943         string.
1944         
1945 2005-04-27  Mauro Tortonesi  <mauro@ferrara.linux.it>
1946
1947         * ftp.c: Add support for --user and --password.
1948         
1949         * http.c: Add support for --user and --password.
1950         
1951         * init.c: Deprecated ftppasswd, httppasswd, login, passwd and
1952         proxypasswd commands.  Added ftppassword, ftpuser, httppassword,
1953         password, proxypassword and user commands.
1954
1955         * main.c: Renamed --ftp-passwd to --ftp-password.  Added --ftp-user,
1956         --http-password, --password, --proxy-password and --user.  Deprecated
1957         --http-passwd and --proxy-passwd.  Added documentation for new options
1958         and removed documentation for deprecated options in the help string.
1959         
1960         * options.h (struct options): Added user and passwd members to handle
1961         --user and --password respectively.  Renamed ftp_acc and ftp_pass
1962         members to ftp_user and ftp_passwd for consistency.
1963
1964 2005-04-27  Hrvoje Niksic  <hniksic@xemacs.org>
1965
1966         * main.c (print_help): Advertise "DER", not "ASN1".
1967
1968 2005-04-27  Hrvoje Niksic  <hniksic@xemacs.org>
1969
1970         * openssl.c (init_prng): Disable the weak random seed by default.
1971
1972         * http.c (gethttp): Simplify SSL initialization; disable SSL when
1973         anything goes wrong with the initialization.
1974
1975         * options.h (struct options): New option opt.random_file.
1976
1977 2005-04-27  Hrvoje Niksic  <hniksic@xemacs.org>
1978
1979         * init.c: Wrap private key commands in IF_SSL.
1980
1981 2005-04-27  Hrvoje Niksic  <hniksic@xemacs.org>
1982
1983         * openssl.c (ssl_init): Ditto.
1984
1985         * options.h (struct options): Allow separate specification of key
1986         type and certificate type.
1987
1988         * init.c (cmd_spec_cert_type): Provide a "der" synonym for "asn1"
1989         certificate encoding.
1990
1991 2005-04-26  Hrvoje Niksic  <hniksic@xemacs.org>
1992
1993         * openssl.c: Renamed "gen_sslfunc.c" to "openssl.c" and
1994         "gen_sslfunc.h" to "openssl.h".  This reflects the intent of
1995         openssl.c encapsulating the OpenSSL-specific code.
1996
1997 2005-04-26  Hrvoje Niksic  <hniksic@xemacs.org>
1998
1999         * init.c: Renamed "closure" (a synonym for context in some
2000         cultures) to "place", which more accurately reflects the usage.
2001
2002 2005-04-26  Hrvoje Niksic  <hniksic@xemacs.org>
2003
2004         * gen_sslfunc.c (ssl_init): Use default locations for loading the
2005         certificate bundles.
2006         (ssl_init_prng): Disable the cryptographically weak PRNG
2007         initialization fallback.
2008
2009         * init.c: Renamed SSL command-line arguments and wgetrc commands.
2010         (defaults): Check the server certificate by default.
2011
2012 2005-04-26  Hrvoje Niksic  <hniksic@xemacs.org>
2013
2014         * cookies.c (cookie_handle_set_cookie): Delete the part of the
2015         path after the trailing slash.
2016
2017         * http.c (gethttp): Call cookie_handle_set_cookie with path that
2018         begins with '/'.
2019
2020 2005-04-26  Hrvoje Niksic  <hniksic@xemacs.org>
2021
2022         * http.c (gethttp): Call skip_short_body only if keep_alive is in
2023         use.
2024         (gethttp): Send the User-Agent header with the CONNECT request as
2025         well.
2026
2027 2005-04-25  Hrvoje Niksic  <hniksic@xemacs.org>
2028
2029         * main.c (option_data): Removed support for the undocumented flag
2030         --use-proxy.
2031
2032 2005-04-25  Hrvoje Niksic  <hniksic@xemacs.org>
2033
2034         * main.c (option_data): Don't treat -Y as a boolean switch; treat
2035         it as a value switch instead, so "-Y off" continues to work.
2036
2037 2005-04-24  Hrvoje Niksic  <hniksic@xemacs.org>
2038
2039         * utils.c (aprintf): Delete unreachable statement.
2040
2041 2005-04-24  Hrvoje Niksic  <hniksic@xemacs.org>
2042
2043         * host.c (cmp_prefer_ipv4): New function.
2044         (cmp_prefer_ipv6): New function.
2045         (lookup_host): Use the appropriate comparator according to
2046         opt.prefer_family.
2047
2048         * init.c: New option prefer_family.
2049
2050         * host.c (is_valid_ipv6_address): Spell NS_* constants in lower
2051         case to avoid clash with system headers.
2052         (lookup_host): Reorder the addresses so that IPv4 ones come first.
2053
2054         * utils.c (stable_sort): New function.
2055
2056 2005-04-24  Hrvoje Niksic  <hniksic@xemacs.org>
2057
2058         * connect.c (retryable_socket_connect_error): Return 0 for
2059         ENETUNREACH and EHOSTUNREACH.
2060
2061 2005-04-23  Hrvoje Niksic  <hniksic@xemacs.org>
2062
2063         * cmpt.c: Reenable the memmove implementation for systems that
2064         lack it.
2065
2066         * http.c (gethttp): Store the "authorized" state of the persistent
2067         connection.
2068         (request_remove_header): New function.
2069         (gethttp): Don't send the "Basic" authentication if the connection
2070         is already authorized.
2071
2072 2005-04-23  Hrvoje Niksic  <hniksic@xemacs.org>
2073
2074         * utils.c (base64_encode): Treat input as unsigned chars.
2075         Required for correct encoding of binary stuff.
2076
2077 2005-04-23  Hrvoje Niksic  <hniksic@xemacs.org>
2078
2079         * http-ntlm.c: Format the function definitions in an
2080         ansi2knr-friendly fashion.
2081
2082 2005-04-22  Hrvoje Niksic  <hniksic@xemacs.org>
2083
2084         * http.c (gethttp): Handle multiple WWW-Authentication headers,
2085         only one of which is recognized.  Those are sent by IIS with NTLM
2086         authorization.
2087         (create_authorization_line): Propagate information whether
2088         authorization is finished.
2089         (gethttp): Only stop authorization when it's really finished, not
2090         after fixed two steps.
2091
2092 2005-04-21  Hrvoje Niksic  <hniksic@xemacs.org>
2093
2094         * gen_sslfunc.c (ssl_init): Fix warning message text; mark the
2095         message as translatable.
2096
2097 2005-04-21  Hrvoje Niksic  <hniksic@xemacs.org>
2098
2099         * main.c (print_help): Print the EGD option outside the cluster of
2100         SSL options.
2101
2102 2005-04-21  Hrvoje Niksic  <hniksic@xemacs.org>
2103
2104         * http-ntlm.c (ntlm_output): Fix setting the domain.
2105         Suggested by Sami Krank.
2106
2107 2005-04-20  Mauro Tortonesi  <mauro@ferrara.linux.it>
2108
2109         * connect.c: Set IPV6_V6ONLY socket option when -6 switch is used.
2110
2111 2005-04-20  FUJISHIMA Satsuki  <sf@FreeBSD.org>
2112
2113         * http.c (request_set_header): Fix the check whether a new header
2114         needs to be allocated.
2115
2116 2005-04-18  Hrvoje Niksic  <hniksic@xemacs.org>
2117
2118         * utils.c (base64_encode): Use the parameter order that makes more
2119         sense.  Return the length of the base64 written.  Updated all
2120         callers.
2121
2122 2005-04-17  Hrvoje Niksic  <hniksic@xemacs.org>
2123
2124         * http.c (request_set_header): Free NAME when VALUE is NULL and
2125         freeing the header name is requested.
2126
2127 2005-04-17  Hrvoje Niksic  <hniksic@xemacs.org>
2128
2129         * snprintf.c (fmtstr): Declare VALUE as const char *.
2130         Based on patch by Russ Allbery.
2131
2132 2005-04-17  Hrvoje Niksic  <hniksic@xemacs.org>
2133
2134         * snprintf.c (fmtfp): More correct handling of significant digit
2135         count with %g -- 0.002 has one significant digit, not three.
2136
2137 2005-04-16  Hrvoje Niksic  <hniksic@xemacs.org>
2138
2139         * retr.c (fd_read_body): Respect read timeout with non-interactive
2140         or no progress gauge -- treat ETIMEDOUT specially only when
2141         progress_interactive.
2142         Reported by FUJISHIMA Satsuki.
2143
2144 2005-04-16  FUJISHIMA Satsuki  <sf@FreeBSD.org>
2145
2146         * http.c (gethttp): Don't use HTTP/1.0 persistent connections over
2147         proxy.
2148
2149 2005-04-16  Hrvoje Niksic  <hniksic@xemacs.org>
2150
2151         * snprintf.c: Use the PARAMS macro to handle prototypes.  Write
2152         function definitions in the ansi2knr-friendly way.
2153         (fmtstr): If string precision is specified, don't read VALUE past
2154         it.
2155         (dopr): Actually print %g and %e formats.
2156         (fmtfp): Fix a bug that caused 0.01 to be printed as 0.1.
2157         (fmtfp): Use LLONG in floating point conversions to be able to
2158         convert more digits.
2159         (fmtfp): Interpret precision as number of significant digits with
2160         %g.
2161         (fmtfp): Omit trailing decimal zeros with %g.
2162
2163         * snprintf.c: Don't include <ctype.h> because none of it is used.
2164         Include strings.h/string.h, as per Autoconf.
2165
2166 2005-04-15  Hrvoje Niksic  <hniksic@xemacs.org>
2167
2168         * ptimer.c: Use _POSIX_TIMERS - 0 > 0, which handles the case when
2169         _POSIX_TIMERS is defined but empty, as well as the case when it is
2170         undefined.  Do the same with the check for _POSIX_MONOTONIC_CLOCK.
2171         Suggested by Larry Jones.
2172
2173 2005-04-15  Hrvoje Niksic  <hniksic@xemacs.org>
2174
2175         * ptimer.c: Check that _POSIX_TIMERS is defined as well as > 0.
2176         Problem reported by Steven M. Schweda.
2177
2178 2005-04-14  Hrvoje Niksic  <hniksic@xemacs.org>
2179
2180         * http.c (skip_short_body): Print the skipped body data in debug
2181         mode.
2182         (skip_short_body): Don't skip more than 4k of body data.
2183         (skip_short_body): Return whether the skipping was successful.
2184         (gethttp): If skip_short_body failed, invalidate the connection.
2185
2186 2005-04-12  Gisle Vanem  <giva@bgnett.no>
2187
2188         * ftp.c (getftp): Ditto.
2189
2190         * http.c (gethttp): Open the output file in binary mode.
2191
2192 2005-04-11  Hrvoje Niksic  <hniksic@xemacs.org>
2193
2194         * hash.c: Conditionalize including config.h on HAVE_CONFIG_H
2195         instead of on STANDALONE.
2196
2197 2005-04-11  Hrvoje Niksic  <hniksic@xemacs.org>
2198
2199         * gen_sslfunc.c (ssl_print_errors): Made static.
2200         (ssl_print_errors): Eliminate potentially dangerous fixed-size
2201         error buffer.  Passing NULL to ERR_error_string causes it to use
2202         its own static buffer, which is fine for our purposes.
2203
2204         * gen_sslfunc.c: Include gen_sslfunc.h.  Make the declarations of
2205         ssl_init and ssl_conect match the actual definitions.
2206         (ssl_connect): Simply return a boolean, the SSL context is no
2207         longer useful as a return value.
2208
2209         * retr.c: Don't include SSL headers; we don't need them.
2210
2211 2005-04-11  Hrvoje Niksic  <hniksic@xemacs.org>
2212
2213         * config-post.h: Don't define _VA_LIST under Solaris; it breaks
2214         compilation with GCC 3.4 under Solaris 10.  (It was defined to
2215         avoid a warning with previous versions of GCC.)
2216
2217 2005-04-11  Hrvoje Niksic  <hniksic@xemacs.org>
2218
2219         * xmalloc.c (register_ptr): Warn the user to increase SZ prior to
2220         aborting.
2221
2222 2005-04-11  Hrvoje Niksic  <hniksic@xemacs.org>
2223
2224         * convert.c (convert_cleanup): Free converted_files.
2225
2226 2005-04-10  Hrvoje Niksic  <hniksic@xemacs.org>
2227
2228         * wget.h (DEBUGP): Use __builtin_expect to give a hint to GCC that
2229         opt.debug is false in the vast majority of cases.
2230
2231 2005-04-10  Hrvoje Niksic  <hniksic@xemacs.org>
2232
2233         * config-post.h: Declare alloca as void *, not char *.
2234
2235 2005-04-09  Hrvoje Niksic  <hniksic@xemacs.org>
2236
2237         * recur.c (download_child_p): When -p is used, (temporarily)
2238         ignore accept/reject rules for HTMLs, even when they are at the
2239         maximum recursion depth.  That is because with -p we are, if
2240         necessary, overstepping the max. depth to get the requisites.
2241
2242 2004-06-12  Larry Jones <lawrence.jones@ugsplm.com>
2243
2244         * recur.c (download_child_p): Correct the logic in check number 6:
2245         test opt.reclevel (not DEPTH) against INFINITE_RECURSION.
2246
2247 2005-04-09  Hrvoje Niksic  <hniksic@xemacs.org>
2248
2249         * url.c: Use "static const" in preference to "const static".
2250         Sun's cc warns that "storage class after type is obsolescent".
2251
2252         * url.c (urlchr_table): Don't mark ~ as unsafe, too many broken
2253         web sites are confused when ~ is changed to %7E.  Their servers
2254         redirect /%7Efoo/ to /~foo/, which Wget again accesses using %7E,
2255         causing further redirections, therefore looping infinitely.  See
2256         Debian bug #301624 for an example.
2257
2258 2005-04-09  Hrvoje Niksic  <hniksic@xemacs.org>
2259
2260         * alloca.c: Include wget.h to be able to use xmalloc.  In addition
2261         to defining malloc to xmalloc, also define free to xfree.
2262
2263 2005-04-09  Hrvoje Niksic  <hniksic@xemacs.org>
2264
2265         * http-ntlm.c (ntlm_output): Use "char", not "unsigned char" for
2266         ntlmbuf.  Our base64 functions accept char anyway.
2267         (ntlm_output): Join up the format string, since we nominally
2268         support K&R compilers.
2269         (ntlm_output): Ditto.
2270
2271 2005-04-08  Hrvoje Niksic  <hniksic@xemacs.org>
2272
2273         * ptimer.c: Use Windows timers under Cygwin, whose POSIX timer
2274         implementation is incomplete.
2275
2276 2005-04-08  Hrvoje Niksic  <hniksic@xemacs.org>
2277
2278         * ptimer.c (struct ptimer): Remove the unused initialized field.
2279
2280         * ptimer.c: Renamed function parameters from WT (which used to
2281         stand for wget_timer or wtimer) to PT.
2282
2283 2005-04-08  Hrvoje Niksic  <hniksic@xemacs.org>
2284
2285         * ptimer.c (posix_init): Be smarter about choosing clocks.  In
2286         decreasing order of preference, use CLOCK_MONOTONIC,
2287         CLOCK_HIGHRES, and CLOCK_REALTIME.
2288         (ptimer_allocate): Removed.
2289
2290         * ptimer.c: Refactor the code by cleanly separating the
2291         architecture-dependent code from the architecture-independent
2292         code.
2293
2294 2005-04-08  Hrvoje Niksic  <hniksic@xemacs.org>
2295
2296         * ptimer.c (ptimer_init): Explicitly check that
2297         _POSIX_MONOTONIC_CLOCK is *both* defined and >=0.  (Undefined
2298         symbols are >=0.)
2299
2300 2005-04-08  Hrvoje Niksic  <hniksic@xemacs.org>
2301
2302         * ptimer.c (ptimer_diff): Fix typo affecting Windows build.
2303
2304 2005-04-08  Hrvoje Niksic  <hniksic@xemacs.org>
2305
2306         * ptimer.c (ptimer_init): In fact, _POSIX_MONOTONIC_CLOCK needs to
2307         be >= 0.
2308
2309         * ptimer.c (ptimer_init): Check whether _POSIX_MONOTONIC_CLOCK is
2310         defined instead of whether it's greater than 0.  glibc defines it
2311         to 0, but still makes it available via sysconf.
2312
2313 2005-04-08  Hrvoje Niksic  <hniksic@xemacs.org>
2314
2315         * mswindows.c (str_to_int64): Rename OVERFLOW and UNDERFLOW to
2316         INT64_OVERFLOW and INT64_UNDERFLOW, since those names are used.
2317
2318 2005-04-07  Hrvoje Niksic  <hniksic@xemacs.org>
2319
2320         * ptimer.c: New file.  Move the "wtimer" functions from utils.c to
2321         this file and rename them to ptimer_.
2322
2323 2005-04-07  Hrvoje Niksic  <hniksic@xemacs.org>
2324
2325         * host.c (NO_ADDRESS): Define NO_ADDRESS only after the system
2326         headers have been included.
2327
2328 2005-04-06  Hrvoje Niksic  <hniksic@xemacs.org>
2329
2330         * http.c (pconn): Include NTLM data, which is per-connection.
2331         (known_authentication_scheme_p): Recognize NTLM authorization.
2332         (create_authorization_line): Call ntlm_input and ntlm_output.
2333
2334         * http-ntlm.c: New file, donated by Daniel Stenberg and originally
2335         written for curl, heavily modified for Wget.
2336
2337         * utils.c (base64_encode): Relocated from http.c, since it is now
2338         used by http-ntlm.c, and will possibly be used elsewhere.
2339         (base64_decode): New function, originally based on code from GNU
2340         recode.
2341
2342 2005-04-02  Hrvoje Niksic  <hniksic@xemacs.org>
2343
2344         * ftp.c (ftp_loop): Ditto.
2345
2346         * ftp-basic.c (ftp_pasv): Use the xzero shorthand for memset(0).
2347         (ftp_lpsv): Ditto.
2348
2349 2005-04-05  Mauro Tortonesi  <mauro@ferrara.linux.it>
2350
2351         * Makefile.in: removed string_t.c from list of source files.
2352
2353 2005-04-04  Mauro Tortonesi  <mauro@ferrara.linux.it>
2354
2355         * string_t.c: Removed.
2356         
2357         * string_t.h: Removed.
2358
2359 2005-04-02  Hrvoje Niksic  <hniksic@xemacs.org>
2360
2361         * url.c (rewrite_shorthand_url): Only accept recognized schemes.
2362         That way "foo:80" will correctly be rewritten to "http://foo:80"
2363         instead of left unchanged and ultimately rejected because of
2364         "unsupported scheme foo".
2365
2366 2005-03-31  Hrvoje Niksic  <hniksic@xemacs.org>
2367
2368         * utils.c (number_to_string): Avoid explicit 64-bit constants;
2369         construct them by multiplication at compile-time.
2370
2371         * utils.c, elsewhere: Don't append "L" to 32-bit integer
2372         constants; we aren't really compilable on 16-bit systems anyway.
2373
2374         * hash.c (prime_size): Remove primes larger than 2^31, but include
2375         2^31-1, which is prime.
2376
2377 2005-03-30  Hrvoje Niksic  <hniksic@xemacs.org>
2378
2379         * utils.c (string_set_to_array): New function.
2380
2381         * convert.c: Replace the use of "slists" with sets/hash-tables,
2382         which in fact suit the intended purpose much better.
2383         downloaded_html_list is removed altogether.
2384
2385 2005-03-29  Hrvoje Niksic  <hniksic@xemacs.org>
2386
2387         * ftp.h (enum): Rename GLOBALL, GETALL, and GETONE to
2388         GLOB_GLOBALL, GLOB_GETALL, and GLOB_GETONE to avoid conflict with
2389         Linux headers.
2390
2391 2005-03-29  Hrvoje Niksic  <hniksic@xemacs.org>
2392
2393         * utils.c (numdigit): More correct handling of negative numbers.
2394
2395 2005-03-21  Hrvoje Niksic  <hniksic@xemacs.org>
2396
2397         * http.c (gethttp): Print the human-readable size.
2398
2399         * ftp.c (getftp): Print the human-readable size of the file to be
2400         downloaded.
2401
2402         * utils.c (human_readable): New function.
2403
2404         * utils.c: Renamed "legible" to "with_thousand_seps",
2405         "legible_large_int" to "with_thousand_seps_large", and "legible_1"
2406         to "add_thousand_seps".
2407
2408 2005-03-21  Hrvoje Niksic  <hniksic@xemacs.org>
2409
2410         * http.c (gethttp): Inhibit persistent connections when talking to
2411         proxies, as mandated by RFC 2068.
2412
2413 2005-03-20  Hrvoje Niksic  <hniksic@xemacs.org>
2414
2415         * url.c (unescape_single_char): New function.
2416         (url_escape_dir): Use it to unescape slashes in directory
2417         components.
2418         (url_string): Escape unsafe chars in host name, except for the ':'
2419         charaters, which can appear in IPv6 addresses.
2420
2421         * main.c (main): Don't access the cookie jar directly.
2422
2423         * log.c (escnonprint_internal): Correctly calculate the needed
2424         string size.  Don't forget the buffer's new size after having
2425         reallocated it.
2426         (log_cleanup): New function.  Free the escnonprint ring data.
2427
2428         * init.c (cleanup): Don't free the cookie jar explicitly, it is
2429         now done by http_cleanup.
2430         (cleanup): opt.user_headers is now a vector, free it with
2431         free_vec.
2432
2433         * http.c (gethttp): Make sure to free the request data, the status
2434         message, and the response data before returning from the function.
2435         (save_cookies): New function.
2436         (http_cleanup): Free the cookie jar here.
2437
2438         * hash.c: Renamed string_hash to hash_string and ptrhash to
2439         hash_pointer.  Exported hash_pointer.
2440
2441         * xmalloc.c: Organized malloc_table (previously malloc_debug) as a
2442         simple EQ hash table.  register_ptr and unregister_ptr are now of
2443         O(1) complexity.
2444
2445         * xmalloc.c: Renamed "*_debug" to debugging_* and "*_real" to
2446         checking_*.
2447
2448 2005-03-12  Hrvoje Niksic  <hniksic@xemacs.org>
2449
2450         * utils.c (debug_test_md5): Moved to gen-md5.c.
2451
2452         * mswindows.h: Don't declare inet_ntop, since we don't use it.
2453
2454         * mswindows.h: For consistency, also wrap closesocket, it being
2455         a Winsock call.
2456
2457         * mswindows.h: Don't declare sleep and usleep; we're defining
2458         xsleep now.
2459
2460         * mswindows.h (mkdir): Don't special-case Borland C, _mkdir
2461         works there as well.
2462
2463         * host.c: Don't include winsock header files; the correct ones
2464         are already included by mswindows.h.
2465
2466         * mswindows.c (xsleep): Round toward the nearest millisecond
2467         in an attempt to avoid average short sleeps.
2468
2469         * utils.c (wtimer_granularity): Report correct values for
2470         Windows timers and for high-resolution timers.
2471
2472         * utils.c (wtimer_initialize_once): New function, called to
2473         initialize the timer frequency.
2474
2475         * utils.c: Replace the use of GetSystemTime with high-resolution
2476         counters under Windows.  When high-resolution counters are
2477         unavailable, use GetTickCount().
2478
2479 2005-03-15  Hrvoje Niksic  <hniksic@xemacs.org>
2480
2481         * retr.c (fd_read_body): Undo the 2004-11-18 change.  Instead,
2482         always be "exact".
2483
2484 2005-03-17  Hrvoje Niksic  <hniksic@xemacs.org>
2485
2486         * ftp-basic.c (ftp_login): Don't free the string if ftp_response
2487         returned an error status because the line didn't get allocated in
2488         the first place.
2489
2490 2005-03-15  Hrvoje Niksic  <hniksic@xemacs.org>
2491
2492         * http.c (read_http_response_head): Limit the response size to 64k
2493         bytes.
2494
2495         * retr.c (fd_read_hunk): Accept a MAXSIZE argument that limits the
2496         number of bytes the function is allowed to allocate.
2497         (fd_read_line): Limit the line to 4096 bytes.
2498
2499 2005-03-12  Hrvoje Niksic  <hniksic@xemacs.org>
2500
2501         * wget.h: Include options.h after wgint has been defined.
2502
2503         * options.h (struct options): Declare options processed with
2504         cmd_bytes as wgint, not long.
2505
2506 2005-03-18  Hrvoje Niksic  <hniksic@xemacs.org>
2507
2508         * init.c (cmd_file): Use concat_strings.
2509
2510         * http.c (basic_authentication_encode): Use concat_strings.
2511
2512         * ftp-ls.c (ftp_index): Use concat_strings.
2513
2514         * ftp-basic.c (ftp_request): Use concat_strings.
2515
2516         * utils.c (concat_strings): New function.
2517
2518 2005-03-12  Hrvoje Niksic  <hniksic@xemacs.org>
2519
2520         * init.c (simple_atof): Handle negative numbers; skip whitespace
2521         before the number.
2522         (simple_atoi): Ditto.  Also, check for overflow and underflow.
2523         (cmd_number): Bail out on negative numbers.
2524         (parse_bytes_helper): Ditto.
2525
2526 2005-03-06  Hrvoje Niksic  <hniksic@xemacs.org>
2527
2528         * http.c (gethttp): Handle multiple Set-Cookie headers sent by
2529         remote server.
2530
2531 2005-03-06  Hrvoje Niksic  <hniksic@xemacs.org>
2532
2533         * init.c (defaults): Use passive FTP by default.
2534
2535 2005-03-06  Hrvoje Niksic  <hniksic@xemacs.org>
2536
2537         * mswindows.c: Provide wrappers to Winsock functions that set
2538         errno to WSAGetLastError() in case of failure.  Also provide a
2539         Windows-specific version of strerror.
2540
2541         * mswindows.h: Wrap calls to socket, bind, connect, recv, send,
2542         select, getsockname, getpeername, and setsockopt.
2543
2544 2005-03-06  Hrvoje Niksic  <hniksic@xemacs.org>
2545
2546         * url.c (url_parse): Reject port numbers larger than 65535.  We
2547         also check for overflow while parsing port numbers.
2548
2549 2005-03-06  Hrvoje Niksic  <hniksic@xemacs.org>
2550
2551         * utils.c (read_file): Don't use wgint for file size; LFS won't
2552         work since the file is mmap'ed as a whole.
2553
2554         * options.h: Don't include stdio.h.
2555
2556         * log.c: Ditto.
2557
2558         * init.c: Disambiguate assignment from non-zero test to avoid
2559         Borland C warning.
2560
2561         * http.c (response_new): Don't needlessly post-increment count.
2562
2563         * hash.c: Include stdio.h.
2564
2565         * gnu-md5.h: Don't include stdio.h.
2566
2567         * getopt.h (struct option): Always use const.
2568
2569         * ftp.c (getftp): Avoid unnecessary assignment to RES to avoid
2570         Borland C warning.
2571
2572         * ftp-ls.c: Disambiguate assignment from non-zero test to avoid
2573         Borland C warning.
2574
2575         * cmpt.c (strptime_internal): Don't initialize rp_backup when
2576         !_NL_CURRENT to avoid Borland C warning.
2577
2578 2005-03-06  Hrvoje Niksic  <hniksic@xemacs.org>
2579
2580         * utils.c (fopen_excl): Fix parse error when O_BINARY is
2581         available.
2582
2583 2005-03-05  Hrvoje Niksic  <hniksic@xemacs.org>
2584
2585         * url.c (url_file_name): Don't allow hosts named ".." to be
2586         appended as path elements.
2587
2588 2005-03-03  Hrvoje Niksic  <hniksic@xemacs.org>
2589
2590         * retr.c (retrieve_url): Escape location header.
2591
2592         * http.c (print_server_response_1): Escape server response when
2593         printing it.
2594         (gethttp): Escape host name, status message, location header, and
2595         content type.
2596         (http_loop): Escape error message from server.
2597
2598         * host.c (lookup_host): Escape host name when printing it.
2599
2600         * ftp.c (getftp): Escape user name when printing it.
2601         (getftp): Escape remote file and directory for printing.
2602         (getftp): Escape server listing when printing it.
2603         (ftp_retrieve_list): Escape link name and file name.
2604         (ftp_retrieve_glob): Escape file name.
2605
2606         * ftp-basic.c (ftp_response): Escape server response when printing
2607         it.
2608
2609         * cookies.c (parse_set_cookies): Escape the cookie field when
2610         printing it.
2611         (parse_set_cookies): Escape contents of remote header.
2612         (cookie_handle_set_cookie): Escape host name and cookie domain.
2613
2614         * connect.c (connect_to_ip): Escape the host name.
2615
2616         * log.c (escnonprint): New function, used for printing strings
2617         coming from the server that possibly contain non-ASCII characters.
2618         (escnonprint_uri): Ditto.
2619
2620 2005-02-24  Hrvoje Niksic  <hniksic@xemacs.org>
2621
2622         * ftp.c (getftp): Ditto.
2623
2624         * http.c (gethttp): When we're not supposed to overwrite files,
2625         use fopen_excl to open the file and recompute the file name.
2626
2627         * log.c (redirect_output): Use unique_create to avoid a race
2628         condition.
2629
2630         * mswindows.c (fake_fork_child): Use unique_create.
2631
2632         * utils.c (fopen_excl): New function that opens a stdio stream
2633         with the O_EXCL flag (where available).
2634         (unique_create): New function, like unique_name, but also creating
2635         the file and returning a file pointer.
2636         (fork_to_background): Use unique_create to create the file
2637         immediately to avoid race condition with multiple instances of
2638         wget -b.
2639
2640 2005-02-24  Hrvoje Niksic  <hniksic@xemacs.org>
2641
2642         * host.c (lookup_host): Test for AI_ADDRCONFIG directly, instead
2643         of checking for HAVE_GETADDRINFO_AI_ADDRCONFIG.
2644
2645 2005-02-23  Hrvoje Niksic  <hniksic@xemacs.org>
2646
2647         * host.c (is_valid_ipv6_address): Move here from url.c.
2648         (lookup_host): If the address is numeric, don't print the
2649         "resolving..." line, don't set up DNS timeouts, and set the
2650         AI_NUMERICHOST hint, where available.
2651
2652 2005-02-26  Gisle Vanem  <giva@bgnett.no>
2653
2654         * utils.c: Use the nnnLL syntax under GCC.  Define struct_stat to
2655         struct _stati64 under __MINGW32__ as well as under MS VC.
2656
2657 2005-02-26  Hrvoje Niksic  <hniksic@xemacs.org>
2658
2659         * utils.c: Use the nnnI64 syntax for __int64 constants under all
2660         Windows compilers.
2661         (SPRINTF_WGINT): Use "%I64" under all Windows compilers.
2662
2663         * mswindows.h (WGINT_MAX): Use the nnnI64 syntax for
2664         __int64 constants under all Windows compilers.
2665         (struct_stat): Use `struct stati64' under Borland C.
2666         (fstat): Don't redefine to _fstati64 under Borland.
2667
2668         * mswindows.c: Define str_to_int64 under Borland C as well as
2669         under (older) Visual C.
2670
2671 2005-02-25  Hrvoje Niksic  <hniksic@xemacs.org>
2672
2673         * ftp.c (getftp): Initialize err to suppress compiler warning.
2674
2675 2005-02-24  Hrvoje Niksic  <hniksic@xemacs.org>
2676
2677         * ftp.c (ftp_expected_bytes): Fix bug that caused infloop because
2678         of not correctly skipping the '(' character.
2679
2680 2005-02-24  Hrvoje Niksic  <hniksic@xemacs.org>
2681
2682         * mswindows.c (wget_ftello): Removed.
2683
2684         * mswindows.h: Remove bogus definition of stat.
2685         (wget_ftello): Remove the leftover ftello replacement.
2686
2687 2005-02-20  Hrvoje Niksic  <hniksic@xemacs.org>
2688
2689         * mswindows.c (wget_ftello): Wget's replacement for ftello.
2690
2691         * utils.c (file_size): Use ftello where available.
2692
2693         * ftp-ls.c (ftp_parse_unix_ls): Use str_to_wgint to parse the file
2694         size.
2695         (ftp_parse_winnt_ls): Ditto.
2696
2697         * ftp-basic.c (ftp_size): Use str_to_wgint to convert number to
2698         wgint; pass 10 instead of 0 as the BASE argument.
2699
2700         * ftp.c (ftp_expected_bytes): Use str_to_wgint to parse the file
2701         size.
2702
2703         * sysdep.h (LARGE_INT_FMT): Use __int64 as LARGE_INT on
2704         MSVC/Windows; print it with "%I64".
2705
2706         * wget.h: Define a `wgint' type, normally aliased to (the possibly
2707         64-bit variant of) off_t.
2708
2709         * all: Use `wgint' instead of `long' for numeric variables that
2710         can hold file sizes.
2711
2712         * utils.c (number_to_string): Support printing of `wgint'
2713         argument.
2714         (number_to_static_string): New function.
2715
2716         * all: Replace printf("%ld", long_value) with printf("%s",
2717         number_to_static_string(wgint_value)).
2718
2719 2005-02-18  Mauro Tortonesi <mauro@ferrara.linux.it>
2720
2721         * main.c: Added the --ftp-passwd command line option.
2722
2723         * init.c: Renamed command passwd to ftppasswd.
2724
2725 2005-02-11  Mauro Tortonesi <mauro@ferrara.linux.it>
2726         
2727         * string_t.c: Fixed a bug in do_escape and triggered escape of
2728         backslashes in string_escape to avoid ambiguities in the result
2729         string.
2730         
2731 2005-02-10  Mauro Tortonesi <mauro@ferrara.linux.it>
2732
2733         * string.h: Renamed to string_t.h to fix a compilation conflict 
2734         with the string.h header in the standard C library.
2735         
2736         * string.c: Renamed to string_t.c for consistency with string.h.
2737         
2738         * string_t.c: Ditto.
2739
2740         * string_t.h: Ditto.
2741         
2742 2004-12-31  Mauro Tortonesi <mauro@ferrara.linux.it>
2743
2744         * string.c: New file.
2745
2746         * string.h: New file.
2747
2748         * Makefile.in: Added string.c to the list of modules to compile.
2749
2750         * main.c: Updated copyright.
2751
2752 2004-11-18  Ulf Harnhammar <ulf.harnhammar.9485@student.uu.se>
2753
2754         * ftp-ls.c: Fixed a problem in ftp_parse_winnt_ls that could allow a
2755         malicious remote FTP server to crash wget.
2756
2757 2004-11-18  Hans-Andreas Engel <engel@node.ch>
2758
2759         * http.c: Enable --convert-links (-k) when a single page is downloaded
2760         via --output-document (-O).
2761
2762 2004-11-18  Mauro Tortonesi <mauro@deepspace6.net>
2763
2764         * connect.c: Minor correction to the comment in front of fd_peek.
2765
2766 2004-11-18  Leonid Petrov <nouser@lpetrov.net>
2767
2768         * retr.c: Fix a timeout problem in fd_read_body when using http_proxy.
2769
2770 2004-11-15  YAMAZAKI Makoto <Yamazaki.Makoto@fujixerox.co.jp>
2771
2772         * netrc.c: Fix termination by assertion bug in netrc parsing.
2773
2774 2004-05-09  David Fritz  <zeroxdf@att.net>
2775
2776         * mswindows.c (fake_fork): Pass entire command line to the child
2777         process.
2778
2779 2004-03-31  Hrvoje Niksic  <hniksic@xemacs.org>
2780
2781         * http.c (gethttp): Fix typo: SCHEME_SSL -> SCHEME_HTTPS.
2782
2783 2004-03-30  Hrvoje Niksic  <hniksic@xemacs.org>
2784
2785         * http.c (gethttp): Send the Proxy-Authorization header over
2786         non-SSL connections too.
2787
2788 2004-03-25  David Fritz  <zeroxdf@att.net>
2789
2790         * mswindows.c (fake_fork_child): Ignore error code when
2791         OpenFileMapping() fails; assume it failed because the object does
2792         not exist.
2793
2794 2004-03-24  David Fritz  <zeroxdf@att.net>
2795
2796         * mswindows.c (fake_fork): New function.
2797
2798         * mswindows.c (fork_to_background): Use it.
2799
2800 2004-03-19  David Fritz  <zeroxdf@att.net>
2801
2802         * mswindows.c (ws_hangup): Incorporate old fork_to_background()
2803         code.  Add event name argument.
2804         (fork_to_backgorund): Now a simple wrapper around ws_hangup().
2805         (ws_handler): Correctly handle the case when neither CTRLC_BACKGND
2806         nor CTRLBREAK_BACKGND are defined.  Don't bother handling close,
2807         logoff, or shutdown events.  Call ws_hangup() with the correct
2808         event name; don't assume it was CTRL+Break.
2809
2810 2004-03-19  Hrvoje Niksic  <hniksic@xemacs.org>
2811
2812         * url.c (url_parse): Decode %HH sequences in host name.
2813
2814 2004-03-04  Hrvoje Niksic  <hniksic@xemacs.org>
2815
2816         * convert.c (local_quote_string): Quote "#" as "%23" and "%" as
2817         "%25" when creating links to local files.
2818
2819 2004-03-02  David Fritz  <zeroxdf@att.net>
2820
2821         * mswindows.c (ws_percenttitle): Guard against future changes by
2822         doing nothing if the proper variables have not been initialized.
2823         Clamp percentage value.
2824
2825 2004-03-04  Gisle Vanem  <giva@bgnett.no>
2826
2827         * retr.c (fd_read_body): Don't change console title if quiet.
2828
2829 2004-02-25  David Fritz  <zeroxdf@att.net>
2830
2831         * mswindows.c (set_sleep_mode): Remove argument and return value.
2832         Call GetModuleHandle() instead of LoadLibrary()/FreeLibrary() for
2833         kernel32.dll.  Use typedef for function-pointer.  Don't cast
2834         l-value.  Don't use dereference operator when calling through
2835         function-pointer.
2836         (ws_startup): Update call to set_sleep_mode().
2837         (ws_cleanup): Remove call to set_sleep_mode().
2838
2839 2004-02-23  David Fritz  <zeroxdf@att.net>
2840
2841         * http.c (http_loop): Ditto.
2842
2843         * ftp.c (ftp_loop_internal): Update call to ws_changetitle().
2844
2845         * main.c (main): Don't bother calling ws_changetitle().
2846
2847         * mswindows.h (ws_changetitle): Update prototype.
2848
2849         * mswindows.c (ws_changetitle): Remove second argument.  Use
2850         xfree_null().
2851         (ws_percenttitle): Only update title when percentage has changed.
2852
2853 2004-02-23  David Fritz  <zeroxdf@att.net>
2854
2855         * mswindows.h: Ditto.
2856
2857         * mswindows.c: Misc. formatting/comment tweaks throughout.
2858
2859 2004-02-20  David Fritz  <zeroxdf@att.net>
2860
2861         * main.c (print_help): Remove call to ws_help().
2862
2863         * mswindows.c (ws_help): Remove.
2864
2865         * mswindows.h (ws_help): Remove.
2866
2867 2004-02-16  David Fritz  <zeroxdf@att.net>
2868
2869         * init.c (home_dir): Use aprintf() instead of xmalloc()/sprintf().
2870         Under Windows, if $HOME is not defined, use the directory that
2871         contains the Wget binary instead of hard-coded `C:\'.
2872         (wgetrc_file_name): Under Windows, look for $HOME/.wgetrc then, if
2873         not found, look for wget.ini in the directory of the Wget binary.
2874
2875         * mswindows.c (ws_mypath): Employ slightly more robust methodology.
2876         Strip trailing path separator.
2877
2878 2004-02-06  Hrvoje Niksic  <hniksic@xemacs.org>
2879
2880         * http.c (gethttp): Respect --ignore-length.
2881         (gethttp): Inhibit keep-alive if --ignore-length is specified.
2882
2883 2004-02-06  Hrvoje Niksic  <hniksic@xemacs.org>
2884
2885         * connect.c (sockaddr_set_data): Zero out
2886         sockaddr_in/sockaddr_in6.  Apparently BSD-derived stacks need this
2887         when binding a socket to local address.
2888
2889 2004-02-04  Hrvoje Niksic  <hniksic@xemacs.org>
2890
2891         * hash.c: Make the file compilable outside Wget source tree when
2892         -DSTANDALONE is used.
2893
2894 2004-01-29  Hrvoje Niksic  <hniksic@xemacs.org>
2895
2896         * utils.c (determine_screen_width): Return 0 if not running on
2897         Windows or on a TIOCGWINSZ-capable system.
2898
2899 2004-01-28  David Fritz  <zeroxdf@att.net>
2900
2901         * utils.c (determine_screen_width): Correctly determine console
2902         width under Windows.
2903
2904 2004-01-28  Christian Biere  <christianbiere@gmx.de>
2905
2906         * progress.c (bar_set_params): Fixed syntax error when HAVE_ISATTY
2907         was undefined.
2908
2909         * ftp.c (ftp_loop_internal): Allocate a larger buffer in case
2910         "try" gets translated to something large.  Ditto in http_loop in
2911         http.c.
2912
2913         * http.c (response_header_copy): Don't write to buf[BUFSIZE].
2914
2915         * ftp-opie.c (skey_response): Eliminate unnecessary string
2916         concatenation; just call gen_md5_update twice.
2917
2918 2004-01-25  Hrvoje Niksic  <hniksic@xemacs.org>
2919
2920         * utils.c (xsleep): Don't call usleep with values larger than
2921         1,000,000.
2922
2923 2003-12-16  Hrvoje Niksic  <hniksic@xemacs.org>
2924
2925         * http.c (gethttp): Fix generation of `Content-Length'.
2926
2927 2003-12-15  Gisle Vanem  <giva@bgnett.no>
2928
2929         * url.c (url_skip_credentials): Fixed return value; 'url' if no
2930         credentials.
2931
2932 2003-12-14  Hrvoje Niksic  <hniksic@xemacs.org>
2933
2934         * url.c (url_skip_credentials): Return a pointer directly.
2935
2936 2003-12-14  Hrvoje Niksic  <hniksic@xemacs.org>
2937
2938         * url.c (url_file_name): Ditto.
2939         (parse_errors): Ditto.
2940
2941         * retr.c (retr_rate): Ditto.
2942
2943         * progress.c (create_image): Ditto.
2944
2945         * netrc.c (parse_netrc): Ditto.
2946
2947         * main.c (struct cmdline_option): Ditto.
2948         (redirect_output_signal): Ditto.
2949
2950         * init.c (commands): Ditto.
2951
2952         * ftp-ls.c (ftp_index): Ditto.
2953
2954         * cookies.c (check_domain_match): Declare the pointer to a literal
2955         string as `const'.
2956
2957 2003-12-12  Hrvoje Niksic  <hniksic@xemacs.org>
2958
2959         * retr.c (fd_read_body): Pass total size to progress_create, not
2960         the remaining amount.
2961
2962 2003-12-12  Hrvoje Niksic  <hniksic@xemacs.org>
2963
2964         * retr.c (fd_read_body): Don't fiddle with "interactive timeout"
2965         if read timeout is unset.
2966
2967 2003-12-12  Hrvoje Niksic  <hniksic@xemacs.org>
2968
2969         * connect.c (bind_local): Don't set the IPV6_V6ONLY option on the
2970         socket.
2971
2972 2003-12-06  Hrvoje Niksic  <hniksic@xemacs.org>
2973
2974         * url.c (url_file_name): Respect the setting of
2975         opt.protocol_directories.
2976
2977         * main.c (main): Only check for ret=='?' when longindex is unset.
2978         (option_data): New option --protocol-directories.
2979
2980 2003-12-06  Hrvoje Niksic  <hniksic@xemacs.org>
2981
2982         * ftp.c (getftp): Ditto.
2983
2984         * http.c (gethttp): Correctly calculate bandwidth as total data
2985         read divided with download time.
2986
2987         * retr.c (fd_read_body): Separate the return values for data
2988         written and read.
2989
2990 2003-12-05  Hrvoje Niksic  <hniksic@xemacs.org>
2991
2992         * http.c (H_REDIRECTED): Respect the HTTP/1.1 "303 See Other"
2993         response code.
2994         Suggested by Dan Razzell.
2995
2996 2003-11-30  Hrvoje Niksic  <hniksic@xemacs.org>
2997
2998         * retr.c (fd_read_body): Report the amount of data *written* as
2999         amount_read.  This is not entirely logical, but that's what the
3000         callers expect, and it's not easy to change.
3001
3002         * ftp.c (ftp_loop_internal): Ditto.
3003
3004         * http.c (http_loop): Be smarter about assigning restval; if we're
3005         in the nth pass of a download, simply use the information we have
3006         about how much data has been retrieved as restval.
3007
3008         * ftp.c (getftp): Ditto for FTP "REST" command.
3009
3010         * http.c (gethttp): When the server doesn't respect range, skip
3011         the first RESTVAL bytes of the read body.  Never truncate the
3012         output file.
3013
3014         * retr.c (fd_read_body): Support skipping initial STARTPOS octets.
3015
3016 2003-11-30  Hrvoje Niksic  <hniksic@xemacs.org>
3017
3018         * http.c (skip_short_body): Renamed skip_body to skip_short_body;
3019         don't bother calling fd_read_body.
3020
3021 2003-11-30  Hrvoje Niksic  <hniksic@xemacs.org>
3022
3023         * retr.c (fd_read_body): Sanitize arguments and document them
3024         better.  Make sure the timer is created and updated only if
3025         necessary.  Updated callers.
3026
3027 2003-11-30  Hrvoje Niksic  <hniksic@xemacs.org>
3028
3029         * http.c (skip_body): New function.
3030         (gethttp): Use it to skip the body of the responses we don't care
3031         to download.  That allows us to reuse the connection.
3032         (gethttp): Trust that the HEAD requests will not generate body
3033         data.
3034
3035         * retr.c (fd_read_body): Don't write to OUT if it's NULL.
3036
3037 2003-11-29  Hrvoje Niksic  <hniksic@xemacs.org>
3038
3039         * http.c (gethttp): Initialize SSL only the first time when SSL
3040         URL is downloaded.
3041
3042 2003-11-29  Hrvoje Niksic  <hniksic@xemacs.org>
3043
3044         * cookies.c (cookie_header): Only generate the contents of the
3045         header, not the leading "Cookie: " or the trailing "\r\n".
3046
3047         * http.c (gethttp): When adding headers specified with `--header',
3048         allow them to override the headers generated by Wget.
3049
3050         * init.c (cmd_spec_header): Made opt.user_headers a vector.
3051
3052         * http.c (request_new): New function.  Returns a request structure
3053         which can be modified in various ways, most notably by adding HTTP
3054         headers to the request.
3055         (request_set_header): New function for adding the header to the
3056         request.  If the header is already available, it gets replaced.
3057         (request_send): Construct and send the request.
3058         (gethttp): Use the request_* functions to generate the request.
3059
3060 2003-11-28  Hrvoje Niksic  <hniksic@xemacs.org>
3061
3062         * http.c (gethttp): Don't include the Proxy-Authorization header
3063         in the request tunneled through proxy.
3064
3065 2003-11-28  Hrvoje Niksic  <hniksic@xemacs.org>
3066
3067         * http.c (gethttp): Use the CONNECT handle to establish SSL
3068         passthrough through non-SSL proxies.
3069
3070 2003-11-28  Hrvoje Niksic  <hniksic@xemacs.org>
3071
3072         * init.c: Don't #include netinet/Winsock stuff.
3073
3074 2003-11-28  Hrvoje Niksic  <hniksic@xemacs.org>
3075
3076         * http.c: Deleted the old functions header_process,
3077         header_extract_number, header_exists, header_strdup,
3078         http_process_range, http_process_none, http_process_type, and
3079         http_process_connection.
3080
3081         * http.c (response_new): New function.
3082         (response_header_bounds): Ditto.
3083         (response_header_copy): Ditto.
3084         (response_header_strdup): Ditto.
3085         (response_status): Ditto.
3086         (gethttp): Use the new response_* functions to parse the response.
3087         Support HTTP/0.9 responses.
3088
3089 2003-11-27  Hrvoje Niksic  <hniksic@xemacs.org>
3090
3091         * progress.c (create_image): Don't calculate ETA if nothing has
3092         been downloaded yet, because it causes division by zero.
3093
3094 2003-11-27  Hrvoje Niksic  <hniksic@xemacs.org>
3095
3096         * connect.c (bind_local): Rename sa_len to addrlen because IRIX
3097         headers define sa_len as a macro.
3098
3099 2003-11-26  Hrvoje Niksic  <hniksic@xemacs.org>
3100
3101         * html-parse.c (convert_and_copy): Remove embedded newlines when
3102         AP_TRIM_BLANKS is specified.
3103
3104 2003-11-26  Hrvoje Niksic  <hniksic@xemacs.org>
3105
3106         * ftp.c: Set con->csock to -1 where rbuf_uninitialize was
3107         previously used.
3108
3109 2003-11-26  Hrvoje Niksic  <hniksic@xemacs.org>
3110
3111         * Makefile.in (http$o): Added the trailing backslash that was
3112         missing.
3113
3114 2003-11-21  Hrvoje Niksic  <hniksic@xemacs.org>
3115
3116         * headers.c: Removed.  The file is no longer relevant, now that no
3117         special handling of headers is done by the rbuf code.  Moved
3118         portions to http.c.
3119
3120 2003-11-21  Hrvoje Niksic  <hniksic@xemacs.org>
3121
3122         * rbuf.c: Removed.
3123
3124         * ftp-basic.c (ftp_response): Use fd_read_line.  No longer use
3125         struct rbuf.  Updated all callers.
3126
3127         * http.c (gethttp): Use fd_read_head to read all the headers in
3128         one go.
3129         (next_header): New function.
3130
3131         * retr.c (fd_read_line): New function: reads a line from FD,
3132         leaving the rest of the data unread.
3133         (fd_read_head): New function.
3134
3135         * connect.c (fd_peek): New function, implements peeking.
3136         (poll_internal): New function.
3137         (fd_read): Use it.
3138         (fd_write): Ditto.
3139         (fd_peek): Ditto.
3140         (fd_register_transport): Allow registering a "peeker" callback.
3141
3142 2003-11-20  Hrvoje Niksic  <hniksic@xemacs.org>
3143
3144         * connect.c: Renamed xread/xwrite/xclose to
3145         fd_read/fd_write/fd_close.  The "x" prefix is not appropriate
3146         because the semantics have diverged from read/write/close too
3147         significantly.  Updated all callers.
3148
3149 2003-11-20  Hrvoje Niksic  <hniksic@xemacs.org>
3150
3151         * connect.c (sock_write): It's not necessary to initialize RES.
3152
3153 2003-11-19  Hrvoje Niksic  <hniksic@xemacs.org>
3154
3155         * main.c (main): Don't reference opt.ipv4_only and opt.ipv6_only
3156         if IPv6 is disabled.
3157
3158 2003-11-19  Hrvoje Niksic  <hniksic@xemacs.org>
3159
3160         * connect.c (socket_has_inet6): Only compile it if IPv6 is enabled
3161         and AI_ADDRCONFIG is missing.
3162
3163 2003-11-18  Hrvoje Niksic  <hniksic@xemacs.org>
3164
3165         * gen_sslfunc.c (ssl_init_prng): Warn the user when using a weak
3166         random seed.
3167
3168 2003-11-18  Hrvoje Niksic  <hniksic@xemacs.org>
3169
3170         * host.c (address_list_contains): Renamed address_list_find to
3171         address_list_contains because its result is boolean.
3172
3173 2003-11-18  Hrvoje Niksic  <hniksic@xemacs.org>
3174
3175         * connect.c (select_fd): Return 1 if select is not available.
3176
3177 2003-11-17  Hrvoje Niksic  <hniksic@xemacs.org>
3178
3179         * connect.c (connect_to_host): Don't reference address list after
3180         releasing it.
3181
3182 2003-11-17  Hrvoje Niksic  <hniksic@xemacs.org>
3183
3184         * main.c (print_help): Fix alignment of FTP options output.
3185
3186 2003-11-17  Hrvoje Niksic  <hniksic@xemacs.org>
3187
3188         * host.c (lookup_host): Check for the ability to create IPv6
3189         sockets here.
3190
3191         * init.c (defaults): Don't auto-set --inet4-only on IPv6-less
3192         systems.
3193
3194 2003-11-16  Hrvoje Niksic  <hniksic@xemacs.org>
3195
3196         * main.c (print_help): Fix typo in `-O' help message.  Fix docs of
3197         -Y/--proxy.  Fix docs of `--cookies' and `--glob'.  Improve docs
3198         of --convert-links.  Fix docs of SSL options.
3199
3200 2003-11-16  Hrvoje Niksic  <hniksic@xemacs.org>
3201
3202         * ftp-basic.c: Don't include <arpa/inet.h> and others because
3203         they're no longer needed.
3204
3205 2003-11-16  Hrvoje Niksic  <hniksic@xemacs.org>
3206
3207         * main.c (main): Don't allow setting of both opt.ipv4_only and
3208         opt.ipv6_only.
3209
3210         * init.c (defaults): Mark opt.ipv4_only specially when set
3211         automatically.
3212
3213 2003-11-15  Hrvoje Niksic  <hniksic@xemacs.org>
3214
3215         * host.c (lookup_host): Use AI_ADDRCONFIG only if the family is
3216         unspecified.  This ensures that specifying `--no-inet4' on systems
3217         where IPv6 resolves, but doesn't work behaves the same regardless
3218         of the availability of AI_ADDRCONFIG.
3219
3220 2003-11-15  Hrvoje Niksic  <hniksic@xemacs.org>
3221
3222         * host.c: Don't refer to the now-removed function
3223         forget_host_lookup in the documentation of lookup_host.
3224
3225 2003-11-15  Hrvoje Niksic  <hniksic@xemacs.org>
3226
3227         * http.c (persistent_available_p): Correctly specify the endpoint
3228         argument to socket_ip_address.
3229         (gethttp): When printing the "reusing connection to..." message,
3230         specify the host name of the reused connection, not the current
3231         host name.  That makes more sense because it provides a useful
3232         piece of information -- we know to which host we're supposed to
3233         connect anyway!
3234
3235 2003-11-15  Hrvoje Niksic  <hniksic@xemacs.org>
3236
3237         * init.c: Make sure the options are in alphabetic order!
3238
3239         * host.c (lookup_host): Merge lookup_host_passive and lookup_host
3240         after all -- having both would result in some code duplication.
3241         (lookup_host): Set hints.ai_family to AF_INET if ipv4_only is
3242         requested.  Likewise, set it to AF_INET6 for ipv6_only.  Specify
3243         AI_ADDRCONFIG where available.
3244         (lookup_host): New flag LH_REFRESH that specifies that a cached
3245         entry for HOST should be refreshed.
3246         (cache_query): New function.
3247         (cache_store): Ditto.
3248         (cache_remove): Ditto.
3249         (forget_host_lookup): No longer necessary, replaced with static
3250         function cache_remove.
3251
3252 2003-11-14  Hrvoje Niksic  <hniksic@xemacs.org>
3253
3254         * main.c: Enable -4 and -6 only if IPv6 is enabled.
3255
3256 2003-11-14  Hrvoje Niksic  <hniksic@xemacs.org>
3257
3258         * connect.c (register_transport): Renamed from register_extended.
3259         Explain the intended usage.
3260
3261 2003-11-14  Hrvoje Niksic  <hniksic@xemacs.org>
3262
3263         * url.c (uri_merge): Merging "foo" and "bar" should result in
3264         "bar", not in "foo/bar".
3265         (path_simplify): Don't remove empty path elements; don't
3266         special-case leading slash.
3267         (path_simplify): Don't swallow ".."'s at the beginning of string.
3268         E.g. simplify "foo/../../bar" as "../bar", not as "bar".
3269         (append_uri_pathel): Defang ".." path element upon encountering
3270         it.
3271
3272 2003-11-13  Hrvoje Niksic  <hniksic@xemacs.org>
3273
3274         * http.c (persistent_available_p): Don't attempt to talk to two
3275         different SSL sites over the same secure connection.
3276
3277 2003-11-13  Hrvoje Niksic  <hniksic@xemacs.org>
3278
3279         * http.c (gethttp): Ditto.
3280
3281         * ftp.c (getftp): Use retryable_socket_connect_error instead of
3282         CONNECT_ERROR.
3283
3284         * wget.h (CONNECT_ERROR): Removed.
3285
3286         * connect.c (retryable_socket_connect_error): New function instead
3287         of unsupported_socket_family_error.
3288
3289 2003-11-13  Hrvoje Niksic  <hniksic@xemacs.org>
3290
3291         * wget.h (CONNECT_ERROR): Use it.
3292
3293         * connect.c (unsupported_socket_family_error): New function.
3294
3295 2003-11-13  Hrvoje Niksic  <hniksic@xemacs.org>
3296
3297         * connect.c (bind_local): Renamed bindport to bind_local; return
3298         the socket directly.  Updated callers.
3299         (accept_connection): Renamed acceptport to accept_connection;
3300         return the created socket directly.  Updated callers.
3301
3302 2003-11-13  Hrvoje Niksic  <hniksic@xemacs.org>
3303
3304         * init.c (defaults): Turn on opt.ipv4_only if we're compiling with
3305         IPv6, and AI_ADDRINFO is not available, and AF_INET6 sockets can't
3306         be created.
3307
3308 2003-11-13  Hrvoje Niksic  <hniksic@xemacs.org>
3309
3310         * host.c (lookup_host): Document the fact that the addresses are
3311         returned in order.
3312
3313 2003-11-12  Hrvoje Niksic  <hniksic@xemacs.org>
3314
3315         * utils.c: Use limits.h only where available.
3316
3317         * hash.c: Use INVALID_PTR and INVALID_PTR_BYTE.  Include limits.h.
3318
3319 2003-11-11  Hrvoje Niksic  <hniksic@xemacs.org>
3320
3321         * main.c: Added options --inet4-only and --inet6-only.
3322
3323 2003-11-11  Hrvoje Niksic  <hniksic@xemacs.org>
3324
3325         * host.c (host_errstr): Use the more standard message "Unknown
3326         host".
3327
3328 2003-11-10  Hrvoje Niksic  <hniksic@xemacs.org>
3329
3330         * connect.c (connect_to_host): Use that flag to decide whether to
3331         re-resolve the host name.
3332
3333         * host.c (struct address_list): Added a flag that maintains
3334         whether the connection worked at some point.
3335
3336 2003-11-10  Hrvoje Niksic  <hniksic@xemacs.org>
3337
3338         * host.c (lookup_host): Special-case the numeric addresses only in
3339         the non-IPv6 case.
3340
3341 2003-11-10  Hrvoje Niksic  <hniksic@xemacs.org>
3342
3343         * connect.c (resolve_bind_address): Call lookup_host_passive.
3344         Make sure that opt.bind_address is resolved only once.
3345
3346         * host.c (lookup_host_passive): New function, handles "passive"
3347         lookups.
3348         (lookup_host): Remove the passive flags.  Remove the
3349         family-related flags -- use ip_default_family instead.
3350
3351 2003-11-09  Hrvoje Niksic  <hniksic@xemacs.org>
3352
3353         * html-url.c: Get URLs from <object data="...">.
3354
3355 2003-11-09  Hrvoje Niksic  <hniksic@xemacs.org>
3356
3357         * main.c (option_data): Specify the command to use for --mirror.
3358
3359 2003-11-08  Hrvoje Niksic  <hniksic@xemacs.org>
3360
3361         * cookies.c (cookie_handle_set_cookie): Specify exact match for
3362         unspecified domains.
3363
3364 2003-11-08  Hrvoje Niksic  <hniksic@xemacs.org>
3365
3366         * main.c (main): Removed one-letter options `-C', `-g', `-G', and
3367         `-s'.
3368
3369 2003-11-08  Hrvoje Niksic  <hniksic@xemacs.org>
3370
3371         * main.c (main): Add --dont-remove-listing for backward
3372         compatibility with previous versions.
3373         (print_help): Fix typo, spotted by Dennis Smit.
3374
3375 2003-11-08  Gisle Vanem  <giva@bgnett.no>
3376
3377         * ftp-basic.c: Support Windows-2000 ftp servers. Win-2000 *is*
3378         Win-NT 5.0 so calling it ST_WINNT is okay I guess.
3379
3380 2003-11-08  Hrvoje Niksic  <hniksic@xemacs.org>
3381
3382         * progress.c (update_speed_ring): Clear the speed ring when the
3383         download stalls.
3384
3385         * retr.c (get_contents): Specify 0.95s read timeout, so that the
3386         progress gauge can be updated even when data arrives very slowly
3387         or stalls.
3388
3389 2003-11-08  Hrvoje Niksic  <hniksic@xemacs.org>
3390
3391         * utils.c (wtimer_allocate): Bless the use of wtimer_read on a
3392         timer that has merely been allocated because get_contents() does
3393         that.
3394         (wtimer_update): Abort if the timer is not initialized.
3395
3396 2003-11-08  Hrvoje Niksic  <hniksic@xemacs.org>
3397
3398         * retr.c (get_contents): Pass the timer to limit_bandwidth().
3399
3400         * utils.c (wtimer_update): New function instead of wget_elapsed;
3401         just update the timer, but don't return anything.
3402         (wtimer_read): Read and return the last known value of the timer.
3403
3404 2003-11-08  Hrvoje Niksic  <hniksic@xemacs.org>
3405
3406         * http.c (persistent_available_p): Instead of matching all the
3407         addresses of HOST and last host, determine the peer's IP address
3408         with socket_ip_address and see if that address is one of those
3409         HOST resolves to.
3410
3411         * host.c (address_list_match_all): Removed.
3412         (address_list_find): New function, finds an IP address in the
3413         address list.
3414
3415         * ftp.c (ftp_do_pasv): Get the peer's address here, and pass it to
3416         ftp_epsv so it doesn't need to call getpeername.
3417
3418         * ftp-basic.c (ftp_port): Use socket_ip_address instead of
3419         getpeername.
3420         (ftp_lprt): Ditto.
3421
3422         * connect.c (socket_ip_address): Replaces conaddr, generalized to
3423         either get peer's or local address.
3424         (sockaddr_get_data): Made local to this file.
3425
3426 2003-11-08  Hrvoje Niksic  <hniksic@xemacs.org>
3427
3428         * hash.c (HASH_POSITION): Explicitly accept the hash function.
3429         (grow_hash_table): Extract ht->hash_function outside the loop.
3430         (hash_table_remove): Ditto.
3431         (hash_table_clear): Fill entries with 0xff to clear them.
3432         (hash_table_remove): Mark entries as deleted with the correct
3433         marker.
3434
3435 2003-11-08  Hrvoje Niksic  <hniksic@xemacs.org>
3436
3437         * http.c (persistent_available_p): No reason for the host lookup
3438         to be silent -- it's a lookup like any other.
3439
3440 2003-11-08  Hrvoje Niksic  <hniksic@xemacs.org>
3441
3442         * connect.c (register_extended): Check that fd >= 0.
3443
3444 2003-11-07  Hrvoje Niksic  <hniksic@xemacs.org>
3445
3446         * connect.c (LAZY_RETRIEVE_INFO): Set LAST_INFO.
3447
3448 2003-11-07  Hrvoje Niksic  <hniksic@xemacs.org>
3449
3450         * hash.c (NON_EMPTY): Use the all-bit-set value as the marker that
3451         the field is empty.  This allows NULL pointer and 0 value to be
3452         used as keys, which is necessary for the connect.c code to work
3453         when fd==0.
3454         (hash_table_new): Fill mappings with 0xff.
3455         (grow_hash_table): Ditto.
3456
3457 2003-11-07  Hrvoje Niksic  <hniksic@xemacs.org>
3458
3459         * url.c (url_parse): Allow empty ports.
3460
3461 2003-11-07  Hrvoje Niksic  <hniksic@xemacs.org>
3462
3463         * main.c (print_help): Break the help string into multiple chunks.
3464         (cmdline_option): New option handler OPT_FUNCALL.  Generalized
3465         HANDLE_CMD to generic DATA.
3466         (option_data): Use the new OPT_FUNCALL feature.
3467
3468 2003-11-06  Hrvoje Niksic  <hniksic@xemacs.org>
3469
3470         * log.h: Declare log_init, log_close, and
3471         log_request_redirect_output here.
3472
3473 2003-11-05  Dennis Smit  <ds@nerds-incorporated.org>
3474
3475         * main.c: (main): added --preserve-permissions option.
3476
3477         * ftp.c (ftp_retrieve_list): added support for
3478         --preserve-permissions option.
3479
3480         * init.c: added support for --preserve-permission option.
3481
3482         * option.h: added support for --preserve-permission option.
3483
3484 2003-11-06  Hrvoje Niksic  <hniksic@xemacs.org>
3485
3486         * main.c (init_switches): New function.  Convert option_data to
3487         long_options and short_options, which can be fed to getopt_long.
3488         (main): Execute command-line options by consulting option_data.
3489
3490 2003-11-06  Hrvoje Niksic  <hniksic@xemacs.org>
3491
3492         * gen_sslfunc.c (ssl_read): Implement a more correct check for
3493         EINTR.
3494         (ssl_write): Ditto.
3495         (init_ssl): Use a global SSL context.
3496
3497 2003-11-06  Hrvoje Niksic  <hniksic@xemacs.org>
3498
3499         * connect.c (xclose): Free INFO even if it doesn't provide a
3500         closer.
3501
3502 2003-11-06  Hrvoje Niksic  <hniksic@xemacs.org>
3503
3504         * connect.c: Updated all callers of
3505         iread/ssl_iread/iwrite/ssl_iwrite to use xread and xwrite instead.
3506
3507         * rbuf.h (struct rbuf): Removed the SSL member because SSL is
3508         handled automatically by xread.
3509
3510         * hash.c (ptrhash): Made private.
3511         (ptrcmp): Ditto.
3512         (inthash): Removed.
3513
3514         * connect.c (select_fd): Don't set errno, leave it to the caller.
3515
3516         * gen_sslfunc.c (connect_ssl): Use register_extended to register
3517         SSL callbacks for communication with SSL-enabled endpoints.
3518         (ssl_read): New function.
3519         (ssl_write): Ditto.
3520         (ssl_poll): Ditto.
3521         (ssl_close): Ditto.
3522
3523         * connect.c (register_extended): New function -- register
3524         callbacks for basic socket operations.
3525         (xread): Ditto.
3526         (xwrite): Ditto.
3527         (xclose): Ditto.
3528         (sock_read): New function, default implementation for reading.
3529         (sock_write): Ditto for writing.
3530         (sock_poll): Ditto for polling.
3531         (sock_close): Ditto for closing.
3532
3533 2003-11-05  Hrvoje Niksic  <hniksic@xemacs.org>
3534
3535         * connect.c (bindport): Fix compilation under pre-C99 compilers.
3536
3537 2003-11-05  Hrvoje Niksic  <hniksic@xemacs.org>
3538
3539         * connect.c (connect_to_ip): More compact error checking.
3540         (bindport): Don't treat failed setsockopt as a fatal error.
3541
3542 2003-11-05  Hrvoje Niksic  <hniksic@xemacs.org>
3543
3544         * connect.c (resolve_bind_address): Use a more accurate error
3545         message -- we're not binding to ANY, we're disabling bind
3546         altogether.
3547
3548 2003-11-05  Hrvoje Niksic  <hniksic@xemacs.org>
3549
3550         * cookies.c (save_cookies_mapper): Respect the setting of
3551         keep-session-cookies.
3552         (cookie_jar_load): Import session cookies.
3553         Based on code submitted by Nicolas Schodet.
3554
3555         * utils.c (datetime_str): Use information in TM when it's
3556         non-NULL.
3557
3558         * main.c (main): New option `--keep-session-cookies'.
3559
3560 2003-11-04  Hrvoje Niksic  <hniksic@xemacs.org>
3561
3562         * Makefile.in (realclean): Delete config.h.in.
3563
3564 2003-11-04  Hrvoje Niksic  <hniksic@xemacs.org>
3565
3566         * config-post.h: New file, included from now autogenerated
3567         config.h.in.
3568
3569 2003-11-04  Hrvoje Niksic  <hniksic@xemacs.org>
3570
3571         * progress.c (progress_handle_sigwinch): Don't call
3572         determine_screen_width() from the signal handler.  Instead, just
3573         set a volatile variable.
3574         (bar_create): Check whether SIGWINCH was received.
3575         (bar_update): Ditto.
3576
3577         * sysdep.h: Define SYSTEM_FNMATCH only if HAVE_FNMATCH_H is true.
3578
3579 2003-11-03  Hrvoje Niksic  <hniksic@xemacs.org>
3580
3581         * utils.c (xsleep): New function.  Uses nanosleep where available,
3582         resuming sleeps interrupted by signals.  Updated callers of sleep
3583         and usleep to use xsleep.
3584
3585 2003-11-03  Hrvoje Niksic  <hniksic@xemacs.org>
3586
3587         * ftp-basic.c (ftp_login): Remove shadowing (and bogus)
3588         declaration of SEED.
3589
3590 2003-11-03  Hrvoje Niksic  <hniksic@xemacs.org>
3591
3592         * log.c (logvprintf): Documented better.  Renamed to
3593         log_vprintf_internal to avoid confusion with the public API
3594         functions logprintf and logputs.
3595
3596 2003-11-03  Hrvoje Niksic  <hniksic@xemacs.org>
3597
3598         * wget.h (N_): Don't parenthesize argument.
3599
3600 2003-11-03  Hrvoje Niksic  <hniksic@xemacs.org>
3601
3602         * host.h (ADDRESS_IPV4_DATA): Don't take the address of in.s_addr
3603         because that doesn't work on machines that define it as bitfield.
3604
3605 2003-11-03  Hrvoje Niksic  <hniksic@xemacs.org>
3606
3607         * connect.c (select_fd): Generalize the third argument into WAIT,
3608         so that the caller can request waiting for both read and write.
3609         Updated callers.
3610
3611 2003-11-02  Hrvoje Niksic  <hniksic@xemacs.org>
3612
3613         * html-url.c (cleanup_html_url): Destroy the hash tables, don't
3614         just call free on them.
3615         (init_interesting): Use hash_table_put instead of string_set_add
3616         because we don't need the strdup that the latter function
3617         performs.
3618
3619         * init.c (cleanup): Don't pass NULL to cookie_jar_delete.
3620
3621         * xmalloc.c (xfree_real): Abort when passed a NULL pointer.
3622         (xfree_debug): Print at the file and line of the offending call to
3623         free.
3624
3625 2003-11-02  Hrvoje Niksic  <hniksic@xemacs.org>
3626
3627         * wget.h: Retired the `boolean' type.  Moved the DEFAULT_LOGFILE
3628         define to log.h.  Moved the INFINITE_RECURSION define to recur.h.
3629
3630         * xmalloc.h: Renamed FREE_MAYBE to xfree_null and moved the
3631         definition from wget.h to xmalloc.h.
3632
3633 2003-11-02  Hrvoje Niksic  <hniksic@xemacs.org>
3634
3635         * html-parse.c (decode_entity): New function; split the decoding
3636         of entities here.
3637         (convert_and_copy): Use it to decode entities.
3638         (decode_entity): Handle the &apos entity.
3639         (decode_entity): Don't decode Latin 1 numeric entities.  Don't
3640         decode &#0.
3641
3642 2003-11-01  Hrvoje Niksic  <hniksic@xemacs.org>
3643
3644         * ftp-opie.c (calculate_skey_response): Use uint32_t instead of
3645         `unsigned long' for the cheksum array.  Document the function.
3646
3647 2003-11-01  Hrvoje Niksic  <hniksic@xemacs.org>
3648
3649         * connect.c (acceptport): Don't call select_fd when timeout is not
3650         requested.
3651
3652 2003-11-01  Hrvoje Niksic  <hniksic@xemacs.org>
3653
3654         * host.c: Removed the ip_default_family global variable.
3655
3656         * host.c (lookup_host): Document the function.  Fixed declaration
3657         of VEC.
3658
3659 2003-10-31  Hrvoje Niksic  <hniksic@xemacs.org>
3660
3661         * various: Use new macros xnew, xnew0, xnew_array, and xnew0_array
3662         in various places.
3663
3664 2003-10-31  Hrvoje Niksic  <hniksic@xemacs.org>
3665
3666         * wget.h: Move declarations of malloc and logging code to
3667         xmalloc.h and log.h respectively to unclutter this file.
3668         (STRDUP_ALLOCA): Made it side-effect free.
3669
3670         * xmalloc.h: New files.  Define macros xnew, xnew0, xnew_array,
3671         and xnew0_array.
3672
3673         * xmalloc.c: New file.  Move the xmalloc routines here.
3674
3675 2003-10-31  Hrvoje Niksic  <hniksic@xemacs.org>
3676
3677         * connect.c (sockaddr_set_data): Remove the broken code that
3678         checked for NULL address.
3679
3680 2003-10-31  Hrvoje Niksic  <hniksic@xemacs.org>
3681
3682         * host.c (address_list_from_single): Removed.
3683         (address_list_from_ipv4_addresses): Renamed from
3684         address_list_from_vector.
3685
3686 2003-10-31  Hrvoje Niksic  <hniksic@xemacs.org>
3687
3688         * sysdep.h (CLOSE): Don't call close on file descriptors less than
3689         0, i.e. on uncreated sockets.
3690
3691         * connect.c (resolve_bind_address): Work on struct sockaddr
3692         directly.
3693         (connect_to_host): Replacement for connect_to_many.  Resolve HOST
3694         and connect to any of its addresses.  If we can't connect and the
3695         host name lookup was cached, try to resolve it again.  This should
3696         fix problems with hosts behind dynamic DNS.  Updated all callers.
3697         (connect_to_ip): Replacement for connect_to_one.  Removed SILENT;
3698         added the argument PRINT instead.  Updated all callers.
3699         (set_connection_host_name): Removed.
3700
3701         * host.c (address_list_address_at): New function instead of
3702         address_list_copy_one. It returns a pointer to ip_address *, so
3703         it's not necessary to copy the data.
3704         (address_list_cached_p): New function.
3705         (forget_host_lookup): Ditto.
3706
3707         * connect.c: Got rid of the MSOCK global variable.  Made bindport
3708         return the local socket it creates.  Added a new argument to
3709         acceptport, the socket to call accept on.  Updated callers.
3710         (closeport): Removed.
3711
3712         * connect.c: Moved the sockaddr code from host.c to this file,
3713         because most of that stuff is used for connecting, and has nothing
3714         to do with host names anyway.
3715         (sockaddr_set_data, sockaddr_get_data): New functions, replace the
3716         old sockaddr_set_address, sockaddr_set_port, sockaddr_get_address,
3717         and sockaddr_get_port.
3718
3719 2003-10-30  Hrvoje Niksic  <hniksic@xemacs.org>
3720
3721         * sysdep.h: Use `S >= 8' rather than `S == 8' when looking for
3722         large integers.
3723
3724 2003-10-30  Hrvoje Niksic  <hniksic@xemacs.org>
3725
3726         * url.c (append_uri_pathel): New argument ESCAPED_P that says
3727         whether [B, E) is to be treated as URL-escaped or not.  If
3728         ESCAPED_P is false, don't unescape the region.
3729         (url_file_name): u->file is not URL-escaped.
3730
3731 2003-10-30  Hrvoje Niksic  <hniksic@xemacs.org>
3732
3733         * retr.c (retrieve_from_file): Use retrieve_tree for
3734         page-requisites.
3735
3736         * main.c (main): Don't define opt.recursive when -p is used.
3737         Instead, make sure that recursion is used for HTTP in that case.
3738
3739 2003-10-29  Hrvoje Niksic  <hniksic@xemacs.org>
3740
3741         * host.h: Defined accessors for elements of ip_address.  Updated
3742         all callers.
3743         (address_list_match_all): Use memcmp in the non-IPv6 case.
3744
3745         * wget.h (CONNECT_ERROR): Don't retry connecting if connect()
3746         returned EAFNOSUPPORT.
3747
3748 2003-10-27  Mauro Tortonesi <mauro@deepspace6.net>
3749
3750         * connect.h: changed bindport prototype and added the related
3751         BIND_ON_IPV4_ONLY and BIND_ON_IPV6_ONLY flags.
3752
3753         * connect.c: changed bindport and resolve_bind_address to allow
3754         protocol-version specific DNS resolution. modified conaddr,
3755         acceptport and connect_to_one to make use of struct
3756         sockaddr_storage and of the new ip_address structure.
3757
3758         * ftp-basic.c: added LPRT/LPSV (RFC1639) support, refactored
3759         PORT/PASV (RFC959) and EPRT/EPSV (RFC2428) support code.
3760
3761         * ftp.c: added the ftp_do_port and ftp_do_pasv functions to
3762         handle FTP over IPv6.
3763
3764         * ftp.h: changed prototype of ftp_epsv and added prototypes for
3765         ftp_lpsv, ftp_lprt and ftp_eprt.
3766
3767         * host.c: renamed the
3768         wget_sockaddr_set_address and wget_sockaddr_get_addr, and
3769         wget_sockaddr_{s,g}et_port couples to sockaddr_{s,g}et_address and
3770         sockaddr_{g,s}et_port respectively.  changed
3771         address_list_match_all, address_list_from_addrinfo sockaddr_len,
3772         pretty_print_address, lookup_host, sockaddr_{s,g}et_address and
3773         sockaddr_{g,s}et_port to make use of struct sockaddr_storage and
3774         of the new ip_address structure.  removed map_ipv4_to_ip and
3775         map_ip_to_ipv4.
3776
3777         * host.h: redefined structure ip_address and removed structure
3778         wget_sockaddr.
3779
3780 2003-10-26  Hrvoje Niksic  <hniksic@xemacs.org>
3781
3782         * sysdep.h: Include inttypes.h where available.
3783
3784         * host.c: Switch from u_int32_t to uint32_t.
3785
3786 2003-10-26  Hrvoje Niksic  <hniksic@xemacs.org>
3787
3788         * netrc.c (parse_netrc): Reset the QUOTE flag after the closing
3789         quote.
3790
3791 2003-10-25  Hrvoje Niksic  <hniksic@xemacs.org>
3792
3793         * url.c (is_valid_ipv6_address): Reformat to GNU coding style.
3794         Use enums for NS_IN* constants.  Use ISXDIGIT.
3795
3796         * convert.c (construct_relative): Document better how the function
3797         works.
3798
3799 2003-10-23  Hrvoje Niksic  <hniksic@xemacs.org>
3800
3801         * config.h.in: Deploy preprocessor magic to avoid Ultrix's
3802         <netdb.h> include <bitypes.h> which defines its own u_int32_t.
3803         Reported by Bernhard Simon.
3804
3805 2003-10-23  Hrvoje Niksic  <hniksic@xemacs.org>
3806
3807         * version.c: Bump version.
3808
3809 2003-10-23  Hrvoje Niksic  <hniksic@xemacs.org>
3810
3811         * url.c: Ditto.
3812
3813         * html-parse.c (advance_declaration): Don't use trailing comma in
3814         enum because older compilers don't support it.
3815
3816         * utils.c: Don't redefine HAVE_SIGSETJMP.
3817
3818 2003-10-16  Hrvoje Niksic  <hniksic@xemacs.org>
3819
3820         * convert.c (construct_relative): Don't handle absolute files
3821         specially -- for example, -P/tmp/foo shouldn't imply that
3822         converted files must refer to "/tmp/foo/..."!
3823
3824 2003-10-15  Hrvoje Niksic  <hniksic@xemacs.org>
3825
3826         * http.c: Consider status 307 a valid redirect.
3827
3828 2003-10-15  Philip Stadermann  <philip.stadermann@credativ.de>
3829
3830         * ftp.c (ftp_retrieve_glob): Correctly loop through the list whose
3831         elements might have been deleted.
3832
3833 2003-10-13  Hrvoje Niksic  <hniksic@xemacs.org>
3834
3835         * html-url.c (tag_handle_meta): Set the Refresh link to expect
3836         HTML.
3837         (append_one_url): Renamed to append_url.
3838
3839 2003-10-13  Hrvoje Niksic  <hniksic@xemacs.org>
3840
3841         * sysdep.h: Only define u_int32_t.
3842
3843 2003-10-11  Hrvoje Niksic  <hniksic@xemacs.org>
3844
3845         * utils.c (large_int_to_string): Use snprintf() to print the
3846         number.  This will work even on systems where libc doesn't
3847         understand %lld, but the compiler does, because it will use our
3848         snprintf replacement.
3849
3850         * init.c (parse_bytes_helper): New function.
3851         (cmd_bytes): Use it to parse bytes, but cast the result to long.
3852         (cmd_bytes_large): Ditto, but store the result to LARGE_INT.  Used
3853         for --quota so that --quota=10G works even on machines without
3854         long long.
3855
3856         * options.h (struct options): Declare quota as LARGE_INT.
3857
3858         * retr.c (downloaded_exceeds_quota): Removed.
3859         (downloaded_increase): Ditto.
3860         (total_downloaded_bytes): New variable, replaces opt.downloaded,
3861         which was the wrong place for it anyway.  Updated callers of
3862         downloaded_exceeds_quota and downloaded_increase to check this
3863         variable directly.
3864
3865         * sysdep.h: Get rid of VERY_LONG_TYPE.  Use LARGE_INT for the same
3866         purpose, defined as `long', `long long' or `double', depending on
3867         size of long and whether long long is available.
3868
3869 2003-10-11  Hrvoje Niksic  <hniksic@xemacs.org>
3870
3871         * sysdep.h: Also check size of short for int32_t.
3872
3873 2003-10-11  Hrvoje Niksic  <hniksic@xemacs.org>
3874
3875         * host.c (lookup_host): Use u_int32_t to store the result of
3876         inet_addr().  That removes the need for offset fiddling, caring
3877         about endian-ness, etc.
3878
3879         * sysdep.h: Define int32_t and u_int32_t if not available.
3880
3881 2003-10-11  Hrvoje Niksic  <hniksic@xemacs.org>
3882
3883         * ftp-basic.c (ftp_epsv): Use socklen_t * as the third argument to
3884         getpeername.
3885
3886         * config.h.in: Define socklen_t stub.
3887
3888         * host.c (sockaddr_len): Return socklen_t.
3889
3890         * connect.c (conaddr): Use socklen_t as the third argument to
3891         accept, getsockname, and connect.
3892
3893 2003-10-10  Hrvoje Niksic  <hniksic@xemacs.org>
3894
3895         * recur.c (retrieve_tree): Don't descend into documents that are
3896         not expected to contain HTML, regardless of their content-type.
3897
3898         * html-url.c (tag_url_attributes): Record which attributes are
3899         supposed to yield HTML links that can be followed.
3900         (tag_find_urls): Propagate that information to the caller through
3901         struct urlpos.
3902
3903 2003-10-10  Hrvoje Niksic  <hniksic@xemacs.org>
3904
3905         * hash.c (find_mapping): Return the next available mapping when
3906         the key is not found, not NULL.
3907         (hash_table_put): Use find_mapping to find the storage for the new
3908         data.
3909         (hash_table_put): Grow the table before exceeding maximum
3910         fullness, not afterwards.
3911
3912 2003-10-10  Hrvoje Niksic  <hniksic@xemacs.org>
3913
3914         * hash.c (hash_table_new): Slightly change the meaning of the
3915         first parameter.  Instead of being the minimum initial size, it is
3916         now the minimum number of items that the hash table can take
3917         without needing to resize.
3918
3919 2003-10-09  Hrvoje Niksic  <hniksic@xemacs.org>
3920
3921         * html-url.c (init_interesting): Initialize interesting_tags and
3922         interesting_attributes as hash tables.  This simplifies the code
3923         immensely because hash tables handle allocation and remove
3924         duplicates automatically.
3925         (find_tag): Removed.
3926         (collect_tags_mapper): Instead of calling find_tag, simply get the
3927         entry from interesting_tags hash table, which is both simpler and
3928         faster.
3929
3930 2003-10-09  Hrvoje Niksic  <hniksic@xemacs.org>
3931
3932         * hash.c (hash_table_get): Declare hash-table argument as const.
3933         (find_mapping): Ditto.
3934         (hash_table_get_pair): Ditto.
3935         (hash_table_contains): Ditto.
3936         (hash_table_count): Ditto.
3937
3938 2003-10-08  Hrvoje Niksic  <hniksic@xemacs.org>
3939
3940         * html-url.c (get_urls_html): Parse the appropriate flags to
3941         html-parse.c.
3942
3943         * html-parse.c (map_html_tags): Accept FLAGS from the caller
3944         instead of examining OPT.
3945
3946 2003-10-08  Hrvoje Niksic  <hniksic@xemacs.org>
3947
3948         * html-url.c (find_tag): Switch to binary search.
3949
3950 2003-10-08  Hrvoje Niksic  <hniksic@xemacs.org>
3951
3952         * main.c (print_help): Fix typo; stured -> stored.
3953
3954 2003-10-08  Hrvoje Niksic  <hniksic@xemacs.org>
3955
3956         * getopt.c: Add definitions of getopt_long and getopt_long_only.
3957
3958 2003-10-08  Hrvoje Niksic  <hniksic@xemacs.org>
3959
3960         * config.h.in: Renamed DEBUG to ENABLE_DEBUG.  ENABLE_DEBUG is, I
3961         think, a better name, because it implies that debugging output is
3962         merely possible, not "on by default", as might be construed from
3963         just DEBUG.
3964
3965 2003-10-08  Hrvoje Niksic  <hniksic@xemacs.org>
3966
3967         * ftp.c (has_insecure_name_p): Define it here.
3968
3969         * utils.c (has_wildcards_p): Define it here.
3970
3971         * sysdep.h: Declare fnmatch-related macros here, if not using
3972         system fnmatch().  Update .c files to not declare fnmatch.h
3973         directly.
3974
3975         * cmpt.c (fnmatch): Moved here.  Use it only under non-GNU libc.
3976
3977 2003-10-08  Hrvoje Niksic  <hniksic@xemacs.org>
3978
3979         * getopt.c: Newer version, imported from Free libit.
3980
3981 2003-10-07  Hrvoje Niksic  <hniksic@xemacs.org>
3982
3983         * cookies.c (struct cookie): Remove unused backpointer to cookie
3984         jar.
3985
3986 2003-10-07  Hrvoje Niksic  <hniksic@xemacs.org>
3987
3988         * cmpt.c (memmove): Comment out, since it's no longer used.
3989
3990         * cookies.c (cookie_jar_generate_cookie_header): Allocate room for
3991         chains in one pass.
3992         (find_chains_of_host): Assume that the caller has allocated DEST
3993         to be sufficiently large to take all the data.
3994         (eliminate_dups): Run through the array and eliminate dups on the
3995         fly instead of using memmove.
3996         (cookie_jar_process_set_cookie): Free cookie->domain before
3997         re-setting it.
3998
3999 2003-10-05  Gisle Vanem  <giva@bgnett.no>
4000
4001         * mswindows.c (set_sleep_mode): Fix type of
4002         _SetThreadExecutionState.
4003
4004 2003-10-05  Hrvoje Niksic  <hniksic@xemacs.org>
4005
4006         * utils.c (file_size): Return -1 if fopen() returns NULL.  Prior
4007         to this patch, wget --post-file=nosuchfile dumped core.
4008
4009 2003-10-04  Gisle Vanem  <giva@bgnett.no>
4010
4011         * mswindows.c (run_with_timeout): Use WaitForSingleObject to wait
4012         for thread termination.
4013
4014 2003-10-04  Hrvoje Niksic  <hniksic@xemacs.org>
4015
4016         * log.c: Use `...' in function definitions; ansi2knr will convert
4017         them to va_dcl.  This allowed removal of the ugly VA_START_1 and
4018         VA_START_2 macros.
4019
4020 2003-10-03  Gisle Vanem  <giva@bgnett.no>
4021
4022         * connect.c: And don't include them here.
4023
4024         * mswindows.h: Include winsock headers here.
4025
4026 2003-10-03  Hrvoje Niksic  <hniksic@xemacs.org>
4027
4028         * html-parse.c (convert_and_copy): Move variable declarations
4029         before statements.
4030
4031 2003-10-02  Gisle Vanem  <giva@bgnett.no>
4032         
4033         * mswindows.c (run_with_timeout): For Windows: Run the 'fun' in a
4034         thread via a helper function. Continually query the thread's
4035         exit-code until finished or timed out.
4036
4037 2003-10-02  Hrvoje Niksic  <hniksic@xemacs.org>
4038
4039         * wget.h (XMALLOC_ARRAY): Removed.
4040         (ALLOCA_ARRAY): Ditto.
4041
4042         * html-parse.c: Renamed alloca_p to resized.
4043         (GROW_ARRAY): Renamed DO_REALLOC_FROM_ALLOCA to GROW_ARRAY and
4044         returned it to html-parse.c, since nothing else was using it.
4045
4046 2003-10-02  Hrvoje Niksic  <hniksic@xemacs.org>
4047
4048         * retr.c (retrieve_url): Initialize DUMMY storage for DT.  Caught
4049         by valgrind.
4050
4051 2003-10-02  Hrvoje Niksic  <hniksic@xemacs.org>
4052
4053         * html-parse.c (convert_and_copy): Handle numeric entities in
4054         hexadecimal, &#xHH.
4055         (convert_and_copy): Copy the contents directly to the pool without
4056         a stack-allocated intermediary.
4057
4058 2003-10-02  Hrvoje Niksic  <hniksic@xemacs.org>
4059
4060         * utils.c (alarm_set): New function; use either setitimer or alarm
4061         to set up the alarm.
4062         (alarm_cancel): New function; cancel the alarm set up by
4063         alarm_set.
4064         (run_with_timeout): Use them.
4065
4066 2003-10-01  Hrvoje Niksic  <hniksic@xemacs.org>
4067
4068         * url.c (url_parse): Don't leak memory when a reencoded URL turns
4069         out to be invalid.
4070
4071         * url.c (parse_errors): Mark error messages for translation.
4072         (url_error): Translate error messages returned to the caller.
4073
4074 2003-10-01  Hrvoje Niksic  <hniksic@xemacs.org>
4075
4076         * ftp.c (ftp_loop_internal): Initialize TMRATE to NULL to shut up
4077         the compiler.
4078
4079 2003-09-26  Gisle Vanem  <giva@bgnett.no>
4080
4081         * src/mswindows.c: Added ws_percenttitle() showing progress in the
4082         window titlebar. Called from retr.c. Secured ws_mypath().
4083
4084         * windows/config.h.ms: alloca() prototype not needed.  Removed
4085         "#undef ENABLE_NLS"; should be in Makefile IMHO. Moved
4086         WGET_USE_STDARG from mswindows.h to config.ms.h because of #ifdef
4087         in log.c. (MSVC's vararg.h and stdarg.h are incompatible).
4088
4089 2003-09-29  Aaron Hawley <Aaron.Hawley@uvm.edu>
4090
4091         * ftp.c (getftp): --spider option should now work with FTP
4092         downloads.
4093         (ftp_loop_internal): quiet reports and calculations of downloads
4094         when --spider option set, nor try deleting when --delete-after
4095         also set.
4096         (ftp_loop): --spider will skip HTML-ification of .listing file.
4097
4098 2003-09-26  Gisle Vanem  <giva@bgnett.no>
4099
4100         * mswindows.c (read_registry): Removed.
4101         (set_sleep_mode): New function.
4102         (windows_main_junk): Call it.
4103
4104 2003-09-26  Gisle Vanem  <giva@bgnett.no>
4105
4106         * mswindows.c (read_registry): Fix invocation of registry
4107         functions.
4108
4109         * mswindows.c (read_registry): Condition definitions of sleep and
4110         usleep with not HAVE_SLEEP and HAVE_USLEEP respectively.  Define
4111         HAVE_SLEEP and HAVE_USLEEP under __DMC__.
4112
4113 2003-09-24  Hrvoje Niksic  <hniksic@xemacs.org>
4114
4115         * url.c (url_escape_1): Revert unintentional change to lowercase
4116         xdigit escapes.
4117         (url_escape_dir): Document that this function depends on the
4118         output of url_escape_1.
4119
4120 2003-09-23  Hrvoje Niksic  <hniksic@xemacs.org>
4121
4122         * progress.c (create_image): Print the current ETA if we're done
4123         with the download.
4124         (create_image): Change '-' display char to '+' in the progress bar.
4125
4126         * Makefile.in (clean): Remove .libs.
4127
4128 2003-09-23  Hrvoje Niksic  <hniksic@xemacs.org>
4129
4130         * cookies.c (struct cookie): New flag domain_exact.
4131         (update_cookie_field): Skip leading dot in domain.
4132         (find_matching_chains): Match numeric addresses exactly; don't
4133         needlessly copy HOST to the stack.
4134         (matching_cookie): Added argument HOST.  If cookie->domain_exact
4135         is set, check that HOST is equal to cookie->domain.
4136         (cookie_jar_load): Only use TAB as delimiter.  Document the
4137         meaning of DOMAIN-FLAG.  Skip leading dot in domain.
4138         (cookie_jar_load): Don't ignore DOMAIN-FLAG -- instead, set
4139         domain_exact to true if DOMAIN-FLAG is false.
4140         (save_cookies_mapper): If domain_exact is false, prepend the
4141         domain with dot, like Mozilla does.
4142
4143 2003-09-22  Hrvoje Niksic  <hniksic@xemacs.org>
4144
4145         * progress.c (create_image): Print the initial part of the
4146         download with '-' characters, analogous to how dot progress prints
4147         the initial part with ','.
4148
4149         * hash.c (ptrhash): New function.
4150         (ptrcmp): Ditto.
4151         (hash_table_new): Default to identity hash table.
4152
4153 2003-09-22  Hrvoje Niksic  <hniksic@xemacs.org>
4154
4155         * safe-ctype.h (_sch_test): The cast of BIT to unsigned char was
4156         broken -- _sch_istable bitmasks are 16-bit, not 8-bit!  Cast BIT
4157         to unsigned short instead.
4158
4159 2003-09-22  Hrvoje Niksic  <hniksic@xemacs.org>
4160
4161         * url.c (path_simplify): Instead of calls to memmove, handle "./"
4162         and "../" by advancing pointers.
4163
4164 2003-09-22  Hrvoje Niksic  <hniksic@xemacs.org>
4165
4166         * retr.c (getproxy): Moved from url.c.
4167
4168         * convert.c: Split off link conversion from url.c into separate
4169         file.  Also included the book-keeping stuff from recur.c.
4170
4171 2003-09-21  Hrvoje Niksic  <hniksic@xemacs.org>
4172
4173         * init.c: Improved documentation of functions.
4174         (cmd_boolean): Attempt to make code that tries to avoid calling
4175         strcmp for "speed" a bit more readable.
4176
4177         * init.c (simple_atof): Report error on encountering non-digit,
4178         non-"." character.
4179         (simple_atoi): Replacement for myatoi(), calling interface
4180         compatible with simple_atof.  Updated myatoi's callers.
4181
4182 2003-09-21  Bertrand Demiddelaer  <bert@b3rt.org>
4183
4184         * url.c (path_simplify): Would read two bytes past the end of the
4185         string in the "./" case.
4186
4187 2003-09-21  Matthew J. Mellon  <mellon@tymenet.com>
4188
4189         * http.c (gethttp): Recognize content-type "application/xhtml+xml"
4190         as what Wget considers "text/html".
4191
4192 2003-09-21  Hrvoje Niksic  <hniksic@xemacs.org>
4193
4194         * connect.c (connect_with_timeout): Made timeout type double.
4195
4196         * options.h (struct options): New members read_timeout,
4197         dns_timeout, and connect_timeout.
4198         Use them.
4199
4200 2003-09-21  Hrvoje Niksic  <hniksic@xemacs.org>
4201
4202         * init.c (simple_atof): New function.
4203         (cmd_time): Use it.
4204         (cmd_bytes): Accept things like "1.5k" and such.  Use simple_atof
4205         to parse decimals.
4206
4207         * retr.c (limit_bandwidth): Adjust each sleep by the error of the
4208         previous one.
4209
4210 2003-09-21  Hrvoje Niksic  <hniksic@xemacs.org>
4211
4212         * main.c (main): Use setoptval() for setting the options.  Use
4213         run_command for `-e'.
4214
4215         * init.c (parse_line): Rewritten to return COMIND right away.
4216         Changed linkage to static.
4217         (run_wgetrc): Use the available comind when calling setval, so it
4218         doesn't have to be computed twice.
4219         (setval_internal): New function, runs the command's action without
4220         any error checking.
4221         (setoptval): New function, does what setval used to do, but exits
4222         in case of error.
4223         (run_command): New function.
4224
4225 2003-09-21  Hrvoje Niksic  <hniksic@xemacs.org>
4226
4227         * connect.c (select_fd): Change MAXTIME's type to double.  Handle
4228         its decimal part.
4229
4230         * retr.c (sleep_between_retrievals): In the random-wait case, use
4231         random_float() to wait between 0 and 2*opt.wait seconds.
4232
4233         * utils.c (run_with_timeout): Accept `double' timeouts.  Correctly
4234         handle timeout values in (0, 1) range.
4235         (random_float): New function.
4236
4237         * options.h (struct options): Change the types of wait, waitretry,
4238         and timeout to double.
4239
4240         * init.c (cmd_time): Accept floating point time.
4241
4242 2003-09-20  Hrvoje Niksic  <hniksic@xemacs.org>
4243
4244         * retr.c (get_contents): Cosmetic fixes.
4245
4246 2003-09-20  Hrvoje Niksic  <hniksic@xemacs.org>
4247
4248         * url.c (uri_merge): Get rid of uri_merge_1.
4249         (uri_merge): Merge "foo//", "bar" as "foo//bar", not "foo///bar",
4250         i.e. don't add an extra slash merely because BASE ends with two
4251         slashes.
4252         (parse_credentials): Renamed from parse_uname.  Rewrittern in
4253         standard [beg, end) calling style.
4254         (url_skip_credentials): Renamed from url_skip_uname.  Made static.
4255         (url_skip_credentials): Include # and ; as terminators.  Old code
4256         would mistakenly consider "http://foo.com#hniksic@iskon.hr" to
4257         contain a username.
4258         (url_skip_scheme): Removed because it was unused.
4259         (url_has_scheme): Require "scheme" to be at least one char long.
4260
4261 2003-09-19  Hrvoje Niksic  <hniksic@xemacs.org>
4262
4263         * url.c (url_file_name): Expect NULL dir_prefix.
4264
4265         * init.c (cmd_file): Use a macro to prevent multiple #ifdef
4266         WINDOWS.
4267         (defaults): Set dir_prefix to NULL by default.
4268
4269 2003-09-19  Hrvoje Niksic  <hniksic@xemacs.org>
4270
4271         * safe-ctype.h (_sch_test): Cast BIT to unsigned char, like latest
4272         gcc does.
4273
4274 2003-09-19  Hrvoje Niksic  <hniksic@xemacs.org>
4275
4276         * wget.h (BOUNDED_TO_ALLOCA): Evaluate PLACE only once.
4277         (ARRAY_SIZE): Renamed to countof.  All callers updated.
4278
4279 2003-09-19  Hrvoje Niksic  <hniksic@xemacs.org>
4280
4281         * main.c (main): New option --strict-comments.
4282
4283         * html-parse.c (find_comment_end): New function: simple BM search
4284         for "-->".
4285         (map_html_tags): Use it if looking at a comment and not in strict
4286         comments mode.
4287
4288 2003-09-17  Aurelien Marchand  <artaxerxes@users.sf.net>
4289
4290         * ftp.h: Added OS400 system in enum
4291         * ftp-basic.c: recognize OS400 systems
4292         * ftp.c: don't prepend the CWD if talking to OS400, since it
4293         breaks the change in library
4294
4295 2003-09-18  Hrvoje Niksic  <hniksic@xemacs.org>
4296
4297         * retr.c (get_contents): Pass the correct argument to ssl_iread.
4298
4299 2003-09-18  Hrvoje Niksic  <hniksic@xemacs.org>
4300
4301         * safe-ctype.h: Don't #define ctype.h macros to errors because
4302         that loses when someone #include's ctype.h after safe-ctype.h.
4303
4304 2003-09-17  Hrvoje Niksic  <hniksic@xemacs.org>
4305
4306         * url.c: Undef U, W, C after use.
4307
4308 2003-09-17  Hrvoje Niksic  <hniksic@xemacs.org>
4309
4310         * init.c (cmd_spec_restrict_file_names): Allow the OS setting to
4311         be augmented by ",nocontrol" which means don't escape the control
4312         characters, but otherwise keep OS settings.
4313
4314         * url.c (file_unsafe_char): Deleted.
4315         (append_uri_pathel): Query filechr_table directly.
4316         (filechr_table): Separated Unix, Windows, and control-unsafe
4317         characters.
4318
4319 2003-09-17  Hrvoje Niksic  <hniksic@xemacs.org>
4320
4321         * url.c (url_escape_1): New function.
4322         (url_escape): Use it.
4323         (sync_path): Handle pathological cases where u->file and u->dir
4324         contain really strange characters.
4325         (ENCODE): Deleted.
4326         (REENCODE): Deleted.
4327
4328 2003-09-16  Hrvoje Niksic  <hniksic@xemacs.org>
4329
4330         * url.c (url_file_name): Don't reallocate FNAME if the file
4331         doesn't exist, as is usually the case.
4332
4333         * utils.c (unique_name): New flag allow_passthrough.
4334
4335 2003-09-16  Hrvoje Niksic  <hniksic@xemacs.org>
4336
4337         * utils.c (wtimer_sys_diff): Convert the time difference to signed
4338         __int64, then to double.  This works around MS VC++ 6 which can't
4339         convert unsigned __int64 to double directly.
4340
4341 2003-09-16  Hrvoje Niksic  <hniksic@xemacs.org>
4342
4343         * Makefile.in (clean): Also remove the core.<number> files
4344         produced by recent Linux systems.
4345
4346 2003-09-16  Hrvoje Niksic  <hniksic@xemacs.org>
4347
4348         * http.c (post_file): Don't pad the file if it's not large
4349         enough.  Bail out instead.
4350
4351 2003-09-15  Hrvoje Niksic  <hniksic@xemacs.org>
4352
4353         * retr.c (get_contents): Reduce the buffer size to the amount of
4354         data that may pass through for one second.  This prevents long
4355         sleeps when limiting bandwidth.
4356
4357         * connect.c (connect_to_one): Reduce the socket's RCVBUF when
4358         bandwidth limitation to small values is requested.
4359
4360 2003-09-15  Hrvoje Niksic  <hniksic@xemacs.org>
4361
4362         * progress.c (update_speed_ring): Moved the speed ring update to a
4363         separate function and documented it better.
4364
4365         * progress.c: Use `double' for most timers to support granularity
4366         smaller than 1ms.
4367
4368 2003-09-15  Hrvoje Niksic  <hniksic@xemacs.org>
4369
4370         * wget.h (XDIGIT_TO_XCHAR): Implement as index into a literal
4371         string.
4372         (XDIGIT_TO_xchar): Ditto.
4373
4374 2003-09-15  Hrvoje Niksic  <hniksic@xemacs.org>
4375
4376         * utils.c: Change the type of timer-related functions from long to
4377         double, for better precision.  On machines supporting gettimeofday
4378         the timers now work with granularity of less than one millisecond.
4379
4380 2003-09-15  Hrvoje Niksic  <hniksic@xemacs.org>
4381
4382         * cookies.c (parse_set_cookies): Fixed the parser to handle more
4383         edge conditions.
4384         (test_cookies): New function, contains a test suite for
4385         parse_set_cookies.
4386
4387 2003-09-15  Hrvoje Niksic  <hniksic@xemacs.org>
4388
4389         * url.c (strpbrk_or_eos): Implement as a macro under Gcc.
4390
4391 2003-09-15  Hrvoje Niksic  <hniksic@xemacs.org>
4392
4393         * cookies.c (parse_set_cookies): Allow trailing space in
4394         set-cookies header.  Also, allow any amount of whitespace, not
4395         only one character.  Allow empty set-cookies header without
4396         spewing an error.
4397
4398 2003-09-14  Hrvoje Niksic  <hniksic@xemacs.org>
4399
4400         * url.c (append_uri_pathel): Use opt.restrict_file_names when
4401         calling file_unsafe_char.
4402
4403         * init.c: New command restrict_file_names.
4404
4405         * main.c (main): New option --restrict-file-names[=windows,unix].
4406
4407         * url.c (url_file_name): Renamed from url_filename.
4408         (url_file_name): Add directory and hostdir prefix here, not in
4409         mkstruct.
4410         (append_dir_structure): New function, does part of the work that
4411         used to be in mkstruct.  Iterates over path elements in u->path,
4412         calling append_uri_pathel on each one to append it to the file
4413         name.
4414         (append_uri_pathel): URL-unescape a path element and reencode it
4415         with a different set of rules, more appropriate for handling of
4416         files.
4417         (file_unsafe_char): New function, uses a lookup table to decide
4418         whether a character should be escaped for use in file name.
4419         (append_string): New utility function.
4420         (append_char): Ditto.
4421         (file_unsafe_char): New argument restrict_for_windows, decide
4422         whether Windows file names should be escaped in run-time.
4423
4424         * connect.c: Include <stdlib.h> to get prototype for abort().
4425
4426 2003-09-14  Hrvoje Niksic  <hniksic@xemacs.org>
4427
4428         * utils.c (wtimer_sys_set): Extracted the code that sets the
4429         current time here.
4430         (wtimer_reset): Call it.
4431         (wtimer_sys_diff): Extracted the code that calculates the
4432         difference between two system times here.
4433         (wtimer_elapsed): Call it.
4434         (wtimer_elapsed): Don't return a value smaller than the previous
4435         one, which could previously happen when system time is set back.
4436         Instead, reset start time to current time and note the elapsed
4437         offset for future calculations.  The returned times are now
4438         guaranteed to be monotonically nondecreasing.
4439
4440 2003-09-10  Hrvoje Niksic  <hniksic@xemacs.org>
4441
4442         * host.c (lookup_host): Print the result of the DNS lookup.
4443
4444 2003-09-10  Hrvoje Niksic  <hniksic@xemacs.org>
4445
4446         * init.c (cmd_boolean): Accept yes/no along with on/off.
4447         (cmd_lockable_boolean): Ditto.
4448
4449 2003-09-10  Hrvoje Niksic  <hniksic@xemacs.org>
4450
4451         * init.c: New command dns_cache.
4452
4453         * main.c (main): New option --dns-cache[=off].
4454
4455 2003-09-09  Hrvoje Niksic  <hniksic@xemacs.org>
4456
4457         * config.h.in: Initialize HAVE_GETADDRINFO and ENABLE_IPV6.
4458
4459         * all: Use #ifdef ENABLE_IPV6 instead of the older INET6.  Use
4460         HAVE_GETADDRINFO for getaddrinfo-related stuff.
4461
4462 2003-09-09  Hrvoje Niksic  <hniksic@xemacs.org>
4463
4464         * url.c (url_parse): Return an error if the URL contains a [...]
4465         IPv6 numeric address and we don't support IPv6.
4466
4467 2003-09-05  Hrvoje Niksic  <hniksic@xemacs.org>
4468
4469         * url.c (is_valid_ipv6_address): Modified to not require
4470         zero-terminated strings.
4471         (is_valid_ipv4_address): Ditto.
4472
4473 2003-09-05  Mauro Tortonesi <mauro@deepspace6.net>
4474
4475         src/url.c: added RFC 2732 compliance for URL parsing. The
4476         functions is_*_address valid are a modified version of
4477         glibc 2.3.2 inet_pton's code.
4478
4479 2003-09-03  Ahmon Dancy  <dancy@dancysoft.com>
4480
4481         * main.c init.c options.h: Added --retry-connrefused option so
4482         that Connection Refused failures are treated as non-fatal (when
4483         trying to retrieve from busy servers).
4484
4485         * wget.h: New CONNECT_ERROR macro for encapsulating this
4486         modification.
4487
4488         * ftp.c http.c : Use CONNECT_ERROR macro in places where
4489         ECONNREFUSED was checked.
4490
4491 2003-01-11  Ian Abbott  <abbotti@mev.co.uk>
4492
4493         * ftp.c (ftp_retrieve_glob): Reject insecure filenames as determined
4494         by calling new function has_insecure_name_p.  This is based on a
4495         patch by Red Hat.
4496
4497         * fnmatch.c (has_insecure_name_p): New function: returns non-zero
4498         if filename starts with `/' or contains `../' and is therefore
4499         considered insecure.
4500
4501         * fnmatch.h: Declare has_insecure_name_p().
4502
4503 2002-08-03  Hrvoje Niksic  <hniksic@xemacs.org>
4504
4505         * init.c (cmd_file): Allocate RESULT correctly.
4506
4507 2002-07-24  Hrvoje Niksic  <hniksic@xemacs.org>
4508
4509         * recur.c (retrieve_tree): Check whether downloaded_html_set is
4510         non-NULL before using it.
4511
4512 2002-05-27  Hrvoje Niksic  <hniksic@arsdigita.com>
4513
4514         * html-parse.c (NAME_CHAR_P): Allow almost any character here.
4515
4516 2002-05-24  Hrvoje Niksic  <hniksic@arsdigita.com>
4517
4518         * progress.c (bar_set_params): Fall back to dot progress if the
4519         terminal type is "emacs".
4520
4521 2002-05-20  Hrvoje Niksic  <hniksic@arsdigita.com>
4522
4523         * log.c: Don't #undef WGET_USE_STDARG.
4524
4525 2002-05-16  Hrvoje Niksic  <hniksic@arsdigita.com>
4526
4527         * hash.c (prime_size): Store the offset of the prime number in the
4528         prime table.  When searching, start with the given offset.
4529         (hash_table_new): Pass the pointer to ht->prime_offset to
4530         prime_size.
4531         (grow_hash_table): Ditto.
4532         (prime_size): Make 13 the first prime to make empty hash tables
4533         slightly smaller.
4534
4535 2002-05-16  Ian Abbott  <abbotti@mev.co.uk>
4536
4537         * recur.c (download_child_p): Minor optimization to avoid an
4538         unnecessary additional call to schemes_are_similar_p function.
4539
4540 2002-05-16  Ian Abbott  <abbotti@mev.co.uk>
4541
4542         * url.c (schemes_are_similar_p): New function to test enumerated
4543         scheme codes for similarity.
4544
4545         * url.h: Declare it.
4546
4547         * recur.c (download_child_p): Use it to compare schemes.  This
4548         also fixes a bug that allows hosts to be spanned (without the
4549         -H option) when the parent scheme is https and the child's is
4550         http or vice versa.
4551
4552 2002-05-14  Bill Richardson  <bill@riverstonenet.com>
4553
4554         * ftp.c (getftp): Don't ftruncate stdout.
4555
4556         * http.c (gethttp): Don't ftruncate stdout.
4557
4558 2002-05-09  Ian Abbott  <abbotti@mev.co.uk>
4559
4560         * cmpt.c (strptime_internal): Synched with glibc-2.1.3.
4561         (get_number): Ditto.
4562         (get_alt_number): Ditto.
4563         (__isleap): New function-like macro used by strptime.
4564         (day_of_the_week): New function used by strptime.
4565         (day_of_the_year): Ditto.
4566         (__mon_yday): Now shared by mktime and strptime implementations.
4567
4568 2002-05-08  Hrvoje Niksic  <hniksic@arsdigita.com>
4569
4570         * cookies.c (check_domain_match): Use match_tail in case
4571         insensitive mode.
4572
4573         * utils.c (match_tail): Allow the caller to specify case
4574         insensitive mode.
4575
4576         * cookies.c (store_cookie): When expiry_time is 0, print it as
4577         undefined, not indefinite.
4578
4579 2002-05-07  Ian Abbott  <abbotti@mev.co.uk>
4580
4581         * cookies.c (cookie_jar_process_set_cookie): Do not store
4582         discarded cookie.
4583
4584 2002-04-21  Hrvoje Niksic  <hniksic@arsdigita.com>
4585
4586         * cookies.c (check_domain_match): Allow cookies to be set for
4587         subdomains of unknown top-level domains under some circumstances.
4588
4589 2002-04-21  Thomas Lussnig  <thomas.lussnig@bewegungsmelder.de>
4590
4591         * gen_ssl.c:
4592         - allow checking of server cert
4593         - allow defining client cert type
4594         - allow limit of ssl protocol
4595         - check more return values
4596         - added debug message on break
4597
4598 2002-04-21  Hrvoje Niksic  <hniksic@arsdigita.com>
4599
4600         * recur.c (download_child_p): Revert order of items in check
4601         number 6 for clarity.
4602
4603 2002-04-20  Hrvoje Niksic  <hniksic@arsdigita.com>
4604
4605         * init.c: Ditto.
4606
4607         * main.c: Ditto.
4608
4609         * http.c: Use the new interface.
4610
4611         * cookies.c: Provide an OO-style "cookie jar" interface to enable
4612         separate cookie jars.
4613
4614         * http.c (http_atotm): Declare argument as const.
4615
4616 2002-04-20  Hrvoje Niksic  <hniksic@arsdigita.com>
4617
4618         * cookies.c (cookie_new): Default to PORT_ANY.
4619         (find_cookie_chain_exact): Only search by DOMAIN.
4620         (find_matching_cookie): Also check that PORT matches.
4621         (store_cookie): Only match the domain.
4622         (set_cookie_header_cb): When a cookie "fakes" a domain, assume it
4623         is valid for that host rather than discarding it completely.
4624         (find_matching_chains): Don't search by PORT.
4625         (matching_cookie): Also match PORT.
4626         (load_cookies): Set the port if specified, otherwise leave it as
4627         ANY.
4628         (save_cookies_mapper): Save the port if specified, otherwise leave
4629         it empty.
4630
4631 2002-04-19  Thomas Lussnig  <thomas.lussnig@bewegungsmelder.de>
4632
4633         * init.c: The option `egdfile' was not in sort order.
4634
4635 2002-04-16  Hrvoje Niksic  <hniksic@arsdigita.com>
4636
4637         * ftp.c (getftp): Treat directories that begin with <letter>: as
4638         absolute.
4639         (getftp): Strip trailing slashes from con->id before merging it
4640         with TARGET.
4641
4642 2002-04-16  Hrvoje Niksic  <hniksic@arsdigita.com>
4643
4644         * http.c (gethttp): If Content-Type is not given, assume
4645         text/html.
4646
4647 2002-04-15  Hrvoje Niksic  <hniksic@arsdigita.com>
4648
4649         * recur.c (download_child_p): Don't ignore rejection of HTML
4650         documents that are themselves leaves of recursion.
4651
4652 2002-04-15  Ian Abbott  <abbotti@mev.co.uk>
4653
4654         Makefile.in: Updated several dependencies for object files to take
4655         account of nested include files.
4656
4657 2002-04-15  Ian Abbott  <abbotti@mev.co.uk>
4658
4659         Makefile.in: The target `connect$o' (connect.o) now depends on
4660         `utils.h'
4661
4662 2002-04-15  Ian Abbott  <abbotti@mev.co.uk>
4663
4664         * host.c (SET_H_ERRNO): New function-like macro to set `h_errno'.
4665         (gethostbyname_with_timeout): Use it.
4666
4667         * utils.c: Don't define `SETJMP()', `run_with_timeout_env' or
4668         `abort_run_with_timeout()' when `USE_SIGNAL_TIMEOUT' is undefined.
4669
4670 2002-04-15  Hrvoje Niksic  <hniksic@arsdigita.com>
4671
4672         * host.c (getaddrinfo_with_timeout): New function.
4673         (gethostbyname_with_timeout): Ditto.
4674         (lookup_host): Use them.
4675
4676 2002-04-14  Hrvoje Niksic  <hniksic@arsdigita.com>
4677
4678         * utils.c (number_to_string): Handle the case when n < -INT_MAX.
4679
4680 2002-04-14  Hrvoje Niksic  <hniksic@arsdigita.com>
4681
4682         * init.c (comind): Use a marginally faster implementation of
4683         binary search.  To quote Martin Buchholz, "a nanosecond saved is a
4684         nanosecond earned."
4685
4686 2002-04-14  Hrvoje Niksic  <hniksic@arsdigita.com>
4687
4688         * main.c (print_help): Document `--post-data' and `--post-file'.
4689
4690 2002-04-14  Hrvoje Niksic  <hniksic@arsdigita.com>
4691
4692         * http.c (gethttp): Ditto.
4693
4694         * retr.c (retrieve_url): Initialize variables to appease the
4695         compiler.
4696
4697         * gen_sslfunc.c (ssl_iread): Don't handle EINTR when calling
4698         select_fd.
4699         (ssl_iwrite): Ditto.
4700
4701         * connect.c (select_fd): Rewrite to handle EINTR.  Set errno to
4702         ETIMEDOUT in case of timeout.
4703         (iread): No need to handle EINTR when calling select_fd.
4704         (iwrite): Ditto.
4705
4706 2002-04-14  Hrvoje Niksic  <hniksic@arsdigita.com>
4707
4708         * retr.c (retrieve_url): Make sure that POST is not honored for
4709         redirections.
4710
4711         * http.c (gethttp): Send the POST data when requested.
4712         (post_file): New function.
4713         (gethttp): Use it.
4714
4715         * main.c (main): Ditto.
4716
4717         * init.c: Add new options.
4718
4719         * options.h (struct options): New options post_data and
4720         post_file_name.
4721
4722 2002-04-14  Hrvoje Niksic  <hniksic@arsdigita.com>
4723
4724         * connect.c (connect_with_timeout): Firing SIGALRM can result in
4725         connect() exiting with EINTR.  Treat EINTR the same as ETIMEDOUT.
4726
4727 2002-04-13  Hrvoje Niksic  <hniksic@arsdigita.com>
4728
4729         * connect.c (connect_with_timeout): Use it.
4730
4731         * utils.c (run_with_timeout): New function.
4732
4733 2002-04-13  Hrvoje Niksic  <hniksic@arsdigita.com>
4734
4735         * url.c (getproxy): Accept a struct url argument.  This obviates
4736         the need for USE_PROXY_P.
4737
4738         * retr.c (retrieve_url): Allow proxy to be a non-FTP URL.
4739
4740         * ftp.c (getftp): Recognize FWTK-style proxy.
4741
4742 2002-04-12  Hrvoje Niksic  <hniksic@arsdigita.com>
4743
4744         * config.h.in: Only define _VA_LIST when compiled with gcc.
4745
4746 2002-04012  Ian Abbott  <abbotti@mev.co.uk>
4747
4748         * http.c (http_loop): Compensate for MS Windows two-second
4749         granularity of file modification time when comparing timestamps.
4750
4751         * ftp.c (ftp_retrieve_list): Ditto.
4752
4753 2002-04-12  Ian Abbott  <abbotti@mev.co.uk>
4754
4755         * utils.c (has_html_suffix_p): New function to test filename for
4756         common html extensions.
4757
4758         * utils.h: Declare it.
4759
4760         * http.c (http_loop): Use it instead of previous test.
4761
4762         * retr.c (retrieve_url): Ditto.
4763
4764         * recur.c (download_child_p): Ditto.
4765
4766 2002-04-12  Hrvoje Niksic  <hniksic@arsdigita.com>
4767
4768         * config.h.in: Define _VA_LIST on Solaris to prevent stdio.h from
4769         declaring va_list.
4770         From Kevin Rodgers <kevinr@ihs.com>.
4771
4772 2002-04-12  Ian Abbott  <abbotti@mev.co.uk>
4773
4774         * Makefile.in: Specify libtool mode explicitly when linking.
4775
4776 2002-04-12  Hrvoje Niksic  <hniksic@arsdigita.com>
4777
4778         * connect.c (connect_with_timeout): New function.
4779         (connect_to_one): Use it.
4780
4781         * config.h.in: Add stubs for HAVE_SIGSETJMP, HAVE_SIGBLOCK, and
4782         HAVE_SETJMP_H.
4783
4784 2002-04-11  Hrvoje Niksic  <hniksic@arsdigita.com>
4785
4786         * log.c: Set WGET_USE_STDARG if __STDC__ is defined and stdarg.h
4787         is present.
4788
4789 2002-04-11  Hrvoje Niksic  <hniksic@arsdigita.com>
4790
4791         * progress.c (bar_create): If INITIAL is larger than TOTAL, fix
4792         TOTAL.
4793         (bar_finish): Likewise.
4794
4795 2002-04-11  Hrvoje Niksic  <hniksic@arsdigita.com>
4796
4797         * html-url.c (tag_handle_form): New function.  Pick up form
4798         actions and mark them for conversion only.
4799
4800 2002-04-11  Hrvoje Niksic  <hniksic@arsdigita.com>
4801
4802         * progress.c (struct progress_implementation): Use PARAMS when
4803         declaring the parameters of *create, *update, *finish, and
4804         *set_params.
4805
4806         * netrc.c: Ditto.
4807
4808         * http.c: Reformat some function definitions so that ansi2knr can
4809         read them.
4810
4811         * hash.c (struct hash_table): Use the PARAMS macro around
4812         parameters in the declaration of hash_function and test_function.
4813         (prime_size): Spell 2580823717UL and 3355070839UL as (unsigned
4814         long)0x99d43ea5 and (unsigned long)0xc7fa5177 respectively, so
4815         that pre-ANSI compilers can read them.
4816         (find_mapping): Use PARAMS when declaring EQUALS.
4817         (hash_table_put): Ditto.
4818
4819         * ftp.h: Wrap the parameters of ftp_index declaration in PARAMS.
4820
4821         * cookies.c (cookie_new): Use (unsigned long)0 instead of 0UL,
4822         which was unsupported by pre-ANSI compilers.
4823
4824         From Nelson H. F. Beebe <beebe@math.utah.edu>, for the most part.
4825
4826 2002-04-11  Hrvoje Niksic  <hniksic@arsdigita.com>
4827
4828         * url.c (url_filename): Use compose_file_name regardless of
4829         whether opt.dirstruct is set.
4830         (mkstruct): Don't handle the query and the reencoding of DIR; that
4831         is done in compose_file_name.
4832
4833 2002-04-10  Hrvoje Niksic  <hniksic@arsdigita.com>
4834
4835         * wget.h: Ditto for extern char *exec_name.
4836
4837         * options.h: Don't guard against OPTIONS_DEFINED_HERE -- it is
4838         perfectly legal to follow an `extern' with a non-`extern' ones,
4839         provided the types match.
4840
4841         * main.c: Don't define OPTIONS_DEFINED_HERE.
4842
4843 2002-04-10  Hrvoje Niksic  <hniksic@arsdigita.com>
4844
4845         * progress.c (create_image): Revert to calculating ETA based on
4846         average download speed.
4847         (create_image): Don't print ETA until the download has been active
4848         for at least 3 seconds.
4849         (create_image): When ETA is not available, don't print anything.
4850         The previous version would print --:--.
4851
4852 2002-04-10  Hrvoje Niksic  <hniksic@arsdigita.com>
4853
4854         * progress.c (bar_update): Keep updating a subinterval until it
4855         reaches or exceeds a watermark.  That way the measurement will be
4856         guaranteed to span a configurable minimum of time.  The current
4857         default is 3s in 30 100ms intervals.
4858
4859 2002-04-09  Hrvoje Niksic  <hniksic@arsdigita.com>
4860
4861         * progress.c (bar_update): Maintain an array of the time it took
4862         to perform previous 30 network reads.
4863         (create_image): Calculate the download speed and ETA based on the
4864         last 30 reads, not the entire download.
4865         (create_image): Make sure that the ETA is not changed more than
4866         once per second.
4867
4868 2002-04-09  Ian Abbott  <abbotti@mev.co.uk>
4869
4870         * mswindows.c (borland_utime): New function conditionally defined
4871         when `HACK_BCC_UTIME_BUG' is defined.  A reimplementation of
4872         `utime()' as Borland's `utime()' function is broken on Windows 9x
4873         systems.  (Original patch by Chin-yuan Kuo <sr1111111@yahoo.com.tw>.)
4874
4875 2002-04-08  Hrvoje Niksic  <hniksic@arsdigita.com>
4876
4877         * ftp.c (ftp_loop): Propagate the result of ftp_retrieve_glob.
4878
4879 2002-03-26  Ian Abbott  <abbotti@mev.co.uk>
4880
4881         * Makefile.in: Updated several dependencies for object files.
4882
4883 2002-03-20  Ian Abbott  <abbotti@mev.co.uk>
4884
4885         * mswindows.c: Include "utils.h".
4886
4887 2002-03-18  Ian Abbott  <abbotti@mev.co.uk>
4888
4889         * host.h: Don't include netdb.h on windows.
4890
4891 2002-02-19  Hrvoje Niksic  <hniksic@arsdigita.com>
4892
4893         * recur.c (retrieve_tree): Handle the case when start_url doesn't
4894         parse.
4895
4896 2002-02-19  Andreas Damm  <andreas-sourceforge@radab.org>
4897
4898         * wget.h (DO_REALLOC_FROM_ALLOCA): Multiply with sizeof(type) when
4899         calling xmalloc and memcpy.
4900
4901 2002-02-19  Hrvoje Niksic  <hniksic@arsdigita.com>
4902
4903         * host.h: Include Unix-specific includes #ifndef WINDOWS.
4904         Patch originally provided by Christian Lackas.
4905
4906 2002-02-11  Christian Lackas  <delta@lackas.net>
4907
4908         * recur.c: recurive downloading for https fixed.
4909
4910 2002-02-19  Alan Eldridge  <alane@geeksrus.net>
4911
4912         * host.h: Also include <netinet/in.h> and <sys/socket.h>.
4913
4914         * ftp-basic.c: Also include <netinet/in.h>.
4915
4916 2002-02-05  Ian Abbott  <abbotti@mev.co.uk>
4917
4918         * http.c (gethttp): when -c used, mark already fully retrieved
4919         file as successfully retrieved.
4920
4921 2002-02-19  Hrvoje Niksic  <hniksic@arsdigita.com>
4922
4923         * url.c (url_parse): Don't treat '?' as query string separator
4924         when parsing FTP URLs.
4925
4926 2002-02-01  Hrvoje Niksic  <hniksic@arsdigita.com>
4927
4928         * html-url.c (tag_handle_meta): Don't crash on <meta
4929         http-equiv=refresh> where content is missing.
4930
4931 2002-01-31  Herold Heiko  <Heiko.Herold@previnet.it>
4932
4933         * ftp-basic.c, host.c: don't include sys/socket.h, arpa/inet.h,
4934         netdb.h on windows.
4935
4936 2002-01-30  Hrvoje Niksic  <hniksic@arsdigita.com>
4937
4938         * retr.c (retrieve_url): Remove redirection cycle detection.  This
4939         is because some sites legitimately redirect the user back to the
4940         same location, e.g. after an authorization check performed by
4941         another page.  MAX_REDIRECTIONS is still used to prevent infinite
4942         redirection loops.
4943
4944 2002-01-26  Hrvoje Niksic  <hniksic@arsdigita.com>
4945
4946         * http.c (gethttp): Wrap host name in square brackets if it
4947         contains a colon.
4948
4949 2002-01-26  Hrvoje Niksic  <hniksic@arsdigita.com>
4950
4951         * url.c (url_parse): Allow all hex digits, not only decimal ones,
4952         to form an IP address.
4953
4954 2002-01-26  Hrvoje Niksic  <hniksic@arsdigita.com>
4955
4956         * url.c (urlchr_table): Make square braces reserved, so we can
4957         parse http://[::1]/.
4958         (url_parse): Handle host in braces.
4959         (url_string): If url->host contains colons, wrap it in braces.
4960
4961 2002-01-24  Hrvoje Niksic  <hniksic@arsdigita.com>
4962
4963         * connect.c (resolve_bind_address): New function.
4964         (connect_to_one): Use it.
4965         (bindport): Ditto.
4966
4967         * init.c: Don't resolve bind-address here.
4968
4969         * host.c (wget_sockaddr_set_address): Would bug out with ADDR == NULL.
4970
4971 2002-01-24  Hrvoje Niksic  <hniksic@arsdigita.com>
4972
4973         * host.c (lookup_host): Use sizeof(ip4_address) to calculate the
4974         offset.
4975         (address_list_new): Use map_ipv4_to_ip.
4976         (wget_sockaddr_set_address): Convert ADDR to IPv4 before using it
4977         in IPv4 context.
4978
4979 2002-01-24  Hrvoje Niksic  <hniksic@arsdigita.com>
4980
4981         * source: Integrated IPv6 support.
4982         Written by Thomas Lussnig <thomas.lussnig@bewegungsmelder.de>.
4983
4984 2002-01-15  Ian Abbott  <abbotti@mev.co.uk>
4985
4986         * init.c (cmd_file): Change `\' to `/' for Windows (yes, really!)
4987         (cmd_directory): New function. Like cmd_file(), but strips
4988         trailing directory separators.
4989         (commands): Change action for "dirprefix" from `cmd_file' to
4990         `cmd_directory'.
4991
4992         * utils.c (make_directory): Allow intermediate `mkdir' calls to
4993         fail, as not all path components that do not exist should be
4994         directory components, especially under Windows.
4995
4996 2002-01-17  Hrvoje Niksic  <hniksic@arsdigita.com>
4997
4998         * netrc.c (parse_netrc): Skip leading whitespace before testing
4999         whether the line is empty.  Empty lines still contain the line
5000         terminator.
5001
5002 2002-01-15  Hrvoje Niksic  <hniksic@arsdigita.com>
5003
5004         * gen_sslfunc.c (ssl_iread): Call select on the file descriptor
5005         only if no data is pending in SSL buffers.
5006         From tony@bluetail.com.
5007
5008 2002-01-14  Hrvoje Niksic  <hniksic@arsdigita.com>
5009
5010         * headers.c (header_get): Strip trailing whitespace from the
5011         header.
5012
5013 2002-01-14  Hrvoje Niksic  <hniksic@arsdigita.com>
5014
5015         * url.c (parse_uname): URL-decode *USER and *PASSWD.
5016
5017 2002-01-07  Ian Abbott <abbotti@mev.co.uk>
5018
5019         * url.c (uri_merge_1): Deal with "net path" relative URL (one that
5020         starts with "//").
5021
5022 2002-01-14  Hrvoje Niksic  <hniksic@arsdigita.com>
5023
5024         * http.c (gethttp): Invalidate SOCK if get_contents encountered an
5025         error.
5026
5027 2001-12-24  Hrvoje Niksic  <hniksic@arsdigita.com>
5028
5029         * version.c: Wget 1.8.1 is released.
5030
5031 2001-12-19  Hrvoje Niksic  <hniksic@arsdigita.com>
5032
5033         * version.c: Wget 1.8.1-pre3 is released.
5034
5035 2001-12-19  Hrvoje Niksic  <hniksic@arsdigita.com>
5036
5037         * recur.c (retrieve_tree): Enqueue the canonical representation of
5038         start_url, so that the test against dl_url_file_map works.
5039
5040 2001-12-19  Hrvoje Niksic  <hniksic@arsdigita.com>
5041
5042         * log.c (logputs): Check for requested verbosity before printing
5043         anything.
5044
5045 2001-12-19  Hrvoje Niksic  <hniksic@arsdigita.com>
5046
5047         * html-url.c (tag_handle_link): Treat the "shortcut icon" link as
5048         inline.
5049
5050 2001-12-18  Hrvoje Niksic  <hniksic@arsdigita.com>
5051
5052         * recur.c (retrieve_tree): Make a copy of file obtained from
5053         dl_url_file_map because the code calls xfree(file) later.
5054
5055 2001-12-18  Hrvoje Niksic  <hniksic@arsdigita.com>
5056
5057         * recur.c (register_html): Maintain a hash table of HTML files
5058         along with the list.  Disallow duplicates.
5059         (retrieve_tree): Use downloaded_html_set to check whether the file
5060         found in dl_url_file_map is an HTML file, and descend into it if
5061         so.
5062         (convert_all_links): Don't guard against duplicates in
5063         downloaded_html_list, since they are no longer possible.
5064
5065 2001-12-18  Ian Abbott  <abbotti@mev.co.uk>
5066
5067         * recur.c (retrieve_tree): Pass on referring URL when retrieving
5068         recursed URL.
5069
5070 2001-12-17  Hrvoje Niksic  <hniksic@arsdigita.com>
5071
5072         * version.c: Wget 1.8.1-pre2 is released.
5073
5074 2001-12-17  Hrvoje Niksic  <hniksic@arsdigita.com>
5075
5076         * retr.c (sleep_between_retrievals): Simplify indentation.
5077
5078 2001-12-17  Hrvoje Niksic  <hniksic@arsdigita.com>
5079
5080         * gen_sslfunc.c (ssl_init_prng): Use random_number to get a byte
5081         of "randomness" at a time.
5082         (ssl_init_prng): Don't seed the PRNG; random_number will do that.
5083
5084         * retr.c (sleep_between_retrievals): Use it.  Make sure that the
5085         random amount averages in opt.wait.
5086         (sleep_between_retrievals): Don't seed the PRNG; random_number
5087         will do that.
5088
5089         * utils.c (random_number): New function.
5090
5091 2001-12-14  Hrvoje Niksic  <hniksic@arsdigita.com>
5092
5093         * url.c (path_simplify): Move here from utils.c, and make static.
5094
5095 2001-12-13  Hrvoje Niksic  <hniksic@arsdigita.com>
5096
5097         * init.c (wgetrc_file_name): Print correct message when loading
5098         getenv("WGETRC") fails.
5099
5100 2001-12-13  Hrvoje Niksic  <hniksic@arsdigita.com>
5101
5102         * recur.c (register_download): Don't abort when one URL references
5103         two different files.
5104
5105 2001-12-13  Hrvoje Niksic  <hniksic@arsdigita.com>
5106
5107         * http.c (gethttp): Check for conn->scheme, not u->scheme, before
5108         calling ssl_iwrite.
5109
5110 2001-12-13  Hrvoje Niksic  <hniksic@arsdigita.com>
5111
5112         * version.c: Wget 1.8.1-pre1 is released.
5113
5114 2001-12-13  Hrvoje Niksic  <hniksic@arsdigita.com>
5115
5116         * res.c (matches): Fix broken URL in the docstring.
5117
5118 2001-12-13  Hrvoje Niksic  <hniksic@arsdigita.com>
5119
5120         * html-url.c (tag_url_attributes): Mark <embed href=...> as
5121         external.
5122
5123 2001-12-12  Hrvoje Niksic  <hniksic@arsdigita.com>
5124
5125         * url.c (get_urls_file): Cosmetic changes.
5126
5127 2001-12-12  Hrvoje Niksic  <hniksic@arsdigita.com>
5128
5129         * html-url.c (append_one_url): Resurrect warning when unable to
5130         resolve a relative link.
5131
5132 2001-12-12  Hrvoje Niksic  <hniksic@arsdigita.com>
5133
5134         * html-url.c (collect_tags_mapper): Break into several functions.
5135         (tag_url_attributes): Collect <embed href=...>.
5136
5137 2001-12-11  Hrvoje Niksic  <hniksic@arsdigita.com>
5138
5139         * host.c: New type ipv4_address.  Use it consistently instead of
5140         `unsigned char[4]' and `unsigned char *'.
5141         (pretty_print_address): Accept a `const void *', to require even
5142         less casting.
5143
5144 2001-12-11  Hrvoje Niksic  <hniksic@arsdigita.com>
5145
5146         * ftp-ls.c (ftp_parse_vms_ls): Fix obvious memory leaks.
5147
5148 2001-12-10  Hrvoje Niksic  <hniksic@arsdigita.com>
5149
5150         * main.c (main): Initialize progress after fork_to_background, so
5151         that it knows when to use dots.
5152
5153         * mswindows.c (ws_hangup): Call log_request_redirect_output.
5154
5155         * utils.c (fork_to_background): Print the PID of the child
5156         process.
5157
5158         * log.c (log_request_redirect_output): Set a flag that output
5159         redirection has been requested.  Doing anything else in a signal
5160         handler is unsafe.
5161         (check_redirect_output): New function: check whether redirection
5162         has been requested and, if so, call redirect_output().
5163         (logputs): Call check_redirect_output.
5164         (logprintf): Ditto.
5165         (debug_logprintf): Ditto.
5166         (redirect_output): Print clearer messages.
5167
5168         * main.c (redirect_output_signal): Don't call
5169         redirect_output_signal directly.  Instead, call
5170         log_request_redirect_output.
5171
5172         * utils.c (memfatal): Ditto.
5173
5174         * progress.c (display_image): Use it.
5175
5176         * log.c (log_set_save_context): New function: allow the caller to
5177         turn off saving log context lines.
5178
5179 2001-12-10  Hrvoje Niksic  <hniksic@arsdigita.com>
5180
5181         * host.c (address_list_set_faulty): Uncomment a sanity check.
5182
5183 2001-12-10  Hrvoje Niksic  <hniksic@arsdigita.com>
5184
5185         * utils.c (long_to_string): Return a pointer after where the
5186         number ends.
5187         (long_to_string): Rename to number_to_string.
5188
5189 2001-12-10  Hrvoje Niksic  <hniksic@arsdigita.com>
5190
5191         * utils.c (path_simplify): Correctly handle the unlikely case that
5192         b starts out as path + 1.
5193
5194 2001-12-10  Hrvoje Niksic  <hniksic@arsdigita.com>
5195
5196         * utils.c (path_simplify): Rewrite, with better comments, and
5197         without the use of strcpy to move overlapping blocks.
5198
5199 2001-12-09  Hrvoje Niksic  <hniksic@arsdigita.com>
5200
5201         * init.c (cmd_spec_progress): Resurrect.  Check whether VAL is a
5202         valid progress type before setting it.
5203
5204 2001-12-09  Hrvoje Niksic  <hniksic@arsdigita.com>
5205
5206         * main.c (main): Remove stray debugging message.
5207
5208 2001-12-09  Hrvoje Niksic  <hniksic@arsdigita.com>
5209
5210         * progress.c (create_image): Fix ETA padding when hours are prined.
5211
5212 2001-12-09  Hrvoje Niksic  <hniksic@arsdigita.com>
5213
5214         * version.c: Wget 1.8 is released.
5215
5216 2001-12-09  Hrvoje Niksic  <hniksic@arsdigita.com>
5217
5218         * url.c (reencode_string): Declare static.
5219
5220         * res.c (registered_specs): Declare static.
5221
5222         * progress.c (current_impl_locked): Declare static.
5223
5224         * log.c (flush_log_p): Declare static.
5225         (needs_flushing): Ditto.
5226
5227         * http.c (digest_authentication_encode): Declare static.
5228
5229         * html-url.c (init_interesting): Declare static.
5230
5231         * host.c (host_name_addresses_map): Declare static.
5232
5233         * cookies.c (find_matching_chains): Declare static.
5234
5235         * ftp-ls.c (ftp_parse_vms_ls): Warn about the memory leak
5236         indicated by lint.
5237
5238         * utils.c (path_simplify): Remove unused variable STUB_CHAR.
5239
5240         * host.c (address_list_set_faulty): Document that INDEX is
5241         currently unused.
5242
5243         * url.c (rewrite_shorthand_url): Remove unused variable PATH.
5244
5245 2001-12-08  Hrvoje Niksic  <hniksic@arsdigita.com>
5246
5247         * version.c: Wget 1.8-pre2 is released.
5248
5249 2001-12-06  Hrvoje Niksic  <hniksic@arsdigita.com>
5250
5251         * progress.c (progress_handle_sigwinch): Set up the signal again.
5252
5253         * utils.c: Include <sys/termios.h>, where Solaris defines
5254         TIOCGWINSZ.
5255
5256         * progress.c (bar_create): Don't use the last column on the screen.
5257         (create_image): Pad ETA to constant size.  Pad SIZE to nine digits
5258         only until it exceeded them.
5259
5260 2001-12-06  Hrvoje Niksic  <hniksic@arsdigita.com>
5261
5262         * version.c: Wget 1.8-pre1 is released.
5263
5264 2001-12-06  Hrvoje Niksic  <hniksic@arsdigita.com>
5265
5266         * progress.c (progress_create): Make sure that, when the output is
5267         redirected, the progress implementation gets changed to the
5268         fallback one.
5269         (bar_set_params): Set current_impl_locked to 1 when "force" is
5270         specified.
5271         (progress_create): Don't change the progress implementation if
5272         current_impl_locked is non-zero.
5273
5274         * main.c (redirect_output_signal): Call
5275         progress_schedule_redirect.
5276
5277         * progress.c (progress_schedule_redirect): New function.
5278
5279 2001-12-06  Hrvoje Niksic  <hniksic@arsdigita.com>
5280
5281         * log.c (logvprintf): Restructure to allow being called multiple
5282         times.
5283         (logprintf): Call logvprintf in a loop.
5284         (debug_logprintf): Ditto.
5285
5286 2001-12-06  Hrvoje Niksic  <hniksic@arsdigita.com>
5287
5288         * gen_sslfunc.c (ssl_init_prng): Allow the user to disable EGD by
5289         setting egd_file it to empty string.
5290
5291         * main.c (main): Change the option name from --sslegdsock to
5292         --egd-file.
5293
5294 2001-12-06  Hrvoje Niksic  <hniksic@arsdigita.com>
5295
5296         * gen_sslfunc.c (ssl_init_prng): Make the printed message
5297         translatable.
5298
5299 2001-12-06  Hrvoje Niksic  <hniksic@arsdigita.com>
5300
5301         * url.c (scheme_disable): New function.
5302
5303         * main.c (main): Call ssl_init_prng from here rather than from
5304         init_ssl, so that it has a chance to disable support for https
5305         before a URL has been resolved.
5306
5307         * gen_sslfunc.c (ssl_init_prng): Seed with rand() if all else
5308         failed.
5309         (ssl_init_prng): Disable support for https if seeding the PRNG
5310         fails.
5311
5312 2001-12-06  Hrvoje Niksic  <hniksic@arsdigita.com>
5313
5314         * utils.c (read_whole_line): Handle lines beginning with \0.
5315
5316 2001-12-05  Hrvoje Niksic  <hniksic@arsdigita.com>
5317
5318         * recur.c (convert_all_links): Guard against duplicates in
5319         downloaded_html_files.
5320         (register_download): Don't invalidate similar-looking URLs.
5321         (match_except_index): New function.
5322
5323 2001-12-05  Hrvoje Niksic  <hniksic@arsdigita.com>
5324
5325         * utils.c (path_simplify): Document with test cases.
5326
5327 2001-12-04  Hrvoje Niksic  <hniksic@arsdigita.com>
5328
5329         * gen_sslfunc.c: Ditto.
5330
5331         * rbuf.c: Include <string.h>.
5332
5333 2001-12-04  Hrvoje Niksic  <hniksic@arsdigita.com>
5334
5335         * recur.c (retrieve_tree): Check whether the URL was already
5336         downloaded before downloading it again.
5337         (descend_child_p): Renamed to download_child_p.
5338         (register_download): When one URL is downloaded to a file already
5339         "owned" by another URL, delete all references that map any URL to
5340         that file.
5341         (register_delete_file): New function.
5342         (retrieve_tree): Use it after deleting a file.
5343
5344         * url.c (url_parse): Re-canonicalize the URL also if the path is
5345         empty, so that e.g. "http://www.server.com" ->
5346         "http://www.server.com/".
5347         (lowercase_str): Use ISUPPER instead of !ISLOWER.
5348
5349         * retr.c (retrieve_url): Use the canonical URL form when calling
5350         register_download().
5351
5352 2001-12-04  Ian Abbott <abbotti@mev.co.uk>
5353
5354         * snprintf.c (dopr): Use `unsigned int' as the second argument to
5355         va_arg when casting to `unsigned short' is intended.
5356
5357 2001-12-04  Herold Heiko  <Heiko.Herold@previnet.it>
5358
5359         * gen_sslfunc.c: on windows provide ssl crypto random 
5360           initialization through RAND_screen(); could possibly
5361           be not enough for strong ssl communication (see the 
5362           relevant manual page from the openssl package).
5363
5364 2001-12-04  Hrvoje Niksic  <hniksic@arsdigita.com>
5365
5366         * url.c (local_quote_string): Reenable quoting of question marks,
5367         but only when `--html-extension' is used.
5368
5369 2001-12-03  Hrvoje Niksic  <hniksic@arsdigita.com>
5370
5371         * version.c: Wget 1.8-beta3 is released.
5372
5373 2001-12-03  Hrvoje Niksic  <hniksic@arsdigita.com>
5374
5375         * snprintf.c (dopr): Cast the result of va_arg to short int and
5376         short unsigned int where these types are expected to be used.
5377
5378 2001-12-03  Hrvoje Niksic  <hniksic@arsdigita.com>
5379
5380         * snprintf.c (dopr): Replace `short int' and `unsigned short int'
5381         with `int' when using it as the second argument to `va_arg'.
5382
5383 2001-12-03  Hrvoje Niksic  <hniksic@arsdigita.com>
5384
5385         * host.c (address_list_new_one): New function.
5386         (lookup_host): Use it.
5387
5388 2001-12-03  Andre Majorel  <amajorel@teaser.fr>
5389
5390         * host.c (lookup_host): Don't initialize TMPSTORE directly because
5391         it's not legal C.
5392
5393 2001-12-03  Hrvoje Niksic  <hniksic@arsdigita.com>
5394
5395         * ftp-basic.c (ftp_port): Don't return HOSTERR if we fail getting
5396         the socket data.
5397
5398         * ftp.c: Ditto.
5399
5400         * http.c: No need to declare h_errno.
5401
5402         * host.c: Declare h_errno.
5403
5404 2001-12-02  Hrvoje Niksic  <hniksic@arsdigita.com>
5405
5406         * utils.c (file_merge): If BASE doesn't contain a slash, just
5407         return a copy of FILE.
5408
5409 2001-12-02  Hrvoje Niksic  <hniksic@arsdigita.com>
5410
5411         * version.c: Wget 1.8-beta2 is released.
5412
5413 2001-12-01  Hrvoje Niksic  <hniksic@arsdigita.com>
5414
5415         * ftp.c (getftp): When PWD fails, assume "/".
5416
5417         * ftp-basic.c (ftp_syst): Fix indentation.
5418
5419 2001-12-01  Hrvoje Niksic  <hniksic@arsdigita.com>
5420
5421         * url.c (get_urls_file): If opt.base_href is specified, merge each
5422         URL with the base.
5423
5424 2001-12-01  Hrvoje Niksic  <hniksic@arsdigita.com>
5425
5426         * main.c (print_help): Don't document the removed `-nh'.
5427
5428 2001-12-01  Hrvoje Niksic  <hniksic@arsdigita.com>
5429
5430         * url.c (url_full_path): Document better.
5431
5432         * http.c (gethttp): Use the full path when creating digest
5433         authorization.
5434
5435 2001-12-01  Hrvoje Niksic  <hniksic@arsdigita.com>
5436
5437         * cookies.c (path_matches): Return 0 if PREFIX doesn't begin with
5438         '/'.
5439
5440 2001-12-01  Hrvoje Niksic  <hniksic@arsdigita.com>
5441
5442         * cookies.c (path_matches): FULL_PATH doesn't begin with '/', but
5443         PREFIX does.
5444
5445 2001-12-01  Hrvoje Niksic  <hniksic@arsdigita.com>
5446
5447         * cookies.c (check_domain_match): Reimplement to match Netscape's
5448         "preliminary specification" for cookies.
5449
5450 2001-12-01  Hrvoje Niksic  <hniksic@arsdigita.com>
5451
5452         * url.c (replace_attr_refresh_hack): New function.
5453         (convert_links): Call replace_attr_refresh_hack for Refresh
5454         links.  It will add the "TMOUT; URL=" junk before the link.
5455
5456         * html-url.c (collect_tags_mapper): Set ID to the ID of the
5457         "content" attribute, not "http-equiv".
5458         (collect_tags_mapper): Don't use OFFSET to hack the raw_* values;
5459         instead, store the information that this entry belongs to a
5460         "refresh" link.
5461
5462 2001-12-01  Hrvoje Niksic  <hniksic@arsdigita.com>
5463
5464         * version.c: Wget 1.8-beta1 is released.
5465
5466 2001-12-01  Hrvoje Niksic  <hniksic@arsdigita.com>
5467
5468         * recur.c (retrieve_tree): Allow -p retrievals to exceed maximum
5469         depth by more than one.
5470
5471 2001-11-30  Hrvoje Niksic  <hniksic@arsdigita.com>
5472
5473         * retr.c (retrieve_url): Don't allow more than 20 redirections.
5474
5475 2001-11-30  Hrvoje Niksic  <hniksic@arsdigita.com>
5476
5477         * recur.c (retrieve_tree): Skip the non-inline entries when
5478         enqueuing the children of a leaf HTML node in -p mode.
5479         (descend_url_p): Ignore opt.no_parent when in -p mode and UPOS is
5480         "inline".
5481
5482         * html-url.c (get_urls_html): Don't accept dash_p_leaf_HTML.
5483         (collect_tags_mapper): When an entry is "inline", mark it as such.
5484
5485         * recur.c (descend_url_p): Fix test when checking for
5486         acceptance/rejection rules.
5487
5488 2001-10-31 Daniel BODEA <dali@dali-designs.com>
5489
5490         * netrc.c (search_netrc): When slack_default is 0, still look for
5491         an account with matching password, just not the "default account".
5492         HTTP Authorization using .netrc should now work as expected.
5493
5494 2001-11-30  T. Bharath  <TBharath@responsenetworks.com>
5495
5496         * http.c (persistent_available_p): Call SHUTDOWN_SSL if
5497         test_socket_open fails.
5498
5499 2001-11-30  Hrvoje Niksic  <hniksic@arsdigita.com>
5500
5501         * progress.c (display_image): Just print one CR to reset the
5502         cursor position.
5503
5504 2001-11-30  Christian Fraenkel  <c.fraenkel@gmx.net>
5505
5506         * init.c: New command `ssl_egd_sock'.
5507
5508         * main.c (main): New option `--sslegdsock'.
5509
5510         * gen_sslfunc.c (ssl_init_prng): Seed the RNG using EGD.
5511
5512 2001-11-29  Hrvoje Niksic  <hniksic@arsdigita.com>
5513
5514         * cmpt.c (memmove): Include a simple memmove implementation.
5515
5516 2001-11-29  Hrvoje Niksic  <hniksic@arsdigita.com>
5517
5518         * headers: Guard against header files being included twice.
5519
5520 2001-11-29  Hrvoje Niksic  <hniksic@arsdigita.com>
5521
5522         * gen-md5.c: Use unsigned char * as the buffer argument to
5523         gen_md5_update.
5524
5525 2001-11-29  Hrvoje Niksic  <hniksic@arsdigita.com>
5526
5527         * connect.h: Declare select_fd.
5528
5529 2001-11-29  Hrvoje Niksic  <hniksic@arsdigita.com>
5530
5531         * recur.c (descend_url_p): When resolving no_parent, compare with
5532         start_url, not parent url.  Otherwise link from /a/b/ to /a/c/
5533         wouldn't be followed, although the download started from /a/.
5534
5535 2001-01-23  Herold Heiko  <Heiko.Herold@previnet.it>
5536
5537         * config.h.ms, mswindows.h: defined HAVE_ISATTY, use _isatty for
5538         MS VC; somebody with Borland compiler please check and provide
5539         patch if possible;
5540
5541         * cmpt.c: provided a usleep emulation.
5542
5543 2001-11-29  Hrvoje Niksic  <hniksic@arsdigita.com>
5544
5545         * host.c (address_list_new): Initialize al->faulty.
5546
5547 2001-11-29  Hrvoje Niksic  <hniksic@arsdigita.com>
5548
5549         * http.c (http_process_range): Accept the broken output of
5550         "JavaWebServer/1.1.1".
5551
5552 2001-11-28  Hrvoje Niksic  <hniksic@arsdigita.com>
5553
5554         * progress.c (dot_set_params): If PARAMS is unspecified, use
5555         dot_style, if available.
5556
5557         * init.c: Ditto.
5558
5559         * main.c (main): Resurect --dot-style.
5560
5561         * progress.c (dot_finish): Print the quantity if we're left at the
5562         beginning of a row.
5563
5564 2001-11-27  Hrvoje Niksic  <hniksic@arsdigita.com>
5565
5566         * cmpt.c (random): Removed.
5567
5568         * retr.c (sleep_between_retrievals): Use the more portable rand()
5569         instead of random().
5570
5571 2001-11-27  Ian Abbott <abbotti@mev.co.uk>
5572
5573         * retr.c (retrieve_from_file): Initialize `new_file' to NULL to
5574         prevent seg fault.
5575
5576 2001-11-27  Hrvoje Niksic  <hniksic@arsdigita.com>
5577
5578         * connect.c (connect_to_many): Use address_list_set_faulty to
5579         prevent the faulty address from being reused.
5580
5581         * host.c (address_list_set_faulty): New function.
5582         (address_list_get_bounds): New function, instead of
5583         address_list_count.
5584
5585 2001-11-27  Hrvoje Niksic  <hniksic@arsdigita.com>
5586
5587         * url.c (convert_links): Don't translate %d-%d.
5588
5589         * main.c (print_help): Remove stray HAVE_RANDOM code.
5590
5591 2001-11-27  Hrvoje Niksic  <hniksic@arsdigita.com>
5592
5593         * ftp.c (getftp): Improve output after sending PASV.  Don't
5594         attempt to "look up" the IP address we already know; call
5595         connect_to_one directly.
5596
5597 2001-11-27  Hrvoje Niksic  <hniksic@arsdigita.com>
5598
5599         * progress.c: Change the default progress implementation to "bar".
5600
5601 2001-11-27  Hrvoje Niksic  <hniksic@arsdigita.com>
5602
5603         * progress.c (bar_create): Print two newlines.
5604
5605 2001-11-27  Hrvoje Niksic  <hniksic@arsdigita.com>
5606
5607         * cmpt.c (random): New function, a simple-minded replacement for
5608         random() on systems that don't have it.
5609
5610 2001-11-26  Hrvoje Niksic  <hniksic@arsdigita.com>
5611
5612         * config.h.in: Put a HAVE_USLEEP stub.
5613
5614         * cmpt.c (usleep): Replacement implementation of usleep using
5615         select.
5616
5617         * init.c: New option init_rate.
5618
5619         * main.c (main): New option --limit-rate.
5620
5621         * retr.c (limit_bandwidth): New function.
5622         (get_contents): Call it to limit the bandwidth used when
5623         downloading.
5624
5625         * progress.c (dot_update): Would print the wrong download speed on
5626         rows other than the first one when the download was continued.
5627         (dot_finish): Ditto.
5628
5629 2001-11-26  Ian Abbott <abbotti@mev.co.uk>
5630
5631         * http.c (gethttp): fix undeclared variable 'err' when compiled
5632         with HAVE_SSL.
5633
5634 2001-11-26  Hrvoje Niksic  <hniksic@arsdigita.com>
5635
5636         * progress.c: Don't allocate new timers; use the timing data
5637         propagated from the caller.
5638
5639         * retr.c (get_contents): Allocate and use a timer.
5640
5641 2001-11-26  Hrvoje Niksic  <hniksic@arsdigita.com>
5642
5643         * http.c (last_host_ip): Made into an address_list.
5644         (invalidate_persistent): Release pc_last_host_ip.
5645         (register_persistent): Use lookup_host.
5646         (persistent_available_p): Check for equality of hosts using
5647         address_list_match_all.  Call address_list_release.
5648         (http_cleanup): New function.
5649
5650         * ftp.c (getftp): Use lookup_host and connect_to_many.
5651
5652         * http.c (gethttp): Use lookup_host and connect_to_many.
5653
5654         * connect.c (make_connection): Removed.
5655         (connect_to_one): New function.
5656         (connect_to_many): Ditto.
5657         (set_connection_host_name): Ditto.
5658
5659         * host.c (lookup_host): New function; new return type.
5660         (address_list_new): New function.
5661         (address_list_count): Ditto.
5662         (address_list_copy_one): Ditto.
5663         (address_list_delete): Ditto.
5664         (address_list_release): Ditto.
5665         (pretty_print_address): Ditto.
5666
5667 2001-11-26  Hrvoje Niksic  <hniksic@arsdigita.com>
5668
5669         * recur.c (retrieve_tree): In case of followed redirection,
5670         blacklist the pre-redirection URL.
5671
5672 2001-11-26  Hrvoje Niksic  <hniksic@arsdigita.com>
5673
5674         * recur.c (descend_redirect_p): New function.
5675         (retrieve_tree): Make sure redirections are not blindly followed.
5676
5677 2001-11-04  Alan Eldridge  <alane@geeksrus.net>
5678
5679         * config.h.in: added HAVE_RANDOM.
5680
5681         * options.h: added random_wait to struct options.
5682
5683         * main.c (print_help [HAVE_RANDOM], main): added arg parsing, help
5684         for --random-wait.
5685
5686         * retr.c (sleep_between_retrievals) [HAVE_RANDOM]: added
5687         implementation of random wait times.
5688
5689         * init.c (commands): added "randomwait" keyword.
5690
5691 2001-11-25  Hrvoje Niksic  <hniksic@arsdigita.com>
5692
5693         * recur.c (descend_url_p): Be more conservative with blacklisting
5694         URLs.
5695         (convert_all_links): Print how many files have been converted, and
5696         how long it took.
5697
5698         * progress.c (create_image): Place the number of downloaded bytes
5699         right after the progress bar.
5700
5701         * utils.c (suffix): Return a pointer into the string.
5702
5703 2001-11-25  Hrvoje Niksic  <hniksic@arsdigita.com>
5704
5705         * url.c (convert_links): Handle CO_NULLIFY_BASE.
5706
5707         * recur.c (retrieve_tree): Ignore download-ignorable children.
5708         (convert_all_links): Specify CO_NULLIFY_BASE when link_base_p.
5709
5710         * html-url.c (handle_link): Return the newly created urlpos.
5711         (collect_tags_mapper): When dealing with BASE, store the base
5712         reference and mark it as download-ignorable.
5713
5714 2001-11-25  Hrvoje Niksic  <hniksic@arsdigita.com>
5715
5716         * url.c (convert_links): Attempt to quote '?' as "%3F" when
5717         linking to local files.  Given up on the attempt, as it breaks
5718         local browsing.
5719
5720 2001-11-25  Hrvoje Niksic  <hniksic@arsdigita.com>
5721
5722         * main.c (private_initialize): Removed.
5723         (main): Don't call private_initialize.
5724
5725         * http.c: Call lookup_host.
5726
5727         * host.c (host_init): Removed.
5728         (add_host_to_cache): Initialize host_name_address_map here, on
5729         demand.
5730         (ngethostbyname): Commented out.
5731
5732         * connect.c (make_connection): Remove dead code; use lookup_host.
5733
5734         * host.c (store_hostaddress): Renamed to lookup_host and reversed
5735         the args.
5736         Removed host_address_name_map and host_slave_master_map.
5737
5738 2001-11-25  Hrvoje Niksic  <hniksic@arsdigita.com>
5739
5740         * progress.c (dot_create): Align the "[ skipping ... ]" string
5741         with the dots.
5742
5743         * retr.c (rate): Split into two functions: calc_rate and
5744         retr_rate.
5745
5746         * progress.c (create_image): Draw a dummy progress bar even when
5747         total size is unknown.
5748         (display_image): Place the text cursor at the end of the "image".
5749
5750 2001-11-25  Hrvoje Niksic  <hniksic@arsdigita.com>
5751
5752         * url.c (reencode_string): Use unsigned char, not char --
5753         otherwise the hex digits come out wrong for 8-bit chars such as
5754         nbsp.
5755         (lowercase_str): New function.
5756         (url_parse): Canonicalize u->url if needed.
5757         (get_urls_file): Parse each URL, and return only the valid ones.
5758         (free_urlpos): Call url_free.
5759         (mkstruct): Add :port if the port is non-standard.
5760         (mkstruct): Append the query string to the file name, if any.
5761         (urlpath_length): Use strpbrk_or_eos.
5762         (uri_merge_1): Handle the cases where LINK is an empty string,
5763         where LINK consists only of query, and where LINK consists only of
5764         fragment.
5765         (convert_links): Count and report both kinds of conversion.
5766         (downloaded_file): Use a hash table, not a list.
5767         (downloaded_files_free): Free the hash table.
5768
5769         * retr.c (retrieve_from_file): Ditto.
5770
5771         * main.c (main): Call either retrieve_url or retrieve_tree
5772         for each URL, not both.
5773
5774         * retr.c (register_all_redirections): New function.
5775         (register_redirections_mapper): Ditto.
5776         (retrieve_url): Register the redirections.
5777         (retrieve_url): Make the string "Error parsing proxy ..." 
5778         translatable.
5779
5780         * res.c (add_path): Strip leading slash from robots.txt paths so
5781         that the path representations are "compatible".
5782         (free_specs): Free each individual path, too.
5783         (res_cleanup): New function.
5784         (cleanup_hash_table_mapper): Ditto.
5785
5786         * recur.c (url_queue_new): New function.
5787         (url_queue_delete): Ditto.
5788         (url_enqueue): Ditto.
5789         (url_dequeue): Ditto.
5790         (retrieve_tree): New function, replacement for recursive_retrieve.
5791         (descend_url_p): New function.
5792         (register_redirection): New function.
5793
5794         * progress.c (create_image): Cosmetic changes.
5795
5796         * init.c (cleanup): Do all those complex cleanups only if
5797         DEBUG_MALLOC is defined.
5798
5799         * main.c: Removed --simple-check and the corresponding
5800         simple_host_check in init.c.
5801
5802         * html-url.c (handle_link): Parse the URL here, and propagate the
5803         parsed URL to the caller, who would otherwise have to parse it
5804         again.
5805
5806         * host.c (xstrdup_lower): Moved to utils.c.
5807         (realhost): Removed.
5808         (same_host): Ditto.
5809
5810 2001-11-24  Hrvoje Niksic  <hniksic@arsdigita.com>
5811
5812         * utils.c (path_simplify): Preserver the (non-)existence of
5813         leading slash.  Return non-zero if changes were made.
5814
5815 2001-11-24  Hrvoje Niksic  <hniksic@arsdigita.com>
5816
5817         * progress.c (bar_update): Don't modify bp->total_length if it is
5818         zero.
5819
5820 2001-11-24  Hrvoje Niksic  <hniksic@arsdigita.com>
5821
5822         * retr.c (retrieve_url): When the redirection URL doesn't parse,
5823         print the correct error message rather than "UNKNOWN".
5824
5825 2001-11-24  Hrvoje Niksic  <hniksic@arsdigita.com>
5826
5827         * progress.c (bar_finish): If the timer didn't record any time
5828         since the download beginning, fake 1ms.
5829
5830 2001-11-24  Hrvoje Niksic  <hniksic@arsdigita.com>
5831
5832         * recur.c (recursive_retrieve): Fix typo.
5833
5834 2001-11-23  Hrvoje Niksic  <hniksic@arsdigita.com>
5835
5836         * progress.c (create_image): Don't translate "%ld ".
5837
5838 2001-11-23  Hrvoje Niksic  <hniksic@arsdigita.com>
5839
5840         * progress.c (bar_set_params): Allow the user to force the use of
5841         the bar.
5842
5843 2001-11-23  Lemble Gregory  <gregory.lemble@st.com>
5844
5845         * gen_sslfunc.c (ssl_init_prng): New function; seed the SSL RNG.
5846
5847 2001-11-23  Hrvoje Niksic  <hniksic@arsdigita.com>
5848
5849         * progress.c: Renamed dp_* functions to dot_* for greater clarity
5850         and consistency with bar_*.
5851         (print_download_speed): Get rid of the unneeded '@' character.
5852         (create_image): Fix download rate geometry.
5853
5854         * progress.c (print_elapsed): Remove spurious space.
5855         (print_elapsed): Renamed to print_download_speed, since that's
5856         what it does.
5857
5858 2001-11-23  Hrvoje Niksic  <hniksic@arsdigita.com>
5859
5860         * progress.c (bar_update): If the downloaded amount becomes larger
5861         than the expected amount, adjust the expected amount accordingly.
5862
5863 2001-11-23  Hrvoje Niksic  <hniksic@arsdigita.com>
5864
5865         * utils.c (determine_screen_width): New function.
5866
5867         * main.c (main): New option `--progress=TYPE'.
5868         (main): Implement compatibility with the old option `--dot-style'.
5869
5870         * init.c: Removed cmd_spec_dotstyle -- that logic is now in
5871         dp_set_params.
5872         (cmd_spec_progress): New function.
5873
5874         * retr.c (get_contents): Use the progress_* functions instead of
5875         the old show_progress().
5876         (show_progress): Removed.
5877         (rate): Print "xxxx.xx K/s" instead of "KB/s".  Ditto for MB/s,
5878         etc.
5879
5880         * progress.c (set_progress_implementation): New function.
5881         (valid_progress_implementation_p): Ditto.
5882         (progress_create): Ditto.
5883         (progress_update): Ditto.
5884         (progress_finish): Ditto.
5885         (dp_create): Ditto.
5886         (dp_update): Ditto.
5887         (dp_finish): Ditto.
5888         (dp_set_params): Ditto.
5889         (print_elapsed): Ditto.
5890
5891 2001-11-22  Hrvoje Niksic  <hniksic@arsdigita.com>
5892
5893         * retr.c (show_progress): Use it.
5894
5895         * log.c (log_set_flush): New function.
5896
5897 2001-11-22  Hrvoje Niksic  <hniksic@arsdigita.com>
5898
5899         * utils.c (path_simplify): Don't remove trailing slashes.
5900
5901         * ftp.c (ftp_get_listing): Use it.
5902
5903         * utils.c (file_merge): New function.
5904
5905         * url.c (opt_url): Removed.
5906
5907         * recur.c (recursive_retrieve): Inline "opt_url" logic.
5908
5909         * main.c (main): Use xfree(), not free().
5910
5911         * url.c (rewrite_url_maybe): Renamed to rewrite_shorthand_url.
5912
5913         * ftp.c (ccon): Move `ccon' typedef here, since it's only used
5914         internally.
5915
5916         * config.h.in: Include a stub for HAVE_STRPBRK.
5917
5918         * cmpt.c (strpbrk): Include a replacement for systems without
5919         strpbrk().
5920
5921         * ftp.c: Use url_set_dir and url_set_file when modifying the URL.
5922
5923         * url.c (url_set_dir): New function.
5924         (url_set_file): Ditto.
5925
5926         * ftp-basic.c (ftp_process_type): Process FTP type here; the URL
5927         parser makes the URL "params" available, so we can do that in this
5928         function.
5929
5930         * retr.c: Ditto.
5931
5932         * ftp.c: Ditto; pass the local file information in `ccon'.
5933
5934         * http.c: Get rid of the ugly kludge that had URL being replaced
5935         with the proxy URL when proxy retrieval was requested.  Use a
5936         separate parameter to http_loop and gethttp for the proxy URL.
5937
5938         * http.c: Changed to reflect the fact that local file, proxy, and
5939         referer information are no longer stored in struct url.  The local
5940         file information is passed in `struct hstat' now.
5941
5942         * url.c: Reworked URL parsing to be more regular.  Reencode the
5943         URL using reencode_string.
5944         Removed non-URL-related information from struct url.  This
5945         includes fields `proxy', `local', and `referer'.
5946
5947 2001-11-22  Jochen Hein  <jochen@jochen.org>
5948
5949         * main.c (main): Split the copyright notice for easier
5950         translation.
5951
5952 2001-08-21  Dave Turner <dct25@hermes.cam.ac.uk>
5953
5954         * ftp-basic.c (ftp_size): New function to send non-standard SIZE
5955           command to server to request file size.
5956         * ftp.h (ftp_size): Export it.
5957         * ftp.c (getftp): Use new ftp_size function if restoring
5958           transfer of a file with unknown size.
5959
5960 2001-11-20  Hrvoje Niksic  <hniksic@arsdigita.com>
5961
5962         * url.c (parseurl): Don't depend on the now-obsolete TYPE.
5963
5964 2001-11-19  Hrvoje Niksic  <hniksic@arsdigita.com>
5965
5966         * url.c (getproxy): Handle URL shorthands.
5967
5968 2001-11-19  Hrvoje Niksic  <hniksic@arsdigita.com>
5969
5970         * main.c: Remove --wait / --waitretry backwards compatibility
5971         code.
5972         
5973 2001-11-19  Hrvoje Niksic  <hniksic@arsdigita.com>
5974
5975         * main.c (main): Use it.
5976
5977         * url.c (rewrite_url_maybe): New function.
5978
5979 2001-11-19  Hrvoje Niksic  <hniksic@arsdigita.com>
5980
5981         * url.c: Clean up handling of URL schemes.
5982
5983 2001-05-13  Hrvoje Niksic  <hniksic@arsdigita.com>
5984
5985         * url.c: Get rid of `protostrings'.
5986         (skip_proto): Don't use protostrings.
5987         (has_proto): Ditto.
5988
5989 2001-11-18  Hrvoje Niksic  <hniksic@arsdigita.com>
5990
5991         * Makefile.in: Conditionally compile getopt.o.
5992
5993 2001-11-18  Hrvoje Niksic  <hniksic@arsdigita.com>
5994
5995         * md5.h: Renamed to gnu-md5.h.
5996
5997         * md5.c: Renamed to gnu-md5.c.
5998
5999         * http.c: Ditto.
6000
6001         * ftp-opie.c: Use the new macros.
6002
6003         * sysdep.h: Define md5-related macros.
6004
6005         * config.h.in: Define HAVE_SOLARIS_MD5 or HAVE_BUILTIN_MD5
6006         depending on which md5 implementation is used.
6007
6008 2001-11-18  Hrvoje Niksic  <hniksic@arsdigita.com>
6009
6010         * res.c (res_register_specs): Initialize OLD and HP_OLD to appease
6011         the compiler.
6012
6013 2001-11-18  Hrvoje Niksic  <hniksic@arsdigita.com>
6014
6015         * http.c (gethttp): Print the whole response line when printing
6016         headers is requested.
6017
6018 2001-05-12  Hrvoje Niksic  <hniksic@arsdigita.com>
6019
6020         * res.c: New file.  Implement all RES-related code here.
6021
6022 2001-11-18  Hrvoje Niksic  <hniksic@arsdigita.com>
6023
6024         * version.c: Wget 1.7.1 is released.
6025
6026 2001-11-16  Hrvoje Niksic  <hniksic@arsdigita.com>
6027
6028         * headers.c (header_extract_number): Ignore trailing whitespace.
6029
6030 2001-08-24  Ian Abbott  <abbotti@mev.co.uk>
6031
6032         * html-url.c (collect_tags_mapper): Fix bug converting links
6033         with -k option for tags with multiple link attributes by
6034         handling links in the order they appear.
6035
6036 2001-08-15  Ian Abbott  <abbotti@mev.co.uk>
6037
6038         * ftp.c (ftp_loop_internal): Avoid a potential buffer overflow in
6039           the call to the 'rate' function by moving it past the error
6040           checking for the 'getftp' function return value.
6041
6042 2001-11-16  Hrvoje Niksic  <hniksic@arsdigita.com>
6043
6044         * html-parse.c (advance_declaration): Use 0x22 instead of '"' or
6045         '\"'.  Different compilers' assert macros are broken in different
6046         ways.
6047
6048 2001-09-29  Christian Fraenkel  <c.fraenkel@gmx.net>
6049
6050         * http.c (gethttp): print debug output for errors occuring during
6051         the ssl handshake.
6052
6053 2001-11-16  Chris Seawood  <cls@seawood.org>
6054
6055         * init.c: Ditto.
6056
6057         * host.c: Ditto.
6058
6059         * connect.c: Ditto.
6060
6061         * sysdep.h: Support compilation under BEOS.
6062
6063 2001-06-08  Edward J. Sabol  <sabol@alderaan.gsfc.nasa.gov>
6064
6065         * url.c (url_equal): Fix a memory leak when parseurl returns an
6066         error on the second URL. Also, since url_equal is not used at the
6067         moment, do not compile it.
6068
6069         * url.h: Ditto for the prototype of url_equal.
6070
6071 2001-11-16  Hrvoje Niksic  <hniksic@arsdigita.com>
6072
6073         * html-parse.c (map_html_tags): Support XML-style empty tags.
6074
6075 2001-06-26  Hrvoje Niksic  <hniksic@arsdigita.com>
6076
6077         * wget.h (DO_REALLOC_FROM_ALLOCA): Check for do_realloc_newsize in
6078         loop condition because we're no longer setting SIZEVAR here.
6079
6080 2001-06-26  Hrvoje Niksic  <hniksic@arsdigita.com>
6081
6082         * wget.h (DO_REALLOC_FROM_ALLOCA): Set SIZEVAR after the memcpy()
6083         call because it needs the old value.
6084
6085 2001-06-18  Hrvoje Niksic  <hniksic@arsdigita.com>
6086
6087         * cookies.c (ATTR_NAME_CHAR): Allow almost any character to be in
6088         an attribute name.
6089
6090 2001-06-18  Hrvoje Niksic  <hniksic@arsdigita.com>
6091
6092         * url.c (url_filename): Make sure that slashes that sneak in to
6093         u->file via query string get protected.
6094         (file_name_protect_query_string): New function.
6095
6096 2001-06-14  Hrvoje Niksic  <hniksic@arsdigita.com>
6097
6098         * recur.c (recursive_retrieve): Also check undesirable_urls with
6099         canonicalized URL.
6100
6101 2001-06-14  Hrvoje Niksic  <hniksic@arsdigita.com>
6102
6103         * http.c (gethttp): Search `.netrc' with real host, not the proxy
6104         one.
6105
6106 2001-06-14  Hrvoje Niksic  <hniksic@arsdigita.com>
6107
6108         * sysdep.h (MAP_FAILED): Provide MAP_FAILED for systems that don't
6109         define it.
6110
6111 2001-06-09  Jan Prikryl  <prikryl@cg.tuwien.ac.at>
6112
6113         * ftp.h: Provide correct prototype for ftp_parse_ls().
6114
6115 2001-06-04  Hrvoje Niksic  <hniksic@arsdigita.com>
6116
6117         * version.c: Wget 1.7 is released.
6118
6119 2001-06-03  Karl Eichwalder  <ke@suse.de>
6120
6121         * ftp-ls.c (ftp_parse_ls): Fix typo.
6122
6123 2001-05-27  Hrvoje Niksic  <hniksic@arsdigita.com>
6124
6125         * all: Update copyright information.
6126
6127 2001-05-26  Hrvoje Niksic  <hniksic@arsdigita.com>
6128
6129         * http.c (gethttp): Indicate that the continued download failed
6130         for *this* file.
6131
6132 2001-05-26  Hrvoje Niksic  <hniksic@arsdigita.com>
6133
6134         * version.c: Wget 1.7-pre1 is released.
6135
6136 2001-05-26  Hrvoje Niksic  <hniksic@arsdigita.com>
6137
6138         * version.c: Updated version to 1.7-pre1.
6139
6140 2001-05-14  Hrvoje Niksic  <hniksic@arsdigita.com>
6141
6142         * gen_sslfunc.c: Don't include <sys/time.h> directly.
6143
6144 2001-05-14  Hrvoje Niksic  <hniksic@arsdigita.com>
6145
6146         * http.c (gethttp): Use real URL data for cookies, not the proxy
6147         stuff.
6148
6149 2001-05-12  Hrvoje Niksic  <hniksic@arsdigita.com>
6150
6151         * main.c (print_help): Document `--no-http-keep-alive'.
6152
6153         * utils.c (numdigit): Handle negative numbers *correctly*.
6154
6155         * hash.c (make_nocase_string_hash_table): Use term "nocase" rather
6156         than the confusing "unsigned".
6157
6158         * utils.c (string_set_contains): Renamed from string_set_exists.
6159
6160         * hash.c (hash_table_contains): Renamed from hash_table_exists.
6161
6162         * cookies.c: Move case-insensitive hash tables to hash.c.
6163
6164 2001-05-09  Hrvoje Niksic  <hniksic@arsdigita.com>
6165
6166         * http.c (gethttp): Before concluding that the file is already
6167         fully retrieved, make sure that the file existed and `Range' was
6168         actually requested.
6169
6170 2001-05-09  Hrvoje Niksic  <hniksic@arsdigita.com>
6171
6172         * cookies.c (eliminate_dups): New function.
6173         (build_cookies_request): Use it.
6174         (build_cookies_request): Set chain_store_size after reallocating
6175         all_chains.
6176         (check_domain_match): Annotated for easier future debugging.
6177         (store_cookie): In the debug message, print whether the cookie is
6178         permanent.
6179
6180 2001-05-08  Hrvoje Niksic  <hniksic@arsdigita.com>
6181
6182         * http.c (http_loop): Reset no_truncate before deciding whether to
6183         set it.
6184         (gethttp): Further clarify "-c conflicts with existing file" error
6185         message, based on input from Herold Heiko.
6186
6187 2001-05-07  Hrvoje Niksic  <hniksic@arsdigita.com>
6188
6189         * http.c (http_loop): If restval is set, set no_truncate to 1
6190         unconditionally.
6191
6192 2001-05-02  Jan Prikryl  <prikryl@cg.tuwien.ac.at>
6193
6194         * ftp-ls.c (ftp_parse_winnt_ls): Assure months are being correctly
6195         converted. Pointed out by <Stefan.Weil@de.heidelberg.com>.
6196         (ftp_parse_vms_ls): Ditto.
6197
6198 2001-04-30  Hrvoje Niksic  <hniksic@arsdigita.com>
6199
6200         * init.c (cmd_address): Zero SIN before using it; apparently
6201         needed on *BSD.
6202
6203 2001-04-29  Hrvoje Niksic  <hniksic@arsdigita.com>
6204
6205         * ftp.c (ftp_loop_internal): Don't set NO_TRUNCATE if the file is
6206         empty.
6207
6208 2001-04-29  Hrvoje Niksic  <hniksic@arsdigita.com>
6209
6210         * main.c (main): Make `--cookies' respect its argument.
6211
6212 2001-04-28  Hrvoje Niksic  <hniksic@arsdigita.com>
6213
6214         * main.c (main): Removed undocumented option `--email-address'.
6215
6216         * netrc.c: Use the latest read_whole_line.
6217
6218         * init.c (defaults): Set opt.ftp_pass to "-wget@".
6219
6220         * mswindows.c (pwd_cuserid): Ditto.
6221
6222         * utils.c (pwd_cuserid): Removed.
6223
6224         * host.c (ftp_getaddress): Removed.
6225
6226 2001-04-28  Hrvoje Niksic  <hniksic@arsdigita.com>
6227
6228         (http_loop): Allocate space for filename_plus_orig_suffix with
6229         alloca; this is more efficient and removes the need to free it
6230         before each and every return.
6231
6232 2001-04-28  Hrvoje Niksic  <hniksic@arsdigita.com>
6233
6234         * http.c (gethttp): Return RETRUNNEEDED when the retrieval is
6235         unneeded because the file is already there and fully downloaded,
6236         and -c is specified.
6237         (http_loop): Handle RETRUNNEEDED.
6238
6239         * wget.h (uerr_t): New value RETRUNNEEDED.
6240
6241         * http.c (http_loop): Set no_truncate for files that both exist
6242         and are non-empty.
6243         (gethttp): Consider the download finished when restval >= contlen,
6244         not only when restval==contlen.
6245         (gethttp): Handle redirection before giving up due to -c.
6246         (gethttp): Clarify error message which explains that -c will not
6247         truncate the file.
6248         (gethttp): When returning CONTNOTSUPPORTED, don't forget to free
6249         the stuff that needs freeing and release the socket.
6250
6251 2001-04-27  Hrvoje Niksic  <hniksic@arsdigita.com>
6252
6253         * main.c (print_help): Wget booleans accept "off", not "no".
6254
6255 2001-04-27  Hrvoje Niksic  <hniksic@arsdigita.com>
6256
6257         * http.c (http_loop): If allow_cache is zero, always disable
6258         caching, not only when retrieving through proxy.
6259
6260         * init.c: Ditto.
6261
6262         * options.h (struct options): Rename proxy_cache to allow_cache.
6263
6264 2001-04-27  Hrvoje Niksic  <hniksic@arsdigita.com>
6265
6266         * http.c (mktime_from_utc): Improve documentation.
6267         (http_atotm): Put format strings into a separate array.
6268
6269 2001-04-27  Hrvoje Niksic  <hniksic@arsdigita.com>
6270
6271         * safe-ctype.h: Instead of throwing #error when isalpha is
6272         defined, redefine it to something that will throw a compile-time
6273         error if actually *used*.  Do the same for the rest of the
6274         standard C macros.
6275
6276 2001-04-26  Hrvoje Niksic  <hniksic@arsdigita.com>
6277
6278         * url.c (getproxy): Ignore empty proxy vars.
6279
6280 2001-04-25  Hrvoje Niksic  <hniksic@arsdigita.com>
6281
6282         * http.c (http_loop): Would load cookies every time.
6283
6284         * cookies.c (load_cookies): Handle cookies whose values contain
6285         embedded spaces.
6286
6287 2001-04-25  Hrvoje Niksic  <hniksic@arsdigita.com>
6288
6289         * utils.c: Define each DIGITS_* in one line.
6290
6291 2001-04-25  Roger L. Beeman  <beeman@cisco.com>
6292
6293         * http.c (http_atotm): Initialize t.tm_isdst to 0.
6294         (mktime_from_utc): Prevent mktime() from having discontinuities at
6295         DST transition points.
6296
6297 2001-04-25  Hrvoje Niksic  <hniksic@arsdigita.com>
6298
6299         * html-url.c (get_urls_html): Fix documentation.
6300
6301 2001-04-25  Hrvoje Niksic  <hniksic@arsdigita.com>
6302
6303         * url.c (UNSAFE_CHAR): Reimplement using a static table.
6304         (url_init): Removed.
6305         (init_unsafe_char_table): Removed.
6306
6307 2001-04-25  Hrvoje Niksic  <hniksic@arsdigita.com>
6308
6309         * snprintf.c (dopr): Replace ISDIGIT with '0' <= ch && ch <= '9'.
6310
6311 2001-04-25  Hrvoje Niksic  <hniksic@arsdigita.com>
6312
6313         * utils.c: Document timer functions.
6314
6315         * retr.c (rate): Use it.
6316         (rate): Print in GB/s if transfer rate exceeds 1 GB/s.
6317
6318         * utils.c (wtimer_granularity): New function.
6319
6320 2001-04-24  Hrvoje Niksic  <hniksic@arsdigita.com>
6321
6322         * retr.c (show_progress): Ditto.
6323
6324         * ftp.c (getftp): Ditto.
6325
6326         * http.c (gethttp): Use new timer functions.
6327
6328         * utils.c (wtimer_allocate): New function.
6329         (wtimer_new): Ditto.
6330         (wtimer_delete): Ditto.
6331         (wtimer_reset): Ditto.
6332         (wtimer_elapsed): Ditto.
6333
6334 2001-04-24  Hrvoje Niksic  <hniksic@arsdigita.com>
6335
6336         * utils.c (long_to_string): New, faster version.  Favors smaller
6337         numbers; much of the calculation is now done at compile-time.
6338
6339 2001-04-24  Hrvoje Niksic  <hniksic@arsdigita.com>
6340
6341         * utils.c (numdigit): Handle negative numbers.
6342
6343 2001-04-23  Hrvoje Niksic  <hniksic@arsdigita.com>
6344
6345         * retr.c (show_progress): Print the download rate even when the
6346         percentages are not available.
6347
6348 2001-04-21  Hrvoje Niksic  <hniksic@arsdigita.com>
6349
6350         * ftp.c (getftp): Adjust expected_bytes if the length is
6351         authoritative.
6352
6353 2001-04-14  Hrvoje Niksic  <hniksic@arsdigita.com>
6354
6355         * url.c: Don't declare `construct'.
6356
6357         * hash.c (grow_hash_table): Speed up rehashing; inline storing of
6358         mappings to new locations.
6359         (hash_table_new): Make resize_threshold a field in the hash table,
6360         so we don't have to recalculate it in each hash_table_put.
6361         (grow_hash_table): Update resize_threshold.
6362         (MAX): Remove unused macro.
6363         (prime_size): Made static.
6364
6365 2001-04-14  Hrvoje Niksic  <hniksic@arsdigita.com>
6366
6367         * retr.c (retrieve_url): Call uri_merge, not url_concat.
6368
6369         * html-url.c (collect_tags_mapper): Call uri_merge, not
6370         url_concat.
6371
6372         * url.c (mkstruct): Use encode_string instead of xstrdup followed
6373         by URL_CLEANSE.
6374         (path_simplify_with_kludge): Deleted.
6375         (contains_unsafe): Deleted.
6376         (construct): Renamed to uri_merge_1.
6377         (url_concat): Renamed to uri_merge.
6378
6379 2001-04-13  Hrvoje Niksic  <hniksic@arsdigita.com>
6380
6381         * url.c (str_url): Use encode_string instead of the unnecessary
6382         CLEANDUP.
6383         (encode_string_maybe): New function, returns input string if no
6384         encoding is needed.
6385         (encode_string): Call encode_string_maybe to do the dirty work,
6386         xstrdup if no work needed.
6387
6388 2001-04-13  Hrvoje Niksic  <hniksic@arsdigita.com>
6389
6390         * wget.h (XDIGIT_TO_xchar): Define here.
6391
6392         * url.c (decode_string): Use new name.
6393         (encode_string): Ditto.
6394
6395         * http.c (XDIGIT_TO_xchar): Rename HEXD2asc to XDIGIT_TO_xchar.
6396         (dump_hash): Use new name.
6397
6398         * wget.h: Rename ASC2HEXD and HEXD2ASC to XCHAR_TO_XDIGIT and
6399         XDIGIT_TO_XCHAR respectively.
6400
6401 2001-04-13  Hrvoje Niksic  <hniksic@arsdigita.com>
6402
6403         * init.c: Include cookies.h.
6404
6405         * cookies.h: Declare cookies_cleanup.
6406
6407         * cookies.c (check_domain_match): Remove unused variable.
6408         (save_cookies): Remove extraneous argument from debug statement.
6409
6410         * host.c (same_host): Don't call skip_url.
6411
6412         * url.c (skip_url): Removed.  Removed its calls from various
6413         functions in url.c.
6414
6415 2001-04-13  Hrvoje Niksic  <hniksic@arsdigita.com>
6416
6417         * cookies.c (unsigned_string_hash): Use the new code in
6418         string_hash as reference.
6419
6420         * hash.c (hash_table_map): Allow deletion and change of the
6421         element processed by MAPFUN.
6422         (string_hash): Use the function from glib.
6423
6424 2001-04-12  Hrvoje Niksic  <hniksic@arsdigita.com>
6425
6426         * config.h.in: Include #undef stub.
6427
6428         * hash.c (hash_table_remove): Rewrite to actually clear deleted
6429         entries instead of just marking them as deleted.
6430
6431 2001-04-12  Hrvoje Niksic  <hniksic@arsdigita.com>
6432
6433         * hash.h: Declare hash_table_get_pair and hash_table_count.
6434
6435 2001-04-12  Hrvoje Niksic  <hniksic@arsdigita.com>
6436
6437         * cookies.c: Declare http_atotm.
6438
6439 2001-04-12  Hrvoje Niksic  <hniksic@arsdigita.com>
6440
6441         * ftp-ls.c (ftp_parse_unix_ls): Use octal constants for
6442         permissions.  A compiler that doesn't accept octal constants is
6443         seriously broken and shouldn't be used -- octal constants were
6444         present in K&R C!
6445
6446 2001-01-20  Karl Eichwalder  <ke@suse.de>
6447
6448         * Makefile.in: Provide and use DESTDIR according to the Coding
6449         Standards.
6450
6451 2001-04-12  Hrvoje Niksic  <hniksic@arsdigita.com>
6452
6453         * ftp-ls.c (ftp_parse_vms_ls): Make seconds optional in time
6454         specification.
6455
6456 2001-04-11  Hrvoje Niksic  <hniksic@arsdigita.com>
6457
6458         * url.c (parseurl): Don't strip trailing slash when u->dir is "/"
6459         because that strips the *leading* slash, thus forcing relative
6460         FTP retrieval.
6461
6462 2001-04-10  Jan Prikryl  <prikryl@cg.tuwien.ac.at>
6463
6464         * ftp.c (getftp): Convert initial FTP directory from VMS to UNIX
6465         notation for VMS servers. 
6466         (ftp_retrieve_dirs): Do not prepend '/' to f->name when
6467         odir is an empty string.
6468
6469 2001-04-10  Jan Prikryl  <prikryl@cg.tuwien.ac.at>
6470
6471         * ftp-ls.c (ftp_parse_winnt_ls): Made the fix for AM/PM more
6472         effective. Suggested by Edward J. Sabol.
6473
6474 2001-04-10  Hrvoje Niksic  <hniksic@arsdigita.com>
6475
6476         * cookies.c (build_cookies_request): Use and sort cookies from all
6477         matching domains.
6478         (build_cookies_request): Check for duplicates before generating
6479         the `Cookies' header.
6480
6481         * main.c (main): Don't load cookies here.
6482         (main): Make loadcookies and savecookies call the correct command.
6483
6484         * http.c (http_loop): Load cookies on-demand.
6485
6486 2001-04-09  Hrvoje Niksic  <hniksic@arsdigita.com>
6487
6488         * http.c (gethttp): Fix indentation of SSL ifdef.
6489
6490 2001-04-09  Hrvoje Niksic  <hniksic@arsdigita.com>
6491
6492         * ftp.c (ftp_retrieve_dirs): Don't forcibly prepend "/" to u->dir;
6493         that hack is no longer necessary.
6494         (getftp): Prepend initial directory to *non*-absolute u->dir's.
6495
6496 2001-04-09  Hrvoje Niksic  <hniksic@arsdigita.com>
6497
6498         * init.c (cmd_file): New function.
6499         (enable_tilde_expansion): New variable.
6500         (run_wgetrc): Use it.
6501         (cmd_file): Use it.
6502
6503 2001-04-08  Hrvoje Niksic  <hniksic@arsdigita.com>
6504
6505         * init.c: Include cookie-related options.
6506
6507         * main.c (main): Include cookie-specific options.
6508         (main): Load cookies before download is finished.
6509         (main): Save cookies when done.
6510
6511         * http.c (gethttp): Process the `Set-Cookie' header.
6512         (gethttp): Include cookies in the response.
6513
6514         * cookies.c: New file.
6515
6516 2001-04-08  Hrvoje Niksic  <hniksic@arsdigita.com>
6517
6518         * utils.c (datetime_str): New function.
6519
6520 2001-04-08  Jan Prikryl  <prikryl@cg.tuwien.ac.at>
6521
6522         * ftp-ls.c (ftp_parse_winnt_ls): The AM/PM change did assume
6523         12:01PM == 00:01, which was obviously wrong. Taken care of this
6524         anomaly.
6525
6526         * ChangeLog: Removed an excess conflict marker. Reformatted the
6527         entry by Philipp Thomas from 2001-03-09.
6528
6529         * ftp-ls.c (ftp_parse_winnt_ls): Ensure that adjusted PM hours lay
6530         between 0 and 23. Elminate unused variable `sec'.
6531
6532 2001-04-08  Hrvoje Niksic  <hniksic@arsdigita.com>
6533
6534         * hash.c (hash_table_count): New function.
6535
6536 2001-04-06  Hrvoje Niksic  <hniksic@arsdigita.com>
6537
6538         * utils.c (read_file): Cast MAP_FAILED to char *.  Enforced by
6539         Digital Unix cc.
6540
6541 2001-04-06  Hrvoje Niksic  <hniksic@arsdigita.com>
6542
6543         * config.h.in: Oops, do the namespace tweaks only on systems we
6544         know about.
6545
6546 2001-04-06  Hrvoje Niksic  <hniksic@arsdigita.com>
6547
6548         * hash.c: Include <string.h>.
6549
6550 2001-04-06  Hrvoje Niksic  <hniksic@arsdigita.com>
6551
6552         * config.h.in: Define "compilation environment" options that work
6553         under Linux and Solaris.  To be reviewed on other OS'es.
6554
6555 2001-04-06  Hrvoje Niksic  <hniksic@arsdigita.com>
6556
6557         * http.c (gethttp): Prepend literal newline with `\n\'.
6558
6559 2001-04-06  Hrvoje Niksic  <hniksic@arsdigita.com>
6560
6561         * sysdep.h: Don't define VERY_LONG_FORMAT.
6562
6563         * utils.c (very_long_to_string): New function.
6564         (legible_very_long): Use it; don't use VERY_LONG_FORMAT.
6565
6566 2001-04-04  Christian Fraenkel  <christian.fraenkel@gmx.net>
6567
6568         * url.c (parse_uname): Would run past the end of the string if the
6569         username was present, but the URL did not contain a slash, e.g.
6570         http://foo:bar@myhost.
6571
6572 2001-04-03  KOJIMA Hajime  <kjm@rins.ryukoku.ac.jp>
6573
6574         * http.c (http_atotm): Use %A instead of %a to match full
6575         weekday.  (On most systems there is no difference.)
6576
6577 2001-04-03  Paul Bludov  <paul@ozero.net>
6578
6579         * mswindows.c (sleep): Use SleepEx() instead of Sleep().
6580         (ws_changetitle): Use alloca() instead of malloc() to avoid memory
6581         leak.
6582         (ws_mypath): Use GetModuleFileName instead of argv[0].
6583         (ws_startup): Use data.wVersion for comparison.
6584
6585 2001-04-02  Hrvoje Niksic  <hniksic@arsdigita.com>
6586
6587         * http.c (http_loop): Ditto.
6588
6589         * ftp.c (ftp_loop_internal): Made the check whether to continue
6590         retrieval `-O'-friendly.
6591
6592 2001-04-02  Hrvoje Niksic  <hniksic@arsdigita.com>
6593
6594         * netrc.c (parse_netrc): Don't trim the line endings explicitly;
6595         they will be handled as whitespace.
6596         (parse_netrc): Correctly handle lines that end with whitespace.
6597
6598 2001-04-02  Hrvoje Niksic  <hniksic@arsdigita.com>
6599
6600         * retr.c (retrieve_url): New variable global_download_count used
6601         to identify first retrieval.
6602
6603         * ftp.c (getftp): Ditto.
6604
6605         * http.c (gethttp): Rewind opt.dfp only on first retrieval.
6606
6607 2001-04-02  Hrvoje Niksic  <hniksic@arsdigita.com>
6608
6609         * init.c (cmd_address): Heap-allocate the address that gets stored
6610         to CLOSURE.  Old code would simply assign an address on the stack.
6611
6612 2001-04-01  Nicolas Lichtmaier <nick@debian.org>
6613
6614         * ftp.c (ftp_get_listing): Propagate error status.
6615         (ftp_retrieve_glob): Use it.
6616         (ftp_loop): Ditto.
6617
6618 2001-04-01  Nicolas Lichtmaier <nick@debian.org>
6619
6620         * main.c (main): Add -C to the string that is the third arg to
6621         getopt_long().
6622
6623 2001-04-01  Hrvoje Niksic  <hniksic@arsdigita.com>
6624
6625         * ftp.c (getftp): Don't start the download from scratch if `-c'
6626         was specified, but the file is already fully downloaded.
6627
6628         * http.c (gethttp): Don't truncate a pre-existing file if `-c' was
6629         specified and the server doesn't support continued download.
6630         (gethttp): Don't start the download from scratch if `-c' was
6631         specified, but the file is already fully downloaded.
6632
6633 2001-03-31  Hrvoje Niksic  <hniksic@arsdigita.com>
6634
6635         (recursive_retrieve): Don't clear the hash tables at this point at
6636         all; it interferes with the normal operation of register_download.
6637
6638 2001-03-31  Hrvoje Niksic  <hniksic@arsdigita.com>
6639
6640         * recur.c (recursive_retrieve): Clear the hash tables only when
6641         they are defined.
6642
6643 2001-03-31  Hrvoje Niksic  <hniksic@arsdigita.com>
6644
6645         * http.c (gethttp): Make sure the socket is closed with
6646         CLOSE_INVALIDATE before we have drained the body.
6647
6648 2001-03-31  Hrvoje Niksic  <hniksic@arsdigita.com>
6649
6650         * retr.c (retrieve_url): Call register_download() for downloaded
6651         files and register_html() for downloaded HTML files.
6652
6653         * recur.c (register_download): New function; register here that a
6654         file has been downloaded, rather than in recursive_retrieve().
6655         (register_html): New function; enqueue the location of HTML files
6656         here rather than in recursive_retrieve().
6657
6658 2001-03-31  Hrvoje Niksic  <hniksic@arsdigita.com>
6659
6660         * main.c (print_help): Use multiple fputs instead of a single ugly
6661         printf().
6662         (main): Consistently assign numbers >128 to options without a
6663         corresponding character.
6664
6665 2001-03-09  Philipp Thomas  <pthomas@suse.de>
6666
6667         * safe-ctype.h: New file. Locale independent ctype.h replacement
6668         taken from libiberty.
6669
6670         * safe-ctype.c: New file. Tables for above.
6671
6672         * Makefile.in: Add safe-ctype$o to OBJS.  Add dependencies for
6673         safe-ctype$o.
6674
6675         * cmpt.c: Remove include of ctype.h. Use ISSPACE instead of
6676         isspace.
6677
6678         * ftp-basic.c: Don't include ctype.h.
6679
6680         * ftp-ls.c: Likewise.
6681
6682         * ftp.c: Likewise.
6683
6684         * headers.c: Likewise.
6685
6686         * host.c: Likewise.
6687
6688         * html-parse.c: Likewise.
6689
6690         * html-url.c: Likewise.
6691
6692         * http.c: Likewise.
6693
6694         * init.c: Likewise.
6695
6696         * main.c: Likewise. Set LC_CTYPE along with LC_MESSAGES.
6697
6698         * netrc.c: Likewise.
6699
6700         * recur.c: Likewise.
6701
6702         * retr.c: Likewise.
6703
6704         * snprintf.c: Replace ctype.h with safe-ctype.h. Use ISDIGIT
6705         instead of isdigit.
6706
6707         * sysdep.h: Remove defines of ctype macros as they aren't needed
6708         for safe-ctype-h.
6709
6710         * url.c: Don't include ctype.h.
6711
6712         * utils.c: Likewise.
6713
6714         * wget.h: Include safe-ctype.h.
6715
6716 2001-03-27  Dan Harkless  <wget@harkless.org>
6717
6718         * Makefile.in: Moved top_builddir out of "User configuration
6719         section" of top Makefile and analogous spot in this one.
6720
6721 2001-03-17  Dan Harkless  <wget@harkless.org>
6722
6723         * Makefile.in: Include @SSL_INCLUDES@ substition in INCLUDES.
6724         Define top_builddir.  Link wget with libtool so the user doesn't
6725         have to supply a bunch of custom environment variables to 
6726         correctly link with the OpenSSL shared libraries.
6727
6728 2001-03-06  Hack Kampbjorn  <hack@hackdata.com>
6729
6730         * http.c (gethttp): skip :port in host header if it is the
6731         DEFAULT_HTTPS_PORT when using SSL.
6732
6733         * url.c: move the #define of DEFAULT_HTTP_PORT, DEFAULT_FTP_PORT
6734         and DEFAULT_HTTPS_PORT to the header file so it can be use in the
6735         rest of the code. 
6736         * url.h: Ditto
6737
6738 2001-03-01  Jonas Jensen  <bones@huleboer.dk>
6739
6740         * retr.c (show_progress): Correctly calculate the number of bytes
6741         in the first line of the download that have been actually
6742         downloaded in this run.
6743
6744 2001-02-23  Dan Harkless  <wget@harkless.org>
6745
6746         * main.c (print_help): --help documentation for -N said it would
6747         re-download files if they had the _same_ timestamp on server.
6748         (print_help): -nr belongs in "FTP options" section of --help
6749         output, not "Recursive retrieval" section.  Alphabetized FTP
6750         options by long option name.
6751
6752 2001-02-16  Dan Harkless  <wget@harkless.org>
6753
6754         * init.c (commands): Hack Kampbjørn <hack@hackdata.com> discovered
6755         that "httpsproxy" had been inserted into commands[] out of
6756         alphabetical order, causing "BUG: unknown command `httpuser'".
6757
6758 2001-02-13  Jan Prikryl  <prikryl@cg.tuwien.ac.at>
6759
6760         * ftp-ls.c (ftp_parse_ls): Added support of ST_MACOS (Unix-like
6761         listing without correct permissons).
6762
6763         * ftp.h (stype): Added ST_MACOS to identify the NetPresenz MacOS
6764         FTP server. 
6765
6766         * ftp.c (ftp_retrieve_list): New mirroring logic: A remote file
6767         shall be donwloaded only when it's newer than the local copy or
6768         when it has the same timeestamp but its size is different. ST_VMS
6769         and ST_MACOS as special cases that lie about file size. 
6770
6771         * ftp-ls.c (ftp_parse_ls): Support for ST_MACOS.
6772
6773         * Makefile.in: Removed dependency on ftpparse library due to unclear
6774         copyright issues and absence of any feedback to our queries. 
6775
6776         * ftp-ls.c: Removed dependency on ftpparse library due to unclear
6777         copyright issues and absence of any feedback to our queries.   
6778         (ftp_parse_ls): Added a warning message when remote server system
6779         does not seem to be suported by wget. 
6780         (ftp_parse_vms_ls): New function for parsing VMS ftp
6781         server listing output.
6782         (clean_line): New function responsible for removing
6783         end-of-line characters from FTP listing texts.
6784
6785         * ftp.c (getftp): Global variables pwd and host_type are now
6786         member of the ccon structure under names ccon.id and ccon.rs. 
6787
6788         * ftp.h (struct ccon): Added formed global variables from ftp.c,
6789         enum stype rs (remote system identification) and char *id (initial
6790         working directory), as suggested by Hrvoje.
6791
6792         * url.c (parse_uname): Added support for passwords containing '@'
6793         characters.
6794         (skip_uname): Ditto.
6795
6796 2001-02-11  Hrvoje Niksic  <hniksic@arsdigita.com>
6797
6798         * ftp.c (ftp_loop): Reset con.
6799
6800 2001-01-06  Jan Prikryl  <prikryl@cg.tuwien.ac.at>
6801
6802         * url.c (parse_uname): Added support for passwords containing '@'
6803         characters.
6804         (skip_uname): Ditto.
6805
6806 2001-02-11  Hack Kampbjørn  <hack@hackdata.com>
6807
6808         * url.c (parseurl): Debug-print u->ftp_type.
6809
6810 2001-02-11  Hrvoje Niksic  <hniksic@arsdigita.com>
6811
6812         * ftp.c (ftp_loop_internal): Disable padding.
6813         (getftp): Ditto.
6814
6815         * http.c (http_loop): Disable padding.
6816
6817         * retr.c (show_progress): Use it to enable padding.
6818
6819         * retr.c (rate): Optional parameter PAD for padding the rate.
6820
6821 2001-02-10  Hrvoje Niksic  <hniksic@arsdigita.com>
6822
6823         * retr.c (show_progress): Make sure that the last output line
6824         includes progress.
6825
6826 2001-02-10  Jonas Jensen  <bones@huleboer.dk>
6827
6828         * retr.c (show_progress): Print the download rate along with the
6829         percentages.
6830         Along with Anders Thorsby <anders@thorsby.dk>.
6831
6832 2001-02-10  Tim Mooney  <mooney@dogbert.cc.ndsu.NoDak.edu>
6833
6834         * ftp.h: Rename enums `command' to `wget_ftp_command' and
6835         `fstatus' to `wget_ftp_status' because old names clash with Tru64
6836         net/if.h.
6837
6838 2001-02-08  Christian Fraenkel <christian.fraenkel@gmx.net>
6839
6840         * gen_sslfunc.c: verify_callback is now static
6841
6842         * gen_sslfunc.c (init_ssl): load certificate if specified
6843
6844         * gen_sslfunc.c (ssl_printerr): new function
6845
6846         * init.c: added new --sslcertfile and --sslcertkey switches
6847
6848         * main.c: ditto
6849
6850         * options.h: ditto
6851
6852         * http.c (gethttp): abort when init_ssl fails
6853
6854 2001-01-23  Herold Heiko  <Heiko.Herold@previnet.it>
6855
6856         * mswindows.h: Include <malloc.h>; it's needed for alloca().
6857
6858 2001-01-10  Dan Harkless  <wget@harkless.org>
6859
6860         * url.c (str_url): Clarified this function's comment header after
6861         Hrvoje answered my question on the list as to when hide != 1.
6862         Also Hrvoje pointed out I need to use xstrdup() on the string literal.
6863
6864 2001-01-06  Hrvoje Niksic  <hniksic@arsdigita.com>
6865
6866         * connect.c (bindport): Declare addrlen as int.  Diagnosed by
6867         Drazen Kacar <dave@arsdigita.com>.
6868         (conaddr): Ditto.
6869
6870 2001-01-09  Dan Harkless  <wget@harkless.org>
6871
6872         * html-url.c: A bunch of fixup of `--page-requisites'-related
6873         comments to reflect Hrvoje's changes to my code when transplanting
6874         it into this new file, to fix spelling mistakes, to clarify, etc.
6875
6876         * url.c (write_backup_file): Clarified a comment.
6877         (str_url): Henrik van Ginhoven pointed out on the list that we
6878         shouldn't give away the number of characters in the password by
6879         replacing each character with a 'x'.  Use "<password>" instead.
6880
6881         * ftp.c (ftp_retrieve_dirs): The bug where recursion into FTP
6882         directories didn't work if logging in put you in a directory other
6883         than "/" is fixed now.  Removed the comment here warning of the bug.
6884
6885         * main.c (print_help): --continue's description was misleading.
6886         We don't "restart", we "resume".  Also, better to say
6887         "partially-downloaded file" rather than just "existing file".
6888
6889 2001-01-06  Dan Harkless  <wget@harkless.org>
6890
6891         * ChangeLog: The '[Not in 1.6 branch.]'s were decided not to be
6892         the best way to go about my aim.  Removed them in favor of:
6893
6894         * ChangeLog-branches/1.6_branch.ChangeLog: New file.
6895
6896 2001-01-04  Hrvoje Niksic  <hniksic@arsdigita.com>
6897
6898         * url.c (replace_attr): New function, to be used by both
6899         TO_COMPLETE and TO_RELATIVE case in convert_links.
6900         (find_fragment): New function for finding URL fragments.
6901         (replace_attr): Better handle the case where the original string
6902         is not quoted.  Use find_fragment.
6903         (convert_links): Use replace_attr().
6904
6905 2000-12-31  Dan Harkless  <wget@harkless.org>
6906
6907         * ChangeLog: Since this flat file doesn't have multiple branches,
6908         looking at the dates would make you think that things went into
6909         1.6 that actually just went into the 1.7-dev branch.  Added "[Not
6910         in 1.6 branch.]" where appropriate to clarify.
6911         
6912 2000-12-30  Dan Harkless  <wget@harkless.org>
6913
6914         * ftp.c, http.c:  Applied Hack Kampbjørn <hack@hackdata.com>'s
6915         patch to deal with h_errno not being defined in netdb.h under Cygwin.
6916
6917 2000-12-18  Csaba Raduly  <csaba.raduly@sophos.com>
6918
6919         * sysdep.h: Include <malloc.h> and <io.h> under Watcom.
6920
6921 2000-12-17  Igor Khristophorov  <igor@atdot.org>
6922
6923         * http.c (check_end): Fix test for '+' or '-'.
6924
6925 2000-12-17  Hrvoje Niksic  <hniksic@arsdigita.com>
6926
6927         * url.c (parseurl): Rename inner loop var from i to ind to avoid
6928         clash with the function top-level-declared variable i.
6929         (str_url): Likewise, rename inner-loop i to j.
6930
6931         * recur.c (parse_robots): Don't declare LEN at top of function.
6932         (robots_match): Renamed parameter FORBIDDEN to avoid hiding of
6933         global variable.
6934
6935         * main.c (main): Change erroneous use of bitwise and to logical.
6936
6937         * init.c (cmd_address): Don't heap-allocate `sin'; it can be on
6938         the stack because it will be copied to closure.
6939
6940         Thanks to Csaba Raduly's run of PC-LINT over the sources.
6941
6942 2000-12-17  Hrvoje Niksic  <hniksic@arsdigita.com>
6943
6944         * http.c (basic_authentication_encode): Use xmalloc(), not
6945         malloc().  Thanks to Csaba Raduly's run of PC-LINT over the
6946         sources.
6947
6948 2000-12-17  Csaba Raduly  <csaba.raduly@sophos.com>
6949
6950         * sysdep.h: Test for __EMX__ rather than for EMXOS2 for OS/2
6951         compilation.
6952
6953 2000-12-17  Hrvoje Niksic  <hniksic@arsdigita.com>
6954
6955         * mswindows.c: Include <errno.h>.
6956
6957         * gen_sslfunc.c: Include <errno.h>.
6958
6959         * ftp-basic.c: Don't attempt to declare errno or h_errno because
6960         they're not used.
6961
6962         * main.c: Include <errno.h> because errno is used.
6963
6964         * ftp.c: Ditto.
6965
6966         * http.c: Include <netdb.h> for h_errno.
6967
6968 2000-12-13  Hrvoje Niksic  <hniksic@arsdigita.com>
6969
6970         * html-parse.c (advance_declaration): MSVC assert() chokes on
6971         '\"'.  Use '"' instead.
6972
6973 2000-12-11  Hrvoje Niksic  <hniksic@arsdigita.com>
6974
6975         * utils.c (xfree_real): Removed.
6976         (xfree_debug): Just call free().
6977
6978         * wget.h (xfree): Make it an alias for free.
6979
6980 2000-12-11  Hrvoje Niksic  <hniksic@arsdigita.com>
6981
6982         * http.c (http_loop): Furthermore, touch output_document only if
6983         it is known to be an existing regular file.
6984
6985 2000-12-11  Hrvoje Niksic  <hniksic@arsdigita.com>
6986
6987         * ftp.c (ftp_retrieve_list): Ditto.
6988
6989         * http.c (http_loop): Touch output_document if that is used for
6990         output.
6991
6992 2000-12-06  Hrvoje Niksic  <hniksic@arsdigita.com>
6993
6994         * http.c: Include gen_sslfunc.h after including Wget's headers.
6995         (persistent_available_p): Needed coma before `int ssl'.
6996
6997 2000-12-06  Hrvoje Niksic  <hniksic@arsdigita.com>
6998
6999         * ftp.c (ftp_loop_internal): Ditto.
7000
7001         * http.c (http_loop): Use it.
7002
7003         * retr.c (sleep_between_retrievals): New function that handles the
7004         logic of opt.wait and opt.waitretry.
7005
7006 2000-12-06  Hrvoje Niksic  <hniksic@arsdigita.com>
7007
7008         * rbuf.h: Implement only a single version of RBUF_READCHAR, using
7009         rbuf_read_bufferful when the buffer is depleted.
7010
7011         * rbuf.c (rbuf_read_bufferful): New function.
7012
7013 2000-12-06  Hrvoje Niksic  <hniksic@arsdigita.com>
7014
7015         * gen_sslfunc.h: Use ansi2knr style function declarations.
7016
7017         * gen_sslfunc.c: Reformat according to the GNU coding standards.
7018         More should be done.
7019
7020         * http.c (persistent_available_p): Place the cheap SSL test nearer
7021         the top of the function.
7022         (CLOSE_FINISH, CLOSE_INVALIDATE): Define only one version of each.
7023
7024 2000-12-05  Hrvoje Niksic  <hniksic@arsdigita.com>
7025
7026         * url.c (init_unsafe_char_table): Reinstate space as an unsafe
7027         char.
7028
7029 2000-12-03  Christian Fraenkel <christian.fraenkel@gmx.net>
7030
7031         * Makefile.in: added gen_sslfunc object
7032         * config.h.in: added HAVE_SSL define
7033         * connect.c: changed select_fd from static int to int
7034         * connect.h: ditto
7035         * gen_sslfunc.h: New file
7036         * gen_sslfunc.c: ditto
7037         * http.c: added HTTPS fuctionality
7038         * retrc.c: ditto
7039         * url.c: ditto
7040         * init.c: added opt.httpsproxy
7041         * options.h: ditto
7042         * rbuf.h: added alternate rbuf struct
7043         * wget.h: added CONSSLERR
7044         * rbuf.c: ditto
7045
7046         * http.c: Added HTTPS fuctionality.
7047
7048         * retrc.c: Ditto.
7049
7050         * url.c: Ditto.
7051
7052         * init.c: Added opt.httpsproxy.
7053
7054         * options.h: Ditto.
7055
7056         * rbuf.h: Added alternate rbuf struct.
7057
7058         * wget.h: Added CONSSLERR.
7059
7060         * rbuf.c: Ditto.
7061
7062 2000-11-30  Jan Prikryl  <prikryl@cg.tuwien.ac.at>
7063
7064         * ftp-ls.c (ftp_parse_unix_ls): Added second parameter
7065         "ignore_perms" to ignore file and directory permissions for
7066         Windows NT FTP server listings.
7067         (ftp_parse_winnt_ls): New function.
7068         (ftp_parse_ls): Parses UNIX and Windows NT listings
7069         separately. Simple heuristics for distinguishing between UNIX and
7070         MS-DOS-like FTP listing provided by Windows NT FTP service.
7071
7072 2000-11-18  Jan Prikryl  <prikryl@cg.tuwien.ac.at>
7073
7074         * ftpparse.c, ftpparse.h: New files.
7075
7076         * ftp-ls.c (ftp_parse_ls): Use ftp_parse_unix_ls for UNIX servers
7077         only. Use ftp_parse_nonunix_ls otherwise.
7078         (ftp_parse_nonunix_ls): Stub to the ftpparse library handling all
7079         exotic FTP servers.
7080
7081         * ftp.h (stype): New enum, distinguishes UNIX, VMS, and "other"
7082         FTP servers.
7083
7084         * ftp.c: New static wariables host_type, pwd, and pwd_len. 
7085         (getftp): Support for VMS. Support for FTP servers that do not
7086         place you in the root directory after login.
7087         (ftp_retrieve_list): VMS is silent about the real file size, issue
7088         a more appropriate message.
7089         (ftp_get_listing): Pass host_type to ftp_parse_ls.
7090
7091         * ftp-basic.c (ftp_pwd, ftp_syst): New functions.
7092
7093 2000-11-30  Jan Prikryl  <prikryl@cg.tuwien.ac.at>
7094
7095         * ftp-ls.c (ftp_parse_unix_ls): Added second parameter
7096         "ignore_perms" to ignore file and directory permissions for
7097         Windows NT FTP server listings.
7098         (ftp_parse_winnt_ls): New function.
7099         (ftp_parse_ls): Parses UNIX and Windows NT listings
7100         separately. Simple heuristics for distinguishing between UNIX
7101         and MS-DOS-like FTP listing provided by Windows NT FTP service.
7102
7103 2000-11-29  John Summerfield  <summer@OS2.ami.com.au>
7104
7105         * netrc.c (parse_netrc): Get rid of line ending.
7106
7107 2000-11-25  Hrvoje Niksic  <hniksic@arsdigita.com>
7108
7109         * ftp.c (ftp_retrieve_list): Undo typo "fix" until resolution by
7110         Dan.
7111
7112 2000-11-24  Karl Eichwalder  <ke@suse.de>
7113
7114         * main.c (print_help): Untabify.
7115
7116 2000-11-23  Hrvoje Niksic  <hniksic@arsdigita.com>
7117
7118         * utils.c (xrealloc_debug): Do the unregister/register thing only
7119         if the pointer has actually changed.
7120         (xmalloc_real): Declare `static' in DEBUG_MALLOC builds.
7121         (xfree_real): Ditto.
7122         (xrealloc_real): Ditto.
7123         (xstrdup_real): Ditto.
7124
7125 2000-11-22  Hrvoje Niksic  <hniksic@arsdigita.com>
7126
7127         * ftp.c (getftp): ftp_getaddress() returns a malloc'ed copy of the
7128         string; no need to strdup() it.
7129         (getftp): Make pwd_len a local variable.
7130         (ftp_loop): Free PWD before returning.
7131
7132         * init.c (cleanup): Free opt.ftp_pass only if it's non-NULL.
7133
7134 2000-11-22  Hrvoje Niksic  <hniksic@arsdigita.com>
7135
7136         * all: Use xfree() instead of free.
7137
7138         * utils.c (xfree): New function.
7139
7140 2000-11-21  Hrvoje Niksic  <hniksic@arsdigita.com>
7141
7142         * url.c (convert_links): HTML-quote the converted string.
7143
7144         * utils.c (html_quote_string): Move here from ftp-ls.c
7145         (html_quote_string): Make non-static; declare in utils.h.
7146         (html_quote_string): Convert SP to &#32;.
7147
7148 2000-11-21  Hrvoje Niksic  <hniksic@arsdigita.com>
7149
7150         * ftp.c (getftp): Reformat Jan's code according to GNU coding
7151         standards; remove (debugging?) printf's; use '\0' for the ASCII
7152         zero character.  Use alloca() instead of malloc() for
7153         inter-function temporary allocations.
7154
7155 2000-11-18  Jan Prikryl  <prikryl@cg.tuwien.ac.at>
7156
7157         * ftpparse.c, ftpparse.h: New files.
7158
7159         * ftp-ls.c (ftp_parse_ls): Use ftp_parse_unix_ls for UNIX servers
7160         only. Use ftp_parse_nonunix_ls otherwise.
7161         (ftp_parse_nonunix_ls): Stub to the ftpparse library handling all
7162         exotic FTP servers.
7163
7164         * ftp.h (stype): New enum, distinguishes UNIX, VMS, and "other"
7165         FTP servers.
7166
7167         * ftp.c: New static wariables host_type, pwd, and pwd_len. 
7168         (getftp): Support for VMS. Support for FTP servers that do not
7169         place you in the root directory after login.
7170         (ftp_retrieve_list): VMS is silent about the real file size, issue
7171         a more appropriate message.
7172         (ftp_get_listing): Pass host_type to ftp_parse_ls.
7173
7174         * ftp-basic.c (ftp_pwd, ftp_syst): New functions.
7175
7176 2000-11-21  Hrvoje Niksic  <hniksic@arsdigita.com>
7177
7178         * hash.c (hash_table_put): Don't overwrite deleted mappings.
7179
7180 2000-11-21  Hrvoje Niksic  <hniksic@arsdigita.com>
7181
7182         * hash.c (find_mapping): New function.
7183         (hash_table_get): Use it.
7184         (hash_table_get_pair): Ditto.
7185         (hash_table_exists): Ditto.
7186         (hash_table_remove): Ditto.
7187         (hash_table_remove): Really delete the entry if the mapping
7188         following LOCATION is empty.
7189
7190         * utils.c (string_set_add): Check whether the element has existed
7191         before.
7192
7193         * hash.c (hash_table_get_pair): New function.
7194
7195 2000-11-20  Hrvoje Niksic  <hniksic@arsdigita.com>
7196
7197         * http.c (http_process_type): Ignore trailing whitespace; use
7198         strdupdelim().
7199
7200         * recur.c (recursive_retrieve): Use the new `convert' field.
7201         (convert_all_links): Ditto.
7202         (convert_all_links): Don't respect meta_disallow_follow.
7203
7204         * html-url.c (handle_link): Fill out link_relative_p and
7205         link_complete_p.
7206
7207         * url.h (struct _urlpos): Make elements more readable.
7208
7209         * recur.c (recursive_retrieve): Call slist_prepend instead of
7210         slist_append.
7211         (convert_all_links): Call slist_nreverse before iterating through
7212         urls_html.
7213
7214         * utils.c (slist_prepend): New function.
7215         (slist_nreverse): Ditto.
7216
7217 2000-11-20  Hrvoje Niksic  <hniksic@arsdigita.com>
7218
7219         * http.c (check_end): Constify.
7220
7221 2000-11-20  Hrvoje Niksic  <hniksic@arsdigita.com>
7222
7223         * http.c (http_loop): If username and password are known, try the
7224         `Basic' authentication scheme by default.
7225
7226         * connect.h: Declare test_socket_open.
7227
7228 2000-11-20  Hrvoje Niksic  <hniksic@arsdigita.com>
7229
7230         * version.c: Bump version from 1.5.3+dev to 1.7-dev.
7231
7232 2000-11-20  Hrvoje Niksic  <hniksic@arsdigita.com>
7233
7234         * http.c (gethttp): Don't use the return value of sprintf().
7235         (gethttp): Inhibit keep-alive if opt.http_keep_alive is 0.
7236
7237 2000-11-20  Hrvoje Niksic  <hniksic@arsdigita.com>
7238
7239         * recur.c (recursive_retrieve): Print the "so we don't load"
7240         debugging message only if we really don't load.
7241
7242         * http.c (gethttp): Inhibit keep-alive if proxy is being used.
7243         (gethttp): Don't request keep-alive if keep-alive is inhibited.
7244
7245 2000-11-19  Hrvoje Niksic  <hniksic@arsdigita.com>
7246
7247         * http.c (gethttp): Make the HTTP persistent connections more
7248         robust.
7249
7250 2000-11-19  Hrvoje Niksic  <hniksic@arsdigita.com>
7251
7252         * retr.c (get_contents): If use_expected, make sure that the
7253         appropriate amount of data is being read.
7254
7255         * http.c (gethttp): Check for both `Keep-Alive: ...' and
7256         `Connection: Keep-Alive'.
7257
7258         * wget.h (DEBUGP): Call debug_logprintf only if opt.debug is
7259         turned on.
7260
7261 2000-11-19  Hrvoje Niksic  <hniksic@arsdigita.com>
7262
7263         * http.c (connection_available_p): Use it.
7264
7265         * connect.c (test_socket_open): New function.
7266
7267         * http.c (gethttp): Support persistent connections.  Based on the
7268         ideas, and partly on code, by Sam Horrocks <sam@daemoninc.com>.
7269         (register_persistent): New function.
7270         (connection_available_p): Ditto.
7271         (invalidate_connection): Ditto.
7272
7273 2000-11-19  Hrvoje Niksic  <hniksic@arsdigita.com>
7274
7275         * url.c (convert_links): Handle UREL2ABS case.
7276
7277         * recur.c (recursive_retrieve): Instead of the list
7278         urls_downloaded, use hash tables dl_file_url_map and
7279         dl_url_file_map.
7280         (convert_all_links): Use them to retrieve data.
7281
7282         * host.c (clean_hosts): Free the hash tables.
7283
7284         * main.c (private_initialize): Call host_init().
7285
7286         * host.c (store_hostaddress): Use a saner, hash table-based data
7287         model.
7288         (realhost): Ditto.
7289         (host_init): Initialize the hash tables.
7290
7291 2000-11-18  Hrvoje Niksic  <hniksic@arsdigita.com>
7292
7293         * utils.c (slist_append): Eviscerate NOSORT.  Hash tables are now
7294         used for what the sorted slists used to be used for.
7295         (slist_contains): Don't rely on the list being sorted.
7296         (slist_append): Simplify the code.
7297
7298         * recur.c (recursive_cleanup): Use free_string_set.
7299
7300         * utils.c (string_set_add, string_set_exists, string_set_free):
7301         New functions for easier freeing of hash tables whose keys are
7302         strdup'ed strings.
7303
7304         * recur.c (recursive_retrieve): Use the hash table functions for
7305         storing undesirable URLs.
7306
7307         * hash.c: New file.
7308
7309 2000-11-17  Hrvoje Niksic  <hniksic@arsdigita.com>
7310
7311         * main.c (private_initialize): Call url_init.
7312         (main): Call private_initialize.
7313
7314         * url.c (unsafe_char_table): New table.
7315         (UNSAFE_CHAR): Use it.
7316         (init_unsafe_char_table): New function.
7317         (url_init): New function; call init_unsafe_char_table.
7318
7319 2000-11-16  Hrvoje Niksic  <hniksic@arsdigita.com>
7320
7321         * mswindows.h: Define snprintf and vsnprintf to _snprintf and
7322         _vsnprintf respectively.
7323
7324 2000-11-15  Hrvoje Niksic  <hniksic@arsdigita.com>
7325
7326         * config.h.in: Do the _XOPEN_SOURCE and _SVID_SOURCE things only
7327         on Linux.
7328
7329 2000-11-15  Hrvoje Niksic  <hniksic@arsdigita.com>
7330
7331         * html-url.c (handle_link): Handle HTML fragment identifiers.
7332
7333         * recur.c (recursive_retrieve): If norobot info is respected and
7334         the file is specified not to be followed by robots, respect that.
7335
7336         * html-url.c (collect_tags_mapper): Handle <meta name=robots
7337         content=X>.  For us the important cases are where X is NONE or
7338         where X contains NOFOLLOW.
7339         (get_urls_html): Propagate that information to the caller.
7340
7341 2000-11-13  Hrvoje Niksic  <hniksic@arsdigita.com>
7342
7343         * url.c (convert_links): Unlink the file we might be reading from
7344         before writing to it.
7345         (convert_links): Use alloca instead of malloc for
7346         filename_plus_orig_suffix.
7347
7348 2000-11-12  Hrvoje Niksic  <hniksic@arsdigita.com>
7349
7350         * host.c (realhost): Add HOST to the list with quality==0 only if
7351         it wasn't already there.
7352         Based on analysis by Lu Guohan <feng@public.bjnet.edu.cn>.
7353
7354 2000-11-10  Hrvoje Niksic  <hniksic@arsdigita.com>
7355
7356         * url.c (get_urls_file): Ditto.
7357         (convert_links): Ditto.
7358
7359         * html-url.c (get_urls_html): Use read_file() instead of
7360         load_file().
7361
7362         * utils.c (read_file): New function, instead of the old
7363         load_file().
7364         (read_file_free): Ditto.
7365
7366         * url.c (findurl): Search only for the supported protocols.
7367         (convert_links): Use fwrite() when writing out a region of
7368         characters.
7369
7370 2000-11-10  Hrvoje Niksic  <hniksic@arsdigita.com>
7371
7372         * ftp-ls.c: Move html_quote_string and ftp_index here.
7373
7374         * url.c: Remove get_urls_html, since that's now in html-url.c.
7375
7376         * html-url.c: New file.
7377
7378         * html-parse.c: New file.
7379
7380 2000-11-10  Hrvoje Niksic  <hniksic@arsdigita.com>
7381
7382         * init.c (run_wgetrc): Don't bother killing off '\r' since
7383         pars_line() skips whitespace at end of line anyway.
7384         (parse_line): Oops, it didn't.  Now it does.
7385
7386         * recur.c (parse_robots): Ditto here.
7387
7388         * ftp-ls.c (ftp_parse_unix_ls): Kill off the newline character
7389         manually because read_whole_line no longer does.
7390
7391         * utils.c (read_whole_line): Rewrite to: a) use less memory
7392         (reallocates to needed size after work), b) work faster -->
7393         fgets() instead of getc, c) be more correct --> doesn't kill the
7394         newline character at the end of line.
7395
7396 2000-11-10  Hrvoje Niksic  <hniksic@arsdigita.com>
7397
7398         * init.c (comind): Initialize MAX to array size - 1.
7399
7400 2000-11-08  Hrvoje Niksic  <hniksic@arsdigita.com>
7401
7402         * url.c (construct): Changed last_slash[-1] to *(last_slash - 1).
7403         Suggested by Edward J. Sabol.
7404
7405 2000-11-08  Hrvoje Niksic  <hniksic@arsdigita.com>
7406
7407         * url.c (construct): Handle the case where host name is not
7408         followed by a slash.
7409
7410 2000-11-06  Hrvoje Niksic  <hniksic@arsdigita.com>
7411
7412         * init.c: commands[] need to be sorted!  ("base" wasn't.)
7413
7414 2000-11-05  Hrvoje Niksic  <hniksic@arsdigita.com>
7415
7416         * wget.h (DO_REALLOC_FROM_ALLOCA): Use braces to disambiguate
7417         `if'.
7418
7419 2000-11-05  Hrvoje Niksic  <hniksic@arsdigita.com>
7420
7421         * url.c (construct): Insert unneeded initialization for the
7422         compiler to shut up.
7423
7424         * config.h.in: Define _XOPEN_SOURCE to 500 to get the prototype
7425         for strptime() (*duh*).  Define _SVID_SOURCE to get S_IFLNK which
7426         otherwise gets lost when you define _XOPEN_SOURCE.
7427
7428         * utils.c (touch): Include the file name in the error message.
7429         From Debian.
7430
7431 2000-11-05  Hrvoje Niksic  <hniksic@arsdigita.com>
7432
7433         * log.c (logvprintf): Use vsnprintf() in all cases.  If necessary,
7434         resize the buffer to fit the formated message.  That way, messages
7435         of arbitrary size may be printed.
7436         (logvprintf): Use saved_append() to optionally log the last
7437         several lines of output.
7438         (logputs): Ditto.
7439         (log_close): Adapt to new data structures.
7440         (log_dump): Ditto.
7441         (redirect_output): Print messages to stderr, not to stdout.
7442
7443         * log.c (saved_append_1): New function.  Replaces the old logging
7444         system ("log all output until 10M characters") with a new, much
7445         more reasonable one ("log last screenful of text").
7446         (saved_append): New function; call saved_append_1.
7447         (free_log_line): New function.
7448
7449 2000-11-05  Hrvoje Niksic  <hniksic@arsdigita.com>
7450
7451         * url.c (construct): Fix comment.
7452         (find_last_char): Document.
7453
7454 2000-11-04  Hrvoje Niksic  <hniksic@arsdigita.com>
7455
7456         * snprintf.c: New file.
7457
7458 2000-11-03  Hrvoje Niksic  <hniksic@arsdigita.com>
7459
7460         * wget.h: If HAVE_STDARG_H is not defined, don't declare argument
7461         types to logprintf() and debug_logprintf().
7462
7463 2000-11-02  Hrvoje Niksic  <hniksic@arsdigita.com>
7464
7465         * ftp.c (ftp_loop_internal): Hide the password from the URL when
7466         printing non-verbose.  Problem spotted by Dariusz Mlynarczyk
7467         <darekm@bydg.lomac.com.pl>.
7468
7469 2000-11-02  Junio Hamano  <junio@twinsun.com>
7470
7471         * ftp-basic.c (ftp_login): Make comparison case-insensitive.
7472
7473 2000-11-02  Tyler Riddle  <triddle@liquidmarket.com>
7474
7475         * http.c (known_authentication_scheme_p): Recognize NTML
7476         authentication.
7477         (create_authorization_line): Treat NTML the same as `Basic'.
7478
7479 2000-11-02  Hrvoje Niksic  <hniksic@arsdigita.com>
7480
7481         * retr.c (retrieve_url): Free url before returning.
7482         (retrieve_url): Free mynewloc before returning.
7483         Spotted by Mark A. Mankins <Mankins_Mark@prc.com>.
7484
7485 2000-11-02  Hrvoje Niksic  <hniksic@arsdigita.com>
7486
7487         * url.c (parseurl): Remove possible reading past the end of
7488         sup_protos[].  Spotted by Mark A. Mankins <Mankins_Mark@prc.com>.
7489
7490 2000-11-01  Hrvoje Niksic  <hniksic@arsdigita.com>
7491
7492         * main.c (main): In case of opt.downloaded overflowing, print
7493         <overflow> instead of a totally bogus random value.
7494
7495         * retr.c (retrieve_from_file): Ditto.
7496
7497         * recur.c (recursive_retrieve): Ditto.
7498
7499         * main.c (main): Ditto.
7500
7501         * http.c (http_loop): Ditto.
7502
7503         * ftp.c (ftp_loop_internal): Use downloaded_increase() instead of
7504         `+=', and downloaded_exceeds_quota() instead of the simple-minded
7505         check.
7506         (ftp_retrieve_list): Ditto.
7507         (ftp_retrieve_dirs): Ditto.
7508         (ftp_retrieve_glob): Ditto.
7509
7510         * retr.c (downloaded_increase): New function.  Notice overflows of
7511         opt.downloaded.
7512         (downloaded_exceeds_quota): Make sure that opt.downloaded is not
7513         used if it overflowed.
7514
7515         * options.h (struct options): New member downloaded_overflow.
7516
7517 2000-11-01  Hrvoje Niksic  <hniksic@arsdigita.com>
7518
7519         * wget.h (enum): Remove extra space after last enumeration.
7520
7521 2000-11-01  Hrvoje Niksic  <hniksic@arsdigita.com>
7522
7523         * main.c (main): Use legible_very_long() for printing
7524         opt.downloaded.
7525
7526         * utils.c (legible_1): New function that operates on strings and
7527         does the brunt of legible()'s work.
7528         (legible): Use legible_1().
7529         (legible_very_long): New function; dump the argument with
7530         sprintf(), and call legible_1().
7531
7532         * options.h (struct options): Use VERY_LONG_TYPE for
7533         opt.downloaded.
7534
7535         * sysdep.h (VERY_LONG_TYPE): Define it to have a 64-bit or greater
7536         type.
7537
7538         * config.h.in: Make sure that SIZEOF_LONG and SIZEOF_LONG_LONG get
7539         defined.  Define HAVE_LONG_LONG if long long is available.
7540
7541 2000-11-01  Hrvoje Niksic  <hniksic@arsdigita.com>
7542
7543         * utils.c (long_to_string): Update with a later, better version.
7544
7545 2000-11-01  Hrvoje Niksic  <hniksic@arsdigita.com>
7546
7547         * url.c (path_simplify_with_kludge): New function.
7548         (path_simplify_with_kludge): Disable it.  Instead...
7549         (parse_dir): ...make sure that at this point the right thing is
7550         done, i.e. that "query" part of the URL (?...) is always assigned
7551         to the file, never to the directory portion of the path.
7552
7553 2000-11-01  Hrvoje Niksic  <hniksic@arsdigita.com>
7554
7555         * retr.c (retrieve_url): Detect redirection cycles.
7556
7557 2000-11-01  Hrvoje Niksic  <hniksic@arsdigita.com>
7558
7559         * url.c (get_urls_html): Decode HTML entities using
7560         html_decode_entities.
7561
7562         * html.c (htmlfindurl): Don't count the `#' in numeric entities
7563         (&#NNN;) as an HTML fragemnt.
7564         (html_decode_entities): New function.
7565
7566 2000-11-01  Hrvoje Niksic  <hniksic@arsdigita.com>
7567
7568         * html.c (htmlfindurl): Fix recognition of # HTML fragments.
7569
7570 2000-11-01  Hrvoje Niksic  <hniksic@arsdigita.com>
7571
7572         * url.c (construct): Rewritten for clarity.  Avoids the
7573         unnecessary copying and stack-allocation the old version
7574         performed.
7575
7576 2000-10-31  Hrvoje Niksic  <hniksic@arsdigita.com>
7577
7578         * ftp.c (getftp): Ditto.
7579
7580         * http.c (gethttp): Rewind the stream when retrying from scratch.
7581
7582 2000-10-31  Hrvoje Niksic  <hniksic@arsdigita.com>
7583
7584         * retr.c (retrieve_url): Use url_concat() to handle relative
7585         redirections instead of /ad hoc/ code.
7586
7587         * url.c (url_concat): New function encapsulating weird
7588         construct().
7589         (urllen_http_hack): New function.
7590         (construct): When constructing new URLs, recognize that `?' does
7591         not form part of the file name in HTTP.
7592
7593 2000-10-13  Adrian Aichner  <adrian@xemacs.org>
7594
7595         * retr.c: Add msec timing support for WINDOWS.
7596         * retr.c (reset_timer): GetSystemTime() on WINDOWS.
7597         * retr.c (elapsed_time): Calculate delta time to msec on WINDOWS.
7598
7599 2000-10-27  Dan Harkless  <wget@harkless.org>
7600
7601         * retr.c (retrieve_url): Manually applied T. Bharath
7602         <TBharath@responsenetworks.com>'s patch to get wget to grok
7603         illegal relative URL redirects.  Reformatted and re-commented it.
7604
7605 2000-10-23  Dan Harkless  <wget@harkless.org>
7606
7607         * connect.c (make_connection and bindport): Manually applied Rob
7608         Mayoff <mayoff@dqd.com>'s 1.5.3 patch to add --bind-address,
7609         changing coding style to GNU's.
7610
7611         * ftp.c (ftp_loop_internal): --delete-after wasn't implemented for
7612         files downloaded via FTP.  Per a comment, .listing files were not
7613         counted towards number of bytes and files downloaded because they're 
7614         deleted anyway.  Well, they aren't under -nr, so count them then.
7615
7616         * init.c: Manually applied Rob Mayoff's 1.5.3 patch to add
7617         --bind-address, alphabetizing, changing coding style to GNU's,
7618         commenting, and renaming cmd_ip_address() to cmd_address() to
7619         imply hostnames also okay.
7620                 
7621         * main.c (main): --delete-after didn't delete the root of the
7622         tree.  Ignore --convert-links if --delete-after was specified.
7623         Manually applied Rob Mayoff's 1.5.3 patch to add --bind-address,
7624         fixing duplicate use of added-since-1.5.3 case value.
7625         (print_help): Clarified that --delete-after deletes local files.
7626         Rob forgot to add a line for his new --bind-address option.
7627                 
7628         * options.h (struct options): Manually applied Rob Mayoff's patch
7629         to add --bind-address (bind_address structure member).
7630                 
7631         * recur.c (recursive_retrieve): Improved comment; added DEBUGP().
7632         Ignore --convert-links if --delete-after was specified.
7633                 
7634         * retr.c (retrieve_from_file): Just added a DEBUGP().
7635                 
7636 2000-10-19  Dan Harkless  <wget@harkless.org>
7637
7638         * ftp.c (ftp_loop_internal): downloaded_file() enumerators changed.
7639         (getftp): Applied Piotr Sulecki <Piotr.Sulecki@ios.krakow.pl>'s
7640         patch to work around FTP servers that incorrectly respond to the
7641         "REST" command with the remaining size rather than the total file size.
7642                 
7643         * http.c (gethttp): Improved a comment and added code to tack on
7644         ".html" to text/html files without that extension when -E specified.
7645         (http_loop): Use new downloaded_file() enumerators and deal with
7646         the case of gethttp() called xrealloc() on u->local.
7647
7648         * init.c (commands): Added new "htmlextension" command.
7649         Also renamed John Daily's cmd_quad() to the more descriptive
7650         cmd_lockable_boolean(), alpha-sorted the CMD_DECLARE()s and
7651         removed duplicate cmd_boolean() declaration.
7652
7653         * main.c (print_help): Added my new -E / --html-extension option.
7654         (main): Undocumented --email-address option previously used -E synonym.
7655         Stole it away for the much more deserving --html-extension's use.
7656
7657         * options.h (struct options): Added html_extension field.
7658
7659         * url.c (convert_links): URL X that we saved as X.html locally due
7660         to -E needs to be backed up as X.orig, not X.html.orig.  Added comments.
7661         (downloaded_file): Now remembers if we added .html extension to a file.
7662
7663         * url.h (downloaded_file_t): Added extra enumerators to support above.
7664         (downloaded_file): Now takes and returns a downloaded_file_t.
7665
7666         * wget.h (unnamed "dt" enum): Added ADDED_HTML_EXTENSION enumerator.
7667         
7668 2000-10-09  Dan Harkless  <wget@harkless.org>
7669
7670         * html.c (htmlfindurl): Added unneeded initialization to quiet warning.
7671                 
7672         * main.c (print_help): Clarified what --retr-symlinks does.
7673         
7674 2000-09-15  John Daily  <jdaily@cyberdude.com>
7675
7676         * init.c: Add support for "always" and "never" values to allow
7677         .wgetrc to override commandline (useful e.g. with .pm files
7678         calling `wget --passive-ftp' when your firewall doesn't allow that).
7679
7680         * ftp.c (getftp): passive_ftp is first option to support always/never.
7681
7682 2000-08-30  Dan Harkless  <wget@harkless.org>
7683
7684         * ftp.c (ftp_retrieve_list): Use new INFINITE_RECURSION #define.
7685         
7686         * html.c: htmlfindurl() now takes final `dash_p_leaf_HTML' parameter.
7687         Wrapped some > 80-column lines.  When -p is specified and we're at a 
7688         leaf node, do not traverse <A>, <AREA>, or <LINK> tags other than 
7689         <LINK REL="stylesheet">.
7690         
7691         * html.h (htmlfindurl): Now takes final `dash_p_leaf_HTML' parameter.
7692         
7693         * init.c: Added new -p / --page-requisites / page_requisites option.
7694
7695         * main.c (print_help): Clarified that -l inf and -l 0 both allow
7696         infinite recursion.  Changed the unhelpful --mirrior description
7697         to simply give the options it's equivalent to.  Added new -p option.
7698         (main): Added some comments; handle new -p / --page-requisites.
7699         
7700         * options.h (struct options): Added new page_requisites field.
7701
7702         * recur.c: Changed "URL-s" to "URLs" and "HTML-s" to "HTMLs".
7703         Calculate and pass down new `dash_p_leaf_HTML' parameter to
7704         get_urls_html().  Use new INFINITE_RECURSION #define.
7705
7706         * retr.c: Changed "URL-s" to "URLs".  get_urls_html() now takes
7707         final `dash_p_leaf_HTML' parameter.
7708
7709         * url.c: get_urls_html() and htmlfindurl() now take final
7710         `dash_p_leaf_HTML' parameter.
7711
7712         * url.h (get_urls_html): Now takes final `dash_p_leaf_HTML' parameter.
7713
7714         * wget.h: Added some comments and new INFINITE_RECURSION #define.
7715         
7716 2000-08-23  Dan Harkless  <wget@harkless.org>
7717
7718         * main.c (print_help): -B / --base was not mentioned.
7719
7720 2000-08-22  Dan Harkless  <wget@harkless.org>
7721
7722         * main.c (print_help): Modified -nc description to mention that it
7723         also prevents the creation of multiple versions of the same file
7724         with ".<number>" suffixes.
7725
7726 2000-07-14  Jan Prikryl  <prikryl@cg.tuwien.ac.at>
7727
7728         * retr.c (retrieve_url): Consistently strdup opt.referer when
7729         setting u->referer.
7730
7731 2000-06-09  Dan Harkless  <wget@harkless.org>
7732
7733         * main.c (print_help): --help output for --waitretry was over 80 cols.
7734
7735 2000-06-09  Hrvoje Niksic  <hniksic@iskon.hr>
7736
7737         * url.c (encode_string): Fix comment.
7738         Suggested by Herold Heiko <Heiko.Herold@previnet.it>.
7739
7740 2000-06-01  Const Kaplinsky  <const@ce.cctpu.edu.ru>
7741
7742         * ftp.c (ftp_retrieve_list): Change permissions only on plain
7743         files.
7744
7745 2000-06-01  Hrvoje Niksic  <hniksic@iskon.hr>
7746
7747         * url.c (str_url): Print the port number only if it's different
7748         from the default port number for that protocol.
7749
7750 2000-05-22  Dan Harkless  <wget@harkless.org>
7751
7752         * main.c (print_help): Added --help line for Damir Dzeko
7753         <ddzeko@zesoi.fer.hr>'s until-now-undocumented --referer option.
7754         Removed comments that --referer and --waitretry were undocumented.
7755         Changed "`.wgetrc' command" to "`.wgetrc'-style command" on --help
7756         line for --execute.
7757
7758 2000-05-18  Hrvoje Niksic  <hniksic@iskon.hr>
7759
7760         * ftp.c (getftp): Ditto.
7761
7762         * http.c (gethttp): Check for return value of fclose/fflush.
7763
7764 2000-04-12  Hrvoje Niksic  <hniksic@iskon.hr>
7765
7766         * host.c (store_hostaddress): Instead of shifting ADDR, start
7767         copying from the correct address.
7768
7769 2000-04-12  Hrvoje Niksic  <hniksic@iskon.hr>
7770
7771         * http.c (gethttp): Don't free REQUEST -- it was allocated with
7772         alloca().
7773         Pointed out by Gisle Vanem <gvanem@eunet.no>.
7774
7775 2000-04-04  Dan Harkless  <wget@harkless.org>
7776
7777         * host.c (store_hostaddress): R. K. Owen's patch introduces a
7778         "left shift count >= width of type" warning on 32-bit
7779         architectures.  Got rid of it by tricking the compiler w/ a variable.
7780         
7781         * url.c (UNSAFE_CHAR): The macro didn't include all the illegal
7782         characters per RFC1738, namely everything above '~'.  It also
7783         generated a warning on OSes where char =~ unsigned char.  Fixed.
7784         
7785 1998-10-17  Hrvoje Niksic  <hniksic@srce.hr>
7786
7787         * http.c (http_process_type): Removed needless strdup(), a memory
7788         leak.
7789
7790 1998-09-25  Hrvoje Niksic  <hniksic@srce.hr>
7791
7792         * html.c (htmlfindurl): Set PH to the first occurrence of `#'.
7793
7794 1998-09-25  Simon Munton  <simonm@m4data.co.uk>
7795
7796         * init.c (wgetrc_file_name): Don't free HOME under Windows.
7797
7798 1998-12-01  "R. K. Owen"  <rkowen@Nersc.GOV>
7799
7800         * host.c (store_hostaddress): Fix for big endian 64-bit machines.
7801
7802 1998-12-01  Hrvoje Niksic  <hniksic@srce.hr>
7803
7804         * url.c (UNSAFE_CHAR): New macro.
7805         (contains_unsafe): Use it.
7806         (encode_string): Ditto.
7807
7808 1998-12-01  Hrvoje Niksic  <hniksic@srce.hr>
7809
7810         * main.c (i18n_initialize): Use LC_MESSAGES only if available.
7811
7812 2000-03-31  Hrvoje Niksic  <hniksic@srce.hr>
7813
7814         * Use TOUPPER/TOLOWER.
7815
7816 1998-12-22  Alexander V. Lukyanov  <lav@yars.free.net>
7817
7818         * ftp-opie.c (btoe): Zero-terminate OSTORE.
7819
7820 2000-03-21  Hrvoje Niksic  <hniksic@iskon.hr>
7821
7822         * wget.h (DO_REALLOC_FROM_ALLOCA): Ditto.
7823
7824         * sysdep.h (ISALNUM): New macro.
7825         (TOLOWER): Ditto.
7826         (TOUPPER): Ditto.
7827
7828 2000-03-10  Dan Harkless  <wget@harkless.org>
7829
7830         * html.c (idmatch): Implemented checking of my new --follow-tags
7831         and --ignore-tags options.
7832         
7833         * init.c (commands): Added comment reminding people adding new
7834         entries doing allocation to add corresponding freeing in cleanup().
7835         (commands): Added new followtags and ignoretags commands.
7836         (cleanup): Free storage for new followtags and ignoretags.
7837         
7838         * main.c: Use of "comma-separated list" was random -- normalized
7839         it.  Did some alphabetization.  Added comments pointing out
7840         "Options without arguments" and "Options accepting an argument"
7841         sections of long_options[].  Added new options --follow-tags and
7842         -G / --ignore-tags.  Added comment that Damir's --referer is
7843         currently undocumented.  Added comment that Heiko's --waitretry is
7844         partially undocumented (mentioned in --help but not in
7845         wget.texi).  Moved improperly sorted 24, 129, and 'G' cases.
7846         
7847         * options.h (struct options): Added new fields follow_tags and
7848         ignore_tags. 
7849         
7850         * wget.h: Added "#define EQ 0" so we can say "strcmp(a, b) == EQ".
7851         
7852 2000-03-02  Dan Harkless  <wget@harkless.org>
7853
7854         * ftp.c (ftp_loop_internal): Heiko introduced "suggest explicit
7855         braces to avoid ambiguous `else'" warnings.  Eliminated them.
7856         
7857         * http.c (gethttp): Dan Berger's query string patch is totally
7858         bogus.  If you have two different URLs, gen_page.cgi?page1 and
7859         get_page.cgi?page2, they'll both be saved as get_page.cgi and the
7860         second will overwrite the first.  Also, parameters to implicit
7861         CGIs, like "http://www.host.com/db/?2000-03-02" cause the URLs to
7862         be printed with trailing garbage characters, and could seg fault.
7863         Backing out the patch, which Dan B. informed me by email was just
7864         a kludge to download StarOffice from Sun made necessary due to
7865         wget's unconditional escaping of certain characters (room for an
7866         option there?).
7867         (http_loop): Heiko introduced "suggest explicit braces to avoid
7868         ambiguous `else'" warnings.  Eliminated them.
7869         
7870         * main.c: Heiko's --wait / --waitretry backwards compatibility
7871         code looks to have been totally untested -- automatic variable
7872         'wr' was used without being initialized, and a long int was passed
7873         into setval()'s char* val parameter.
7874         
7875         * recur.c (parse_robots): Applied Edward J. Sabol
7876         <sabol@alderaan.gsfc.nasa.gov>'s patch for Guan Yang's reported
7877         problem with "User-agent:<space>*<space>" lines in robots.txt.
7878         
7879         * url.c (parseurl, str_url): Removing Dan Berger's code (see
7880         http.c above for explanation).
7881         
7882 1999-08-25  Heiko Herold  <Heiko.Herold@previnet.it>
7883
7884         * ftp.c: Respect new option waitretry.
7885
7886 2000-01-30  Damir Dzeko  <ddzeko@zesoi.fer.hr>
7887
7888         * http.c (gethttp): Send custom Referer, if required.
7889
7890 1999-09-24  Charles G Waldman  <cgw@fnal.gov>
7891
7892         * netrc.c (parse_netrc): Allow passwords to contain spaces.
7893
7894         * netrc.c (parse_netrc): New function.
7895
7896 1999-09-17  Dan Berger  <dberger@ix.netcom.com>
7897
7898         * http.c (gethttp): Send it.
7899
7900         * url.c (parseurl): Detect query string in HTTP URL-s.
7901         (str_url): Print it.
7902
7903 2000-03-02  HIROSE Masaaki  <hirose31@t3.rim.or.jp>
7904
7905         * html.c (html_allow): Add <link href=...> and <script src=...>.
7906
7907 1999-05-02  andrew deryabin  <djsf@softhome.net>
7908
7909         * http.c (gethttp): Specify port in `Host' header only if it's
7910         different from 80.
7911
7912 1998-11-03  Edward J. Sabol  <sabol@alderaan.gsfc.nasa.gov>
7913
7914         * recur.c (recursive_retrieve): If a finite maximum depth is
7915         specified, and we're are already at that depth, don't download the
7916         HTML file for parsing.
7917
7918 2000-03-01  Dan Harkless  <wget@harkless.org>
7919
7920         * ftp.c (ftp_loop_internal): Call new downloaded_file() function,
7921         even though we don't do conversion on HTML files retrieved via
7922         FTP, so _current_ usage of downloaded_file() makes this call unneeded. 
7923         (ftp_retrieve_list): Added a comment saying where we need to
7924         stat() a .orig file if FTP'd HTML file conversion is ever implemented.
7925         (ftp_retrieve_list): "Local file '%s' is more recent," is sometimes
7926         a lie -- reworded as "Server file no newer than local file '%s' --".
7927         
7928         * http.c (http_loop): Fixed a typo and clarified a comment.
7929         (http_loop): When -K and -N are specified together, compare size
7930         and timestamp of server file X against local file X.orig (if
7931         extant) rather than converted local file X.
7932         (http_loop): "Local file '%s' is more recent," is sometimes a lie
7933         -- reworded as "Server file no newer than local file '%s' --".
7934         (http_loop): Call new downloaded_file() function to prevent
7935         wrongful overwriting of .orig file when -N is specified.
7936         
7937         * url.c (convert_links): When -K specified, only rename X to
7938         X.orig if downloaded_file() returns TRUE.  Otherwise when we skip
7939         file X due to -N, we clobber an X.orig from a previous invocation.
7940         (convert_links): Call the failsafe xstrdup(), not the real strdup().
7941         (convert_links): Added a note asking anyone who understands how
7942         multiple URLs can correspond to a single file to comment it.
7943         (downloaded_file): Added this new function.
7944         
7945         * url.h (downloaded_file): Added prototype for this new function
7946         as well as its downloaded_file_t enum type.
7947
7948         * wget.h (boolean): Added this new typedef and TRUE and FALSE #defines.
7949
7950 2000-02-29  Dan Harkless  <wget@harkless.org>
7951
7952         * version.c: Upped version to developer-only "1.5.3+dev".
7953
7954 2000-02-18  Dan Harkless  <wget@harkless.org>
7955
7956         * init.c (backup_converted): Added this new option.
7957
7958         * main.c (-K / --backup-converted): Added this new option.
7959
7960         * options.h (backup_converted): Added this new option.
7961
7962         * url.c (convert_links): When backup_converted is specified, save
7963         file X as X.orig before converting.
7964
7965         * url.h (urlpos): Fixed typo -- said "Rekative" instead of "Relative".
7966
7967 1998-09-21  Hrvoje Niksic  <hniksic@srce.hr>
7968
7969         * version.c: Wget 1.5.3 is released.
7970
7971 1998-09-21  Hrvoje Niksic  <hniksic@srce.hr>
7972
7973         * host.c (ftp_getaddress): Don't warn when reverse-lookup of local 
7974         address doesn't yield FQDN.
7975
7976 1998-09-21  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
7977
7978         * cmpt.c (strerror): Fix declaration of sys_errlist.
7979
7980 1998-09-11  Hrvoje Niksic  <hniksic@srce.hr>
7981
7982         * main.c (main): Don't use an array subscript as the first
7983         argument to STRDUP_ALLOCA.
7984         From Kaveh R. Ghazi.
7985
7986 1998-09-11  Szakacsits Szabolcs  <szaka@sienet.hu>
7987
7988         * html.c (htmlfindurl): Download table background.
7989
7990 1998-09-11  Hans Grobler  <grobh@conde.ee.sun.ac.za>
7991
7992         * init.c (parse_line): Would free *com before allocating it.
7993         (parse_line): Would free com instead of *com.
7994
7995 1998-09-10  Howard Gayle  <howard@fjst.com>
7996
7997         * url.c (get_urls_html): Would drop the last character of the
7998         link.
7999
8000 1998-09-10  Hrvoje Niksic  <hniksic@srce.hr>
8001
8002         * http.c (http_loop): Don't print status code if quiet.
8003
8004 1998-09-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8005
8006         * log.c: Use <stdarg.h> only when __STDC__.
8007
8008 1998-09-10  Adam D. Moss  <adam@foxbox.org>
8009
8010         * html.c (htmlfindurl): Download <layer src=...>.
8011
8012 1998-09-10  Howard Gayle  <howard@fjst.com>
8013
8014         * ftp.c (ftp_retrieve_list): Don't update the time stamp of a file 
8015         not retrieved.
8016
8017 1998-06-27  Hrvoje Niksic  <hniksic@srce.hr>
8018
8019         * utils.c: Include <libc.h> on NeXT.
8020
8021 1998-06-26  Heinz Salzmann  <heinz.salzmann@intermetall.de>
8022
8023         * url.c (get_urls_html): Fix calculation of URL position.
8024
8025 1998-06-23  Hrvoje Niksic  <hniksic@srce.hr>
8026
8027         * version.c: Wget 1.5.2 is released.
8028
8029 1998-06-23  Dave Love  <d.love@dl.ac.uk>
8030
8031         * ftp.c, init.c, netrc.c: Include errno.h.
8032
8033         * http.c: Include errno.h and time header.
8034
8035         * Makefile.in (exext): Define.
8036         (install.bin, uninstall.bin): Use it.
8037
8038 1998-06-21  Hrvoje Niksic  <hniksic@srce.hr>
8039
8040         * http.c (http_loop): Don't attempt to compare local and remote
8041         sizes if the remote size is unknown.
8042
8043 1998-06-16  Hrvoje Niksic  <hniksic@srce.hr>
8044
8045         * url.c (get_urls_html): Use malloc() instead of alloca in the
8046         loop.
8047
8048 1998-06-13  Hrvoje Niksic  <hniksic@srce.hr>
8049
8050         * version.c: Wget 1.5.2-b4 is released.
8051
8052 1998-06-13  Hrvoje Niksic  <hniksic@srce.hr>
8053
8054         * url.c (get_urls_html): Ignore spaces before and after the URI.
8055
8056 1998-06-08  Wanderlei Antonio Cavassin  <cavassin@conectiva.com.br>
8057
8058         * ftp.c (getftp): Translate `done'.
8059
8060 1998-06-06  Hrvoje Niksic  <hniksic@srce.hr>
8061
8062         * version.c: Wget 1.5.2-b3 is released.
8063
8064 1998-06-06  Alexander Kourakos  <awk@bnt.com>
8065
8066         * init.c (cleanup): Close dfp, don't free it.
8067
8068 1998-06-06  Hrvoje Niksic  <hniksic@srce.hr>
8069
8070         * utils.c (make_directory): Twiddle.
8071
8072         * config.h.in: Added template for access().
8073
8074 1998-06-05  Mathieu Guillaume  <mat@cythere.com>
8075
8076         * html.c (htmlfindurl): Download <input src=...>
8077
8078 1998-06-03  Hrvoje Niksic  <hniksic@srce.hr>
8079
8080         * utils.c (file_exists_p): Use access() with two arguments.
8081
8082 1998-05-27  Martin Kraemer  <Martin.Kraemer@mch.sni.de>
8083
8084         * netrc.c (parse_netrc): Correct logic.
8085
8086 1998-05-27  Hrvoje Niksic  <hniksic@srce.hr>
8087
8088         * ftp.c (getftp): Added `break'; suggested by Lin Zhe Min
8089         <ljm@ljm.wownet.net>.
8090
8091 1998-05-24  Hrvoje Niksic  <hniksic@srce.hr>
8092
8093         * version.c: Wget 1.5.2-b2 is released.
8094
8095 1998-05-18  Juan Jose Rodriguez  <jcnsoft@jal1.telmex.net.mx>
8096
8097         * mswindows.h: Don't translate mkdir to _mkdir under Borland.
8098
8099 1998-05-17  Hrvoje Niksic  <hniksic@srce.hr>
8100
8101         * retr.c (elapsed_time): Return correct value when
8102         HAVE_GETTIMEOFDAY is undefined.
8103
8104 1998-05-13  Hrvoje Niksic  <hniksic@srce.hr>
8105
8106         * version.c: Wget 1.5.2-b1 is released.
8107
8108 1998-05-08  Hrvoje Niksic  <hniksic@srce.hr>
8109
8110         * getopt.c (_getopt_internal): Use exec_name instead of argv[0].
8111         (_getopt_internal): Don't translate `#if 0'-ed strings.
8112
8113 1998-05-06  Douglas E. Wegscheid  <wegscd@whirlpool.com>
8114
8115         * mswindows.c (ws_handler): Use fork_to_background().
8116
8117 1998-05-05  Hrvoje Niksic  <hniksic@srce.hr>
8118
8119         * version.c: Wget 1.5.1 is released.
8120
8121 1998-05-05  Hrvoje Niksic  <hniksic@srce.hr>
8122
8123         * http.c (parse_http_status_line): Avoid `minor' and `major'
8124         names.
8125
8126 1998-05-02  Hrvoje Niksic  <hniksic@srce.hr>
8127
8128         * utils.c (mkdirhier): Renamed to make_directory.
8129
8130 1998-05-01  Hrvoje Niksic  <hniksic@srce.hr>
8131
8132         * mswindows.c (fork_to_background): Define under Windows.
8133
8134         * utils.c (fork_to_background): New function.
8135
8136         * html.c (htmlfindurl): Removed rerdundant casts.
8137
8138 1998-05-01  Douglas E. Wegscheid  <wegscd@whirlpool.com>
8139
8140         * mswindows.c (ws_mypath): Cache the path.
8141
8142 1998-04-30  Douglas E. Wegscheid  <wegscd@whirlpool.com>
8143
8144         * ftp.h: Prefix enum ftype members with FT_.
8145
8146         * ftp-ls.c, ftp.c, html.h: Adjust accordingly.
8147
8148         * mswindows.h: Use stat under Borland, _stat under MSVC.
8149
8150 1998-04-28  Hrvoje Niksic  <hniksic@srce.hr>
8151
8152         * http.c (known_authentication_scheme_p): New function.
8153         (gethttp): Handle authorization more correctly.
8154
8155         * ftp-basic.h: Removed.
8156
8157         * cmpt.h: Removed.
8158
8159         * utils.c: Include <unistd.h> before <pwd.h>; needed under SunOS
8160         with gcc 2.8.
8161         (numdigit): Use `while' loop.
8162
8163         * http.c (create_authorization_line): Detect authentication
8164         schemes case-insensitively.
8165
8166         * http.c (extract_header_attr): Use strdupdelim().
8167         (digest_authentication_encode): Move declaration of local
8168         variables to smaller scope.
8169         (digest_authentication_encode): Reset REALM, OPAQUE and NONCE.
8170         (create_authorization_line): Detect authentication schemes
8171         case-insensitively.
8172
8173         * utils.c (touch): Constify.
8174
8175         * http.c (gethttp): Report a nicer error when no data is received.
8176
8177         * rbuf.h (RBUF_READCHAR): Ditto.
8178
8179         * ftp-basic.c (ftp_response): Use sizeof.
8180
8181 1998-04-27  Hrvoje Niksic  <hniksic@srce.hr>
8182
8183         * retr.c (print_percentage): EXPECTED is long, not int.
8184         (print_percentage): Use floating-point arithmetic to avoid
8185         overflow with large files' sizes multiplied with 100.
8186
8187 1998-04-27  Gregor Hoffleit  <flight@mathi.uni-heidelberg.de>
8188
8189         * config.h.in: Added pid_t stub.
8190
8191         * sysdep.h (S_ISREG): Moved here from mswindows.h (NeXT doesn't
8192         define it).
8193
8194 1998-04-20  Hrvoje Niksic  <hniksic@srce.hr>
8195
8196         * version.c: Wget 1.5.0 is released.
8197
8198 1998-04-18  Hrvoje Niksic  <hniksic@srce.hr>
8199
8200         * url.c (str_url): Ditto.
8201
8202         * ftp-basic.c (ftp_rest): Use new name.
8203
8204         * utils.c (long_to_string): Renamed from prnum().
8205
8206 1998-04-16  Hrvoje Niksic  <hniksic@srce.hr>
8207
8208         * version.c: Wget 1.5-b17 is released.
8209
8210 1998-04-08  Hrvoje Niksic  <hniksic@srce.hr>
8211
8212         * headers.c (header_get): New argument FLAGS.
8213
8214         * http.c (gethttp): If request is malformed, bail out of the
8215         header loop.
8216         (gethttp): Check for empty header *after* the status line checks.
8217         (gethttp): Disallow continuations for status line.
8218
8219 1998-04-08  Hrvoje Niksic  <hniksic@srce.hr>
8220
8221         * version.c: Wget 1.5-b16 is released.
8222
8223 1998-04-08  Hrvoje Niksic  <hniksic@srce.hr>
8224
8225         * init.c (commands): Renamed `always_rest' to `continue'.
8226
8227 1998-04-05  Hrvoje Niksic  <hniksic@srce.hr>
8228
8229         * all: Use it.
8230
8231         * log.c (logputs): New argument.
8232         (logvprintf): Ditto.
8233         (logprintf): Ditto.
8234
8235 1998-04-04  Hrvoje Niksic  <hniksic@srce.hr>
8236
8237         * http.c (http_atotm): Update comment.
8238
8239         * main.c (i18n_initialize): Set LC_MESSAGES, not LC_ALL.
8240
8241         * wget.h: Renamed ENABLED_NLS to HAVE_NLS.
8242
8243         * main.c (i18n_initialize): New function.
8244         (main): Use it.
8245
8246         * log.c: Include <unistd.h>.
8247
8248         * retr.c (show_progress): Cast alloca to char *.
8249
8250 1998-04-04  Hrvoje Niksic  <hniksic@srce.hr>
8251
8252         * version.c: Wget 1.5-b15 is released.
8253
8254 1998-04-04  Hrvoje Niksic  <hniksic@srce.hr>
8255
8256         * utils.h: Declare file_non_directory_p().
8257
8258 1998-04-03  Hrvoje Niksic  <hniksic@srce.hr>
8259
8260         * main.c (main): It's `tries', not `numtries' now.
8261
8262 1998-04-01  Hrvoje Niksic  <hniksic@srce.hr>
8263
8264         * init.c (getperms): Removed.
8265
8266 1998-04-01  Tim Charron  <tcharron@interlog.com>
8267
8268         * log.c (logvprintf): Don't use ARGS twice.
8269
8270 1998-04-01  John  <john@futuresguide.com>
8271
8272         * mswindows.c: Cleaned up.
8273
8274 1998-04-01  Hrvoje Niksic  <hniksic@srce.hr>
8275
8276         * version.c: Wget 1.5-b14 is released.
8277
8278 1998-04-01  Hrvoje Niksic  <hniksic@srce.hr>
8279
8280         * ftp-opie.c (STRLEN4): New macro.
8281         (btoe): Use it.
8282
8283 1998-04-01  Junio Hamano  <junio@twinsun.com>
8284
8285         * http.c: Document all the Digest functions.
8286
8287 1998-04-01  Hrvoje Niksic  <hniksic@srce.hr>
8288
8289         * utils.c (file_non_directory_p): Renamed from isfile().
8290
8291         * mswindows.h (S_ISREG): New macro, suggested by Tim Adam.
8292
8293 1998-03-31  Hrvoje Niksic  <hniksic@srce.hr>
8294
8295         * utils.c (mkdirhier): Use 0777 instead of opt.dirmode.
8296
8297         * init.c (cmd_spec_dotstyle): Use 48 dots per line for binary
8298         style.
8299         (cmd_permissions): Removed.
8300
8301         * config.h.in: Add template for WORDS_BIGENDIAN.
8302
8303 1998-03-31  Junio Hamano  <junio@twinsun.com>
8304
8305         * http.c (HEXD2asc): New macro.
8306         (dump_hash): Use it.
8307
8308 1998-03-31  Hrvoje Niksic  <hniksic@srce.hr>
8309
8310         * version.c: Wget 1.5-b13 is released.
8311
8312 1998-03-31  Hrvoje Niksic  <hniksic@srce.hr>
8313
8314         * main.c (main): Don't try to use `com'.
8315
8316 1998-03-30  Hrvoje Niksic  <hniksic@srce.hr>
8317
8318         * init.c (cmd_permissions): New function.
8319
8320 1998-03-30  Hrvoje Niksic  <hniksic@srce.hr>
8321
8322         * version.c: Wget 1.5-b12 is released.
8323
8324 1998-03-30  Hrvoje Niksic  <hniksic@srce.hr>
8325
8326         * init.c (commands): Renamed `numtries' to `tries'.
8327         (cmd_spec_debug): Removed.
8328         (home_dir): Under Windows, return `C:\' if HOME is undefined.
8329
8330 1998-03-29  Hrvoje Niksic  <hniksic@srce.hr>
8331
8332         * config.h.in: Define _XOPEN_SOURCE.
8333
8334         * init.c (check_user_specified_header): New function.
8335         (cmd_spec_header): Use it.
8336         (cmd_spec_useragent): New function.
8337
8338 1998-03-29  Hrvoje Niksic  <hniksic@srce.hr>
8339
8340         * version.c: Wget 1.5-b11 is released.
8341
8342 1998-03-28  Hrvoje Niksic  <hniksic@srce.hr>
8343
8344         * wget.h: Include <libintl.h> only if NLS is enabled.
8345
8346 1998-03-26  Hrvoje Niksic  <hniksic@srce.hr>
8347
8348         * options.h (struct options): Made `wait' a long.
8349         (struct options): Ditto for `timeout'.
8350
8351 1998-03-19  Hrvoje Niksic  <hniksic@srce.hr>
8352
8353         * utils.c (exists): Renamed to file_exists_p.
8354         (file_exists_p): Use access() if available.
8355
8356 1998-03-17  Hrvoje Niksic  <hniksic@srce.hr>
8357
8358         * utils.c (memfatal): Set save_log_p to 0 to avoid potential
8359         infloop.
8360
8361         * log.c: do_logging -> save_log_p.
8362
8363         * config.h.in: Added template for HAVE_VSNPRINTF.
8364
8365 1998-03-16  Hrvoje Niksic  <hniksic@srce.hr>
8366
8367         * init.c: Ditto.
8368
8369         * http.c: Protect declaration against non-ANSI compiler.
8370
8371         * log.c (logvprintf): Use vsnprintf() if available.
8372
8373         * getopt.c (main): Don't translate test stuff.
8374
8375 1998-03-16  Hrvoje Niksic  <hniksic@srce.hr>
8376
8377         * version.c: Wget 1.5-b10 is released.
8378
8379 1998-03-11  Hrvoje Niksic  <hniksic@srce.hr>
8380
8381         * ftp.c (getftp): Don't translate "CWD %s".
8382
8383         * wget.h (GCC_FORMAT_ATTR): Renamed from FORMAT_ATTR.
8384
8385 1998-03-07  Hrvoje Niksic  <hniksic@srce.hr>
8386
8387         * ftp-opie.c (btoe): Use memcpy() instead of strncat().
8388
8389         * log.c (logputs): New function.
8390         (logvprintf): Renamed from vlogmsg; use logputs().
8391
8392         * retr.c (show_progress): Print `[100%]' when the retrieval is
8393         finished.
8394
8395         * init.c (run_wgetrc): Use FILE, not PATH.
8396         (wgetrc_file_name): Ditto.
8397
8398 1998-03-07  Tim Adam  <tma@osa.com.au>
8399
8400         * recur.c (parse_robots): Correctly reset `entries' on empty
8401         disallow.
8402
8403 1998-03-07  Hrvoje Niksic  <hniksic@srce.hr>
8404
8405         * init.c (cmd_spec_debug): Use cmd_boolean().
8406
8407 1998-02-23  Hrvoje Niksic  <hniksic@srce.hr>
8408
8409         * http.c (gethttp): Create proxy-authorization correctly.
8410
8411 1998-02-22  Hrvoje Niksic  <hniksic@srce.hr>
8412
8413         * md5.c: Ditto.
8414
8415         * getopt.c: Use ANSI function definitions.
8416
8417         * ftp-opie.c: New file.
8418
8419         * options.h: Don't redefine EXTERN.
8420
8421         * init.c: Sort it correctly.
8422
8423 1998-02-22  Hrvoje Niksic  <hniksic@srce.hr>
8424
8425         * version.c: Wget 1.5-b9 is released.
8426
8427 1998-02-22  Hrvoje Niksic  <hniksic@srce.hr>
8428
8429         * recur.c (recursive_retrieve): Reset `first_time'.
8430
8431         * ftp.c (getftp): Added `default' clause to switches of uerr_t.
8432
8433         * rbuf.c (rbuf_peek): Simplified.
8434         (rbuf_flush): Use MINVAL.
8435
8436         * wget.h (MINVAL): Moved from url.h.
8437
8438         * rbuf.h (RBUF_FD): New macro.
8439
8440         * url.c (add_url): Add to the head of the list.
8441
8442         * ftp.c (ftp_retrieve_list): Set the permissions to downloaded
8443         file.
8444         (getftp): Set the default permissions to 0600.
8445
8446 1998-02-21  Hrvoje Niksic  <hniksic@srce.hr>
8447
8448         * url.c (get_urls_html): Ditto.
8449         (convert_links): Ditto.
8450
8451         * recur.c (parse_robots): Ditto.
8452
8453         * html.c (ftp_index): Ditto.
8454
8455         * ftp-ls.c (ftp_parse_unix_ls): Open file as binary.
8456
8457         * init.c (defaults): Initialize `opt' to zero via memset.
8458
8459         * http.c (digest_authentication_encode): goto considered harmful.
8460
8461 1998-02-19  Hrvoje Niksic  <hniksic@srce.hr>
8462
8463         * ftp.c (delelement): Simplify and fix leak.
8464
8465 1998-02-18  Hrvoje Niksic  <hniksic@srce.hr>
8466
8467         * http.c (dump_hash): Use HEXD2ASC instead of home-grown stuff.
8468
8469         * url.h (HEXD2ASC): Removed warning.
8470
8471         * init.c (comind): Use binary search.
8472         (commands): Reorganized.
8473         (setval): Ditto.
8474         (cmd_boolean): New function.
8475         (cmd_number): Ditto.
8476         (cmd_number_inf): Ditto.
8477         (cmd_string): Ditto.
8478         (cmd_vector): Ditto.
8479         (cmd_directory_vector): Ditto.
8480         (cmd_bytes): Ditto.
8481         (cmd_time): Ditto.
8482         (cmd_spec_debug): Ditto.
8483         (cmd_spec_dirmode): Ditto.
8484         (cmd_spec_dirstruct): Ditto.
8485         (cmd_spec_dotstyle): Ditto.
8486         (cmd_spec_header): Ditto.
8487         (cmd_spec_htmlify): Ditto.
8488         (cmd_spec_mirror): Ditto.
8489         (cmd_spec_outputdocument): Ditto.
8490         (cmd_spec_recursive): Ditto.
8491         (settime): Merged with cmd_time().
8492         (setbytes): Merged with cmd_bytes().
8493         (setonoff): Merged with cmd_boolean().
8494         (onoff): Ditto.
8495
8496 1998-02-17  Hrvoje Niksic  <hniksic@srce.hr>
8497
8498         * Makefile.in (distclean): Remove `config.h'.
8499
8500 1998-02-17  Hrvoje Niksic  <hniksic@srce.hr>
8501
8502         * version.c: Wget 1.5-b8 is released.
8503
8504 1998-02-17  Hrvoje Niksic  <hniksic@srce.hr>
8505
8506         * http.c (digest_authentication_encode): New function.
8507         (create_authorization_line): Use it.
8508         (dump_hash): New function.
8509         (digest_authentication_encode): Use it.
8510
8511         * fnmatch.c: Renamed from `mtch.c'.
8512
8513 1998-02-15  Karl Eichwalder  <ke@suse.de>
8514
8515         * main.c (main): Tag "Written by..." string as translatable.
8516
8517 1998-02-15  Hrvoje Niksic  <hniksic@srce.hr>
8518
8519         * wget.h (FREE_MAYBE): New macro.
8520
8521         * http.c (create_authorization_line): Don't use ANSI C string
8522         concatenation feature.
8523         (basic_authentication_encode): Use alloca() for temporary
8524         variables.
8525
8526         * recur.h: Ditto.
8527
8528         * http.c: Ditto.
8529
8530         * headers.h: Ditto.
8531
8532         * ftp-basic.c: Protect declaration against non-ANSI compiler.
8533
8534         * http.c (create_authorization_line): Cast `unsigned char *' to
8535         `char *' for sprintf, to shut up the noisy Digital Unix cc.
8536
8537 1998-02-15  Hrvoje Niksic  <hniksic@srce.hr>
8538
8539         * version.c: Wget 1.5-b7 is released.
8540
8541 1998-02-15  Hrvoje Niksic  <hniksic@srce.hr>
8542
8543         * cmpt.c (strstr): Synched with glibc-2.0.6.
8544
8545         * ftp-basic.c (calculate_skey_response): Ditto.
8546         (calculate_skey_response): Use alloca().
8547
8548         * http.c (create_authorization_line): Work with FSF's version of
8549         md5.c.
8550
8551         * md5.c: New file, from GNU libc.
8552
8553 1998-02-14  Hrvoje Niksic  <hniksic@srce.hr>
8554
8555         * url.h (URL_CLEANSE): Name the temporary variable more carefully.
8556
8557 1998-02-13  Hrvoje Niksic  <hniksic@srce.hr>
8558
8559         * http.c (basic_authentication_encode): New function, instead of
8560         the macro.
8561
8562 1998-02-13  Junio Hamano  <junio@twinsun.com>
8563
8564         * http.c: Add HTTP-DA support.
8565         * ftp-basic.c: Add Opie/S-key support.
8566         * config.h.in, Makefile.in: Add HTTP-DA and Opie/S-key support.
8567         * md5.c, md5.h: New files.
8568
8569 1998-02-13  Hrvoje Niksic  <hniksic@srce.hr>
8570
8571         * http.c (http_process_range): Renamed from hprocrange().
8572         (http_process_range): Parse the whole header.
8573
8574         * headers.c: New file.
8575         (header_process): New function.
8576         (header_get): Renamed from fetch_next_header.
8577
8578         * all: Include utils.h only where necessary.
8579
8580         * wget.h: Declare xmalloc(), xrealloc() and xstrdup() here.
8581
8582         * wget.h: Add provisions for dmalloc.
8583
8584 1998-02-12  Hrvoje Niksic  <hniksic@srce.hr>
8585
8586         * version.c: Wget 1.5-b6 is released.
8587
8588 1998-02-12  Hrvoje Niksic  <hniksic@srce.hr>
8589
8590         * ftp.c (ftp_loop): Determine `filename' more precisely.
8591
8592         * init.c (setval): Don't set `opt.quiet' if output-document is
8593         `-'.
8594
8595         * log.c (log_init): Print to STDERR instead of STDOUT.
8596         (vlogmsg): Use STDERR by default.
8597         (logflush): Ditto.
8598
8599 1998-02-11  Simon Josefsson  <jas@pdc.kth.se>
8600
8601         * host.c: Use addr_in again.
8602
8603 1998-02-08  Karl Eichwalder  <karl@suse.de>
8604
8605         * http.c (gethttp): Fixed typo.
8606
8607 1998-02-08  Hrvoje Niksic  <hniksic@srce.hr>
8608
8609         * version.c: Wget 1.5-b5 is released.
8610
8611 1998-02-08  Hrvoje Niksic  <hniksic@srce.hr>
8612
8613         * retr.c (show_progress): Use it.
8614
8615         * log.c (logflush): New function.
8616
8617         * wget.h: Utilize __attribute__ if on gcc.
8618
8619 1998-02-07  Hrvoje Niksic  <hniksic@srce.hr>
8620
8621         * http.c (base64_encode_line): New argument LENGTH.
8622         (BASIC_AUTHENTICATION_ENCODE): Use it.
8623         (BASIC_AUTHENTICATION_ENCODE): Take length of HEADER into account.
8624
8625         * main.c (main): Fixed fprintf() format mismatch.
8626
8627 1998-02-06  Hrvoje Niksic  <hniksic@srce.hr>
8628
8629         * version.c: Wget 1.5-b4 is released.
8630
8631 1998-02-03  Simon Josefsson  <jas@pdc.kth.se>
8632
8633         * host.c: use sockaddr_in instead of addr_in.
8634
8635 1998-02-04  Hrvoje Niksic  <hniksic@srce.hr>
8636
8637         * init.c (cleanup): Use it.
8638
8639         * recur.c (recursive_cleanup): New function.
8640
8641         * retr.c (retrieve_from_file): Ditto.
8642
8643         * main.c (main): Use it.
8644
8645         * recur.c (recursive_reset): New function.
8646
8647         * retr.c (retrieve_from_file): Ditto.
8648
8649         * main.c (main): Simplify call to recursive_retrieve().
8650
8651         * recur.c (recursive_retrieve): Removed FLAGS argument.
8652
8653         * http.c (gethttp): Changed call to iwrite().
8654
8655 1998-02-03  Hrvoje Niksic  <hniksic@srce.hr>
8656
8657         * url.c (get_urls_html): Ditto.
8658         (free_urlpos): Ditto.
8659         (mkstruct): Ditto.
8660         (construct): Ditto.
8661
8662         * retr.c (retrieve_url): Move declaration of local variables to
8663         smaller scope.
8664
8665         * url.c (urlproto): Use it.
8666         (parseurl): Ditto.
8667         (str_url): Ditto.
8668         (get_urls_html): Ditto.
8669
8670         * utils.h (ARRAY_SIZE): New macro.
8671
8672         * url.c (proto): Moved from url.h.
8673
8674         * url.h (URL_CLEANSE): Reformatted.
8675         (USE_PROXY_P): Renamed from USE_PROXY.
8676
8677         * ftp-basic.c: Adjust to the new interface of iwrite().
8678
8679         * ftp-basic.c (ftp_port): Use alloca().
8680
8681 1998-02-03  Hrvoje Niksic  <hniksic@srce.hr>
8682
8683         * version.c: Wget 1.5-b3 is released.
8684
8685         * host.c (ftp_getaddress): Don't print to stderr directly.
8686
8687         * init.c (setbytes): Support `g' for gigabytes.
8688         (cmdtype): New specification CTIME.
8689         (setval): Use it with settime().
8690         (commands): Use it for WAIT and TIMEOUT.
8691
8692 1998-02-02  Hrvoje Niksic  <hniksic@srce.hr>
8693
8694         * http.c (BASIC_AUTHENTICATION_ENCODE): New macro.
8695         (gethttp): Use it.
8696
8697         * utils.c (unique_name_1): Moved from url.c.
8698         (unique_name): Ditto.
8699
8700         * url.c (url_filename): Ditto.
8701
8702         * log.c (redirect_output): Changed call to unique_name().
8703
8704         * url.c (unique_name_1): Renamed from unique_name().
8705         (unique_name): Changed interface.
8706
8707         * init.c (enum cmdid): Moved from init.h.
8708         (cmdtype): Ditto.
8709         (struct cmd): Ditto.
8710
8711         * main.c (main): Use it.
8712         (main): Moved `--backups' to not have a short option.
8713
8714         * options.h (struct options): New member BACKGROUND.
8715
8716         * main.c (print_help): Rearranged.
8717         (main): New long options for -n* short options: --no-directories,
8718         --no-host-directories, --non-verbose, --no-host-lookup and
8719         --dont-remove-listing.
8720
8721 1998-02-01  Hrvoje Niksic  <hniksic@srce.hr>
8722
8723         * main.c (main): Use log_close().
8724
8725         * log.c: New variable LOGFP.
8726         (vlogmsg): Use it.
8727         (redirect_output): Don't open /dev/null; set LOGFP to stdin
8728         instead.
8729         (log_close): New function.
8730
8731         * options.h (struct options): Removed LFILE.
8732
8733         * log.c (log_enable): Removed.
8734
8735         * main.c (main): Use it.
8736
8737         * log.c (log_init): New function.
8738
8739         * url.c (get_urls_html): Removed needless assignment to BASE.
8740
8741         * host.c (add_hlist): Don't set CMP needlessly.
8742
8743         * utils.c (match_backwards): Ditto.
8744         (in_acclist): Ditto.
8745
8746         * url.c (findurl): Ditto.
8747
8748         * netrc.c (parse_netrc): Ditto.
8749
8750         * log.c (log_dump): Ditto.
8751
8752         * html.c (html_quote_string): Ditto.
8753
8754         * ftp-basic.c (ftp_request): Made static.
8755
8756         * connect.c: Made global variables static.
8757
8758         * url.c (construct): Ditto.
8759
8760         * init.c (init_path): Avoid assignment inside `if'-condition.
8761
8762         * ftp.c: Don't include in.h or winsock.h.
8763
8764         * ftp.c (ftp_loop): Use SZ.
8765
8766         * connect.c (bindport): Cast &addrlen to int *.
8767         (conaddr): Ditto.
8768
8769         * init.c (initialize): Don't use SYSTEM_WGETRC unconditionally.
8770
8771 1998-01-31  Hrvoje Niksic  <hniksic@srce.hr>
8772
8773         * ftp.c (getftp): Initialize opt.ftp_pass here.
8774         (ftp_retrieve_dirs): Use alloca().
8775
8776         * init.c (defaults): Don't initialize opt.ftp_pass.
8777
8778         * sysdep.h (S_ISLNK): Declare for OS/2; ditto for lstat.
8779         From Ivan F. Martinez <ivanfm@ecodigit.com.br>.
8780
8781 1998-01-31  Hrvoje Niksic  <hniksic@srce.hr>
8782
8783         * recur.c (parse_robots): Check for comments more correctly.
8784
8785         * host.c (ftp_getaddress): Use STRDUP_ALLOCA.
8786         (ftp_getaddress): Add diagnostics when reverse-lookup yields only
8787         hostname.
8788
8789 1998-01-31  Hrvoje Niksic  <hniksic@srce.hr>
8790
8791         * version.c: Wget 1.5-b2 is released.
8792
8793         * netrc.c (NETRC_FILE_NAME): Moved from netrc.h.
8794
8795         * utils.c (proclist): Pass FNM_PATHNAME to fnmatch().
8796
8797         * ftp-basic.c (ftp_pasv): Avoid unnecessary casting to unsigned
8798         char.
8799
8800         * log.c: Don't attempt to hide arguments from ansi2knr.
8801
8802         * cmpt.c: Synched strptime() and mktime() with glibc-2.0.6.
8803
8804         * ansi2knr.c: Use a later version, from fileutils-3.16l alpha.
8805
8806         * ftp.c (getftp): Ditto.
8807
8808         * http.c (gethttp): Use it.
8809
8810         * retr.c (get_contents): New argument EXPECTED; pass it to
8811         show_progress().
8812         (show_progress): New argument EXPECTED; use it to display
8813         percentages.
8814
8815         * init.c (setval): Ditto.
8816
8817         * http.c (gethttp): Ditto.
8818         (http_loop): Ditto.
8819
8820         * ftp.c (getftp): Ditto.
8821         (ftp_loop_internal): Ditto.
8822
8823         * ftp-ls.c (ftp_parse_unix_ls): Use abort() instead of assert(0).
8824
8825         * sysdep.h (CLOSE): Simplify; use DEBUGP.
8826
8827         * netrc.c (search_netrc): Use alloca().
8828
8829         * init.c (defaults): Initialize no_flush.
8830
8831         * log.c (vlogmsg): Don't flush if no_flush.
8832
8833         * options.h (struct options): New variable no_flush.
8834
8835         * main.c (main): Don't play games with buffering.
8836
8837         * log.c (vlogmsg): Flush the output after every message.
8838
8839 1998-01-31  Hrvoje Niksic  <hniksic@srce.hr>
8840
8841         * init.c (parse_line): Ditto.
8842
8843         * url.c (get_urls_html): Ditto.
8844
8845         * main.c (main): Don't cast to unsigned char.
8846
8847         * init.c (run_wgetrc): Don't cast to unsigned char.
8848         (parse_line): Accept char instead of unsigned char.
8849
8850         * html.c (htmlfindurl): Use char instead of unsigned char.
8851
8852         * all: Use them.
8853
8854         * sysdep.h: Add wrappers to ctype macros to make them
8855         eight-bit-clean:
8856
8857 1998-01-30  Hrvoje Niksic  <hniksic@srce.hr>
8858
8859         * html.c (htmlfindurl): Download <img lowsrc=...>
8860
8861         * main.c (main): Ignore SIGPIPE.
8862
8863         * connect.c (select_fd): New argument WRITEP.
8864         (iwrite): Call select_fd().
8865
8866 1997-02-27  Fila Kolodny <fila@ibi.com>
8867
8868         * ftp.c (ftp_retrieve_list): If retrieving symlink and the proper
8869         one already exists, just skip it.
8870
8871 1998-01-30  Hrvoje Niksic  <hniksic@srce.hr>
8872
8873         * http.c (gethttp): Cosmetic changes.
8874
8875         * http.c (check_end): Allow `+D...' instead of `GMT'.
8876         From Fabrizio Pollastri <pollastri@cstv.to.cnr.it>.
8877
8878         * url.c (process_ftp_type): New function.
8879         (parseurl): Use it.
8880
8881         * connect.c (iwrite): Allow writing in a few chunks.
8882         (bindport): Made SRV static, so addr can point to it.
8883         (select_fd): Removed HPUX kludge.
8884
8885         * host.c (free_hlist): Incorporated into clean_hosts().
8886
8887 1998-01-29  Hrvoje Niksic  <hniksic@srce.hr>
8888
8889         * host.c (hlist): Made static.
8890         (search_address): Cosmetic change.
8891
8892 1998-01-29  Hrvoje Niksic  <hniksic@srce.hr>
8893
8894         * version.c: Wget v1.5-b1 is released.
8895
8896         * http.c (hgetlen): Use sizeof() to get the header length.
8897         (hgetrange): Ditto.
8898         (hgettype): Ditto.
8899         (hgetlocation): Ditto.
8900         (hgetmodified): Ditto.
8901         (haccepts_none): Ditto.
8902
8903         * main.c (main): Updated `--version' and `--help' output, as per
8904         Francois Pinard's suggestions.
8905
8906         * main.c: Include locale.h; call setlocale(), bindtextdomain() and 
8907         textdomain().
8908
8909         * config.h.in: Define stubs for I18N3.
8910
8911         * wget.h: Include libintl.h.
8912
8913 1998-01-28  Hrvoje Niksic  <hniksic@srce.hr>
8914
8915         * url.c (mkstruct): Check for opt.cut_dirs.
8916         (mkstruct): alloca()-te more, xmalloc() less.
8917
8918         * utils.c (load_file): Check for ferror().
8919
8920         * url.c (get_urls_file): Close only the files we opened.
8921         (get_urls_html): Ditto.
8922         (count_slashes): New function.
8923
8924         * http.h: Removed.
8925
8926         * http.c (gethttp): Respect username and password provided by
8927         proxy URL.
8928         (base64_encode_line): Write into an existing buffer instead of
8929         malloc-ing a new one.
8930         (struct http_stat): Moved from http.h
8931
8932         * retr.c (retrieve_url): Free SUF.
8933
8934         * all: Removed lots of unnecessary .h dependencies.
8935
8936         * html.c (global_state): Made static.
8937
8938         * utils.h (ALLOCA_ARRAY): New macro.
8939
8940         * main.c (main): New option `--cut-dirs'.
8941
8942         * url.c (construct): Use alloca() for T.
8943
8944         * utils.c (mkdirhier): Use STRDUP_ALLOCA.
8945
8946         * host.c (_host_t): Moved from host.h.
8947         (struct host): Renamed from _host_t.
8948         (store_hostaddress): Use STRDUP_ALLOCA for INET_S.
8949         (realhost): Ditto.
8950
8951         * host.h: Don't include url.h.
8952
8953         * ftp.c (LIST_FILENAME): Moved from ftp.h.
8954
8955         * init.c (DEFAULT_FTP_ACCT): Moved from ftp.h.
8956
8957         * main.c (main): Enable log if the output goes to a TTY.
8958
8959         * connect.h: Removed unused constant `BACKLOG'.
8960
8961         * config.h.in: Check for isatty().
8962
8963         * Makefile.in (LINK): Use CFLAGS when linking.
8964
8965 1998-01-27  Hrvoje Niksic  <hniksic@srce.hr>
8966
8967         * mswindows.c (ws_hangup): Use redirect_output().
8968
8969         * main.c (redirect_output_signal): New function; use
8970         redirect_output().
8971
8972         * log.c (redirect_output): New function, based on hangup(), which
8973         is deleted.
8974
8975         * log.c (vlogmsg): New function.
8976
8977         * wget.h (DEBUGP): Use debug_logmsg().
8978
8979         * main.c (hangup): Use it.
8980
8981         * log.c (log_dump): New function.
8982
8983         * utils.h (DO_REALLOC): Use `long' for various sizes.
8984
8985         * http.c (hskip_lws): Use `while', for clarity.
8986         (HTTP_DYNAMIC_LINE_BUFFER): New constant.
8987         (fetch_next_header): Use it instead of DYNAMIC_LINE_BUFFER.
8988
8989         * ftp-basic.c (FTP_DYNAMIC_LINE_BUFFER): New constant.
8990         (ftp_response): Use it instead of DYNAMIC_LINE_BUFFER.
8991
8992         * utils.c (DYNAMIC_LINE_BUFFER): Moved from utils.c.
8993         (LEGIBLE_SEPARATOR): Ditto.
8994         (FILE_BUFFER_SIZE): Ditto.
8995
8996         * retr.c (BUFFER_SIZE): Moved from retr.h.
8997
8998         * log.c: New file.
8999         (logmsg): Moved from utils.c.
9000         (debug_logmsg): New function.
9001
9002         * mswindows.h: Include it here.
9003
9004         * init.c: Ditto.
9005
9006         * utils.c: Don't include <windows.h>.
9007
9008 1998-01-25  Hrvoje Niksic  <hniksic@srce.hr>
9009
9010         * host.c (ftp_getaddress): Ditto.
9011
9012         * main.c (main): Use it.
9013
9014         * utils.h (STRDUP_ALLOCA): New macro.
9015
9016         * init.c: Prepend `wget: ' to error messages printed on stderr.
9017
9018         * utils.c (mkdirhier): Renamed from mymkdir.
9019         (touch): Renamed from my_touch.
9020         (pwd_cuserid): Renamed from my_cuserid().
9021
9022 1998-01-24  Andy Eskilsson  <andy.eskilsson@telelogic.se>
9023
9024         * utils.c (accdir): Process wildcards.
9025         (proclist): New function.
9026         (accdir): Use it to avoid code repetition.
9027
9028 1998-01-24  Hrvoje Niksic  <hniksic@srce.hr>
9029
9030         * recur.c (parse_robots): Respect opt.useragent; use alloca().
9031
9032         * http.c (gethttp): Construct useragent accordingly.
9033
9034         * version.c: Changed version string to numbers-only.
9035
9036         * main.c (print_help): List all the options.
9037
9038         * mswindows.c (windows_main_junk): Initialize argv0 here.
9039
9040 1998-01-24  Karl Heuer  <kwzh@gnu.org>
9041
9042         * netrc.c (search_netrc): Initialize `l' only after processing
9043         netrc.
9044
9045         * main.c (main): Don't trap SIGHUP if it's being ignored.
9046
9047 1998-01-24  Hrvoje Niksic  <hniksic@srce.hr>
9048
9049         * all: Use logmsg().
9050
9051         * utils.c (time_str): Moved from retr.c.
9052         (logmsg): New function.
9053         (logmsg_noflush): Ditto.
9054
9055         * rbuf.c: New file, moved buf_* functions here.
9056
9057         * ftp.c (ftp_expected_bytes): Moved from ftp-basic.c.
9058
9059         * ftp-basic.c (ftp_rest): Use prnum().
9060
9061         * ftp-basic.c: Ditto.
9062
9063         * ftp.c: Use the new reading functions and macros.
9064
9065         * retr.c (buf_initialize): New function.
9066         (buf_initialized_p): Ditto.
9067         (buf_uninitialize): Ditto.
9068         (buf_fd): Ditto.
9069
9070         * http.c (fetch_next_header): Use the BUF_READCHAR macro for
9071         efficiency.
9072         (gethttp): Use alloca() where appropriate.
9073
9074         * retr.c (buf_readchar): Use it.
9075         (buf_peek): Use rstreams.
9076
9077         * retr.h (BUF_READCHAR): New macro.
9078
9079         * init.c (home_dir): Rewritten for clarity.
9080         (init_path): Ditto.
9081
9082         * mswindows.c (ws_backgnd): Made static.
9083         (read_registry): Ditto.
9084         (ws_cleanup): Ditto.
9085         (ws_handler): Ditto.
9086
9087 1998-01-23  Hrvoje Niksic  <hniksic@srce.hr>
9088
9089         * alloca.c: New file.
9090
9091         * Makefile.in (ALLOCA): Define.
9092
9093         * mswindows.c (ws_help): Constify.
9094         (ws_help): Use alloca.
9095
9096         * mswindows.c: Reformat.
9097
9098         * all: Added _(...) annotations for I18N snarfing and translation.
9099
9100         * host.c (ftp_getaddress): Nuke SYSINFO.
9101         (ftp_getaddress): Don't use getdomainname().
9102         (ftp_getaddress): Use uname(), where available.
9103
9104         * http.c (gethttp): Protect a stray fprintf().
9105
9106         * init.c (settime): New function.
9107         (setval): Treat WAIT specially, allowing suffixes like `m' for
9108         minutes, etc.
9109
9110 1998-01-21  Hrvoje Niksic  <hniksic@srce.hr>
9111
9112         * url.c (get_urls_html): Use alloca() for TEMP.
9113
9114 1998-01-21  Jordan Mendelson  <jordy@wserv.com>
9115
9116         * url.c (rotate_backups): New function.
9117
9118         * http.c (gethttp): Ditto.
9119
9120         * ftp.c (getftp): Rotate backups.
9121
9122 1997-12-18  Hrvoje Niksic  <hniksic@srce.hr>
9123
9124         * all: Renamed nmalloc(), nrealloc() and nstrdup() to xmalloc(),
9125         xrealloc() and xstrdup().  Use the new functions.
9126
9127         * url.c (decode_string): Made static.
9128         (has_proto): Ditto.
9129         (parse_dir): Ditto.
9130         (parse_uname): Ditto.
9131         (mkstruct): Ditto.
9132         (construct): Ditto.
9133         (construct_relative): Ditto.
9134
9135         * retr.c (show_progress): Made static.
9136
9137         * recur.c (robots_url): Made static.
9138         (retrieve_robots): Ditto.
9139         (parse_robots): Ditto.
9140         (robots_match): Ditto.
9141
9142         * main.h: Removed.
9143
9144         * main.c (printhelp): Made static.
9145         (hangup): Ditto.
9146
9147         * init.c (comind): Made static.
9148         (defaults): Ditto.
9149         (init_path): Ditto.
9150         (run_wgetrc): Ditto.
9151         (onoff): Ditto.
9152         (setonoff): Ditto.
9153         (setnum): Ditto.
9154         (myatoi): Ditto.
9155         (getperms): Ditto.
9156         (setbytes): Ditto.
9157
9158         * http.c (fetch_next_header): Made static.
9159         (hparsestatline): Ditto.
9160         (hskip_lws): Ditto.
9161         (hgetlen): Ditto.
9162         (hgetrange): Ditto.
9163         (hgettype): Ditto.
9164         (hgetlocation): Ditto.
9165         (hgetmodified): Ditto.
9166         (haccepts_none): Ditto.
9167         (gethttp): Ditto.
9168         (base64_encode_line): Ditto.
9169         (mktime_from_utc): Ditto.
9170         (http_atotm): Ditto.
9171
9172         * html.c (idmatch): Made static.
9173
9174         * host.c (search_host): Made static.
9175         (search_address): Ditto.
9176         (free_hlist): Ditto.
9177
9178         * ftp.c (getftp): Made static.
9179         (ftp_loop_internal): Ditto.
9180         (ftp_get_listing): Ditto.
9181         (ftp_retrieve_list): Ditto.
9182         (ftp_retrieve_dirs): Ditto.
9183         (ftp_retrieve_glob): Ditto.
9184         (freefileinfo): Ditto.
9185         (delelement): Ditto.
9186
9187         * ftp-ls.c (symperms): Made static.
9188         (ftp_parse_unix_ls): Ditto.
9189
9190         * connect.c (select_fd): Made static.
9191
9192         * utils.c (xmalloc): Renamed from nmalloc.
9193         (xrealloc): Renamed from nrealloc.
9194         (xstrdup): Renamed from nstrdup.
9195
9196         * getopt.c (exchange): Use alloca.
9197
9198         * mswindows.c (mycuserid): Use strncpy.
9199
9200         * New files mswindows.c, mswindows.h, sysdep.h.  winjunk.c,
9201         systhings.h, windecl.h and winjunk.h removed.
9202
9203         * mswindows.c (sleep): New function.
9204
9205         * utils.c: Include <windows.h> under Windows.
9206
9207 1997-06-12  Darko Budor  <dbudor@zesoi.fer.hr>
9208
9209         * url.h (URL_UNSAFE): Change default under Windows.
9210
9211         * retr.c (retrieve_from_file): Respect opt.delete_after.
9212
9213         * main.c (main): Call ws_help on Windows.
9214
9215         * winjunk.c (windows_main_junk): New function.
9216
9217         * main.c (main): Junk-process argv[0].
9218
9219         * http.c (mktime_from_utc): Return -1 if mktime failed.
9220
9221         * http.c (http_loop): Ditto.
9222
9223         * ftp.c (ftp_loop_internal): Change title on Windows when using a
9224         new URL.
9225
9226         * winjunk.c (getdomainname): Lots of functions.
9227
9228 1997-06-12  Hrvoje Niksic  <hniksic@srce.hr>
9229
9230         * cmpt.c (strptime_internal): Handle years more correctly for
9231         `%y'.
9232
9233 1997-06-09  Mike Thomas <mthomas@reality.ctron.com>
9234
9235         * http.c (gethttp): Allocate enough space for
9236         `Proxy-Authorization' header.
9237
9238 1997-05-10  Hrvoje Niksic  <hniksic@srce.hr>
9239
9240         * version.c: Wget/1.4.5 is released.
9241
9242 1997-05-10  Hrvoje Niksic  <hniksic@srce.hr>
9243
9244         * retr.c (get_contents): Check return value of fwrite more
9245         carefully.
9246
9247 1997-03-30  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
9248
9249         * cmpt.c (strptime_internal) [case 'Y']: Always subtract 1900 from
9250         year, regardless of century.
9251
9252 1997-03-30  Hrvoje Niksic  <hniksic@srce.hr>
9253
9254         * utils.c (isfile): Use `lstat' instead of `stat'.
9255
9256 1997-03-29  Hrvoje Niksic  <hniksic@srce.hr>
9257
9258         * utils.c (numdigit): Use explicit test.
9259
9260 1997-03-21  Hrvoje Niksic  <hniksic@srce.hr>
9261
9262         * http.c (http_loop): Always use `url_filename' to get u->local.
9263
9264 1997-03-20  Hrvoje Niksic  <hniksic@srce.hr>
9265
9266         * url.c: Recognize https.
9267
9268 1997-03-13  Hrvoje Niksic  <hniksic@srce.hr>
9269
9270         * recur.c (recursive_retrieve): Lowercase just the host name.
9271
9272 1997-03-09  Hrvoje Niksic  <hniksic@srce.hr>
9273
9274         * url.c (get_urls_file): Use the correct test.
9275         (get_urls_html): Ditto.
9276
9277 1997-03-07  Hrvoje Niksic  <hniksic@srce.hr>
9278
9279         * connect.c: Reverted addrlen to int.
9280
9281         * init.c (parse_line): Check for -1 instead of NONE.
9282
9283         * version.c: Changed version to 1.4.5.
9284
9285 1997-02-17  Hrvoje Niksic  <hniksic@srce.hr>
9286
9287         * init.c: New option netrc.
9288         (initialize): Don't parse .netrc.
9289
9290         * cmpt.c (recursive): Return rp.
9291         (strptime_internal): Match the long strings first, the abbreviated
9292         second.
9293
9294 1997-02-16  Hrvoje Niksic  <hniksic@srce.hr>
9295
9296         * http.c (check_end): New function.
9297         (http_atotm): Use it.
9298
9299 1997-02-13  gilles Cedoc  <gilles@cedocar.fr>
9300
9301         * http.c (gethttp): Use them.
9302
9303         * init.c: New options proxy_user and proxy_passwd.
9304
9305 1997-02-14  Hrvoje Niksic  <hniksic@srce.hr>
9306
9307         * ftp.c (ftp_retrieve_list): Create links even if not relative.
9308
9309 1997-02-10  Hrvoje Niksic  <hniksic@srce.hr>
9310
9311         * recur.c (recursive_retrieve): Lowercase the host name, if the
9312         URL is not "optimized".
9313
9314         * host.c (realhost): Return l->hostname, even if it matches with
9315         host.
9316
9317 1997-02-10  Marin Purgar  <pmc@asgard.hr>
9318
9319         * connect.c: Make addrlen size_t instead of int.
9320         (conaddr): Ditto.
9321
9322 1997-02-09  Gregor Hoffleit  <flight@mathi.uni-heidelberg.DE>
9323
9324         * systhings.h: Define S_ISLNK on NeXT too.
9325
9326 1997-02-09  Hrvoje Niksic  <hniksic@srce.hr>
9327
9328         * version.c: Released 1.4.3.
9329
9330         * url.c: Futher update to list of protostrings.
9331         (skip_proto): Skip `//' correctly for FTP and HTTP.
9332
9333         * url.c (get_urls_html): Handle bogus `http:' things a little
9334         different.
9335
9336         * main.c (main): Removed `follow-ftp' from `f'.
9337         (main): Dumped the `prefix-files' and `file-prefix' options and
9338         features; old and bogus.
9339         (main): Exit on failed setval() in `-e'.
9340
9341         * http.c (fetch_next_header): Use it to detect header continuation
9342         correctly.
9343
9344         * retr.c (buf_peek): New function.
9345
9346 1997-02-08  Hrvoje Niksic  <hniksic@srce.hr>
9347
9348         * wget.h: Include time.h and stuff.
9349
9350 1997-02-08  Roger Beeman  <beeman@cisco.com>
9351
9352         * ftp.c: Include <time.h>
9353
9354 1997-02-07  Hrvoje Niksic  <hniksic@srce.hr>
9355
9356         * url.c (findurl): Would read over buffer limits.
9357
9358 1997-02-06  Hrvoje Niksic  <hniksic@srce.hr>
9359
9360         * ftp-ls.c (ftp_parse_unix_ls): Allow spaces in file names.
9361
9362 1997-02-05  Hrvoje Niksic  <hniksic@srce.hr>
9363
9364         * http.c (http_atotm): Initialize tm.is_dst.
9365
9366 1997-02-02  Hrvoje Niksic  <hniksic@srce.hr>
9367
9368         * http.c (gethttp): Don't print the number of retrieved headers.
9369
9370         * main.c (main): New option `--no-clobber', alias for `-nc'.
9371
9372         * url.c: Recognize `https://'.
9373
9374 1997-02-01  Hrvoje Niksic  <hniksic@srce.hr>
9375
9376         * host.c (herrmsg): Don't use h_errno.
9377
9378 1997-01-30  Hrvoje Niksic  <hniksic@srce.hr>
9379
9380         * host.c (accept_domain): Use it.
9381
9382         * main.c (main): New option `--exclude-domains'.
9383
9384         * retr.c (retrieve_url): Use it.
9385         (retrieve_url): Bail out when an URL is redirecting to itself.
9386
9387         * url.c (url_equal): New function.
9388
9389 1997-01-29  Hrvoje Niksic  <hniksic@srce.hr>
9390
9391         * connect.c: Include arpa/inet.h instead of arpa/nameser.h.
9392
9393         * http.c (mk_utc_time): New function.
9394         (http_atotm): Use it; handle time zones correctly.
9395
9396 1997-01-28  Hrvoje Niksic  <hniksic@srce.hr>
9397
9398         * http.c: Ditto.
9399
9400         * ftp-basic.c: Use it instead of WRITE.
9401
9402         * connect.c (iwrite): New function.
9403
9404 1997-01-27  Hrvoje Niksic  <hniksic@srce.hr>
9405
9406         * cmpt.c (mktime): New function.
9407
9408         * netrc.c: Include <sys/types.h>.
9409
9410         * main.c (main): Wouldn't recognize --spider.
9411
9412         * retr.c (rate): Use `B', `KB' and `MB'.
9413         (reset_timer,elapsed_time): Moved from utils.c.
9414
9415         * ftp.c (ftp_retrieve_list): Ditto.
9416
9417         * http.c (http_loop): Don't touch the file if opt.dfp.
9418
9419 1997-01-24  Hrvoje Niksic  <hniksic@srce.hr>
9420
9421         * cmpt.c: New file.
9422
9423         * ftp.c (ftp_retrieve_glob): New argument semantics.
9424         (ftp_retrieve_dirs): Use it.
9425         (ftp_loop): Ditto.
9426
9427         * html.c (htmlfindurl): Recognize `'' as the quote char.
9428
9429 1997-01-23  Hrvoje Niksic  <hniksic@srce.hr>
9430
9431         * ftp.c (ftp_loop_internal): Use it.
9432
9433         * utils.c (remove_link): New function.
9434
9435 1997-01-22  Hrvoje Niksic  <hniksic@srce.hr>
9436
9437         * retr.c (retrieve_url): Require STRICT redirection URL.
9438
9439         * url.c (parseurl): New argument STRICT.
9440
9441         * http.c (hparsestatline): Be a little-bit less strict about
9442         status line format.
9443
9444 1997-01-21  Hrvoje Niksic  <hniksic@srce.hr>
9445
9446         * http.c (gethttp): Use it.
9447
9448         * main.c (main): Don't use '<digit>' as options.
9449
9450         * init.c: New option ignore_length.
9451
9452         * http.c (gethttp): Ditto.
9453         (http_loop): Check for redirection without Location:.
9454         (gethttp): Don't print Length unless RETROKF.
9455
9456         * ftp.c (getftp): Use it.
9457
9458         * url.c (mkalldirs): New function.
9459
9460         * utils.c (mymkdir): Don't check for existing non-directory.
9461
9462         * url.c (mkstruct): Don't create the directory.
9463
9464 1997-01-20  Hrvoje Niksic  <hniksic@srce.hr>
9465
9466         * init.c (setval): Removed NO_RECURSION checks.
9467
9468 1997-01-19  Hrvoje Niksic  <hniksic@srce.hr>
9469
9470         * version.c: "Released" 1.4.3-pre2.
9471
9472         * recur.c (recursive_retrieve): Bypass host checking only if URL
9473         is ftp AND parent URL is not ftp.
9474
9475         * ftp-basic.c (ftp_request): Print out Turtle Power.
9476
9477         * ftp.c (ftp_loop): Call ftp_retrieve_glob with 0 if there's no
9478         wildcard.
9479         (ftp_retrieve_glob): Call ftp_loop_internal even on empty list, if
9480         not glob.
9481
9482         * http.c (gethttp): Be a little bit smarter about status codes.
9483
9484         * recur.c (recursive_retrieve): Always reset opt.recursive when
9485         dealing with FTP.
9486
9487 1997-01-18  Hrvoje Niksic  <hniksic@srce.hr>
9488
9489         * retr.c (retrieve_url): New variable location_changed; use it for
9490         tests instead of mynewloc.
9491         (retrieve_url): Allow heuristic adding of html.
9492
9493         * url.c (url_filename): Don't use the `%' in Windows file names.
9494
9495         * http.c (http_loop): Always time-stamp the local file.
9496
9497         * http.c (http_loop): Ditto.
9498
9499         * ftp.c (ftp_retrieve_list): Use it.
9500
9501         * utils.c (my_touch): New function.
9502
9503         * ftp.c (ftp_retrieve_list): Use #ifdef HAVE_STRUCT_UTIMBUF
9504         instead of #ifndef NeXT.
9505
9506         * utils.c (strptime): New version, by Ulrich Drepper.
9507
9508 1997-01-17  Hrvoje Niksic  <hniksic@srce.hr>
9509
9510         * http.c (haccepts_none): Renamed from `haccepts_bytes'.
9511         (gethttp): If haccepts_none(), disable ACCEPTRANGES.
9512         (http_loop): Would remove ACCEPTRANGES.
9513
9514         * ftp.c (getftp): Call ftp_list with NULL.
9515
9516 1997-01-15  Hrvoje Niksic  <hniksic@srce.hr>
9517
9518         * html.c (ftp_index): Don't print minutes and seconds if we don't
9519         know them; beautify the output.
9520
9521         * ftp.c (getftp): Don't close the socket on FTPNSFOD.
9522
9523 1997-01-14  Hrvoje Niksic  <hniksic@srce.hr>
9524
9525         * utils.c (strptime): New function.
9526         (strptime): Don't use get_alt_number.
9527         (strptime): Don't use locale.
9528         (match_string): Made it a function.
9529
9530 1997-01-12  Hrvoje Niksic  <hniksic@srce.hr>
9531
9532         * http.c (http_atotm): New function.
9533         (http_loop): Use it.
9534
9535         * atotm.c: Removed from the distribution.
9536
9537         * http.c (base64_encode_line): Rewrite.
9538
9539 1997-01-09  Hrvoje Niksic  <hniksic@srce.hr>
9540
9541         * ftp.c (getftp): Use ftp_expected_bytes; print size.
9542
9543         * ftp-basic.c (ftp_response): Use ftp_last_respline.
9544         (ftp_expected_bytes): New function.
9545
9546         * ftp.c (getftp): Print the unauthoritative file length.
9547
9548         * ftp-ls.c: Renamed from ftp-unix.c.
9549         (ftp_parse_ls): Moved from ftp.c.
9550         (ftp_parse_unix_ls): Recognize seconds in time spec.
9551         (ftp_parse_unix_ls): Recognize year-less dates of the previous
9552         year.
9553
9554 1997-01-08  Hrvoje Niksic  <hniksic@srce.hr>
9555
9556         * ftp-basic.c: Don't declare errno if #defined.
9557
9558         * host.c (ftp_getaddress): Check for sysinfo legally.
9559
9560 1997-01-08  Darko Budor  <dbudor@diana.zems.fer.hr>
9561
9562         * connect.c (iread): Use READ.
9563
9564 1996-12-23  Hrvoje Niksic  <hniksic@srce.hr>
9565
9566         * url.c: Recognize finger, rlogin, tn3270, mid and cid as valid
9567         schemes.
9568
9569 1996-12-22  Hrvoje Niksic  <hniksic@srce.hr>
9570
9571         * host.c (ftp_getaddress): Allow `.' in hostname.
9572
9573 1996-12-26  Darko Budor <dbudor@zems.fer.hr>
9574
9575         * wget.h: READ and WRITE macros for use instead of read and write
9576         on sockets, grep READ *.c, grep WRITE *.c
9577
9578         * wsstartup.c: new file - startup for winsock
9579
9580         * wsstartup.h: new file
9581
9582         * win32decl.h: new file - fixup for <errno.h> and winsock trouble
9583
9584         * configure.bat: Configure utility for MSVC
9585
9586         * src/Makefile.ms,config.h.ms: new files for use with MSVC 4.x
9587
9588 1996-12-22  Hrvoje Niksic  <hniksic@srce.hr>
9589
9590         * version.c: Released 1.4.3-pre.
9591
9592         * utils.c (prnum): Accept long.
9593         (legible): Use prnum().
9594
9595         * connect.c (make_connection): Accept port as short.
9596         (bindport): Ditto.
9597
9598         * http.c (gethttp): Use search_netrc.
9599
9600 1996-12-21  Hrvoje Niksic  <hniksic@srce.hr>
9601
9602         * ftp.c (getftp): Use search_netrc.
9603
9604         * netrc.c (free_netrc): New function.
9605
9606         * init.c (home_dir): New function.
9607
9608         * url.c (convert_links): Allow REL2ABS changes.
9609
9610 1996-12-21  Gordon Matzigkeit  <gord@gnu.ai.mit.edu>
9611
9612         * netrc.c: New file.
9613         (parse_netrc, maybe_add_to_list): New functions.
9614
9615 1996-12-17  Hrvoje Niksic  <hniksic@srce.hr>
9616
9617         * retr.c (retrieve_url): Reset opt.recursion before calling
9618         ftp_loop if it is reached through newloc.
9619
9620         * init.c (run_wgetrc): Print the wgetrc path too, when reporting
9621         error; don't use "Syntax error", since we don't know if it is
9622         really a syntax error.
9623
9624 1996-12-16  Hrvoje Niksic  <hniksic@srce.hr>
9625
9626         * utils.c (acceptable): Extract the filename part of the path.
9627
9628         * recur.c (recursive_retrieve): Call acceptable() with the right
9629         argument; would bug out on wildcards.
9630
9631         * init.c (parse_line): Likewise.
9632
9633         * html.c (htmlfindurl): Cast to char * when calling stuff.
9634
9635 1996-12-15  Hrvoje Niksic  <hniksic@srce.hr>
9636
9637         * ftp.c (getftp): Use ftp_pasv.
9638
9639         * ftp-basic.c (ftp_request): Accept NULL value.
9640         (ftp_pasv): New function.
9641
9642         * options.h (struct options): Add passive FTP option.
9643
9644 1996-12-15  Hrvoje Niksic  <hniksic@srce.hr>
9645
9646         * url.c (parseurl): Debug output.
9647
9648         * utils.c (path_simplify): New one, adapted from bash's
9649         canonicalize_pathname().
9650
9651 1996-12-14  Hrvoje Niksic  <hniksic@srce.hr>
9652
9653         * ftp.c (getftp): Don't discard the buffer.
9654
9655         * retr.c (get_contents): New parameter nobuf.
9656
9657 1996-12-13  Shawn McHorse  <riffraff@txdirect.net>
9658
9659         * html.c (htmlfindurl): Recognize <meta contents="d; URL=...".
9660
9661         * init.c (setval): Strip the trailing slashes on CVECDIR.
9662
9663 1996-12-13  Hrvoje Niksic  <hniksic@srce.hr>
9664
9665         * init.c: Make excludes and includes under CVECDIR instead of
9666         CVEC.
9667
9668 1996-12-13  Shawn McHorse  <riffraff@txdirect.net>
9669
9670         * url.c (get_urls_html): Skip "http:".
9671
9672 1996-12-13  Hrvoje Niksic  <hniksic@srce.hr>
9673
9674         * utils.c (strcasecmp): From glibc.
9675         (strncasecmp): Also.
9676         (strstr): Also.
9677
9678         * url.c: Added javascript: to the list of URLs prefixes.
9679
9680 1996-12-12  Shawn McHorse  <riffraff@txdirect.net>
9681
9682         * recur.c (retrieve_robots): Print the warning message only if
9683         verbose.
9684
9685 1996-12-12  Gregor Hoffleit  <flight@mathi.uni-heidelberg.DE>
9686
9687         * ftp.c (ftp_retrieve_list): Use NeXT old utime interface.
9688
9689 1996-12-12  Hrvoje Niksic  <hniksic@srce.hr>
9690
9691         * systhings.h: New file.
9692
9693         * ../configure.in: Check for utime.h
9694
9695         * ftp.c: Check whether we have unistd.h.
9696
9697 1996-11-27  Hrvoje Niksic  <hniksic@srce.hr>
9698
9699         * recur.c (recursive_retrieve): Send the canonical URL as referer.
9700         (recursive_retrieve): Call get_urls_html with the canonical URL.
9701
9702 1996-12-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9703
9704         * (configure.in, config.h.in, src/Makefile.in, src/*.[ch]): Add
9705         ansi2knr support for compilers which don't support ANSI style
9706         function prototypes and signatures.
9707
9708         * (aclocal.m4, src/ansi2knr.c, src/ansi2knr.1): New files.
9709
9710 1996-11-26  Hrvoje Niksic  <hniksic@srce.hr>
9711
9712         * url.c: Use it; Recognize paths ending with "." and ".." as
9713         directories.
9714         (url_filename): Append .n whenever file exists and could be a
9715         directory.
9716
9717         * url.h (ISDDOT): New macro.
9718
9719         * init.c (parse_line): Use unsigned char.
9720
9721         * url.c (get_urls_html): Cast to unsigned char * when calling
9722         htmlfindurl.
9723
9724         * html.c (htmlfindurl): Use unsigned char.
9725
9726         * version.c: Changed version to 1.4.3.
9727
9728 1996-11-25  Hrvoje Niksic  <hniksic@srce.hr>
9729
9730         * version.c: Released 1.4.2.
9731
9732         * ftp.c (getftp): Simplified assertion.
9733         (ftp_loop_internal): Remove symlink before downloading.
9734         (ftp_retrieve_list): Unlink the symlink name before attempting to
9735         create a symlink!
9736
9737         * options.h (struct options): Renamed print_server_response to
9738         server_response.
9739
9740         * ftp.c (rel_constr): Removed.
9741         (ftp_retrieve_list): Don't use it.
9742         (ftp_retrieve_list): Use opt.retr_symlinks.
9743
9744 1996-11-24  Hrvoje Niksic  <hniksic@srce.hr>
9745
9746         * main.c (main): New option retr_symlinks.
9747
9748         * url.c (convert_links): Print verbose message.
9749
9750 1996-11-24  Hrvoje Niksic  <hniksic@srce.hr>
9751
9752         * http.c (http_loop): Reset newloc in the beginning of function;
9753         would cause FMR in retrieve_url.
9754
9755 1996-11-23  Hrvoje Niksic  <hniksic@srce.hr>
9756
9757         * recur.c (convert_all_links): Find the URL of each HTML document,
9758         and feed it to get_urls_html; would bug out.
9759         (convert_all_links): Check for l2 instead of dl; removed dl.
9760
9761         * url.c (convert_links): Don't refer to freed newname.
9762
9763         * recur.c (recursive_retrieve): Add this_url to urls_downloaded.
9764
9765         * main.c (main): Print the OS_TYPE in the debug output, too.
9766
9767         * recur.c (recursive_retrieve): Check for opt.delete_after.
9768
9769         * main.c (main): New option delete-after.
9770
9771         * init.c (setval): Cleaned up.
9772
9773 1996-11-21  Hrvoje Niksic  <hniksic@srce.hr>
9774
9775         * Makefile.in (wget): Make `wget' the default target.
9776
9777         * ftp.c (ftp_loop_internal): Move noclobber checking out of the
9778         loop.
9779         (ftp_retrieve_list): Warn about non-matching sizes.
9780
9781         * http.c (http_loop): Made -nc non-dependent on opt.recursive.
9782
9783         * init.c (setnum): Renamed from setnuminf; New argument flags.
9784         (setval): Use it.
9785
9786         * main.c (main): Sorted the options.
9787         (main): New option --wait.
9788
9789 1996-11-21  Shawn McHorse  <riffraff@txdirect.net>
9790
9791         * html.c (htmlfindurl): Reset s->in_quote after getting out of
9792         quotes.
9793
9794 1996-11-20  Hrvoje Niksic  <hniksic@srce.hr>
9795
9796         * version.c: Changed version to 1.4.2.
9797
9798 1996-11-20  Hrvoje Niksic  <hniksic@srce.hr>
9799
9800         * version.c: Released 1.4.1.
9801
9802         * html.c (html_quote_string): New function.
9803         (ftp_index): Use it.
9804         (htmlfindurl): A more gentle ending debug message.
9805
9806         * ftp.c (ftp_loop): Check for opt.htmlify.
9807
9808         * init.c: New command htmlify.
9809
9810         * ftp.c (getftp): Nicer error messages, with `'-encapsulated
9811         strings.
9812         (ftp_loop): Print size of index.html.
9813
9814         * init.c (setval): Implement "styles".
9815
9816         * main.c (main): New option dotstyle.
9817
9818 1996-11-19  Hrvoje Niksic  <hniksic@srce.hr>
9819
9820         * ftp.c (getftp): Close the master socket in case of errors, after
9821         bindport().
9822
9823         * connect.c (bindport): Initialize msock to -1.
9824
9825         * ftp.c (getftp): Initialize dtsock to -1.
9826
9827         * connect.c (closeport): Don't close sock if sock == -1.
9828
9829 1996-11-18  Hrvoje Niksic  <hniksic@srce.hr>
9830
9831         * init.c (setnuminf): Nuked default value -- just leave unchanged.
9832         (setval): Don't send default values.
9833         (defaults): Use DEFAULT_TIMEOUT -- aaargh.
9834
9835         * options.h (struct options): Use long for dot_bytes.
9836
9837         * init.c (setquota): Renamed to setbytes.
9838         (setval): Use setbytes on DOTBYTES.
9839
9840 1996-11-17  Hrvoje Niksic  <hniksic@srce.hr>
9841
9842         * ftp.c (getftp): Initialize con->dltime.
9843
9844         * recur.c (recursive_retrieve): Use same_host instead of
9845         try_robots; simply load robots_txt whenever the host is changed.
9846         (recursive_retrieve): Free forbidden before calling parse_robots.
9847
9848 1996-11-16  Hrvoje Niksic  <hniksic@srce.hr>
9849
9850         * retr.c (show_progress): Use them.
9851
9852         * options.h (struct options): New options dot_bytes, dots_on_line
9853         and dot_spacing.
9854
9855 1996-11-16  Mark Boyns  <boyns@sdsu.edu>
9856
9857         * recur.c (recursive_retrieve): Retrieve directories regardless of
9858         acc/rej rules; check for empty u->file.
9859
9860 1996-11-14  Hrvoje Niksic  <hniksic@srce.hr>
9861
9862         * init.c (setval): Use it.
9863
9864         * utils.c (merge_vecs): New function.
9865
9866         * init.c (setval): Reset the list-type functions when encountering
9867         "".
9868
9869 1996-11-14  Shawn McHorse  <riffraff@txdirect.net>
9870
9871         * recur.c (recursive_retrieve): Use base_url instead of this_url
9872         for no_parent.
9873
9874 1996-11-14  Shawn McHorse  <riffraff@txdirect.net>
9875
9876         * html.c (htmlfindurl): Reset s->in_quote after exiting the quote.
9877
9878 1996-11-13  Hrvoje Niksic  <hniksic@srce.hr>
9879
9880         * utils.c (sepstring): Rewrote; don't use strtok.
9881
9882         * recur.c (recursive_retrieve): Enter assorted this_url to slist
9883         when running the first time.
9884         (retrieve_robots): Warn to ignore errors when robots are loaded.
9885
9886         * utils.c (load_file): Moved from url.c.
9887
9888         * http.c: Made static variables const too in h* functions.
9889
9890         * main.c (main): Renamed --continue-ftp to --continue.
9891
9892         * recur.c (recursive_retrieve): Use it.
9893
9894         * utils.c (frontcmp): New function.
9895
9896         * url.c (accdir): New function.
9897
9898         * html.c (htmlfindurl): Recognize <area href=...>.
9899
9900         * ftp.c (ftp_retrieve_dirs): Implemented opt.includes.
9901
9902         * init.c (setval): Free the existing opt.excludes and
9903         opt.includes, if available.
9904
9905         * main.c (main): New option -I.
9906
9907 1996-11-12  Hrvoje Niksic  <hniksic@srce.hr>
9908
9909         * ftp.c (ftp_retrieve_glob): Do not weed out directories.
9910
9911         * version.c: Changed version to 1.4.1.
9912
9913 1996-11-11  Hrvoje Niksic  <hniksic@srce.hr>
9914
9915         * version.c: Released 1.4.0.
9916
9917 1996-11-10  Hrvoje Niksic  <hniksic@srce.hr>
9918
9919         * main.c (main): Free com and val after parse_line.
9920         (printhelp): Reorder the listing.
9921
9922         * http.c: More robust header parsing.
9923
9924         * http.c: Allow any number of spaces, or no spaces, precede ':'.
9925         (hskip_lws): New function.
9926         (haccepts_bytes): New function.
9927         (gethttp): Use it.
9928
9929         * init.c (setval): Check header sanity.
9930         (setval): Allow resetting of headers.
9931
9932 1996-11-10  Hrvoje Niksic  <hniksic@srce.hr>
9933
9934         * http.c (http_loop): Don't use has_wildcards.
9935
9936         * http.c (gethttp): Free all_headers -- would leak.
9937
9938         * recur.c (recursive_retrieve): Initialize depth to 1 instead of
9939         0 -- this fixes a long-standing bug in -rl.
9940
9941 1996-11-09  Hrvoje Niksic  <hniksic@srce.hr>
9942
9943         * ftp.c: Use -1 as "impossible" value for con->fd.
9944
9945         * url.h (URL_SEPARATOR): Don't treat `*' and `+' as separators.
9946
9947         * init.c (parse_line): Use isalpha.
9948
9949         * ftp-unix.c: Use HAVE_UNISTD_H.
9950
9951         * mtch.c (has_wildcards): Don't match \.
9952
9953         * http.c (http_loop): Warn on HTTP wildcard usage.
9954
9955 1996-11-08  Hrvoje Niksic  <hniksic@srce.hr>
9956
9957         * url.c (url_filename): Do not create numbered suffixes if
9958         opt.noclobber -- would bug out on -nc.
9959
9960 1996-11-07  Hrvoje Niksic  <hniksic@srce.hr>
9961
9962         * recur.c (parse_robots): Don't chuck out the commands without
9963         arguments (`Disallow:<empty>' didn't work).
9964         (parse_robots): Compare versions lowercase.
9965         (parse_robots): Match on base_version, not version_string!
9966         (parse_robots): Handle comments properly.
9967         (parse_robots): Match versions in a sane way.
9968
9969         * init.c: Print nicer error messages.
9970
9971         * version.c: Changed version to 1.4.0.
9972
9973 1996-11-06  Hrvoje Niksic  <hniksic@srce.hr>
9974
9975         * version.c: Released 1.4.0-test2.
9976
9977         * init.c (run_wgetrc): Close fp.
9978
9979         * ftp.c (ftp_retrieve_dirs): Allocate the correct length for
9980         u->dir.
9981
9982 1996-11-06  Hrvoje Niksic  <hniksic@srce.hr>
9983
9984         * init.c (setquota): Allow inf as quota specification.
9985
9986 1996-11-05  Hrvoje Niksic  <hniksic@srce.hr>
9987
9988         * ftp.c (ftp_retrieve_dirs): Return QUOTEXC if quota exceeded.
9989         (ftp_retrieve_glob): Return QUOTEXC on quota exceeded.
9990
9991         * main.c (main): Check for quota by comparison with downloaded
9992         stuff, not from status.
9993
9994         * connect.c (select_fd): Should compile on HPUX without warnings now.
9995
9996         * ftp.c (ftp_get_listing): Check whether ftp_loop_internal
9997         returned RETROK.
9998
9999 1996-11-04  Hrvoje Niksic  <hniksic@srce.hr>
10000
10001         * ftp.c (ftp_retrieve_glob): Print the pattern nicely.
10002         (getftp): Return FTPRETRINT on control connection error.
10003
10004         * html.c (htmlfindurl): Recognize <embed src=...> and
10005         <bgsound src=...>.
10006         (ftp_index): Handle username and password correctly.
10007
10008         * main.c (main): Made `-np' a synonim for --no-parent.
10009
10010 1996-11-02  Hrvoje Niksic  <hniksic@srce.hr>
10011
10012         * ftp.c (ftp_loop): Check for opt.ftp_glob too before calling
10013         ftp_retrieve_glob.
10014
10015         * version.c: Changed version to 1.4.0-test2.
10016
10017 1996-11-02  Hrvoje Niksic  <hniksic@srce.hr>
10018
10019         * version.c: Released 1.4.0-test1.
10020
10021         * url.c (str_url): Don't use sprintf when creating %2F-prefixed
10022         directory.
10023         (convert_links): Removed definition of make_backup.
10024
10025         * http.h: Removed definition of MAX_ERROR_LENGTH.
10026
10027         * host.c (ftp_getaddress): Check for "(none)" domains.
10028
10029         * ftp.c (ftp_retrieve_dirs): Docfix.
10030
10031         * http.c (gethttp): Use ou->referer instead of u->referer.
10032
10033         * retr.c (retrieve_url): Reset u to avoid freeing pointers twice;
10034         this was known to cause coredumps on Linux.
10035
10036         * html.c (ftp_index): Cast the argument to local_time to time_t *.
10037
10038 1996-11-01  Hrvoje Niksic  <hniksic@srce.hr>
10039
10040         * connect.c (select_fd): Use exceptfds -- once and for all.
10041
10042         * retr.c (retrieve_from_file): Free filename after
10043         recursive_retrieve.
10044         (retrieve_from_file): Send RFIRST_TIME to recursive_retrieve on
10045         first-time retrieval.
10046         (retrieve_from_file): Return uerr_t; new argument, count.
10047         (retrieve_from_file): Break on QUOTEXC.
10048
10049         * init.c (setquota): Fixed a bug that caused rejection of
10050         non-postfixed values..
10051
10052 1996-10-30  Hrvoje Niksic  <hniksic@srce.hr>
10053
10054         * version.c: Changed name to wget.
10055
10056         * connect.c (iread): Smarter use of select.
10057         (select_fd): Set errno on timeout.  If not timeout, return 1
10058         instead of 0.
10059
10060 1996-10-29  Hrvoje Niksic  <hniksic@srce.hr>
10061
10062         * ftp.c (ftp_loop_internal): Don't use con->cmd before
10063         establishing it.
10064
10065 1996-10-26  Hrvoje Niksic  <hniksic@srce.hr>
10066
10067         * http.c (gethttp): Send correct referer when using proxy.
10068         (gethttp): Use struct urlinfo ou to access the relevant data; send
10069         correct authorization in all cases.
10070
10071         * host.c (same_host): Use skip_uname to skip username and
10072         password.
10073
10074         * url.c (skip_uname): New function.
10075         (parseurl): Use it.
10076
10077         * host.c (same_host): Do not assume HTTP -- same_host should now
10078         be totally foolproof.
10079
10080         * url.c (skip_proto): New function.
10081         (parse_uname): Use it.
10082
10083         * http.c (gethttp): Create local user and passwd from what is
10084         given.
10085
10086         * url.c (parseurl): Check for HTTP username and password too.
10087
10088 1996-10-25  Hrvoje Niksic  <hniksic@srce.hr>
10089
10090         * config.h.in: Removed #define gethostbyname R...
10091
10092 1996-10-22  Hrvoje Niksic  <hniksic@srce.hr>
10093
10094         * version.c: Changed version to 1.4.0-test1.
10095
10096 1996-10-21  Hrvoje Niksic  <hniksic@srce.hr>
10097
10098         * version.c: "Released" 1.4b29.
10099
10100         * recur.c (recursive_retrieve): Check for no_parent.
10101
10102         * init.c (setval): Option update.
10103
10104         * main.c (main): New option no-parent.
10105
10106         * options.h (struct options): New variable no_parent.
10107
10108         * recur.c (recursive_retrieve): Only files are checked for
10109         opt.accepts and opt.rejects.
10110         (recursive_retrieve): Check directories for opt.excludes.
10111         (recursive_retrieve): Make the dir absolute when checking
10112         opt.excludes.
10113
10114         * html.c (htmlfindurl): Recognize <applet code=...> and <script
10115         src=...>
10116
10117 1996-10-18  Hrvoje Niksic  <hniksic@srce.hr>
10118
10119         * ftp.c (getftp): Do not line-break assert entries at all.
10120         (ftp_retrieve_dirs): docfix.
10121
10122         * connect.c (select_fd): Use fd + 1 as nfds.
10123
10124         * version.c: Changed version to 1.4b29.
10125
10126 1996-10-18  Hrvoje Niksic  <hniksic@srce.hr>
10127
10128         * version.c: "Released" 1.4b28.
10129
10130         * ftp.c (ftp_loop_internal): Check whether f->size == len and
10131         don't continue the loop if it is.
10132         (ftp_get_listing): Remove list_filename on unsuccesful loop.
10133
10134 1996-10-17  Hrvoje Niksic  <hniksic@srce.hr>
10135
10136         * ftp.c (ftp_loop_internal): Use strcpy to initialize tmp.
10137         (getftp): Do not use multiline assert.
10138
10139         * http.c (hparsestatline): Use mjr and mnr instead of major and
10140         minor, which don't compile on Ultrix.
10141         (http_loop): Use strcpy() to initialize tmp.
10142
10143         * all: Geturl -> Fetch
10144
10145 1996-10-17  Hrvoje Niksic  <hniksic@srce.hr>
10146
10147         * recur.c (parse_robots): Fixed an off-by-one bug when looking for
10148         ':'.
10149
10150         * html.c (htmlfindurl): Fixed several possible off-by-one bugs by
10151         moving `bufsize &&' to the beginning of each check in for-loops.
10152
10153         * recur.c (parse_robots): Close fp on exit.
10154
10155         * url.c (mymkdir): Check for each directory before creating.
10156
10157 1996-10-16  Hrvoje Niksic  <hniksic@srce.hr>
10158
10159         * version.c: Changed version to 1.4b28.
10160
10161 1996-10-16  Hrvoje Niksic  <hniksic@srce.hr>
10162
10163         * version.c: "Released" 1.4b27.
10164
10165         * init.c (parse_line): Use isspace.
10166         (parse_line): Free *com on all errors.
10167
10168         * ftp.c (ftp_loop): Change FTPOK to RETROK before exiting.
10169         (delelement): Use next instead of f->next and prev instead of
10170         f->prev.
10171         (delelement): Free the members of the deleted element.
10172
10173         * http.c (http_loop): Do not return RETROK on code != 20x.
10174
10175         * init.c (cleanup): Free opt.user_header.
10176         (cleanup): Free opt.domains.
10177
10178         * url.c (freelists): Moved to cleanup().
10179
10180         * http.c (hparsestatline): Docfix.
10181
10182         * main.c (main): Return with error status on unsuccesful
10183         retrieval.
10184
10185         * init.c (setval): Do not remove listing when mirroring.
10186
10187         * url.c (url_filename): Use opt.fileprefix.
10188
10189         * ftp.c (ftp_get_listing): Use url_filename to get filename for
10190         .listing.
10191
10192         * main.c (main): New option: -rn.
10193
10194 1996-10-15  Hrvoje Niksic  <hniksic@srce.hr>
10195
10196         * Makefile.in (RM): Added RM = rm -f.
10197
10198         * host.c (clean_hosts): New function.
10199         (free_hlist): Just free the list, no reset.
10200
10201         * version.c: Changed version to 1.4b27.
10202
10203 1996-10-13  Hrvoje Niksic  <hniksic@srce.hr>
10204
10205         * version.c: "Released" 1.4b26.
10206
10207         * retr.c (retrieve_from_file): If call get_urls_html with
10208         opt.spider to make it silent in spider mode.
10209
10210         * url.c (str_url): Use CLEANDUP instead of URL_CLEANSE.
10211
10212         * url.h (CLEANDUP): New macro.
10213
10214         * http.c (gethttp): Fixed a bug that freed location only when it
10215         was NULL.
10216
10217         * retr.c (retrieve_url): Free url if it will not be stored,
10218         i.e. newloc is NULL.
10219
10220         * html.c (htmlfindurl): Handle exiting from quotes correctly; the
10221         old version would bug out on <a href="x#a"href="y">.
10222
10223         * html.h (state_t): New member in_quote.
10224
10225         * html.c (htmlfindurl): Free s->attr at the beginning of
10226         attr-loop.
10227
10228         * recur.c (recursive_retrieve): Recognize RCLEANUP.
10229         (tried_robots): Make hosts a global variable.
10230         (recursive_retrieve): Free constr after URL host optimization.
10231         (tried_robots): Free urlinfo before exiting.
10232
10233         * utils.c (free_slist): New function.
10234
10235         * recur.c (recursive_retrieve): Use flags to add cleanup
10236         possibility.
10237
10238         * main.c (main): Free filename after recursive_retrieve.
10239
10240         * http.c (gethttp): Store successful responses too.
10241
10242 1996-10-12  Hrvoje Niksic  <hniksic@srce.hr>
10243
10244         * all: Constified the whole source.  This required some minor
10245         changes in many functions in url.c, possibly introducing bugs -- I
10246         hope not.
10247
10248         * ftp-basic.c: Removed last_respline.
10249
10250         * http.c (gethttp): Free type.
10251
10252         * host.c (same_host): Free real1 and real2.
10253
10254         * main.c (main): New option --spider.
10255
10256         * retr.c (get_contents): Don't reset errno.
10257
10258         * main.c (main): Sorted the options.
10259
10260         * connect.c (iread): Set errno to ETIMEDOUT only if it was left
10261         uninitialized by select().
10262
10263         * http.c (http_loop): Print the time when the connection is
10264         closed.
10265         (gethttp): Debug-print the HTTP request.
10266
10267 1996-10-11  Hrvoje Niksic  <hniksic@srce.hr>
10268
10269         * connect.c (iread): Do not try reading after timeout.
10270
10271         * main.c (main): Would bug out on -T.
10272
10273         * connect.c (select_fd): Do not use exceptfds.
10274         (iread): Set ETIMEDOUT on select_fd <= 0.
10275
10276         * version.c: Changed version to 1.4b26.
10277
10278 1996-10-10  Hrvoje Niksic  <hniksic@srce.hr>
10279
10280         * version.c: "Released" 1.4b25.
10281
10282         * ftp-unix.c (ftp_parse_unix_ls): Ignore lines without file name
10283         or link name.
10284
10285         * http.c (gethttp): Add errcode to struct hstat.
10286         (http_loop): Use it.
10287
10288         * url.c (no_proxy_match): Simplify using char** for no_proxy.
10289
10290         * options.h (struct options): Make opt.no_proxy a vector.
10291
10292         * utils.c (sepstring): Use !*s instead of !strlen(s).
10293
10294         * init.c (setval): Set opt.maxreclevel to 0 on --mirror.
10295         (getperms): Use ISODIGIT instead of isdigit.
10296
10297         * ftp.c (getftp): Print time.
10298
10299         * main.c (main): Use legible output of downloaded quantity.
10300
10301         * ftp.c (getftp): Use elapsed_time().
10302         (ftp_loop_internal): Use rate().
10303
10304         * http.c (http_loop): Add download ratio output; Use rate().
10305
10306         * utils.c (rate): New function.
10307
10308 1996-10-09  Hrvoje Niksic  <hniksic@srce.hr>
10309
10310         * http.c (http_loop): Use timer.
10311
10312         * ftp.c: Split to ftp-basic.c and ftp.c
10313
10314         * utils.c (reset_timer): New function.
10315         (elapsed_time): New function.
10316
10317         * retr.c (show_progress): Make bytes_in_line and offs long; should
10318         work on 16-bit machines.
10319
10320 1996-10-08  Hrvoje Niksic  <hniksic@srce.hr>
10321
10322         * url.c (in_acclist): New argument backward.
10323
10324         * ftp.c (ftp_retrieve_glob): Use acceptable() to determine whether
10325         a file should be retrieved according to suffix.
10326         (ftp_get_listing): Check the return value of unlink; Do not call
10327         ftp_retrieve_dirs if depth reached maxreclevel.
10328         (ftp_retrieve_dirs): Check whether the directory is in
10329         exclude-list.
10330
10331         * main.c (main): Print the version number at the beginning of
10332         DEBUG output.
10333         (main): Use strrchr when creating exec_name.
10334
10335         * ftp.c (ftp_retrieve_glob): Do not close control connection.
10336
10337         * version.c: Changed version to 1.4b25.
10338
10339 1996-10-07  Hrvoje Niksic  <hniksic@srce.hr>
10340
10341         * version.c: "Released" 1.4b24.
10342
10343         * Makefile.in: Rewrite.
10344
10345         * ftp.c (ftp_loop_internal): Likewise.
10346
10347         * retr.c (time_str): Check for failed time().
10348
10349         * html.c (htmlfindurl): Recognize <fig src> and <overlay src> from
10350         HTML3.0.
10351
10352         * retr.c (time_str): Return time_t *.
10353
10354         * connect.c (bindport): Close msock on unsuccesful bind.
10355         (bindport): The same for getsockname and listen.
10356
10357         * retr.c (retrieve_url): Allow any number of retries on
10358         proxy.
10359
10360         * http.c (gethttp): Do not treat errno == 0 as timeout.
10361         (http_loop): Likewise.
10362         (http_loop): Cosmetic changes.
10363
10364         * connect.c (iread): Set errno to ETIMEDOUT in case of timeout.
10365
10366         * retr.c (get_contents): Reset errno.
10367
10368         * ftp.c (getftp): Minor fixes.
10369
10370 1996-10-06  Hrvoje Niksic  <hniksic@srce.hr>
10371
10372         * http.c: Do not use backups.
10373
10374         * geturl.1 (WARNING): Warn that man-page could be obsolete.
10375
10376         * getopt.c (getopt_long): Moved to getopt.c
10377
10378         * geturl.texi: Enhanced.
10379
10380         * main.c (main): Use it.
10381
10382         * recur.c (convert_all_links): New function.
10383
10384         * utils.c (add_slist): New argument flags.
10385
10386         * recur.c (recursive_retrieve): Update a list of downloaded URLs.
10387         (parse_robots): Do not chuck out empty value fields.
10388         (parse_robots): Make yourself welcome on empty Disallow.
10389
10390         * version.c: Changed version to 1.4b24.
10391
10392 1996-10-06  Hrvoje Niksic  <hniksic@srce.hr>
10393
10394         * version.c: "Released" 1.4b23.
10395
10396         * ftp.c (ftp_loop_internal): Get the time after getftp.
10397
10398         * Makefile.in (install.info): New target.
10399         (install): Use it.
10400
10401         * http.c (http_loop): Fix output when doing -O.
10402
10403 1996-10-05  Hrvoje Niksic  <hniksic@srce.hr>
10404
10405         * geturl.texi: New file.
10406
10407         * main.c (main): Do not print the warnings and download summary if
10408         opt.quiet is set.
10409
10410         * version.c: Changed version to 1.4b23.
10411
10412 1996-10-05  Hrvoje Niksic  <hniksic@srce.hr>
10413
10414         * "Released" 1.4b22.
10415
10416         * atotm.c (atotm): Use True and False instead of TRUE and FALSE,
10417         to avoid redefinition warnings.
10418
10419         * host.c (store_hostaddress): Use memcpy() to copy the address
10420         returned by inet_addr.
10421
10422         * version.c: Changed version to 1.4b22.
10423
10424 1996-10-04  Hrvoje Niksic  <hniksic@srce.hr>
10425
10426         * version.c: "Released" 1.4b21.
10427
10428         * ftp-unix.c (ftp_parse_ls): Renamed to ftp_parse_unix_ls.
10429
10430         * ftp.c (ftp_port): Use conaddr.
10431         (getftp): Print the file length.
10432         (ftp_retrieve_list): Check the stamps of plain files only.
10433
10434         * connect.c (closeport): Do not call shutdown().
10435         (conaddr): New function.
10436
10437         * html.c (ftp_index): Made it dfp-aware.
10438
10439         * init.c (cleanup): New name of freemem. Close opt.dfp.
10440
10441         * ftp.c (getftp): Use opt.dfp if it is set.
10442
10443         * ftp-unix.c (ftp_parse_ls): Recognize time in h:mm format.
10444
10445         * ftp.c (ftp_retrieve_dirs): Fixed a bug that caused incorrect
10446         CWDs to be sent with recursive FTP retrievals.
10447
10448 1996-10-03  Hrvoje Niksic  <hniksic@srce.hr>
10449
10450         * recur.c (parse_robots): Made it more compliant with "official"
10451         specifications.
10452
10453         * http.c: New function.
10454
10455         * ftp-unix.c (ftp_parse_ls): Added better debug output.
10456
10457         * ftp.c (getftp): Print out the LIST in case of
10458         opt.print_server_response.
10459
10460         * version.c: Changed version to 1.4b21.
10461
10462 1996-10-01  Hrvoje Niksic  <hniksic@srce.hr>
10463
10464         * version.c: "Released" 1.4b20.
10465
10466         * README: Update.
10467
10468         * http.c (gethttp): Preset lengths of various headers instead of
10469         calculating them dynamically.
10470         (gethttp): Check for 206 partial contents.
10471
10472 1996-09-30  Hrvoje Niksic  <hniksic@srce.hr>
10473
10474         * configure.in: Set SYSTEM_GETURLRC to $libdir/geturlrc
10475
10476         * http.c (gethttp): Send the port number in the Host: header.
10477
10478 1996-09-29  Hrvoje Niksic  <hniksic@srce.hr>
10479
10480         * http.c (gethttp): Send host: header.
10481         (gethttp): Add the possibility of user-defined headers.
10482         (gethttp): Move decision about pragma: no-cache to http_loop,
10483         where it belongs.
10484         (gethttp): Pass a struct instead of enormous argument list.
10485         (http_loop): Use a new, fancier display format.
10486         (ftp_loop): Likewise.
10487
10488         * main.c: (hangup): Turn off buffering of the new log file.
10489
10490         * install-sh: Likewise.
10491
10492         * config.sub: Replace with the one in autoconf-2.10
10493
10494         * geturl.1: Update.
10495
10496         * init.c: New options httpuser and httppasswd.
10497
10498         * http.c: (base64_encode_line): New function.
10499         (gethttp): Send authentication.
10500
10501         * connect.c (make_connection): Use store_hostaddress.
10502
10503 1996-09-28  Hrvoje Niksic  <hniksic@srce.hr>
10504
10505         * host.c (store_hostaddress): New function.
10506
10507         * NEWS: Update.
10508
10509         * http.c (hgetrange): New function.
10510         (gethttp): Use ranges.
10511
10512         * utils.c (numdigit): Accept long instead of int.
10513
10514         * http.c (http_loop): Add restart capabilities.
10515
10516         * ftp.c (ftp_retrieve_glob): Fixed a bug that could cause matchres
10517         being used uninitialized.
10518         (ftp_retrieve_list): Similar fix.
10519
10520         * host.c (add_hlist): Fixed a bug that could cause cmp being used
10521         uninitialized.
10522
10523         * url.c (construct_relative): New function.
10524
10525         * recur.c (recursive_retrieve): Use it.
10526
10527         * retr.c (convert_links): New function.
10528
10529 1996-09-27  Hrvoje Niksic  <hniksic@srce.hr>
10530
10531         * url.c (free_urlpos): New function.
10532
10533         * recur.c (recursive_retrieve): Adapt.
10534
10535         * url.c (get_urls_html): Return a linked list instead of a vector.
10536
10537         * url.c (get_urls_file): Return a linked list instead of a vector.
10538
10539         * geturl.1: Update.
10540
10541         * http.c (gethttp): Implement it.
10542
10543         * init.c (setval): New option: SAVEHEADERS
10544
10545         * ftp.c (ftp_loop_internal): Do not set restval if listing is to
10546         be retrieved. Lack of this test caused bugs when the connection
10547         was lost during listing.
10548
10549         * retr.c (retrieve_url): Fixed a bug that caused
10550         coredumps. *newloc is now reset by default.
10551         (retrieve_url): Lift the twenty-tries limit on proxies.
10552
10553         * version.c: Changed version to 1.4b20.
10554
10555 1996-09-20  Hrvoje Niksic  <hniksic@srce.hr>
10556
10557         * version.c: "Released" 1.4b19.
10558
10559 1996-09-19  Hrvoje Niksic  <hniksic@srce.hr>
10560
10561         * ftp.c (ftp_loop_internal): Renamed from ftp_1fl_loop.
10562         (getftp): Changed prototype to accept ccon *.
10563
10564 1996-09-17  Hrvoje Niksic  <hniksic@srce.hr>
10565
10566         * ftp.c (ftp_retrieve_list): Fixed a bug that caused setting
10567         incorrect values to files pointed to by symbolic links.
10568         (ftp_1fl_loop): Do not count listings among the downloaded URL-s.
10569
10570 1996-09-16  Hrvoje Niksic  <hniksic@srce.hr>
10571
10572         * url.c (mkstruct): Do not prepend "./" in front of a pathname.
10573
10574         * main.c (main): New option: --user-agent.
10575
10576         * geturl.1: Ditto.
10577
10578         * init.h: Ditto.
10579
10580         * init.c (setval): Ditto.
10581
10582         * main.c (main): Rename "server-headers" to "server-response".
10583
10584         * ftp-unix.c (ftp_parse_ls): Check for asterisks at the end of
10585         executables in 'ls -F' listings.
10586
10587 1996-09-15  Hrvoje Niksic  <hniksic@srce.hr>
10588
10589         * url.c (parseurl): Remove realloc() and sprintf().
10590         (str_url): Get rid of sprintf().
10591
10592         * recur.c (recursive_retrieve): Enable FTP recursion through proxy
10593         servers.
10594
10595         * url.h (URL_CLEANSE): Made it else-resistant.
10596         (USE_PROXY): New macro.
10597
10598 1996-09-14  Hrvoje Niksic  <hniksic@srce.hr>
10599
10600         * NEWS: Update.
10601
10602         * version.c: Changed version to 1.4b19.
10603
10604 1996-09-14  Hrvoje Niksic  <hniksic@srce.hr>
10605
10606         * version.c: "Released" 1.4b18.
10607
10608         * url.c: Made it reallocate space exponentially.
10609
10610 1996-09-14  Drazen Kacar  <dave@fly.cc.fer.hr>
10611
10612         * html.c (htmlfindurl): Added <frame src> and <iframe src> among
10613         the list of stuff to fetch.
10614
10615 1996-09-13  Hrvoje Niksic  <hniksic@srce.hr>
10616
10617         * url.c (get_urls_html): Fixed a bug that caused SIGSEGV's with
10618         -Fi.
10619
10620         * html.c (htmlfindurl): Rewrite.
10621
10622         * http.c (gethttp): Use opt.proxy_cache.
10623
10624         * main.c (main): Added --cache option.
10625
10626         * ftp.c (ftp_response): Print server response if opt.print_server
10627         response is set.
10628         (getftp): Print newlines after each request if the server response
10629         is to be printed.
10630         (ftp_response): Copy the last response line to last_respline.
10631
10632         * http.c (gethttp): Add Pragma: nocache for retried
10633         proxy-retrievals.
10634
10635         * ftp.c (getftp): Use it.
10636
10637         * retr.c (buf_discard): New function.
10638
10639         * ftp.c (ftp_response): Use buf_readchar().
10640         (getftp): Flush the control connection buffer before calling
10641         get_contents().
10642
10643         * retr.c (buf_readchar): New function.
10644         (buf_flush): New function.
10645         (get_contents): Use buf_readchar() instead of read(x, x, 1).
10646         (get_contents): Use buf_flush.
10647
10648 1996-09-12  Hrvoje Niksic  <hniksic@srce.hr>
10649
10650         * ftp.c: Incorporate changes to ftp_response.
10651
10652         * ftp.c (ftp_response): Allocate the server response dynamically,
10653         as in read_whole_line and fetch_next_header.
10654
10655         * utils.c (read_whole_line): Fixed a bug that prevented reading
10656         the last line if it is not \n-terminated. Also fixed a possible
10657         memory overflow.
10658
10659         * http.c (fetch_next_header): Return malloc-ed string as large as
10660         needed.
10661         (gethttp): Use new fetch_next_header.
10662
10663 1996-09-12  Hrvoje Niksic  <hniksic@srce.hr>
10664
10665         * http.c (hgetlen): Compute the header length the first time only.
10666         (hgettype): Ditto.
10667         (hgetlocation): Ditto.
10668         (hgetmodified): Ditto.
10669
10670 1996-09-11  Hrvoje Niksic  <hniksic@srce.hr>
10671
10672         * sample.geturlrc: Update.
10673
10674 1996-09-10  Hrvoje Niksic  <hniksic@srce.hr>
10675
10676         * http.c (http_loop): Ditto.
10677
10678         * ftp.c (getftp): Open the output file as binary.
10679
10680         * version.c: Changed version to 1.4b18.
10681
10682 1996-09-10  Hrvoje Niksic  <hniksic@srce.hr>
10683
10684         * version.c: "Released" 1.4b17.
10685
10686         * ftp-unix.c (ftp_parse_ls): If unable to open file, return NULL
10687         instead of failed assertion.
10688
10689 1996-09-09  Hrvoje Niksic  <hniksic@srce.hr>
10690
10691         * ftp.c (ftp_get_listing): Add a numbered suffix to LIST_FILENAME
10692         if a file of that name already exists.
10693
10694 1996-09-05  Hrvoje Niksic  <hniksic@srce.hr>
10695
10696         * ftp.c (ftp_1fl_loop): Handler FTPPORTERR and FOPENERR correctly.
10697
10698         * config.h.in: Define gethostbyname as Rgethostbyname when using
10699         Socks.
10700
10701         * configure.in: Check for -lresolv if using Socks.
10702
10703         * version.c: Changed version to 1.4b17.
10704
10705 1996-07-15  Hrvoje Niksic  <hniksic@srce.hr>
10706
10707         * version.c: "Released" 1.4b16.
10708
10709         * http.c (gethttp): More intelligent check for first line of HTTP
10710         response.
10711         (gethttp): Would bug out on time-stamping.
10712
10713         * version.c: Changed version to 1.4b16.
10714
10715 1996-07-11  Hrvoje Niksic  <hniksic@srce.hr>
10716
10717         * version.c: Released 1.4b15.
10718
10719         * http.c (http_loop): Print \n after the loop entry, not before.
10720
10721         * url.c (url_filename): Use ISDOT.
10722
10723         * url.h (ISDOT): New macro.
10724
10725         * recur.c (recursive_retrieve): Change only opt.recursive for
10726         following FTP.
10727
10728 1996-07-11  Antonio Rosella <antonio.rosella@agip.it>
10729
10730         * socks/geturl.cgi: Fixed version No.
10731
10732         * socks/download-netscape.html: Ditto.
10733
10734         * socks/download.html: Changed socks.html to download.html.
10735
10736 1996-07-11  Hrvoje Niksic  <hniksic@srce.hr>
10737
10738         * url.c (url_filename): Check for opt.dirstruct instead for
10739         opt.recursive && opt.dirstruct.
10740
10741         * init.c (defaults): Ditto.
10742         (defaults): Reset dirstruct by default.
10743         (setval): Set opt.dirstruct whenever setting recursive.
10744
10745         * init.h: Removed FORCEDIRHIER.
10746
10747         * INSTALL: Added -L to socks-description.
10748
10749         * version.c: Changed version to 1.4b15.
10750
10751 1996-07-10  Hrvoje Niksic  <hniksic@srce.hr>
10752
10753         * version.c: "Released" 1.4b14.
10754
10755         * geturl.1: Update AUTHOR to include Rosella as contributor.
10756
10757         * NEWS: Update.
10758
10759         * socks/geturl.cgi: Simplified command creation, nuked <blink>.
10760
10761         * socks/geturl.cgi: Wrap nutscape extensions within if $netscape.
10762         (cal_time): Fix == to eq.
10763
10764         * socks/geturl.cgi: GPL-ized with permission of A. Rosella.
10765
10766         * geturl.1 (hostname): Moved URL CONVENTIONS to the beginning.
10767
10768         * Makefile.in: Use @VERSION@.
10769
10770         * configure.in: Check version from version.c.
10771
10772         * socks/geturl.cgi: Changed /pub/bin/perl to /usr/bin/perl.
10773
10774         * socks/download.html: Created from download-netscape.html, made
10775         HTML-2.0 compliant.
10776
10777         * recur.c (recursive_retrieve): Set opt.force_dir_hier when
10778         following FTP links from recursions.
10779
10780 1996-07-09  Hrvoje Niksic  <hniksic@srce.hr>
10781
10782         * url.c (mymkdir): Fixed a bug that prevented mymkdir() to create
10783         absolute directories correctly.
10784
10785         * version.c: Changed version to 1.4b14.
10786
10787 1996-07-09  Hrvoje Niksic  <hniksic@srce.hr>
10788
10789         * version.c: "Released" 1.4b13.
10790
10791         * url.c (make_backup): New function.
10792
10793         * http.c (http_loop): Make a backup copy of the local file (using
10794         rename(2)) before opening it.
10795
10796         * main.c (main): Added --backups.
10797
10798         * host.c (ftp_getaddress): Bail out on failed mycuserid().
10799         (ftp_getaddress): Check for leading dot on MY_DOMAIN.
10800         (ftp_getaddress): Check for empty, null or (null) domain.
10801
10802         * url.c (get_urls_html): If this_url is NULL, the base must have a
10803         protocol.
10804         (parseurl): Use has_proto.
10805
10806         * retr.c (retrieve_url): Warn when proxy is used with more than 20
10807         retries.
10808
10809         * url.c (mkstruct): Create the directory (calling mymkdir()) only
10810         if it is not already there.
10811         (has_proto): New function.
10812         (get_urls_html): Eliminate the remaining call to findurl -- use
10813         has_proto.
10814
10815         * geturl.1: Ditto.
10816
10817         * main.c: Change -X to -x.
10818
10819         * url.c (url_filename): Simplify creation of filename if
10820         prefix_files is set.
10821         (url_filename): Simplify everything. And I do mean *everything*.
10822         (mkstruct): Add dir_prefix before hostname.
10823         (path_simplify): Fixed a bug that caused writing outside the path
10824         string in case of "." and ".." path strings.
10825
10826 1996-07-06  Hrvoje Niksic  <hniksic@srce.hr>
10827
10828         * init.c: Added --mirror.
10829
10830         * main.c (main): Added -X to force saving of directory hierarchy.
10831
10832         * ftp.c (ftp_retrieve_list): Added recursion depth counter.
10833         (ftp_retrieve_list): Check whether quota is exceeded.
10834
10835         * url.c (get_urls_html): Skip leading blanks for absolute URIs.
10836
10837         * http.c (gethttp): Use referer if present.
10838
10839         * recur.c (recursive_retrieve): Set u->referer before calling
10840         retrieve_url.
10841
10842         * url.c (newurl): Use memset to nullify the struct members.
10843         (freeurl): Free the referer field too.
10844
10845         * url.h: Added referer to urlinfo.
10846
10847         * geturl.1: Updated the manual to document some of the new features.
10848
10849         * utils.c (numdigit): Moved from url.c.
10850
10851         * README: Rewritten.
10852
10853         * config.h.in: Add the support for socks.
10854
10855         * configure.in: Add the support for socks.
10856
10857         * url.c (url_filename): If the dir_prefix is ".", work with just
10858         the file name.
10859         (url_filename): Do not look for .n extensions if timestamping if
10860         turned on.
10861
10862         * retr.c (show_progress): Skip the over-abundant restval data, and
10863         print the rest of it with ',' instead of '.'.
10864
10865 1996-07-05  Hrvoje Niksic  <hniksic@srce.hr>
10866
10867         * retr.c (show_progress): Changed second arg. to long (as it
10868         should be).
10869         (show_progress): Moved to retr.c.
10870         (get_contents): Moved to retr.c.
10871
10872         * version.c: Change version to 1.4b13.
10873
10874 1996-07-05  Hrvoje Lacko <hlacko@fly.cc.fer.hr>
10875
10876         * url.c (in_acclist): Would return after the first suffix.
10877
10878 1996-07-04  Hrvoje Niksic  <hniksic@srce.hr>
10879
10880         * version.c: "Released" 1.4b12.
10881
10882         * url.c (path_simplify): More kludgifications.
10883         (get_urls_html): Use new parameters for htmlfindurl.
10884
10885         * html.c: Removed memorizing "parser states", since the new
10886         organization does not require them.
10887
10888         * init.c (run_geturlrc): Use read_whole_line.
10889
10890         * ftp-unix.c (ftp_parse_ls): Use read_whole_line.
10891
10892         * recur.c (parse_robots): Use read_whole_line.
10893
10894         * utils.c (read_whole_line): New function.
10895
10896         * recur.c (tried_robots): Use add_slist/in_slist, *much* cleaner.
10897
10898         * host.c (ngethostbyname): Call inet_addr just once. Yet to be
10899         tested on OSF and Ultrix.
10900         (add_hlist): New function.
10901         (free_hlist): New function.
10902         (search_host): New function.
10903         (search_address): New function.
10904         (realhost): Use search_host, search_address and add_hlist.
10905         (same_host): Replaced realloc() with strdupdelim(), made
10906         case-insensitive, fixed a memory leak.
10907
10908         * html.c (ftp_index): Fixed tm_min and tm_sec to be tm_hour and
10909         tm_min, like intended.
10910
10911         * version.c: Change user agent information to
10912         Geturl/version.
10913
10914 1996-07-03  Hrvoje Niksic  <hniksic@srce.hr>
10915
10916         * utils.c: Renamed nmalloc.c to utils.c, .h likewise.
10917
10918         * url.c (acceptable): Always accept directories.
10919
10920         * ftp-unix.c (ftp_parse_ls): Support brain-damaged "ls -F"-loving
10921         servers by stripping trailing @ from symlinks and trailing / from
10922         directories.
10923
10924         * ftp.c (ftp_loop): Debugged the "enhanced" heuristics. :-)
10925
10926         * url.c (skip_url): Use toupper instead of UCASE.
10927
10928         * host.c (sufmatch): Made it case-insensitive.
10929
10930         * url.c (match_backwards_or_pattern): Fixed i == -1 to j == -1.
10931         (match_backwards): New function, instead of
10932         match_backwards_or_pattern.
10933
10934         * recur.c (recursive_retrieve): Increased performance by
10935         introducing inl, which reduces number of calls to in_slist to only
10936         one.
10937
10938         * ftp.c (ftp_loop): Enhanced the heuristics that decides which
10939         routine to use.
10940
10941         * main.c (printhelp): Removed the warranty stuff.
10942
10943 1996-07-02  Hrvoje Niksic  <hniksic@srce.hr>
10944
10945         * url.c (add_slist): Simplify.
10946         (match_backwards_or_pattern): New function.
10947         (in_acclist): Use match_backwards_or_pattern.
10948         (matches): Remove.
10949
10950 1996-06-30  Hrvoje Niksic  <hniksic@srce.hr>
10951
10952         * ftp.c (ftp_loop): Call ftp_index on empty file names, if not
10953         recursive.
10954
10955         * html.c (ftp_index): Fixed to work. Beautified the output.
10956
10957         * ftp.c (ftp_retrieve_glob): Another argument to control whether
10958         globbing is to be used.
10959         (ftp_retrieve_list): Compare the time-stamps of local and remote
10960         files to determine whether to download.
10961
10962 1996-06-29  Hrvoje Niksic  <hniksic@srce.hr>
10963
10964         * ftp.c (rel_constr): New function.
10965
10966         * retr.c (retrieve_from_file): Check for text/html before
10967         retrieving recursively.
10968
10969         * main.c (main): Check whether the file is HTML before going into
10970         recursive HTML retrieving.
10971
10972         * ftp.c (ftp_retrieve_list): Manage directories.
10973         (ftp_retrieve_glob): Pass all the file-types to ftp_retrieve_list.
10974         (ftp_1fl_loop): Fixed a bug that caused con->com to be incorrectly
10975         initialized, causing bugchecks in getftp to fail.
10976
10977         * configure.in: Check for symlink.
10978
10979         * ftp.c (ftp_retrieve_list): Added support for symlinks.
10980
10981         * version.c: "Released" 1.4b10.
10982
10983         * atotm.c (atotm): Redeclared as time_t.
10984
10985         * init.c: New variable "timestamping".
10986
10987         * main.c (main): New option 'N'.
10988
10989         * http.c (hgetlocation): Case-insensitive match.
10990         (hgetmodified): New function.
10991         (http_loop): Implement time-stamping.
10992
10993 1996-06-28  Hrvoje Niksic  <hniksic@srce.hr>
10994
10995         * version.c: Changed version to 1.4b10
10996
10997         * atotm.c: New file, from phttpd.
10998
10999         * options.h (struct options): New parameter timestamping.
11000
11001         * version.c: 1.4b9 "released".
11002
11003         * recur.c (recursive_retrieve): Used linked list (ulist) for
11004         faster storing of URLs.
11005
11006         * url.c (get_urls_html): Removed the old kludge with comparing the
11007         outputs of htmlfindurl and findurl.
11008         (get_urls_html): Added better protocol support here.
11009         (create_hash): Removed, as well as add_hash and in_hash.
11010         (addslist): New function.
11011         (in_slist): ditto
11012
11013         * version.c: Released 1.4b8, changed version to b9.
11014
11015 1996-06-27  Hrvoje Niksic  <hniksic@srce.hr>
11016
11017         * ftp.c (freefileinfo): New function.
11018         (delelement): New function.
11019
11020         * everywhere: GPL!
11021
11022         * ftp.c (ftp_loop): Use ccon.
11023         (ftp_retrieve_glob): Likewise.
11024
11025         * ftp.h: Define ccon, to define status of control connection.
11026
11027         * ftp.c (ftp_get_listing): New function.
11028         (ftp_retrieve_more): New function.
11029         (ftp_retrieve_glob): New function.
11030
11031 1996-06-25  Hrvoje Niksic  <hniksic@srce.hr>
11032
11033         * configure.in: Removed the search for cuserid().
11034
11035         * init.c (getmode): Renamed to getperms.
11036
11037 1996-06-24  Hrvoje Niksic  <hniksic@srce.hr>
11038
11039         * version.c: New version.
11040
11041         * main.c (hangup): New function, that handles hangup. Hangup
11042         signal now causes geturl to stop writing on stdout, and to write
11043         to a log file.
11044
11045         * ftp.c (getftp): "Released" 1.4b7.
11046
11047         * html.c (htmlfindurl): Ignore everything inside <head>...</head>.
11048         (ftp_index): Use fileinfo/urlinfo.
11049
11050         * ftp-unix.c (ftp_parse_ls): New function.
11051         (symperms): New function.
11052
11053         * ftp.c (ftp_1fl_loop): New function, to handle 1-file loops.
11054
11055         * retr.c (retrieve_url): Added FTP support.
11056
11057 1996-06-23  Hrvoje Niksic  <hniksic@srce.hr>
11058
11059         * geturl.h: Removed NOTFTP2HTML enum.
11060         Added DO_LOGIN, DO_CWD and DO_LIST. LIST_ONLY is obsolete.
11061
11062         * ftp.c (getftp): Resynched with urlinfo.
11063         (getftp): Removed HMTL-ization of index.html from getftp.
11064
11065         * version.c: 1.4b6 "released".
11066
11067         * options.h (options): New struct, to keep options in.
11068
11069         * http.c (http_loop,gethttp): Synched with proxy.
11070
11071         * retr.c (retrieve_url): Implemented proxy retrieval.
11072
11073         * main.c (main): Use retrieve_from_file.
11074
11075 1996-06-22  Hrvoje Niksic  <hniksic@srce.hr>
11076
11077         * retr.c (retrieve_from_file): New function.
11078
11079         * url.c (parseurl): Modified to return URLOK if all OK. Protocol
11080         can be found in u->proto.
11081
11082         * ftp.c (ftp_response): Fixed to accept multi-line responses as
11083         per RFC 959.
11084
11085         * recr.c (recursive_retrieve): Take newloc from retrieve_url.
11086
11087         * url.c (mymkdir): Removed the file of the same name, if one
11088         exists.
11089         (isfile): New function.
11090         (mkstruct): Fixed the '/' glitches.
11091         (path_simplify): Hacked to treat something/.. correctly.
11092
11093 1996-06-21  Hrvoje Niksic  <hniksic@srce.hr>
11094
11095         * http.c (gethttp): Close the socket after error in headers.
11096         (http_loop): HEOF no longer a fatal header.
11097
11098         * loop.c (retrieve_url): When dt is NULL, do not modify it. This
11099         simplifies the syntax of calling retrieve_url.
11100
11101         * recr.c (recursive_retrieve): Modified to use get_urls_html.
11102
11103         * url.c (get_urls_file): New function.
11104         (get_urls_html): New function.
11105
11106         * recr.c (recursive_retrieve): Patched up to conform to the
11107         standards.
11108
11109         * http.c (gethttp): Synched with the rest...
11110         (gethttp): Treat only CONREFUSED specially, with connection
11111         errors.
11112
11113         * init.c,geturl.1,http.c (http_loop): Removed kill_error.
11114
11115 1996-06-20  Hrvoje Niksic  <hniksic@srce.hr>
11116
11117         * http.c (http_loop): New function.
11118
11119         * loop.c: Removed *lots* of stuff from retrieve_url.
11120
11121         * url.c (parseurl): Changed to work with urlinfo. Integrated
11122         username finding and path parsing.
11123         (newurl): New function.
11124         (freeurl): New function.
11125         (mkstruct): Removed the old bogosities, made it urlinfo-compliant.
11126         (url_filename): Likewise.
11127         (path_simplify): Accept relative paths too.
11128         (opt_url): Made urlinfo-compliant, removed bogosities.
11129         (path_simplify): Expanded to accept relative paths.
11130         (str_url): A replacement for hide_url
11131         (decode_string): Fixed a bug that caused malfunctioning when
11132         encountering an illegal %.. combination.
11133         (opt_url): Removed the argument. Dot-optimizations are now default.
11134
11135         * nmalloc.c (strdupdelim): New function.
11136
11137         * url.h: Added the urlinfo structure
11138
11139 1996-06-19  Hrvoje Niksic  <hniksic@srce.hr>
11140
11141         * url.c (hide_url): Thrown out the protocol assertion. Do not
11142         change the URL if the protocol if not recognized.
11143         (findurl): Put continue instead of break.
11144
11145 1996-06-18  Hrvoje Niksic  <hniksic@srce.hr>
11146
11147         * sample.geturlrc: Changed the defaults to be commented out and
11148         harmless (previous defaults caused pains if copied to
11149         ~/.geturlrc).
11150
11151         * http.c (gethttp): Print the HTTP request in debug mode.
11152
11153         * connect.c (iread): Added EINTR check loop to select-ing
11154         too. EINTR is now correctly handled with select().
11155
11156         * TODO: new file
11157
11158 1996-05-07  Hrvoje Niksic  <hniksic@srce.hr>
11159
11160         * host.c (same_host): Made the function a little bit more
11161         intelligent regarding diversified URL syntaxes.
11162
11163         * url.c (skip_url): Spaces are now skipped after URL:
11164
11165         * Released 1.3.1 with the patch to prevent crashing when sending
11166         NULL to robot* functions and the patch to compile "out of the box"
11167         on AIX.
11168
11169         * recr.c (recursive_retrieve): Added checking whether this_url is
11170         NULL when calling the robot functions.
11171
11172         * ChangeLog: New file.