]> sjero.net Git - wget/blob - src/ChangeLog
c0d3258fded5582fcb2c24082790830d7db13841
[wget] / src / ChangeLog
1 2004-11-18  Hans-Andreas Engel <engel@node.ch>
2
3         * http.c: Enable --convert-links (-k) when a single page is downloaded
4         via --output-document (-O).
5
6 2004-11-18  Mauro Tortonesi <mauro@deepspace6.net>
7
8         * connect.c: Minor correction to the comment in front of fd_peek.
9
10 2004-11-18  Leonid Petrov <nouser@lpetrov.net>
11
12         * retr.c: Fix a timeout problem in fd_read_body when using http_proxy.
13
14 2004-11-15  YAMAZAKI Makoto <Yamazaki.Makoto@fujixerox.co.jp>
15
16         * netrc.c: Fix termination by assertion bug in netrc parsing.
17
18 2004-05-09  David Fritz  <zeroxdf@att.net>
19
20         * mswindows.c (fake_fork): Pass entire command line to the child
21         process.
22
23 2004-03-31  Hrvoje Niksic  <hniksic@xemacs.org>
24
25         * http.c (gethttp): Fix typo: SCHEME_SSL -> SCHEME_HTTPS.
26
27 2004-03-30  Hrvoje Niksic  <hniksic@xemacs.org>
28
29         * http.c (gethttp): Send the Proxy-Authorization header over
30         non-SSL connections too.
31
32 2004-03-25  David Fritz  <zeroxdf@att.net>
33
34         * mswindows.c (fake_fork_child): Ignore error code when
35         OpenFileMapping() fails; assume it failed because the object does
36         not exist.
37
38 2004-03-24  David Fritz  <zeroxdf@att.net>
39
40         * mswindows.c (fake_fork): New function.
41
42         * mswindows.c (fork_to_background): Use it.
43
44 2004-03-19  David Fritz  <zeroxdf@att.net>
45
46         * mswindows.c (ws_hangup): Incorporate old fork_to_background()
47         code.  Add event name argument.
48         (fork_to_backgorund): Now a simple wrapper around ws_hangup().
49         (ws_handler): Correctly handle the case when neither CTRLC_BACKGND
50         nor CTRLBREAK_BACKGND are defined.  Don't bother handling close,
51         logoff, or shutdown events.  Call ws_hangup() with the correct
52         event name; don't assume it was CTRL+Break.
53
54 2004-03-19  Hrvoje Niksic  <hniksic@xemacs.org>
55
56         * url.c (url_parse): Decode %HH sequences in host name.
57
58 2004-03-04  Hrvoje Niksic  <hniksic@xemacs.org>
59
60         * convert.c (local_quote_string): Quote "#" as "%23" and "%" as
61         "%25" when creating links to local files.
62
63 2004-03-02  David Fritz  <zeroxdf@att.net>
64
65         * mswindows.c (ws_percenttitle): Guard against future changes by
66         doing nothing if the proper variables have not been initialized.
67         Clamp percentage value.
68
69 2004-03-04  Gisle Vanem  <giva@bgnett.no>
70
71         * retr.c (fd_read_body): Don't change console title if quiet.
72
73 2004-02-25  David Fritz  <zeroxdf@att.net>
74
75         * mswindows.c (set_sleep_mode): Remove argument and return value.
76         Call GetModuleHandle() instead of LoadLibrary()/FreeLibrary() for
77         kernel32.dll.  Use typedef for function-pointer.  Don't cast
78         l-value.  Don't use dereference operator when calling through
79         function-pointer.
80         (ws_startup): Update call to set_sleep_mode().
81         (ws_cleanup): Remove call to set_sleep_mode().
82
83 2004-02-23  David Fritz  <zeroxdf@att.net>
84
85         * http.c (http_loop): Ditto.
86
87         * ftp.c (ftp_loop_internal): Update call to ws_changetitle().
88
89         * main.c (main): Don't bother calling ws_changetitle().
90
91         * mswindows.h (ws_changetitle): Update prototype.
92
93         * mswindows.c (ws_changetitle): Remove second argument.  Use
94         xfree_null().
95         (ws_percenttitle): Only update title when percentage has changed.
96
97 2004-02-23  David Fritz  <zeroxdf@att.net>
98
99         * mswindows.h: Ditto.
100
101         * mswindows.c: Misc. formatting/comment tweaks throughout.
102
103 2004-02-20  David Fritz  <zeroxdf@att.net>
104
105         * main.c (print_help): Remove call to ws_help().
106
107         * mswindows.c (ws_help): Remove.
108
109         * mswindows.h (ws_help): Remove.
110
111 2004-02-16  David Fritz  <zeroxdf@att.net>
112
113         * init.c (home_dir): Use aprintf() instead of xmalloc()/sprintf().
114         Under Windows, if $HOME is not defined, use the directory that
115         contains the Wget binary instead of hard-coded `C:\'.
116         (wgetrc_file_name): Under Windows, look for $HOME/.wgetrc then, if
117         not found, look for wget.ini in the directory of the Wget binary.
118
119         * mswindows.c (ws_mypath): Employ slightly more robust methodology.
120         Strip trailing path separator.
121
122 2004-02-06  Hrvoje Niksic  <hniksic@xemacs.org>
123
124         * http.c (gethttp): Respect --ignore-length.
125         (gethttp): Inhibit keep-alive if --ignore-length is specified.
126
127 2004-02-06  Hrvoje Niksic  <hniksic@xemacs.org>
128
129         * connect.c (sockaddr_set_data): Zero out
130         sockaddr_in/sockaddr_in6.  Apparently BSD-derived stacks need this
131         when binding a socket to local address.
132
133 2004-02-04  Hrvoje Niksic  <hniksic@xemacs.org>
134
135         * hash.c: Make the file compilable outside Wget source tree when
136         -DSTANDALONE is used.
137
138 2004-01-29  Hrvoje Niksic  <hniksic@xemacs.org>
139
140         * utils.c (determine_screen_width): Return 0 if not running on
141         Windows or on a TIOCGWINSZ-capable system.
142
143 2004-01-28  David Fritz  <zeroxdf@att.net>
144
145         * utils.c (determine_screen_width): Correctly determine console
146         width under Windows.
147
148 2004-01-28  Christian Biere  <christianbiere@gmx.de>
149
150         * progress.c (bar_set_params): Fixed syntax error when HAVE_ISATTY
151         was undefined.
152
153         * ftp.c (ftp_loop_internal): Allocate a larger buffer in case
154         "try" gets translated to something large.  Ditto in http_loop in
155         http.c.
156
157         * http.c (response_header_copy): Don't write to buf[BUFSIZE].
158
159         * ftp-opie.c (skey_response): Eliminate unnecessary string
160         concatenation; just call gen_md5_update twice.
161
162 2004-01-25  Hrvoje Niksic  <hniksic@xemacs.org>
163
164         * utils.c (xsleep): Don't call usleep with values larger than
165         1,000,000.
166
167 2003-12-16  Hrvoje Niksic  <hniksic@xemacs.org>
168
169         * http.c (gethttp): Fix generation of `Content-Length'.
170
171 2003-12-15  Gisle Vanem  <giva@bgnett.no>
172
173         * url.c (url_skip_credentials): Fixed return value; 'url' if no
174         credentials.
175
176 2003-12-14  Hrvoje Niksic  <hniksic@xemacs.org>
177
178         * url.c (url_skip_credentials): Return a pointer directly.
179
180 2003-12-14  Hrvoje Niksic  <hniksic@xemacs.org>
181
182         * url.c (url_file_name): Ditto.
183         (parse_errors): Ditto.
184
185         * retr.c (retr_rate): Ditto.
186
187         * progress.c (create_image): Ditto.
188
189         * netrc.c (parse_netrc): Ditto.
190
191         * main.c (struct cmdline_option): Ditto.
192         (redirect_output_signal): Ditto.
193
194         * init.c (commands): Ditto.
195
196         * ftp-ls.c (ftp_index): Ditto.
197
198         * cookies.c (check_domain_match): Declare the pointer to a literal
199         string as `const'.
200
201 2003-12-12  Hrvoje Niksic  <hniksic@xemacs.org>
202
203         * retr.c (fd_read_body): Pass total size to progress_create, not
204         the remaining amount.
205
206 2003-12-12  Hrvoje Niksic  <hniksic@xemacs.org>
207
208         * retr.c (fd_read_body): Don't fiddle with "interactive timeout"
209         if read timeout is unset.
210
211 2003-12-12  Hrvoje Niksic  <hniksic@xemacs.org>
212
213         * connect.c (bind_local): Don't set the IPV6_V6ONLY option on the
214         socket.
215
216 2003-12-06  Hrvoje Niksic  <hniksic@xemacs.org>
217
218         * url.c (url_file_name): Respect the setting of
219         opt.protocol_directories.
220
221         * main.c (main): Only check for ret=='?' when longindex is unset.
222         (option_data): New option --protocol-directories.
223
224 2003-12-06  Hrvoje Niksic  <hniksic@xemacs.org>
225
226         * ftp.c (getftp): Ditto.
227
228         * http.c (gethttp): Correctly calculate bandwidth as total data
229         read divided with download time.
230
231         * retr.c (fd_read_body): Separate the return values for data
232         written and read.
233
234 2003-12-05  Hrvoje Niksic  <hniksic@xemacs.org>
235
236         * http.c (H_REDIRECTED): Respect the HTTP/1.1 "303 See Other"
237         response code.
238         Suggested by Dan Razzell.
239
240 2003-11-30  Hrvoje Niksic  <hniksic@xemacs.org>
241
242         * retr.c (fd_read_body): Report the amount of data *written* as
243         amount_read.  This is not entirely logical, but that's what the
244         callers expect, and it's not easy to change.
245
246         * ftp.c (ftp_loop_internal): Ditto.
247
248         * http.c (http_loop): Be smarter about assigning restval; if we're
249         in the nth pass of a download, simply use the information we have
250         about how much data has been retrieved as restval.
251
252         * ftp.c (getftp): Ditto for FTP "REST" command.
253
254         * http.c (gethttp): When the server doesn't respect range, skip
255         the first RESTVAL bytes of the read body.  Never truncate the
256         output file.
257
258         * retr.c (fd_read_body): Support skipping initial STARTPOS octets.
259
260 2003-11-30  Hrvoje Niksic  <hniksic@xemacs.org>
261
262         * http.c (skip_short_body): Renamed skip_body to skip_short_body;
263         don't bother calling fd_read_body.
264
265 2003-11-30  Hrvoje Niksic  <hniksic@xemacs.org>
266
267         * retr.c (fd_read_body): Sanitize arguments and document them
268         better.  Make sure the timer is created and updated only if
269         necessary.  Updated callers.
270
271 2003-11-30  Hrvoje Niksic  <hniksic@xemacs.org>
272
273         * http.c (skip_body): New function.
274         (gethttp): Use it to skip the body of the responses we don't care
275         to download.  That allows us to reuse the connection.
276         (gethttp): Trust that the HEAD requests will not generate body
277         data.
278
279         * retr.c (fd_read_body): Don't write to OUT if it's NULL.
280
281 2003-11-29  Hrvoje Niksic  <hniksic@xemacs.org>
282
283         * http.c (gethttp): Initialize SSL only the first time when SSL
284         URL is downloaded.
285
286 2003-11-29  Hrvoje Niksic  <hniksic@xemacs.org>
287
288         * cookies.c (cookie_header): Only generate the contents of the
289         header, not the leading "Cookie: " or the trailing "\r\n".
290
291         * http.c (gethttp): When adding headers specified with `--header',
292         allow them to override the headers generated by Wget.
293
294         * init.c (cmd_spec_header): Made opt.user_headers a vector.
295
296         * http.c (request_new): New function.  Returns a request structure
297         which can be modified in various ways, most notably by adding HTTP
298         headers to the request.
299         (request_set_header): New function for adding the header to the
300         request.  If the header is already available, it gets replaced.
301         (request_send): Construct and send the request.
302         (gethttp): Use the request_* functions to generate the request.
303
304 2003-11-28  Hrvoje Niksic  <hniksic@xemacs.org>
305
306         * http.c (gethttp): Don't include the Proxy-Authorization header
307         in the request tunneled through proxy.
308
309 2003-11-28  Hrvoje Niksic  <hniksic@xemacs.org>
310
311         * http.c (gethttp): Use the CONNECT handle to establish SSL
312         passthrough through non-SSL proxies.
313
314 2003-11-28  Hrvoje Niksic  <hniksic@xemacs.org>
315
316         * init.c: Don't #include netinet/Winsock stuff.
317
318 2003-11-28  Hrvoje Niksic  <hniksic@xemacs.org>
319
320         * http.c: Deleted the old functions header_process,
321         header_extract_number, header_exists, header_strdup,
322         http_process_range, http_process_none, http_process_type, and
323         http_process_connection.
324
325         * http.c (response_new): New function.
326         (response_header_bounds): Ditto.
327         (response_header_copy): Ditto.
328         (response_header_strdup): Ditto.
329         (response_status): Ditto.
330         (gethttp): Use the new response_* functions to parse the response.
331         Support HTTP/0.9 responses.
332
333 2003-11-27  Hrvoje Niksic  <hniksic@xemacs.org>
334
335         * progress.c (create_image): Don't calculate ETA if nothing has
336         been downloaded yet, because it causes division by zero.
337
338 2003-11-27  Hrvoje Niksic  <hniksic@xemacs.org>
339
340         * connect.c (bind_local): Rename sa_len to addrlen because IRIX
341         headers define sa_len as a macro.
342
343 2003-11-26  Hrvoje Niksic  <hniksic@xemacs.org>
344
345         * html-parse.c (convert_and_copy): Remove embedded newlines when
346         AP_TRIM_BLANKS is specified.
347
348 2003-11-26  Hrvoje Niksic  <hniksic@xemacs.org>
349
350         * ftp.c: Set con->csock to -1 where rbuf_uninitialize was
351         previously used.
352
353 2003-11-26  Hrvoje Niksic  <hniksic@xemacs.org>
354
355         * Makefile.in (http$o): Added the trailing backslash that was
356         missing.
357
358 2003-11-21  Hrvoje Niksic  <hniksic@xemacs.org>
359
360         * headers.c: Removed.  The file is no longer relevant, now that no
361         special handling of headers is done by the rbuf code.  Moved
362         portions to http.c.
363
364 2003-11-21  Hrvoje Niksic  <hniksic@xemacs.org>
365
366         * rbuf.c: Removed.
367
368         * ftp-basic.c (ftp_response): Use fd_read_line.  No longer use
369         struct rbuf.  Updated all callers.
370
371         * http.c (gethttp): Use fd_read_head to read all the headers in
372         one go.
373         (next_header): New function.
374
375         * retr.c (fd_read_line): New function: reads a line from FD,
376         leaving the rest of the data unread.
377         (fd_read_head): New function.
378
379         * connect.c (fd_peek): New function, implements peeking.
380         (poll_internal): New function.
381         (fd_read): Use it.
382         (fd_write): Ditto.
383         (fd_peek): Ditto.
384         (fd_register_transport): Allow registering a "peeker" callback.
385
386 2003-11-20  Hrvoje Niksic  <hniksic@xemacs.org>
387
388         * connect.c: Renamed xread/xwrite/xclose to
389         fd_read/fd_write/fd_close.  The "x" prefix is not appropriate
390         because the semantics have diverged from read/write/close too
391         significantly.  Updated all callers.
392
393 2003-11-20  Hrvoje Niksic  <hniksic@xemacs.org>
394
395         * connect.c (sock_write): It's not necessary to initialize RES.
396
397 2003-11-19  Hrvoje Niksic  <hniksic@xemacs.org>
398
399         * main.c (main): Don't reference opt.ipv4_only and opt.ipv6_only
400         if IPv6 is disabled.
401
402 2003-11-19  Hrvoje Niksic  <hniksic@xemacs.org>
403
404         * connect.c (socket_has_inet6): Only compile it if IPv6 is enabled
405         and AI_ADDRCONFIG is missing.
406
407 2003-11-18  Hrvoje Niksic  <hniksic@xemacs.org>
408
409         * gen_sslfunc.c (ssl_init_prng): Warn the user when using a weak
410         random seed.
411
412 2003-11-18  Hrvoje Niksic  <hniksic@xemacs.org>
413
414         * host.c (address_list_contains): Renamed address_list_find to
415         address_list_contains because its result is boolean.
416
417 2003-11-18  Hrvoje Niksic  <hniksic@xemacs.org>
418
419         * connect.c (select_fd): Return 1 if select is not available.
420
421 2003-11-17  Hrvoje Niksic  <hniksic@xemacs.org>
422
423         * connect.c (connect_to_host): Don't reference address list after
424         releasing it.
425
426 2003-11-17  Hrvoje Niksic  <hniksic@xemacs.org>
427
428         * main.c (print_help): Fix alignment of FTP options output.
429
430 2003-11-17  Hrvoje Niksic  <hniksic@xemacs.org>
431
432         * host.c (lookup_host): Check for the ability to create IPv6
433         sockets here.
434
435         * init.c (defaults): Don't auto-set --inet4-only on IPv6-less
436         systems.
437
438 2003-11-16  Hrvoje Niksic  <hniksic@xemacs.org>
439
440         * main.c (print_help): Fix typo in `-O' help message.  Fix docs of
441         -Y/--proxy.  Fix docs of `--cookies' and `--glob'.  Improve docs
442         of --convert-links.  Fix docs of SSL options.
443
444 2003-11-16  Hrvoje Niksic  <hniksic@xemacs.org>
445
446         * ftp-basic.c: Don't include <arpa/inet.h> and others because
447         they're no longer needed.
448
449 2003-11-16  Hrvoje Niksic  <hniksic@xemacs.org>
450
451         * main.c (main): Don't allow setting of both opt.ipv4_only and
452         opt.ipv6_only.
453
454         * init.c (defaults): Mark opt.ipv4_only specially when set
455         automatically.
456
457 2003-11-15  Hrvoje Niksic  <hniksic@xemacs.org>
458
459         * host.c (lookup_host): Use AI_ADDRCONFIG only if the family is
460         unspecified.  This ensures that specifying `--no-inet4' on systems
461         where IPv6 resolves, but doesn't work behaves the same regardless
462         of the availability of AI_ADDRCONFIG.
463
464 2003-11-15  Hrvoje Niksic  <hniksic@xemacs.org>
465
466         * host.c: Don't refer to the now-removed function
467         forget_host_lookup in the documentation of lookup_host.
468
469 2003-11-15  Hrvoje Niksic  <hniksic@xemacs.org>
470
471         * http.c (persistent_available_p): Correctly specify the endpoint
472         argument to socket_ip_address.
473         (gethttp): When printing the "reusing connection to..." message,
474         specify the host name of the reused connection, not the current
475         host name.  That makes more sense because it provides a useful
476         piece of information -- we know to which host we're supposed to
477         connect anyway!
478
479 2003-11-15  Hrvoje Niksic  <hniksic@xemacs.org>
480
481         * init.c: Make sure the options are in alphabetic order!
482
483         * host.c (lookup_host): Merge lookup_host_passive and lookup_host
484         after all -- having both would result in some code duplication.
485         (lookup_host): Set hints.ai_family to AF_INET if ipv4_only is
486         requested.  Likewise, set it to AF_INET6 for ipv6_only.  Specify
487         AI_ADDRCONFIG where available.
488         (lookup_host): New flag LH_REFRESH that specifies that a cached
489         entry for HOST should be refreshed.
490         (cache_query): New function.
491         (cache_store): Ditto.
492         (cache_remove): Ditto.
493         (forget_host_lookup): No longer necessary, replaced with static
494         function cache_remove.
495
496 2003-11-14  Hrvoje Niksic  <hniksic@xemacs.org>
497
498         * main.c: Enable -4 and -6 only if IPv6 is enabled.
499
500 2003-11-14  Hrvoje Niksic  <hniksic@xemacs.org>
501
502         * connect.c (register_transport): Renamed from register_extended.
503         Explain the intended usage.
504
505 2003-11-14  Hrvoje Niksic  <hniksic@xemacs.org>
506
507         * url.c (uri_merge): Merging "foo" and "bar" should result in
508         "bar", not in "foo/bar".
509         (path_simplify): Don't remove empty path elements; don't
510         special-case leading slash.
511         (path_simplify): Don't swallow ".."'s at the beginning of string.
512         E.g. simplify "foo/../../bar" as "../bar", not as "bar".
513         (append_uri_pathel): Defang ".." path element upon encountering
514         it.
515
516 2003-11-13  Hrvoje Niksic  <hniksic@xemacs.org>
517
518         * http.c (persistent_available_p): Don't attempt to talk to two
519         different SSL sites over the same secure connection.
520
521 2003-11-13  Hrvoje Niksic  <hniksic@xemacs.org>
522
523         * http.c (gethttp): Ditto.
524
525         * ftp.c (getftp): Use retryable_socket_connect_error instead of
526         CONNECT_ERROR.
527
528         * wget.h (CONNECT_ERROR): Removed.
529
530         * connect.c (retryable_socket_connect_error): New function instead
531         of unsupported_socket_family_error.
532
533 2003-11-13  Hrvoje Niksic  <hniksic@xemacs.org>
534
535         * wget.h (CONNECT_ERROR): Use it.
536
537         * connect.c (unsupported_socket_family_error): New function.
538
539 2003-11-13  Hrvoje Niksic  <hniksic@xemacs.org>
540
541         * connect.c (bind_local): Renamed bindport to bind_local; return
542         the socket directly.  Updated callers.
543         (accept_connection): Renamed acceptport to accept_connection;
544         return the created socket directly.  Updated callers.
545
546 2003-11-13  Hrvoje Niksic  <hniksic@xemacs.org>
547
548         * init.c (defaults): Turn on opt.ipv4_only if we're compiling with
549         IPv6, and AI_ADDRINFO is not available, and AF_INET6 sockets can't
550         be created.
551
552 2003-11-13  Hrvoje Niksic  <hniksic@xemacs.org>
553
554         * host.c (lookup_host): Document the fact that the addresses are
555         returned in order.
556
557 2003-11-12  Hrvoje Niksic  <hniksic@xemacs.org>
558
559         * utils.c: Use limits.h only where available.
560
561         * hash.c: Use INVALID_PTR and INVALID_PTR_BYTE.  Include limits.h.
562
563 2003-11-11  Hrvoje Niksic  <hniksic@xemacs.org>
564
565         * main.c: Added options --inet4-only and --inet6-only.
566
567 2003-11-11  Hrvoje Niksic  <hniksic@xemacs.org>
568
569         * host.c (host_errstr): Use the more standard message "Unknown
570         host".
571
572 2003-11-10  Hrvoje Niksic  <hniksic@xemacs.org>
573
574         * connect.c (connect_to_host): Use that flag to decide whether to
575         re-resolve the host name.
576
577         * host.c (struct address_list): Added a flag that maintains
578         whether the connection worked at some point.
579
580 2003-11-10  Hrvoje Niksic  <hniksic@xemacs.org>
581
582         * host.c (lookup_host): Special-case the numeric addresses only in
583         the non-IPv6 case.
584
585 2003-11-10  Hrvoje Niksic  <hniksic@xemacs.org>
586
587         * connect.c (resolve_bind_address): Call lookup_host_passive.
588         Make sure that opt.bind_address is resolved only once.
589
590         * host.c (lookup_host_passive): New function, handles "passive"
591         lookups.
592         (lookup_host): Remove the passive flags.  Remove the
593         family-related flags -- use ip_default_family instead.
594
595 2003-11-09  Hrvoje Niksic  <hniksic@xemacs.org>
596
597         * html-url.c: Get URLs from <object data="...">.
598
599 2003-11-09  Hrvoje Niksic  <hniksic@xemacs.org>
600
601         * main.c (option_data): Specify the command to use for --mirror.
602
603 2003-11-08  Hrvoje Niksic  <hniksic@xemacs.org>
604
605         * cookies.c (cookie_handle_set_cookie): Specify exact match for
606         unspecified domains.
607
608 2003-11-08  Hrvoje Niksic  <hniksic@xemacs.org>
609
610         * main.c (main): Removed one-letter options `-C', `-g', `-G', and
611         `-s'.
612
613 2003-11-08  Hrvoje Niksic  <hniksic@xemacs.org>
614
615         * main.c (main): Add --dont-remove-listing for backward
616         compatibility with previous versions.
617         (print_help): Fix typo, spotted by Dennis Smit.
618
619 2003-11-08  Gisle Vanem  <giva@bgnett.no>
620
621         * ftp-basic.c: Support Windows-2000 ftp servers. Win-2000 *is*
622         Win-NT 5.0 so calling it ST_WINNT is okay I guess.
623
624 2003-11-08  Hrvoje Niksic  <hniksic@xemacs.org>
625
626         * progress.c (update_speed_ring): Clear the speed ring when the
627         download stalls.
628
629         * retr.c (get_contents): Specify 0.95s read timeout, so that the
630         progress gauge can be updated even when data arrives very slowly
631         or stalls.
632
633 2003-11-08  Hrvoje Niksic  <hniksic@xemacs.org>
634
635         * utils.c (wtimer_allocate): Bless the use of wtimer_read on a
636         timer that has merely been allocated because get_contents() does
637         that.
638         (wtimer_update): Abort if the timer is not initialized.
639
640 2003-11-08  Hrvoje Niksic  <hniksic@xemacs.org>
641
642         * retr.c (get_contents): Pass the timer to limit_bandwidth().
643
644         * utils.c (wtimer_update): New function instead of wget_elapsed;
645         just update the timer, but don't return anything.
646         (wtimer_read): Read and return the last known value of the timer.
647
648 2003-11-08  Hrvoje Niksic  <hniksic@xemacs.org>
649
650         * http.c (persistent_available_p): Instead of matching all the
651         addresses of HOST and last host, determine the peer's IP address
652         with socket_ip_address and see if that address is one of those
653         HOST resolves to.
654
655         * host.c (address_list_match_all): Removed.
656         (address_list_find): New function, finds an IP address in the
657         address list.
658
659         * ftp.c (ftp_do_pasv): Get the peer's address here, and pass it to
660         ftp_epsv so it doesn't need to call getpeername.
661
662         * ftp-basic.c (ftp_port): Use socket_ip_address instead of
663         getpeername.
664         (ftp_lprt): Ditto.
665
666         * connect.c (socket_ip_address): Replaces conaddr, generalized to
667         either get peer's or local address.
668         (sockaddr_get_data): Made local to this file.
669
670 2003-11-08  Hrvoje Niksic  <hniksic@xemacs.org>
671
672         * hash.c (HASH_POSITION): Explicitly accept the hash function.
673         (grow_hash_table): Extract ht->hash_function outside the loop.
674         (hash_table_remove): Ditto.
675         (hash_table_clear): Fill entries with 0xff to clear them.
676         (hash_table_remove): Mark entries as deleted with the correct
677         marker.
678
679 2003-11-08  Hrvoje Niksic  <hniksic@xemacs.org>
680
681         * http.c (persistent_available_p): No reason for the host lookup
682         to be silent -- it's a lookup like any other.
683
684 2003-11-08  Hrvoje Niksic  <hniksic@xemacs.org>
685
686         * connect.c (register_extended): Check that fd >= 0.
687
688 2003-11-07  Hrvoje Niksic  <hniksic@xemacs.org>
689
690         * connect.c (LAZY_RETRIEVE_INFO): Set LAST_INFO.
691
692 2003-11-07  Hrvoje Niksic  <hniksic@xemacs.org>
693
694         * hash.c (NON_EMPTY): Use the all-bit-set value as the marker that
695         the field is empty.  This allows NULL pointer and 0 value to be
696         used as keys, which is necessary for the connect.c code to work
697         when fd==0.
698         (hash_table_new): Fill mappings with 0xff.
699         (grow_hash_table): Ditto.
700
701 2003-11-07  Hrvoje Niksic  <hniksic@xemacs.org>
702
703         * url.c (url_parse): Allow empty ports.
704
705 2003-11-07  Hrvoje Niksic  <hniksic@xemacs.org>
706
707         * main.c (print_help): Break the help string into multiple chunks.
708         (cmdline_option): New option handler OPT_FUNCALL.  Generalized
709         HANDLE_CMD to generic DATA.
710         (option_data): Use the new OPT_FUNCALL feature.
711
712 2003-11-06  Hrvoje Niksic  <hniksic@xemacs.org>
713
714         * log.h: Declare log_init, log_close, and
715         log_request_redirect_output here.
716
717 2003-11-05  Dennis Smit  <ds@nerds-incorporated.org>
718
719         * main.c: (main): added --preserve-permissions option.
720
721         * ftp.c (ftp_retrieve_list): added support for
722         --preserve-permissions option.
723
724         * init.c: added support for --preserve-permission option.
725
726         * option.h: added support for --preserve-permission option.
727
728 2003-11-06  Hrvoje Niksic  <hniksic@xemacs.org>
729
730         * main.c (init_switches): New function.  Convert option_data to
731         long_options and short_options, which can be fed to getopt_long.
732         (main): Execute command-line options by consulting option_data.
733
734 2003-11-06  Hrvoje Niksic  <hniksic@xemacs.org>
735
736         * gen_sslfunc.c (ssl_read): Implement a more correct check for
737         EINTR.
738         (ssl_write): Ditto.
739         (init_ssl): Use a global SSL context.
740
741 2003-11-06  Hrvoje Niksic  <hniksic@xemacs.org>
742
743         * connect.c (xclose): Free INFO even if it doesn't provide a
744         closer.
745
746 2003-11-06  Hrvoje Niksic  <hniksic@xemacs.org>
747
748         * connect.c: Updated all callers of
749         iread/ssl_iread/iwrite/ssl_iwrite to use xread and xwrite instead.
750
751         * rbuf.h (struct rbuf): Removed the SSL member because SSL is
752         handled automatically by xread.
753
754         * hash.c (ptrhash): Made private.
755         (ptrcmp): Ditto.
756         (inthash): Removed.
757
758         * connect.c (select_fd): Don't set errno, leave it to the caller.
759
760         * gen_sslfunc.c (connect_ssl): Use register_extended to register
761         SSL callbacks for communication with SSL-enabled endpoints.
762         (ssl_read): New function.
763         (ssl_write): Ditto.
764         (ssl_poll): Ditto.
765         (ssl_close): Ditto.
766
767         * connect.c (register_extended): New function -- register
768         callbacks for basic socket operations.
769         (xread): Ditto.
770         (xwrite): Ditto.
771         (xclose): Ditto.
772         (sock_read): New function, default implementation for reading.
773         (sock_write): Ditto for writing.
774         (sock_poll): Ditto for polling.
775         (sock_close): Ditto for closing.
776
777 2003-11-05  Hrvoje Niksic  <hniksic@xemacs.org>
778
779         * connect.c (bindport): Fix compilation under pre-C99 compilers.
780
781 2003-11-05  Hrvoje Niksic  <hniksic@xemacs.org>
782
783         * connect.c (connect_to_ip): More compact error checking.
784         (bindport): Don't treat failed setsockopt as a fatal error.
785
786 2003-11-05  Hrvoje Niksic  <hniksic@xemacs.org>
787
788         * connect.c (resolve_bind_address): Use a more accurate error
789         message -- we're not binding to ANY, we're disabling bind
790         altogether.
791
792 2003-11-05  Hrvoje Niksic  <hniksic@xemacs.org>
793
794         * cookies.c (save_cookies_mapper): Respect the setting of
795         keep-session-cookies.
796         (cookie_jar_load): Import session cookies.
797         Based on code submitted by Nicolas Schodet.
798
799         * utils.c (datetime_str): Use information in TM when it's
800         non-NULL.
801
802         * main.c (main): New option `--keep-session-cookies'.
803
804 2003-11-04  Hrvoje Niksic  <hniksic@xemacs.org>
805
806         * Makefile.in (realclean): Delete config.h.in.
807
808 2003-11-04  Hrvoje Niksic  <hniksic@xemacs.org>
809
810         * config-post.h: New file, included from now autogenerated
811         config.h.in.
812
813 2003-11-04  Hrvoje Niksic  <hniksic@xemacs.org>
814
815         * progress.c (progress_handle_sigwinch): Don't call
816         determine_screen_width() from the signal handler.  Instead, just
817         set a volatile variable.
818         (bar_create): Check whether SIGWINCH was received.
819         (bar_update): Ditto.
820
821         * sysdep.h: Define SYSTEM_FNMATCH only if HAVE_FNMATCH_H is true.
822
823 2003-11-03  Hrvoje Niksic  <hniksic@xemacs.org>
824
825         * utils.c (xsleep): New function.  Uses nanosleep where available,
826         resuming sleeps interrupted by signals.  Updated callers of sleep
827         and usleep to use xsleep.
828
829 2003-11-03  Hrvoje Niksic  <hniksic@xemacs.org>
830
831         * ftp-basic.c (ftp_login): Remove shadowing (and bogus)
832         declaration of SEED.
833
834 2003-11-03  Hrvoje Niksic  <hniksic@xemacs.org>
835
836         * log.c (logvprintf): Documented better.  Renamed to
837         log_vprintf_internal to avoid confusion with the public API
838         functions logprintf and logputs.
839
840 2003-11-03  Hrvoje Niksic  <hniksic@xemacs.org>
841
842         * wget.h (N_): Don't parenthesize argument.
843
844 2003-11-03  Hrvoje Niksic  <hniksic@xemacs.org>
845
846         * host.h (ADDRESS_IPV4_DATA): Don't take the address of in.s_addr
847         because that doesn't work on machines that define it as bitfield.
848
849 2003-11-03  Hrvoje Niksic  <hniksic@xemacs.org>
850
851         * connect.c (select_fd): Generalize the third argument into WAIT,
852         so that the caller can request waiting for both read and write.
853         Updated callers.
854
855 2003-11-02  Hrvoje Niksic  <hniksic@xemacs.org>
856
857         * html-url.c (cleanup_html_url): Destroy the hash tables, don't
858         just call free on them.
859         (init_interesting): Use hash_table_put instead of string_set_add
860         because we don't need the strdup that the latter function
861         performs.
862
863         * init.c (cleanup): Don't pass NULL to cookie_jar_delete.
864
865         * xmalloc.c (xfree_real): Abort when passed a NULL pointer.
866         (xfree_debug): Print at the file and line of the offending call to
867         free.
868
869 2003-11-02  Hrvoje Niksic  <hniksic@xemacs.org>
870
871         * wget.h: Retired the `boolean' type.  Moved the DEFAULT_LOGFILE
872         define to log.h.  Moved the INFINITE_RECURSION define to recur.h.
873
874         * xmalloc.h: Renamed FREE_MAYBE to xfree_null and moved the
875         definition from wget.h to xmalloc.h.
876
877 2003-11-02  Hrvoje Niksic  <hniksic@xemacs.org>
878
879         * html-parse.c (decode_entity): New function; split the decoding
880         of entities here.
881         (convert_and_copy): Use it to decode entities.
882         (decode_entity): Handle the &apos entity.
883         (decode_entity): Don't decode Latin 1 numeric entities.  Don't
884         decode &#0.
885
886 2003-11-01  Hrvoje Niksic  <hniksic@xemacs.org>
887
888         * ftp-opie.c (calculate_skey_response): Use uint32_t instead of
889         `unsigned long' for the cheksum array.  Document the function.
890
891 2003-11-01  Hrvoje Niksic  <hniksic@xemacs.org>
892
893         * connect.c (acceptport): Don't call select_fd when timeout is not
894         requested.
895
896 2003-11-01  Hrvoje Niksic  <hniksic@xemacs.org>
897
898         * host.c: Removed the ip_default_family global variable.
899
900         * host.c (lookup_host): Document the function.  Fixed declaration
901         of VEC.
902
903 2003-10-31  Hrvoje Niksic  <hniksic@xemacs.org>
904
905         * various: Use new macros xnew, xnew0, xnew_array, and xnew0_array
906         in various places.
907
908 2003-10-31  Hrvoje Niksic  <hniksic@xemacs.org>
909
910         * wget.h: Move declarations of malloc and logging code to
911         xmalloc.h and log.h respectively to unclutter this file.
912         (STRDUP_ALLOCA): Made it side-effect free.
913
914         * xmalloc.h: New files.  Define macros xnew, xnew0, xnew_array,
915         and xnew0_array.
916
917         * xmalloc.c: New file.  Move the xmalloc routines here.
918
919 2003-10-31  Hrvoje Niksic  <hniksic@xemacs.org>
920
921         * connect.c (sockaddr_set_data): Remove the broken code that
922         checked for NULL address.
923
924 2003-10-31  Hrvoje Niksic  <hniksic@xemacs.org>
925
926         * host.c (address_list_from_single): Removed.
927         (address_list_from_ipv4_addresses): Renamed from
928         address_list_from_vector.
929
930 2003-10-31  Hrvoje Niksic  <hniksic@xemacs.org>
931
932         * sysdep.h (CLOSE): Don't call close on file descriptors less than
933         0, i.e. on uncreated sockets.
934
935         * connect.c (resolve_bind_address): Work on struct sockaddr
936         directly.
937         (connect_to_host): Replacement for connect_to_many.  Resolve HOST
938         and connect to any of its addresses.  If we can't connect and the
939         host name lookup was cached, try to resolve it again.  This should
940         fix problems with hosts behind dynamic DNS.  Updated all callers.
941         (connect_to_ip): Replacement for connect_to_one.  Removed SILENT;
942         added the argument PRINT instead.  Updated all callers.
943         (set_connection_host_name): Removed.
944
945         * host.c (address_list_address_at): New function instead of
946         address_list_copy_one. It returns a pointer to ip_address *, so
947         it's not necessary to copy the data.
948         (address_list_cached_p): New function.
949         (forget_host_lookup): Ditto.
950
951         * connect.c: Got rid of the MSOCK global variable.  Made bindport
952         return the local socket it creates.  Added a new argument to
953         acceptport, the socket to call accept on.  Updated callers.
954         (closeport): Removed.
955
956         * connect.c: Moved the sockaddr code from host.c to this file,
957         because most of that stuff is used for connecting, and has nothing
958         to do with host names anyway.
959         (sockaddr_set_data, sockaddr_get_data): New functions, replace the
960         old sockaddr_set_address, sockaddr_set_port, sockaddr_get_address,
961         and sockaddr_get_port.
962
963 2003-10-30  Hrvoje Niksic  <hniksic@xemacs.org>
964
965         * sysdep.h: Use `S >= 8' rather than `S == 8' when looking for
966         large integers.
967
968 2003-10-30  Hrvoje Niksic  <hniksic@xemacs.org>
969
970         * url.c (append_uri_pathel): New argument ESCAPED_P that says
971         whether [B, E) is to be treated as URL-escaped or not.  If
972         ESCAPED_P is false, don't unescape the region.
973         (url_file_name): u->file is not URL-escaped.
974
975 2003-10-30  Hrvoje Niksic  <hniksic@xemacs.org>
976
977         * retr.c (retrieve_from_file): Use retrieve_tree for
978         page-requisites.
979
980         * main.c (main): Don't define opt.recursive when -p is used.
981         Instead, make sure that recursion is used for HTTP in that case.
982
983 2003-10-29  Hrvoje Niksic  <hniksic@xemacs.org>
984
985         * host.h: Defined accessors for elements of ip_address.  Updated
986         all callers.
987         (address_list_match_all): Use memcmp in the non-IPv6 case.
988
989         * wget.h (CONNECT_ERROR): Don't retry connecting if connect()
990         returned EAFNOSUPPORT.
991
992 2003-10-27  Mauro Tortonesi <mauro@deepspace6.net>
993
994         * connect.h: changed bindport prototype and added the related
995         BIND_ON_IPV4_ONLY and BIND_ON_IPV6_ONLY flags.
996
997         * connect.c: changed bindport and resolve_bind_address to allow
998         protocol-version specific DNS resolution. modified conaddr,
999         acceptport and connect_to_one to make use of struct
1000         sockaddr_storage and of the new ip_address structure.
1001
1002         * ftp-basic.c: added LPRT/LPSV (RFC1639) support, refactored
1003         PORT/PASV (RFC959) and EPRT/EPSV (RFC2428) support code.
1004
1005         * ftp.c: added the ftp_do_port and ftp_do_pasv functions to
1006         handle FTP over IPv6.
1007
1008         * ftp.h: changed prototype of ftp_epsv and added prototypes for
1009         ftp_lpsv, ftp_lprt and ftp_eprt.
1010
1011         * host.c: renamed the
1012         wget_sockaddr_set_address and wget_sockaddr_get_addr, and
1013         wget_sockaddr_{s,g}et_port couples to sockaddr_{s,g}et_address and
1014         sockaddr_{g,s}et_port respectively.  changed
1015         address_list_match_all, address_list_from_addrinfo sockaddr_len,
1016         pretty_print_address, lookup_host, sockaddr_{s,g}et_address and
1017         sockaddr_{g,s}et_port to make use of struct sockaddr_storage and
1018         of the new ip_address structure.  removed map_ipv4_to_ip and
1019         map_ip_to_ipv4.
1020
1021         * host.h: redefined structure ip_address and removed structure
1022         wget_sockaddr.
1023
1024 2003-10-26  Hrvoje Niksic  <hniksic@xemacs.org>
1025
1026         * sysdep.h: Include inttypes.h where available.
1027
1028         * host.c: Switch from u_int32_t to uint32_t.
1029
1030 2003-10-26  Hrvoje Niksic  <hniksic@xemacs.org>
1031
1032         * netrc.c (parse_netrc): Reset the QUOTE flag after the closing
1033         quote.
1034
1035 2003-10-25  Hrvoje Niksic  <hniksic@xemacs.org>
1036
1037         * url.c (is_valid_ipv6_address): Reformat to GNU coding style.
1038         Use enums for NS_IN* constants.  Use ISXDIGIT.
1039
1040         * convert.c (construct_relative): Document better how the function
1041         works.
1042
1043 2003-10-23  Hrvoje Niksic  <hniksic@xemacs.org>
1044
1045         * config.h.in: Deploy preprocessor magic to avoid Ultrix's
1046         <netdb.h> include <bitypes.h> which defines its own u_int32_t.
1047         Reported by Bernhard Simon.
1048
1049 2003-10-23  Hrvoje Niksic  <hniksic@xemacs.org>
1050
1051         * version.c: Bump version.
1052
1053 2003-10-23  Hrvoje Niksic  <hniksic@xemacs.org>
1054
1055         * url.c: Ditto.
1056
1057         * html-parse.c (advance_declaration): Don't use trailing comma in
1058         enum because older compilers don't support it.
1059
1060         * utils.c: Don't redefine HAVE_SIGSETJMP.
1061
1062 2003-10-16  Hrvoje Niksic  <hniksic@xemacs.org>
1063
1064         * convert.c (construct_relative): Don't handle absolute files
1065         specially -- for example, -P/tmp/foo shouldn't imply that
1066         converted files must refer to "/tmp/foo/..."!
1067
1068 2003-10-15  Hrvoje Niksic  <hniksic@xemacs.org>
1069
1070         * http.c: Consider status 307 a valid redirect.
1071
1072 2003-10-15  Philip Stadermann  <philip.stadermann@credativ.de>
1073
1074         * ftp.c (ftp_retrieve_glob): Correctly loop through the list whose
1075         elements might have been deleted.
1076
1077 2003-10-13  Hrvoje Niksic  <hniksic@xemacs.org>
1078
1079         * html-url.c (tag_handle_meta): Set the Refresh link to expect
1080         HTML.
1081         (append_one_url): Renamed to append_url.
1082
1083 2003-10-13  Hrvoje Niksic  <hniksic@xemacs.org>
1084
1085         * sysdep.h: Only define u_int32_t.
1086
1087 2003-10-11  Hrvoje Niksic  <hniksic@xemacs.org>
1088
1089         * utils.c (large_int_to_string): Use snprintf() to print the
1090         number.  This will work even on systems where libc doesn't
1091         understand %lld, but the compiler does, because it will use our
1092         snprintf replacement.
1093
1094         * init.c (parse_bytes_helper): New function.
1095         (cmd_bytes): Use it to parse bytes, but cast the result to long.
1096         (cmd_bytes_large): Ditto, but store the result to LARGE_INT.  Used
1097         for --quota so that --quota=10G works even on machines without
1098         long long.
1099
1100         * options.h (struct options): Declare quota as LARGE_INT.
1101
1102         * retr.c (downloaded_exceeds_quota): Removed.
1103         (downloaded_increase): Ditto.
1104         (total_downloaded_bytes): New variable, replaces opt.downloaded,
1105         which was the wrong place for it anyway.  Updated callers of
1106         downloaded_exceeds_quota and downloaded_increase to check this
1107         variable directly.
1108
1109         * sysdep.h: Get rid of VERY_LONG_TYPE.  Use LARGE_INT for the same
1110         purpose, defined as `long', `long long' or `double', depending on
1111         size of long and whether long long is available.
1112
1113 2003-10-11  Hrvoje Niksic  <hniksic@xemacs.org>
1114
1115         * sysdep.h: Also check size of short for int32_t.
1116
1117 2003-10-11  Hrvoje Niksic  <hniksic@xemacs.org>
1118
1119         * host.c (lookup_host): Use u_int32_t to store the result of
1120         inet_addr().  That removes the need for offset fiddling, caring
1121         about endian-ness, etc.
1122
1123         * sysdep.h: Define int32_t and u_int32_t if not available.
1124
1125 2003-10-11  Hrvoje Niksic  <hniksic@xemacs.org>
1126
1127         * ftp-basic.c (ftp_epsv): Use socklen_t * as the third argument to
1128         getpeername.
1129
1130         * config.h.in: Define socklen_t stub.
1131
1132         * host.c (sockaddr_len): Return socklen_t.
1133
1134         * connect.c (conaddr): Use socklen_t as the third argument to
1135         accept, getsockname, and connect.
1136
1137 2003-10-10  Hrvoje Niksic  <hniksic@xemacs.org>
1138
1139         * recur.c (retrieve_tree): Don't descend into documents that are
1140         not expected to contain HTML, regardless of their content-type.
1141
1142         * html-url.c (tag_url_attributes): Record which attributes are
1143         supposed to yield HTML links that can be followed.
1144         (tag_find_urls): Propagate that information to the caller through
1145         struct urlpos.
1146
1147 2003-10-10  Hrvoje Niksic  <hniksic@xemacs.org>
1148
1149         * hash.c (find_mapping): Return the next available mapping when
1150         the key is not found, not NULL.
1151         (hash_table_put): Use find_mapping to find the storage for the new
1152         data.
1153         (hash_table_put): Grow the table before exceeding maximum
1154         fullness, not afterwards.
1155
1156 2003-10-10  Hrvoje Niksic  <hniksic@xemacs.org>
1157
1158         * hash.c (hash_table_new): Slightly change the meaning of the
1159         first parameter.  Instead of being the minimum initial size, it is
1160         now the minimum number of items that the hash table can take
1161         without needing to resize.
1162
1163 2003-10-09  Hrvoje Niksic  <hniksic@xemacs.org>
1164
1165         * html-url.c (init_interesting): Initialize interesting_tags and
1166         interesting_attributes as hash tables.  This simplifies the code
1167         immensely because hash tables handle allocation and remove
1168         duplicates automatically.
1169         (find_tag): Removed.
1170         (collect_tags_mapper): Instead of calling find_tag, simply get the
1171         entry from interesting_tags hash table, which is both simpler and
1172         faster.
1173
1174 2003-10-09  Hrvoje Niksic  <hniksic@xemacs.org>
1175
1176         * hash.c (hash_table_get): Declare hash-table argument as const.
1177         (find_mapping): Ditto.
1178         (hash_table_get_pair): Ditto.
1179         (hash_table_contains): Ditto.
1180         (hash_table_count): Ditto.
1181
1182 2003-10-08  Hrvoje Niksic  <hniksic@xemacs.org>
1183
1184         * html-url.c (get_urls_html): Parse the appropriate flags to
1185         html-parse.c.
1186
1187         * html-parse.c (map_html_tags): Accept FLAGS from the caller
1188         instead of examining OPT.
1189
1190 2003-10-08  Hrvoje Niksic  <hniksic@xemacs.org>
1191
1192         * html-url.c (find_tag): Switch to binary search.
1193
1194 2003-10-08  Hrvoje Niksic  <hniksic@xemacs.org>
1195
1196         * main.c (print_help): Fix typo; stured -> stored.
1197
1198 2003-10-08  Hrvoje Niksic  <hniksic@xemacs.org>
1199
1200         * getopt.c: Add definitions of getopt_long and getopt_long_only.
1201
1202 2003-10-08  Hrvoje Niksic  <hniksic@xemacs.org>
1203
1204         * config.h.in: Renamed DEBUG to ENABLE_DEBUG.  ENABLE_DEBUG is, I
1205         think, a better name, because it implies that debugging output is
1206         merely possible, not "on by default", as might be construed from
1207         just DEBUG.
1208
1209 2003-10-08  Hrvoje Niksic  <hniksic@xemacs.org>
1210
1211         * ftp.c (has_insecure_name_p): Define it here.
1212
1213         * utils.c (has_wildcards_p): Define it here.
1214
1215         * sysdep.h: Declare fnmatch-related macros here, if not using
1216         system fnmatch().  Update .c files to not declare fnmatch.h
1217         directly.
1218
1219         * cmpt.c (fnmatch): Moved here.  Use it only under non-GNU libc.
1220
1221 2003-10-08  Hrvoje Niksic  <hniksic@xemacs.org>
1222
1223         * getopt.c: Newer version, imported from Free libit.
1224
1225 2003-10-07  Hrvoje Niksic  <hniksic@xemacs.org>
1226
1227         * cookies.c (struct cookie): Remove unused backpointer to cookie
1228         jar.
1229
1230 2003-10-07  Hrvoje Niksic  <hniksic@xemacs.org>
1231
1232         * cmpt.c (memmove): Comment out, since it's no longer used.
1233
1234         * cookies.c (cookie_jar_generate_cookie_header): Allocate room for
1235         chains in one pass.
1236         (find_chains_of_host): Assume that the caller has allocated DEST
1237         to be sufficiently large to take all the data.
1238         (eliminate_dups): Run through the array and eliminate dups on the
1239         fly instead of using memmove.
1240         (cookie_jar_process_set_cookie): Free cookie->domain before
1241         re-setting it.
1242
1243 2003-10-05  Gisle Vanem  <giva@bgnett.no>
1244
1245         * mswindows.c (set_sleep_mode): Fix type of
1246         _SetThreadExecutionState.
1247
1248 2003-10-05  Hrvoje Niksic  <hniksic@xemacs.org>
1249
1250         * utils.c (file_size): Return -1 if fopen() returns NULL.  Prior
1251         to this patch, wget --post-file=nosuchfile dumped core.
1252
1253 2003-10-04  Gisle Vanem  <giva@bgnett.no>
1254
1255         * mswindows.c (run_with_timeout): Use WaitForSingleObject to wait
1256         for thread termination.
1257
1258 2003-10-04  Hrvoje Niksic  <hniksic@xemacs.org>
1259
1260         * log.c: Use `...' in function definitions; ansi2knr will convert
1261         them to va_dcl.  This allowed removal of the ugly VA_START_1 and
1262         VA_START_2 macros.
1263
1264 2003-10-03  Gisle Vanem  <giva@bgnett.no>
1265
1266         * connect.c: And don't include them here.
1267
1268         * mswindows.h: Include winsock headers here.
1269
1270 2003-10-03  Hrvoje Niksic  <hniksic@xemacs.org>
1271
1272         * html-parse.c (convert_and_copy): Move variable declarations
1273         before statements.
1274
1275 2003-10-02  Gisle Vanem  <giva@bgnett.no>
1276         
1277         * mswindows.c (run_with_timeout): For Windows: Run the 'fun' in a
1278         thread via a helper function. Continually query the thread's
1279         exit-code until finished or timed out.
1280
1281 2003-10-02  Hrvoje Niksic  <hniksic@xemacs.org>
1282
1283         * wget.h (XMALLOC_ARRAY): Removed.
1284         (ALLOCA_ARRAY): Ditto.
1285
1286         * html-parse.c: Renamed alloca_p to resized.
1287         (GROW_ARRAY): Renamed DO_REALLOC_FROM_ALLOCA to GROW_ARRAY and
1288         returned it to html-parse.c, since nothing else was using it.
1289
1290 2003-10-02  Hrvoje Niksic  <hniksic@xemacs.org>
1291
1292         * retr.c (retrieve_url): Initialize DUMMY storage for DT.  Caught
1293         by valgrind.
1294
1295 2003-10-02  Hrvoje Niksic  <hniksic@xemacs.org>
1296
1297         * html-parse.c (convert_and_copy): Handle numeric entities in
1298         hexadecimal, &#xHH.
1299         (convert_and_copy): Copy the contents directly to the pool without
1300         a stack-allocated intermediary.
1301
1302 2003-10-02  Hrvoje Niksic  <hniksic@xemacs.org>
1303
1304         * utils.c (alarm_set): New function; use either setitimer or alarm
1305         to set up the alarm.
1306         (alarm_cancel): New function; cancel the alarm set up by
1307         alarm_set.
1308         (run_with_timeout): Use them.
1309
1310 2003-10-01  Hrvoje Niksic  <hniksic@xemacs.org>
1311
1312         * url.c (url_parse): Don't leak memory when a reencoded URL turns
1313         out to be invalid.
1314
1315         * url.c (parse_errors): Mark error messages for translation.
1316         (url_error): Translate error messages returned to the caller.
1317
1318 2003-10-01  Hrvoje Niksic  <hniksic@xemacs.org>
1319
1320         * ftp.c (ftp_loop_internal): Initialize TMRATE to NULL to shut up
1321         the compiler.
1322
1323 2003-09-26  Gisle Vanem  <giva@bgnett.no>
1324
1325         * src/mswindows.c: Added ws_percenttitle() showing progress in the
1326         window titlebar. Called from retr.c. Secured ws_mypath().
1327
1328         * windows/config.h.ms: alloca() prototype not needed.  Removed
1329         "#undef ENABLE_NLS"; should be in Makefile IMHO. Moved
1330         WGET_USE_STDARG from mswindows.h to config.ms.h because of #ifdef
1331         in log.c. (MSVC's vararg.h and stdarg.h are incompatible).
1332
1333 2003-09-29  Aaron Hawley <Aaron.Hawley@uvm.edu>
1334
1335         * ftp.c (getftp): --spider option should now work with FTP
1336         downloads.
1337         (ftp_loop_internal): quiet reports and calculations of downloads
1338         when --spider option set, nor try deleting when --delete-after
1339         also set.
1340         (ftp_loop): --spider will skip HTML-ification of .listing file.
1341
1342 2003-09-26  Gisle Vanem  <giva@bgnett.no>
1343
1344         * mswindows.c (read_registry): Removed.
1345         (set_sleep_mode): New function.
1346         (windows_main_junk): Call it.
1347
1348 2003-09-26  Gisle Vanem  <giva@bgnett.no>
1349
1350         * mswindows.c (read_registry): Fix invocation of registry
1351         functions.
1352
1353         * mswindows.c (read_registry): Condition definitions of sleep and
1354         usleep with not HAVE_SLEEP and HAVE_USLEEP respectively.  Define
1355         HAVE_SLEEP and HAVE_USLEEP under __DMC__.
1356
1357 2003-09-24  Hrvoje Niksic  <hniksic@xemacs.org>
1358
1359         * url.c (url_escape_1): Revert unintentional change to lowercase
1360         xdigit escapes.
1361         (url_escape_dir): Document that this function depends on the
1362         output of url_escape_1.
1363
1364 2003-09-23  Hrvoje Niksic  <hniksic@xemacs.org>
1365
1366         * progress.c (create_image): Print the current ETA if we're done
1367         with the download.
1368         (create_image): Change '-' display char to '+' in the progress bar.
1369
1370         * Makefile.in (clean): Remove .libs.
1371
1372 2003-09-23  Hrvoje Niksic  <hniksic@xemacs.org>
1373
1374         * cookies.c (struct cookie): New flag domain_exact.
1375         (update_cookie_field): Skip leading dot in domain.
1376         (find_matching_chains): Match numeric addresses exactly; don't
1377         needlessly copy HOST to the stack.
1378         (matching_cookie): Added argument HOST.  If cookie->domain_exact
1379         is set, check that HOST is equal to cookie->domain.
1380         (cookie_jar_load): Only use TAB as delimiter.  Document the
1381         meaning of DOMAIN-FLAG.  Skip leading dot in domain.
1382         (cookie_jar_load): Don't ignore DOMAIN-FLAG -- instead, set
1383         domain_exact to true if DOMAIN-FLAG is false.
1384         (save_cookies_mapper): If domain_exact is false, prepend the
1385         domain with dot, like Mozilla does.
1386
1387 2003-09-22  Hrvoje Niksic  <hniksic@xemacs.org>
1388
1389         * progress.c (create_image): Print the initial part of the
1390         download with '-' characters, analogous to how dot progress prints
1391         the initial part with ','.
1392
1393         * hash.c (ptrhash): New function.
1394         (ptrcmp): Ditto.
1395         (hash_table_new): Default to identity hash table.
1396
1397 2003-09-22  Hrvoje Niksic  <hniksic@xemacs.org>
1398
1399         * safe-ctype.h (_sch_test): The cast of BIT to unsigned char was
1400         broken -- _sch_istable bitmasks are 16-bit, not 8-bit!  Cast BIT
1401         to unsigned short instead.
1402
1403 2003-09-22  Hrvoje Niksic  <hniksic@xemacs.org>
1404
1405         * url.c (path_simplify): Instead of calls to memmove, handle "./"
1406         and "../" by advancing pointers.
1407
1408 2003-09-22  Hrvoje Niksic  <hniksic@xemacs.org>
1409
1410         * retr.c (getproxy): Moved from url.c.
1411
1412         * convert.c: Split off link conversion from url.c into separate
1413         file.  Also included the book-keeping stuff from recur.c.
1414
1415 2003-09-21  Hrvoje Niksic  <hniksic@xemacs.org>
1416
1417         * init.c: Improved documentation of functions.
1418         (cmd_boolean): Attempt to make code that tries to avoid calling
1419         strcmp for "speed" a bit more readable.
1420
1421         * init.c (simple_atof): Report error on encountering non-digit,
1422         non-"." character.
1423         (simple_atoi): Replacement for myatoi(), calling interface
1424         compatible with simple_atof.  Updated myatoi's callers.
1425
1426 2003-09-21  Bertrand Demiddelaer  <bert@b3rt.org>
1427
1428         * url.c (path_simplify): Would read two bytes past the end of the
1429         string in the "./" case.
1430
1431 2003-09-21  Matthew J. Mellon  <mellon@tymenet.com>
1432
1433         * http.c (gethttp): Recognize content-type "application/xhtml+xml"
1434         as what Wget considers "text/html".
1435
1436 2003-09-21  Hrvoje Niksic  <hniksic@xemacs.org>
1437
1438         * connect.c (connect_with_timeout): Made timeout type double.
1439
1440         * options.h (struct options): New members read_timeout,
1441         dns_timeout, and connect_timeout.
1442         Use them.
1443
1444 2003-09-21  Hrvoje Niksic  <hniksic@xemacs.org>
1445
1446         * init.c (simple_atof): New function.
1447         (cmd_time): Use it.
1448         (cmd_bytes): Accept things like "1.5k" and such.  Use simple_atof
1449         to parse decimals.
1450
1451         * retr.c (limit_bandwidth): Adjust each sleep by the error of the
1452         previous one.
1453
1454 2003-09-21  Hrvoje Niksic  <hniksic@xemacs.org>
1455
1456         * main.c (main): Use setoptval() for setting the options.  Use
1457         run_command for `-e'.
1458
1459         * init.c (parse_line): Rewritten to return COMIND right away.
1460         Changed linkage to static.
1461         (run_wgetrc): Use the available comind when calling setval, so it
1462         doesn't have to be computed twice.
1463         (setval_internal): New function, runs the command's action without
1464         any error checking.
1465         (setoptval): New function, does what setval used to do, but exits
1466         in case of error.
1467         (run_command): New function.
1468
1469 2003-09-21  Hrvoje Niksic  <hniksic@xemacs.org>
1470
1471         * connect.c (select_fd): Change MAXTIME's type to double.  Handle
1472         its decimal part.
1473
1474         * retr.c (sleep_between_retrievals): In the random-wait case, use
1475         random_float() to wait between 0 and 2*opt.wait seconds.
1476
1477         * utils.c (run_with_timeout): Accept `double' timeouts.  Correctly
1478         handle timeout values in (0, 1) range.
1479         (random_float): New function.
1480
1481         * options.h (struct options): Change the types of wait, waitretry,
1482         and timeout to double.
1483
1484         * init.c (cmd_time): Accept floating point time.
1485
1486 2003-09-20  Hrvoje Niksic  <hniksic@xemacs.org>
1487
1488         * retr.c (get_contents): Cosmetic fixes.
1489
1490 2003-09-20  Hrvoje Niksic  <hniksic@xemacs.org>
1491
1492         * url.c (uri_merge): Get rid of uri_merge_1.
1493         (uri_merge): Merge "foo//", "bar" as "foo//bar", not "foo///bar",
1494         i.e. don't add an extra slash merely because BASE ends with two
1495         slashes.
1496         (parse_credentials): Renamed from parse_uname.  Rewrittern in
1497         standard [beg, end) calling style.
1498         (url_skip_credentials): Renamed from url_skip_uname.  Made static.
1499         (url_skip_credentials): Include # and ; as terminators.  Old code
1500         would mistakenly consider "http://foo.com#hniksic@iskon.hr" to
1501         contain a username.
1502         (url_skip_scheme): Removed because it was unused.
1503         (url_has_scheme): Require "scheme" to be at least one char long.
1504
1505 2003-09-19  Hrvoje Niksic  <hniksic@xemacs.org>
1506
1507         * url.c (url_file_name): Expect NULL dir_prefix.
1508
1509         * init.c (cmd_file): Use a macro to prevent multiple #ifdef
1510         WINDOWS.
1511         (defaults): Set dir_prefix to NULL by default.
1512
1513 2003-09-19  Hrvoje Niksic  <hniksic@xemacs.org>
1514
1515         * safe-ctype.h (_sch_test): Cast BIT to unsigned char, like latest
1516         gcc does.
1517
1518 2003-09-19  Hrvoje Niksic  <hniksic@xemacs.org>
1519
1520         * wget.h (BOUNDED_TO_ALLOCA): Evaluate PLACE only once.
1521         (ARRAY_SIZE): Renamed to countof.  All callers updated.
1522
1523 2003-09-19  Hrvoje Niksic  <hniksic@xemacs.org>
1524
1525         * main.c (main): New option --strict-comments.
1526
1527         * html-parse.c (find_comment_end): New function: simple BM search
1528         for "-->".
1529         (map_html_tags): Use it if looking at a comment and not in strict
1530         comments mode.
1531
1532 2003-09-17  Aurelien Marchand  <artaxerxes@users.sf.net>
1533
1534         * ftp.h: Added OS400 system in enum
1535         * ftp-basic.c: recognize OS400 systems
1536         * ftp.c: don't prepend the CWD if talking to OS400, since it
1537         breaks the change in library
1538
1539 2003-09-18  Hrvoje Niksic  <hniksic@xemacs.org>
1540
1541         * retr.c (get_contents): Pass the correct argument to ssl_iread.
1542
1543 2003-09-18  Hrvoje Niksic  <hniksic@xemacs.org>
1544
1545         * safe-ctype.h: Don't #define ctype.h macros to errors because
1546         that loses when someone #include's ctype.h after safe-ctype.h.
1547
1548 2003-09-17  Hrvoje Niksic  <hniksic@xemacs.org>
1549
1550         * url.c: Undef U, W, C after use.
1551
1552 2003-09-17  Hrvoje Niksic  <hniksic@xemacs.org>
1553
1554         * init.c (cmd_spec_restrict_file_names): Allow the OS setting to
1555         be augmented by ",nocontrol" which means don't escape the control
1556         characters, but otherwise keep OS settings.
1557
1558         * url.c (file_unsafe_char): Deleted.
1559         (append_uri_pathel): Query filechr_table directly.
1560         (filechr_table): Separated Unix, Windows, and control-unsafe
1561         characters.
1562
1563 2003-09-17  Hrvoje Niksic  <hniksic@xemacs.org>
1564
1565         * url.c (url_escape_1): New function.
1566         (url_escape): Use it.
1567         (sync_path): Handle pathological cases where u->file and u->dir
1568         contain really strange characters.
1569         (ENCODE): Deleted.
1570         (REENCODE): Deleted.
1571
1572 2003-09-16  Hrvoje Niksic  <hniksic@xemacs.org>
1573
1574         * url.c (url_file_name): Don't reallocate FNAME if the file
1575         doesn't exist, as is usually the case.
1576
1577         * utils.c (unique_name): New flag allow_passthrough.
1578
1579 2003-09-16  Hrvoje Niksic  <hniksic@xemacs.org>
1580
1581         * utils.c (wtimer_sys_diff): Convert the time difference to signed
1582         __int64, then to double.  This works around MS VC++ 6 which can't
1583         convert unsigned __int64 to double directly.
1584
1585 2003-09-16  Hrvoje Niksic  <hniksic@xemacs.org>
1586
1587         * Makefile.in (clean): Also remove the core.<number> files
1588         produced by recent Linux systems.
1589
1590 2003-09-16  Hrvoje Niksic  <hniksic@xemacs.org>
1591
1592         * http.c (post_file): Don't pad the file if it's not large
1593         enough.  Bail out instead.
1594
1595 2003-09-15  Hrvoje Niksic  <hniksic@xemacs.org>
1596
1597         * retr.c (get_contents): Reduce the buffer size to the amount of
1598         data that may pass through for one second.  This prevents long
1599         sleeps when limiting bandwidth.
1600
1601         * connect.c (connect_to_one): Reduce the socket's RCVBUF when
1602         bandwidth limitation to small values is requested.
1603
1604 2003-09-15  Hrvoje Niksic  <hniksic@xemacs.org>
1605
1606         * progress.c (update_speed_ring): Moved the speed ring update to a
1607         separate function and documented it better.
1608
1609         * progress.c: Use `double' for most timers to support granularity
1610         smaller than 1ms.
1611
1612 2003-09-15  Hrvoje Niksic  <hniksic@xemacs.org>
1613
1614         * wget.h (XDIGIT_TO_XCHAR): Implement as index into a literal
1615         string.
1616         (XDIGIT_TO_xchar): Ditto.
1617
1618 2003-09-15  Hrvoje Niksic  <hniksic@xemacs.org>
1619
1620         * utils.c: Change the type of timer-related functions from long to
1621         double, for better precision.  On machines supporting gettimeofday
1622         the timers now work with granularity of less than one millisecond.
1623
1624 2003-09-15  Hrvoje Niksic  <hniksic@xemacs.org>
1625
1626         * cookies.c (parse_set_cookies): Fixed the parser to handle more
1627         edge conditions.
1628         (test_cookies): New function, contains a test suite for
1629         parse_set_cookies.
1630
1631 2003-09-15  Hrvoje Niksic  <hniksic@xemacs.org>
1632
1633         * url.c (strpbrk_or_eos): Implement as a macro under Gcc.
1634
1635 2003-09-15  Hrvoje Niksic  <hniksic@xemacs.org>
1636
1637         * cookies.c (parse_set_cookies): Allow trailing space in
1638         set-cookies header.  Also, allow any amount of whitespace, not
1639         only one character.  Allow empty set-cookies header without
1640         spewing an error.
1641
1642 2003-09-14  Hrvoje Niksic  <hniksic@xemacs.org>
1643
1644         * url.c (append_uri_pathel): Use opt.restrict_file_names when
1645         calling file_unsafe_char.
1646
1647         * init.c: New command restrict_file_names.
1648
1649         * main.c (main): New option --restrict-file-names[=windows,unix].
1650
1651         * url.c (url_file_name): Renamed from url_filename.
1652         (url_file_name): Add directory and hostdir prefix here, not in
1653         mkstruct.
1654         (append_dir_structure): New function, does part of the work that
1655         used to be in mkstruct.  Iterates over path elements in u->path,
1656         calling append_uri_pathel on each one to append it to the file
1657         name.
1658         (append_uri_pathel): URL-unescape a path element and reencode it
1659         with a different set of rules, more appropriate for handling of
1660         files.
1661         (file_unsafe_char): New function, uses a lookup table to decide
1662         whether a character should be escaped for use in file name.
1663         (append_string): New utility function.
1664         (append_char): Ditto.
1665         (file_unsafe_char): New argument restrict_for_windows, decide
1666         whether Windows file names should be escaped in run-time.
1667
1668         * connect.c: Include <stdlib.h> to get prototype for abort().
1669
1670 2003-09-14  Hrvoje Niksic  <hniksic@xemacs.org>
1671
1672         * utils.c (wtimer_sys_set): Extracted the code that sets the
1673         current time here.
1674         (wtimer_reset): Call it.
1675         (wtimer_sys_diff): Extracted the code that calculates the
1676         difference between two system times here.
1677         (wtimer_elapsed): Call it.
1678         (wtimer_elapsed): Don't return a value smaller than the previous
1679         one, which could previously happen when system time is set back.
1680         Instead, reset start time to current time and note the elapsed
1681         offset for future calculations.  The returned times are now
1682         guaranteed to be monotonically nondecreasing.
1683
1684 2003-09-10  Hrvoje Niksic  <hniksic@xemacs.org>
1685
1686         * host.c (lookup_host): Print the result of the DNS lookup.
1687
1688 2003-09-10  Hrvoje Niksic  <hniksic@xemacs.org>
1689
1690         * init.c (cmd_boolean): Accept yes/no along with on/off.
1691         (cmd_lockable_boolean): Ditto.
1692
1693 2003-09-10  Hrvoje Niksic  <hniksic@xemacs.org>
1694
1695         * init.c: New command dns_cache.
1696
1697         * main.c (main): New option --dns-cache[=off].
1698
1699 2003-09-09  Hrvoje Niksic  <hniksic@xemacs.org>
1700
1701         * config.h.in: Initialize HAVE_GETADDRINFO and ENABLE_IPV6.
1702
1703         * all: Use #ifdef ENABLE_IPV6 instead of the older INET6.  Use
1704         HAVE_GETADDRINFO for getaddrinfo-related stuff.
1705
1706 2003-09-09  Hrvoje Niksic  <hniksic@xemacs.org>
1707
1708         * url.c (url_parse): Return an error if the URL contains a [...]
1709         IPv6 numeric address and we don't support IPv6.
1710
1711 2003-09-05  Hrvoje Niksic  <hniksic@xemacs.org>
1712
1713         * url.c (is_valid_ipv6_address): Modified to not require
1714         zero-terminated strings.
1715         (is_valid_ipv4_address): Ditto.
1716
1717 2003-09-05  Mauro Tortonesi <mauro@deepspace6.net>
1718
1719         src/url.c: added RFC 2732 compliance for URL parsing. The
1720         functions is_*_address valid are a modified version of
1721         glibc 2.3.2 inet_pton's code.
1722
1723 2003-09-03  Ahmon Dancy  <dancy@dancysoft.com>
1724
1725         * main.c init.c options.h: Added --retry-connrefused option so
1726         that Connection Refused failures are treated as non-fatal (when
1727         trying to retrieve from busy servers).
1728
1729         * wget.h: New CONNECT_ERROR macro for encapsulating this
1730         modification.
1731
1732         * ftp.c http.c : Use CONNECT_ERROR macro in places where
1733         ECONNREFUSED was checked.
1734
1735 2003-01-11  Ian Abbott  <abbotti@mev.co.uk>
1736
1737         * ftp.c (ftp_retrieve_glob): Reject insecure filenames as determined
1738         by calling new function has_insecure_name_p.  This is based on a
1739         patch by Red Hat.
1740
1741         * fnmatch.c (has_insecure_name_p): New function: returns non-zero
1742         if filename starts with `/' or contains `../' and is therefore
1743         considered insecure.
1744
1745         * fnmatch.h: Declare has_insecure_name_p().
1746
1747 2002-08-03  Hrvoje Niksic  <hniksic@xemacs.org>
1748
1749         * init.c (cmd_file): Allocate RESULT correctly.
1750
1751 2002-07-24  Hrvoje Niksic  <hniksic@xemacs.org>
1752
1753         * recur.c (retrieve_tree): Check whether downloaded_html_set is
1754         non-NULL before using it.
1755
1756 2002-05-27  Hrvoje Niksic  <hniksic@arsdigita.com>
1757
1758         * html-parse.c (NAME_CHAR_P): Allow almost any character here.
1759
1760 2002-05-24  Hrvoje Niksic  <hniksic@arsdigita.com>
1761
1762         * progress.c (bar_set_params): Fall back to dot progress if the
1763         terminal type is "emacs".
1764
1765 2002-05-20  Hrvoje Niksic  <hniksic@arsdigita.com>
1766
1767         * log.c: Don't #undef WGET_USE_STDARG.
1768
1769 2002-05-16  Hrvoje Niksic  <hniksic@arsdigita.com>
1770
1771         * hash.c (prime_size): Store the offset of the prime number in the
1772         prime table.  When searching, start with the given offset.
1773         (hash_table_new): Pass the pointer to ht->prime_offset to
1774         prime_size.
1775         (grow_hash_table): Ditto.
1776         (prime_size): Make 13 the first prime to make empty hash tables
1777         slightly smaller.
1778
1779 2002-05-16  Ian Abbott  <abbotti@mev.co.uk>
1780
1781         * recur.c (download_child_p): Minor optimization to avoid an
1782         unnecessary additional call to schemes_are_similar_p function.
1783
1784 2002-05-16  Ian Abbott  <abbotti@mev.co.uk>
1785
1786         * url.c (schemes_are_similar_p): New function to test enumerated
1787         scheme codes for similarity.
1788
1789         * url.h: Declare it.
1790
1791         * recur.c (download_child_p): Use it to compare schemes.  This
1792         also fixes a bug that allows hosts to be spanned (without the
1793         -H option) when the parent scheme is https and the child's is
1794         http or vice versa.
1795
1796 2002-05-14  Bill Richardson  <bill@riverstonenet.com>
1797
1798         * ftp.c (getftp): Don't ftruncate stdout.
1799
1800         * http.c (gethttp): Don't ftruncate stdout.
1801
1802 2002-05-09  Ian Abbott  <abbotti@mev.co.uk>
1803
1804         * cmpt.c (strptime_internal): Synched with glibc-2.1.3.
1805         (get_number): Ditto.
1806         (get_alt_number): Ditto.
1807         (__isleap): New function-like macro used by strptime.
1808         (day_of_the_week): New function used by strptime.
1809         (day_of_the_year): Ditto.
1810         (__mon_yday): Now shared by mktime and strptime implementations.
1811
1812 2002-05-08  Hrvoje Niksic  <hniksic@arsdigita.com>
1813
1814         * cookies.c (check_domain_match): Use match_tail in case
1815         insensitive mode.
1816
1817         * utils.c (match_tail): Allow the caller to specify case
1818         insensitive mode.
1819
1820         * cookies.c (store_cookie): When expiry_time is 0, print it as
1821         undefined, not indefinite.
1822
1823 2002-05-07  Ian Abbott  <abbotti@mev.co.uk>
1824
1825         * cookies.c (cookie_jar_process_set_cookie): Do not store
1826         discarded cookie.
1827
1828 2002-04-21  Hrvoje Niksic  <hniksic@arsdigita.com>
1829
1830         * cookies.c (check_domain_match): Allow cookies to be set for
1831         subdomains of unknown top-level domains under some circumstances.
1832
1833 2002-04-21  Thomas Lussnig  <thomas.lussnig@bewegungsmelder.de>
1834
1835         * gen_ssl.c:
1836         - allow checking of server cert
1837         - allow defining client cert type
1838         - allow limit of ssl protocol
1839         - check more return values
1840         - added debug message on break
1841
1842 2002-04-21  Hrvoje Niksic  <hniksic@arsdigita.com>
1843
1844         * recur.c (download_child_p): Revert order of items in check
1845         number 6 for clarity.
1846
1847 2002-04-20  Hrvoje Niksic  <hniksic@arsdigita.com>
1848
1849         * init.c: Ditto.
1850
1851         * main.c: Ditto.
1852
1853         * http.c: Use the new interface.
1854
1855         * cookies.c: Provide an OO-style "cookie jar" interface to enable
1856         separate cookie jars.
1857
1858         * http.c (http_atotm): Declare argument as const.
1859
1860 2002-04-20  Hrvoje Niksic  <hniksic@arsdigita.com>
1861
1862         * cookies.c (cookie_new): Default to PORT_ANY.
1863         (find_cookie_chain_exact): Only search by DOMAIN.
1864         (find_matching_cookie): Also check that PORT matches.
1865         (store_cookie): Only match the domain.
1866         (set_cookie_header_cb): When a cookie "fakes" a domain, assume it
1867         is valid for that host rather than discarding it completely.
1868         (find_matching_chains): Don't search by PORT.
1869         (matching_cookie): Also match PORT.
1870         (load_cookies): Set the port if specified, otherwise leave it as
1871         ANY.
1872         (save_cookies_mapper): Save the port if specified, otherwise leave
1873         it empty.
1874
1875 2002-04-19  Thomas Lussnig  <thomas.lussnig@bewegungsmelder.de>
1876
1877         * init.c: The option `egdfile' was not in sort order.
1878
1879 2002-04-16  Hrvoje Niksic  <hniksic@arsdigita.com>
1880
1881         * ftp.c (getftp): Treat directories that begin with <letter>: as
1882         absolute.
1883         (getftp): Strip trailing slashes from con->id before merging it
1884         with TARGET.
1885
1886 2002-04-16  Hrvoje Niksic  <hniksic@arsdigita.com>
1887
1888         * http.c (gethttp): If Content-Type is not given, assume
1889         text/html.
1890
1891 2002-04-15  Hrvoje Niksic  <hniksic@arsdigita.com>
1892
1893         * recur.c (download_child_p): Don't ignore rejection of HTML
1894         documents that are themselves leaves of recursion.
1895
1896 2002-04-15  Ian Abbott  <abbotti@mev.co.uk>
1897
1898         Makefile.in: Updated several dependencies for object files to take
1899         account of nested include files.
1900
1901 2002-04-15  Ian Abbott  <abbotti@mev.co.uk>
1902
1903         Makefile.in: The target `connect$o' (connect.o) now depends on
1904         `utils.h'
1905
1906 2002-04-15  Ian Abbott  <abbotti@mev.co.uk>
1907
1908         * host.c (SET_H_ERRNO): New function-like macro to set `h_errno'.
1909         (gethostbyname_with_timeout): Use it.
1910
1911         * utils.c: Don't define `SETJMP()', `run_with_timeout_env' or
1912         `abort_run_with_timeout()' when `USE_SIGNAL_TIMEOUT' is undefined.
1913
1914 2002-04-15  Hrvoje Niksic  <hniksic@arsdigita.com>
1915
1916         * host.c (getaddrinfo_with_timeout): New function.
1917         (gethostbyname_with_timeout): Ditto.
1918         (lookup_host): Use them.
1919
1920 2002-04-14  Hrvoje Niksic  <hniksic@arsdigita.com>
1921
1922         * utils.c (number_to_string): Handle the case when n < -INT_MAX.
1923
1924 2002-04-14  Hrvoje Niksic  <hniksic@arsdigita.com>
1925
1926         * init.c (comind): Use a marginally faster implementation of
1927         binary search.  To quote Martin Buchholz, "a nanosecond saved is a
1928         nanosecond earned."
1929
1930 2002-04-14  Hrvoje Niksic  <hniksic@arsdigita.com>
1931
1932         * main.c (print_help): Document `--post-data' and `--post-file'.
1933
1934 2002-04-14  Hrvoje Niksic  <hniksic@arsdigita.com>
1935
1936         * http.c (gethttp): Ditto.
1937
1938         * retr.c (retrieve_url): Initialize variables to appease the
1939         compiler.
1940
1941         * gen_sslfunc.c (ssl_iread): Don't handle EINTR when calling
1942         select_fd.
1943         (ssl_iwrite): Ditto.
1944
1945         * connect.c (select_fd): Rewrite to handle EINTR.  Set errno to
1946         ETIMEDOUT in case of timeout.
1947         (iread): No need to handle EINTR when calling select_fd.
1948         (iwrite): Ditto.
1949
1950 2002-04-14  Hrvoje Niksic  <hniksic@arsdigita.com>
1951
1952         * retr.c (retrieve_url): Make sure that POST is not honored for
1953         redirections.
1954
1955         * http.c (gethttp): Send the POST data when requested.
1956         (post_file): New function.
1957         (gethttp): Use it.
1958
1959         * main.c (main): Ditto.
1960
1961         * init.c: Add new options.
1962
1963         * options.h (struct options): New options post_data and
1964         post_file_name.
1965
1966 2002-04-14  Hrvoje Niksic  <hniksic@arsdigita.com>
1967
1968         * connect.c (connect_with_timeout): Firing SIGALRM can result in
1969         connect() exiting with EINTR.  Treat EINTR the same as ETIMEDOUT.
1970
1971 2002-04-13  Hrvoje Niksic  <hniksic@arsdigita.com>
1972
1973         * connect.c (connect_with_timeout): Use it.
1974
1975         * utils.c (run_with_timeout): New function.
1976
1977 2002-04-13  Hrvoje Niksic  <hniksic@arsdigita.com>
1978
1979         * url.c (getproxy): Accept a struct url argument.  This obviates
1980         the need for USE_PROXY_P.
1981
1982         * retr.c (retrieve_url): Allow proxy to be a non-FTP URL.
1983
1984         * ftp.c (getftp): Recognize FWTK-style proxy.
1985
1986 2002-04-12  Hrvoje Niksic  <hniksic@arsdigita.com>
1987
1988         * config.h.in: Only define _VA_LIST when compiled with gcc.
1989
1990 2002-04012  Ian Abbott  <abbotti@mev.co.uk>
1991
1992         * http.c (http_loop): Compensate for MS Windows two-second
1993         granularity of file modification time when comparing timestamps.
1994
1995         * ftp.c (ftp_retrieve_list): Ditto.
1996
1997 2002-04-12  Ian Abbott  <abbotti@mev.co.uk>
1998
1999         * utils.c (has_html_suffix_p): New function to test filename for
2000         common html extensions.
2001
2002         * utils.h: Declare it.
2003
2004         * http.c (http_loop): Use it instead of previous test.
2005
2006         * retr.c (retrieve_url): Ditto.
2007
2008         * recur.c (download_child_p): Ditto.
2009
2010 2002-04-12  Hrvoje Niksic  <hniksic@arsdigita.com>
2011
2012         * config.h.in: Define _VA_LIST on Solaris to prevent stdio.h from
2013         declaring va_list.
2014         From Kevin Rodgers <kevinr@ihs.com>.
2015
2016 2002-04-12  Ian Abbott  <abbotti@mev.co.uk>
2017
2018         * Makefile.in: Specify libtool mode explicitly when linking.
2019
2020 2002-04-12  Hrvoje Niksic  <hniksic@arsdigita.com>
2021
2022         * connect.c (connect_with_timeout): New function.
2023         (connect_to_one): Use it.
2024
2025         * config.h.in: Add stubs for HAVE_SIGSETJMP, HAVE_SIGBLOCK, and
2026         HAVE_SETJMP_H.
2027
2028 2002-04-11  Hrvoje Niksic  <hniksic@arsdigita.com>
2029
2030         * log.c: Set WGET_USE_STDARG if __STDC__ is defined and stdarg.h
2031         is present.
2032
2033 2002-04-11  Hrvoje Niksic  <hniksic@arsdigita.com>
2034
2035         * progress.c (bar_create): If INITIAL is larger than TOTAL, fix
2036         TOTAL.
2037         (bar_finish): Likewise.
2038
2039 2002-04-11  Hrvoje Niksic  <hniksic@arsdigita.com>
2040
2041         * html-url.c (tag_handle_form): New function.  Pick up form
2042         actions and mark them for conversion only.
2043
2044 2002-04-11  Hrvoje Niksic  <hniksic@arsdigita.com>
2045
2046         * progress.c (struct progress_implementation): Use PARAMS when
2047         declaring the parameters of *create, *update, *finish, and
2048         *set_params.
2049
2050         * netrc.c: Ditto.
2051
2052         * http.c: Reformat some function definitions so that ansi2knr can
2053         read them.
2054
2055         * hash.c (struct hash_table): Use the PARAMS macro around
2056         parameters in the declaration of hash_function and test_function.
2057         (prime_size): Spell 2580823717UL and 3355070839UL as (unsigned
2058         long)0x99d43ea5 and (unsigned long)0xc7fa5177 respectively, so
2059         that pre-ANSI compilers can read them.
2060         (find_mapping): Use PARAMS when declaring EQUALS.
2061         (hash_table_put): Ditto.
2062
2063         * ftp.h: Wrap the parameters of ftp_index declaration in PARAMS.
2064
2065         * cookies.c (cookie_new): Use (unsigned long)0 instead of 0UL,
2066         which was unsupported by pre-ANSI compilers.
2067
2068         From Nelson H. F. Beebe <beebe@math.utah.edu>, for the most part.
2069
2070 2002-04-11  Hrvoje Niksic  <hniksic@arsdigita.com>
2071
2072         * url.c (url_filename): Use compose_file_name regardless of
2073         whether opt.dirstruct is set.
2074         (mkstruct): Don't handle the query and the reencoding of DIR; that
2075         is done in compose_file_name.
2076
2077 2002-04-10  Hrvoje Niksic  <hniksic@arsdigita.com>
2078
2079         * wget.h: Ditto for extern char *exec_name.
2080
2081         * options.h: Don't guard against OPTIONS_DEFINED_HERE -- it is
2082         perfectly legal to follow an `extern' with a non-`extern' ones,
2083         provided the types match.
2084
2085         * main.c: Don't define OPTIONS_DEFINED_HERE.
2086
2087 2002-04-10  Hrvoje Niksic  <hniksic@arsdigita.com>
2088
2089         * progress.c (create_image): Revert to calculating ETA based on
2090         average download speed.
2091         (create_image): Don't print ETA until the download has been active
2092         for at least 3 seconds.
2093         (create_image): When ETA is not available, don't print anything.
2094         The previous version would print --:--.
2095
2096 2002-04-10  Hrvoje Niksic  <hniksic@arsdigita.com>
2097
2098         * progress.c (bar_update): Keep updating a subinterval until it
2099         reaches or exceeds a watermark.  That way the measurement will be
2100         guaranteed to span a configurable minimum of time.  The current
2101         default is 3s in 30 100ms intervals.
2102
2103 2002-04-09  Hrvoje Niksic  <hniksic@arsdigita.com>
2104
2105         * progress.c (bar_update): Maintain an array of the time it took
2106         to perform previous 30 network reads.
2107         (create_image): Calculate the download speed and ETA based on the
2108         last 30 reads, not the entire download.
2109         (create_image): Make sure that the ETA is not changed more than
2110         once per second.
2111
2112 2002-04-09  Ian Abbott  <abbotti@mev.co.uk>
2113
2114         * mswindows.c (borland_utime): New function conditionally defined
2115         when `HACK_BCC_UTIME_BUG' is defined.  A reimplementation of
2116         `utime()' as Borland's `utime()' function is broken on Windows 9x
2117         systems.  (Original patch by Chin-yuan Kuo <sr1111111@yahoo.com.tw>.)
2118
2119 2002-04-08  Hrvoje Niksic  <hniksic@arsdigita.com>
2120
2121         * ftp.c (ftp_loop): Propagate the result of ftp_retrieve_glob.
2122
2123 2002-03-26  Ian Abbott  <abbotti@mev.co.uk>
2124
2125         * Makefile.in: Updated several dependencies for object files.
2126
2127 2002-03-20  Ian Abbott  <abbotti@mev.co.uk>
2128
2129         * mswindows.c: Include "utils.h".
2130
2131 2002-03-18  Ian Abbott  <abbotti@mev.co.uk>
2132
2133         * host.h: Don't include netdb.h on windows.
2134
2135 2002-02-19  Hrvoje Niksic  <hniksic@arsdigita.com>
2136
2137         * recur.c (retrieve_tree): Handle the case when start_url doesn't
2138         parse.
2139
2140 2002-02-19  Andreas Damm  <andreas-sourceforge@radab.org>
2141
2142         * wget.h (DO_REALLOC_FROM_ALLOCA): Multiply with sizeof(type) when
2143         calling xmalloc and memcpy.
2144
2145 2002-02-19  Hrvoje Niksic  <hniksic@arsdigita.com>
2146
2147         * host.h: Include Unix-specific includes #ifndef WINDOWS.
2148         Patch originally provided by Christian Lackas.
2149
2150 2002-02-11  Christian Lackas  <delta@lackas.net>
2151
2152         * recur.c: recurive downloading for https fixed.
2153
2154 2002-02-19  Alan Eldridge  <alane@geeksrus.net>
2155
2156         * host.h: Also include <netinet/in.h> and <sys/socket.h>.
2157
2158         * ftp-basic.c: Also include <netinet/in.h>.
2159
2160 2002-02-05  Ian Abbott  <abbotti@mev.co.uk>
2161
2162         * http.c (gethttp): when -c used, mark already fully retrieved
2163         file as successfully retrieved.
2164
2165 2002-02-19  Hrvoje Niksic  <hniksic@arsdigita.com>
2166
2167         * url.c (url_parse): Don't treat '?' as query string separator
2168         when parsing FTP URLs.
2169
2170 2002-02-01  Hrvoje Niksic  <hniksic@arsdigita.com>
2171
2172         * html-url.c (tag_handle_meta): Don't crash on <meta
2173         http-equiv=refresh> where content is missing.
2174
2175 2002-01-31  Herold Heiko  <Heiko.Herold@previnet.it>
2176
2177         * ftp-basic.c, host.c: don't include sys/socket.h, arpa/inet.h,
2178         netdb.h on windows.
2179
2180 2002-01-30  Hrvoje Niksic  <hniksic@arsdigita.com>
2181
2182         * retr.c (retrieve_url): Remove redirection cycle detection.  This
2183         is because some sites legitimately redirect the user back to the
2184         same location, e.g. after an authorization check performed by
2185         another page.  MAX_REDIRECTIONS is still used to prevent infinite
2186         redirection loops.
2187
2188 2002-01-26  Hrvoje Niksic  <hniksic@arsdigita.com>
2189
2190         * http.c (gethttp): Wrap host name in square brackets if it
2191         contains a colon.
2192
2193 2002-01-26  Hrvoje Niksic  <hniksic@arsdigita.com>
2194
2195         * url.c (url_parse): Allow all hex digits, not only decimal ones,
2196         to form an IP address.
2197
2198 2002-01-26  Hrvoje Niksic  <hniksic@arsdigita.com>
2199
2200         * url.c (urlchr_table): Make square braces reserved, so we can
2201         parse http://[::1]/.
2202         (url_parse): Handle host in braces.
2203         (url_string): If url->host contains colons, wrap it in braces.
2204
2205 2002-01-24  Hrvoje Niksic  <hniksic@arsdigita.com>
2206
2207         * connect.c (resolve_bind_address): New function.
2208         (connect_to_one): Use it.
2209         (bindport): Ditto.
2210
2211         * init.c: Don't resolve bind-address here.
2212
2213         * host.c (wget_sockaddr_set_address): Would bug out with ADDR == NULL.
2214
2215 2002-01-24  Hrvoje Niksic  <hniksic@arsdigita.com>
2216
2217         * host.c (lookup_host): Use sizeof(ip4_address) to calculate the
2218         offset.
2219         (address_list_new): Use map_ipv4_to_ip.
2220         (wget_sockaddr_set_address): Convert ADDR to IPv4 before using it
2221         in IPv4 context.
2222
2223 2002-01-24  Hrvoje Niksic  <hniksic@arsdigita.com>
2224
2225         * source: Integrated IPv6 support.
2226         Written by Thomas Lussnig <thomas.lussnig@bewegungsmelder.de>.
2227
2228 2002-01-15  Ian Abbott  <abbotti@mev.co.uk>
2229
2230         * init.c (cmd_file): Change `\' to `/' for Windows (yes, really!)
2231         (cmd_directory): New function. Like cmd_file(), but strips
2232         trailing directory separators.
2233         (commands): Change action for "dirprefix" from `cmd_file' to
2234         `cmd_directory'.
2235
2236         * utils.c (make_directory): Allow intermediate `mkdir' calls to
2237         fail, as not all path components that do not exist should be
2238         directory components, especially under Windows.
2239
2240 2002-01-17  Hrvoje Niksic  <hniksic@arsdigita.com>
2241
2242         * netrc.c (parse_netrc): Skip leading whitespace before testing
2243         whether the line is empty.  Empty lines still contain the line
2244         terminator.
2245
2246 2002-01-15  Hrvoje Niksic  <hniksic@arsdigita.com>
2247
2248         * gen_sslfunc.c (ssl_iread): Call select on the file descriptor
2249         only if no data is pending in SSL buffers.
2250         From tony@bluetail.com.
2251
2252 2002-01-14  Hrvoje Niksic  <hniksic@arsdigita.com>
2253
2254         * headers.c (header_get): Strip trailing whitespace from the
2255         header.
2256
2257 2002-01-14  Hrvoje Niksic  <hniksic@arsdigita.com>
2258
2259         * url.c (parse_uname): URL-decode *USER and *PASSWD.
2260
2261 2002-01-07  Ian Abbott <abbotti@mev.co.uk>
2262
2263         * url.c (uri_merge_1): Deal with "net path" relative URL (one that
2264         starts with "//").
2265
2266 2002-01-14  Hrvoje Niksic  <hniksic@arsdigita.com>
2267
2268         * http.c (gethttp): Invalidate SOCK if get_contents encountered an
2269         error.
2270
2271 2001-12-24  Hrvoje Niksic  <hniksic@arsdigita.com>
2272
2273         * version.c: Wget 1.8.1 is released.
2274
2275 2001-12-19  Hrvoje Niksic  <hniksic@arsdigita.com>
2276
2277         * version.c: Wget 1.8.1-pre3 is released.
2278
2279 2001-12-19  Hrvoje Niksic  <hniksic@arsdigita.com>
2280
2281         * recur.c (retrieve_tree): Enqueue the canonical representation of
2282         start_url, so that the test against dl_url_file_map works.
2283
2284 2001-12-19  Hrvoje Niksic  <hniksic@arsdigita.com>
2285
2286         * log.c (logputs): Check for requested verbosity before printing
2287         anything.
2288
2289 2001-12-19  Hrvoje Niksic  <hniksic@arsdigita.com>
2290
2291         * html-url.c (tag_handle_link): Treat the "shortcut icon" link as
2292         inline.
2293
2294 2001-12-18  Hrvoje Niksic  <hniksic@arsdigita.com>
2295
2296         * recur.c (retrieve_tree): Make a copy of file obtained from
2297         dl_url_file_map because the code calls xfree(file) later.
2298
2299 2001-12-18  Hrvoje Niksic  <hniksic@arsdigita.com>
2300
2301         * recur.c (register_html): Maintain a hash table of HTML files
2302         along with the list.  Disallow duplicates.
2303         (retrieve_tree): Use downloaded_html_set to check whether the file
2304         found in dl_url_file_map is an HTML file, and descend into it if
2305         so.
2306         (convert_all_links): Don't guard against duplicates in
2307         downloaded_html_list, since they are no longer possible.
2308
2309 2001-12-18  Ian Abbott  <abbotti@mev.co.uk>
2310
2311         * recur.c (retrieve_tree): Pass on referring URL when retrieving
2312         recursed URL.
2313
2314 2001-12-17  Hrvoje Niksic  <hniksic@arsdigita.com>
2315
2316         * version.c: Wget 1.8.1-pre2 is released.
2317
2318 2001-12-17  Hrvoje Niksic  <hniksic@arsdigita.com>
2319
2320         * retr.c (sleep_between_retrievals): Simplify indentation.
2321
2322 2001-12-17  Hrvoje Niksic  <hniksic@arsdigita.com>
2323
2324         * gen_sslfunc.c (ssl_init_prng): Use random_number to get a byte
2325         of "randomness" at a time.
2326         (ssl_init_prng): Don't seed the PRNG; random_number will do that.
2327
2328         * retr.c (sleep_between_retrievals): Use it.  Make sure that the
2329         random amount averages in opt.wait.
2330         (sleep_between_retrievals): Don't seed the PRNG; random_number
2331         will do that.
2332
2333         * utils.c (random_number): New function.
2334
2335 2001-12-14  Hrvoje Niksic  <hniksic@arsdigita.com>
2336
2337         * url.c (path_simplify): Move here from utils.c, and make static.
2338
2339 2001-12-13  Hrvoje Niksic  <hniksic@arsdigita.com>
2340
2341         * init.c (wgetrc_file_name): Print correct message when loading
2342         getenv("WGETRC") fails.
2343
2344 2001-12-13  Hrvoje Niksic  <hniksic@arsdigita.com>
2345
2346         * recur.c (register_download): Don't abort when one URL references
2347         two different files.
2348
2349 2001-12-13  Hrvoje Niksic  <hniksic@arsdigita.com>
2350
2351         * http.c (gethttp): Check for conn->scheme, not u->scheme, before
2352         calling ssl_iwrite.
2353
2354 2001-12-13  Hrvoje Niksic  <hniksic@arsdigita.com>
2355
2356         * version.c: Wget 1.8.1-pre1 is released.
2357
2358 2001-12-13  Hrvoje Niksic  <hniksic@arsdigita.com>
2359
2360         * res.c (matches): Fix broken URL in the docstring.
2361
2362 2001-12-13  Hrvoje Niksic  <hniksic@arsdigita.com>
2363
2364         * html-url.c (tag_url_attributes): Mark <embed href=...> as
2365         external.
2366
2367 2001-12-12  Hrvoje Niksic  <hniksic@arsdigita.com>
2368
2369         * url.c (get_urls_file): Cosmetic changes.
2370
2371 2001-12-12  Hrvoje Niksic  <hniksic@arsdigita.com>
2372
2373         * html-url.c (append_one_url): Resurrect warning when unable to
2374         resolve a relative link.
2375
2376 2001-12-12  Hrvoje Niksic  <hniksic@arsdigita.com>
2377
2378         * html-url.c (collect_tags_mapper): Break into several functions.
2379         (tag_url_attributes): Collect <embed href=...>.
2380
2381 2001-12-11  Hrvoje Niksic  <hniksic@arsdigita.com>
2382
2383         * host.c: New type ipv4_address.  Use it consistently instead of
2384         `unsigned char[4]' and `unsigned char *'.
2385         (pretty_print_address): Accept a `const void *', to require even
2386         less casting.
2387
2388 2001-12-11  Hrvoje Niksic  <hniksic@arsdigita.com>
2389
2390         * ftp-ls.c (ftp_parse_vms_ls): Fix obvious memory leaks.
2391
2392 2001-12-10  Hrvoje Niksic  <hniksic@arsdigita.com>
2393
2394         * main.c (main): Initialize progress after fork_to_background, so
2395         that it knows when to use dots.
2396
2397         * mswindows.c (ws_hangup): Call log_request_redirect_output.
2398
2399         * utils.c (fork_to_background): Print the PID of the child
2400         process.
2401
2402         * log.c (log_request_redirect_output): Set a flag that output
2403         redirection has been requested.  Doing anything else in a signal
2404         handler is unsafe.
2405         (check_redirect_output): New function: check whether redirection
2406         has been requested and, if so, call redirect_output().
2407         (logputs): Call check_redirect_output.
2408         (logprintf): Ditto.
2409         (debug_logprintf): Ditto.
2410         (redirect_output): Print clearer messages.
2411
2412         * main.c (redirect_output_signal): Don't call
2413         redirect_output_signal directly.  Instead, call
2414         log_request_redirect_output.
2415
2416         * utils.c (memfatal): Ditto.
2417
2418         * progress.c (display_image): Use it.
2419
2420         * log.c (log_set_save_context): New function: allow the caller to
2421         turn off saving log context lines.
2422
2423 2001-12-10  Hrvoje Niksic  <hniksic@arsdigita.com>
2424
2425         * host.c (address_list_set_faulty): Uncomment a sanity check.
2426
2427 2001-12-10  Hrvoje Niksic  <hniksic@arsdigita.com>
2428
2429         * utils.c (long_to_string): Return a pointer after where the
2430         number ends.
2431         (long_to_string): Rename to number_to_string.
2432
2433 2001-12-10  Hrvoje Niksic  <hniksic@arsdigita.com>
2434
2435         * utils.c (path_simplify): Correctly handle the unlikely case that
2436         b starts out as path + 1.
2437
2438 2001-12-10  Hrvoje Niksic  <hniksic@arsdigita.com>
2439
2440         * utils.c (path_simplify): Rewrite, with better comments, and
2441         without the use of strcpy to move overlapping blocks.
2442
2443 2001-12-09  Hrvoje Niksic  <hniksic@arsdigita.com>
2444
2445         * init.c (cmd_spec_progress): Resurrect.  Check whether VAL is a
2446         valid progress type before setting it.
2447
2448 2001-12-09  Hrvoje Niksic  <hniksic@arsdigita.com>
2449
2450         * main.c (main): Remove stray debugging message.
2451
2452 2001-12-09  Hrvoje Niksic  <hniksic@arsdigita.com>
2453
2454         * progress.c (create_image): Fix ETA padding when hours are prined.
2455
2456 2001-12-09  Hrvoje Niksic  <hniksic@arsdigita.com>
2457
2458         * version.c: Wget 1.8 is released.
2459
2460 2001-12-09  Hrvoje Niksic  <hniksic@arsdigita.com>
2461
2462         * url.c (reencode_string): Declare static.
2463
2464         * res.c (registered_specs): Declare static.
2465
2466         * progress.c (current_impl_locked): Declare static.
2467
2468         * log.c (flush_log_p): Declare static.
2469         (needs_flushing): Ditto.
2470
2471         * http.c (digest_authentication_encode): Declare static.
2472
2473         * html-url.c (init_interesting): Declare static.
2474
2475         * host.c (host_name_addresses_map): Declare static.
2476
2477         * cookies.c (find_matching_chains): Declare static.
2478
2479         * ftp-ls.c (ftp_parse_vms_ls): Warn about the memory leak
2480         indicated by lint.
2481
2482         * utils.c (path_simplify): Remove unused variable STUB_CHAR.
2483
2484         * host.c (address_list_set_faulty): Document that INDEX is
2485         currently unused.
2486
2487         * url.c (rewrite_shorthand_url): Remove unused variable PATH.
2488
2489 2001-12-08  Hrvoje Niksic  <hniksic@arsdigita.com>
2490
2491         * version.c: Wget 1.8-pre2 is released.
2492
2493 2001-12-06  Hrvoje Niksic  <hniksic@arsdigita.com>
2494
2495         * progress.c (progress_handle_sigwinch): Set up the signal again.
2496
2497         * utils.c: Include <sys/termios.h>, where Solaris defines
2498         TIOCGWINSZ.
2499
2500         * progress.c (bar_create): Don't use the last column on the screen.
2501         (create_image): Pad ETA to constant size.  Pad SIZE to nine digits
2502         only until it exceeded them.
2503
2504 2001-12-06  Hrvoje Niksic  <hniksic@arsdigita.com>
2505
2506         * version.c: Wget 1.8-pre1 is released.
2507
2508 2001-12-06  Hrvoje Niksic  <hniksic@arsdigita.com>
2509
2510         * progress.c (progress_create): Make sure that, when the output is
2511         redirected, the progress implementation gets changed to the
2512         fallback one.
2513         (bar_set_params): Set current_impl_locked to 1 when "force" is
2514         specified.
2515         (progress_create): Don't change the progress implementation if
2516         current_impl_locked is non-zero.
2517
2518         * main.c (redirect_output_signal): Call
2519         progress_schedule_redirect.
2520
2521         * progress.c (progress_schedule_redirect): New function.
2522
2523 2001-12-06  Hrvoje Niksic  <hniksic@arsdigita.com>
2524
2525         * log.c (logvprintf): Restructure to allow being called multiple
2526         times.
2527         (logprintf): Call logvprintf in a loop.
2528         (debug_logprintf): Ditto.
2529
2530 2001-12-06  Hrvoje Niksic  <hniksic@arsdigita.com>
2531
2532         * gen_sslfunc.c (ssl_init_prng): Allow the user to disable EGD by
2533         setting egd_file it to empty string.
2534
2535         * main.c (main): Change the option name from --sslegdsock to
2536         --egd-file.
2537
2538 2001-12-06  Hrvoje Niksic  <hniksic@arsdigita.com>
2539
2540         * gen_sslfunc.c (ssl_init_prng): Make the printed message
2541         translatable.
2542
2543 2001-12-06  Hrvoje Niksic  <hniksic@arsdigita.com>
2544
2545         * url.c (scheme_disable): New function.
2546
2547         * main.c (main): Call ssl_init_prng from here rather than from
2548         init_ssl, so that it has a chance to disable support for https
2549         before a URL has been resolved.
2550
2551         * gen_sslfunc.c (ssl_init_prng): Seed with rand() if all else
2552         failed.
2553         (ssl_init_prng): Disable support for https if seeding the PRNG
2554         fails.
2555
2556 2001-12-06  Hrvoje Niksic  <hniksic@arsdigita.com>
2557
2558         * utils.c (read_whole_line): Handle lines beginning with \0.
2559
2560 2001-12-05  Hrvoje Niksic  <hniksic@arsdigita.com>
2561
2562         * recur.c (convert_all_links): Guard against duplicates in
2563         downloaded_html_files.
2564         (register_download): Don't invalidate similar-looking URLs.
2565         (match_except_index): New function.
2566
2567 2001-12-05  Hrvoje Niksic  <hniksic@arsdigita.com>
2568
2569         * utils.c (path_simplify): Document with test cases.
2570
2571 2001-12-04  Hrvoje Niksic  <hniksic@arsdigita.com>
2572
2573         * gen_sslfunc.c: Ditto.
2574
2575         * rbuf.c: Include <string.h>.
2576
2577 2001-12-04  Hrvoje Niksic  <hniksic@arsdigita.com>
2578
2579         * recur.c (retrieve_tree): Check whether the URL was already
2580         downloaded before downloading it again.
2581         (descend_child_p): Renamed to download_child_p.
2582         (register_download): When one URL is downloaded to a file already
2583         "owned" by another URL, delete all references that map any URL to
2584         that file.
2585         (register_delete_file): New function.
2586         (retrieve_tree): Use it after deleting a file.
2587
2588         * url.c (url_parse): Re-canonicalize the URL also if the path is
2589         empty, so that e.g. "http://www.server.com" ->
2590         "http://www.server.com/".
2591         (lowercase_str): Use ISUPPER instead of !ISLOWER.
2592
2593         * retr.c (retrieve_url): Use the canonical URL form when calling
2594         register_download().
2595
2596 2001-12-04  Ian Abbott <abbotti@mev.co.uk>
2597
2598         * snprintf.c (dopr): Use `unsigned int' as the second argument to
2599         va_arg when casting to `unsigned short' is intended.
2600
2601 2001-12-04  Herold Heiko  <Heiko.Herold@previnet.it>
2602
2603         * gen_sslfunc.c: on windows provide ssl crypto random 
2604           initialization through RAND_screen(); could possibly
2605           be not enough for strong ssl communication (see the 
2606           relevant manual page from the openssl package).
2607
2608 2001-12-04  Hrvoje Niksic  <hniksic@arsdigita.com>
2609
2610         * url.c (local_quote_string): Reenable quoting of question marks,
2611         but only when `--html-extension' is used.
2612
2613 2001-12-03  Hrvoje Niksic  <hniksic@arsdigita.com>
2614
2615         * version.c: Wget 1.8-beta3 is released.
2616
2617 2001-12-03  Hrvoje Niksic  <hniksic@arsdigita.com>
2618
2619         * snprintf.c (dopr): Cast the result of va_arg to short int and
2620         short unsigned int where these types are expected to be used.
2621
2622 2001-12-03  Hrvoje Niksic  <hniksic@arsdigita.com>
2623
2624         * snprintf.c (dopr): Replace `short int' and `unsigned short int'
2625         with `int' when using it as the second argument to `va_arg'.
2626
2627 2001-12-03  Hrvoje Niksic  <hniksic@arsdigita.com>
2628
2629         * host.c (address_list_new_one): New function.
2630         (lookup_host): Use it.
2631
2632 2001-12-03  Andre Majorel  <amajorel@teaser.fr>
2633
2634         * host.c (lookup_host): Don't initialize TMPSTORE directly because
2635         it's not legal C.
2636
2637 2001-12-03  Hrvoje Niksic  <hniksic@arsdigita.com>
2638
2639         * ftp-basic.c (ftp_port): Don't return HOSTERR if we fail getting
2640         the socket data.
2641
2642         * ftp.c: Ditto.
2643
2644         * http.c: No need to declare h_errno.
2645
2646         * host.c: Declare h_errno.
2647
2648 2001-12-02  Hrvoje Niksic  <hniksic@arsdigita.com>
2649
2650         * utils.c (file_merge): If BASE doesn't contain a slash, just
2651         return a copy of FILE.
2652
2653 2001-12-02  Hrvoje Niksic  <hniksic@arsdigita.com>
2654
2655         * version.c: Wget 1.8-beta2 is released.
2656
2657 2001-12-01  Hrvoje Niksic  <hniksic@arsdigita.com>
2658
2659         * ftp.c (getftp): When PWD fails, assume "/".
2660
2661         * ftp-basic.c (ftp_syst): Fix indentation.
2662
2663 2001-12-01  Hrvoje Niksic  <hniksic@arsdigita.com>
2664
2665         * url.c (get_urls_file): If opt.base_href is specified, merge each
2666         URL with the base.
2667
2668 2001-12-01  Hrvoje Niksic  <hniksic@arsdigita.com>
2669
2670         * main.c (print_help): Don't document the removed `-nh'.
2671
2672 2001-12-01  Hrvoje Niksic  <hniksic@arsdigita.com>
2673
2674         * url.c (url_full_path): Document better.
2675
2676         * http.c (gethttp): Use the full path when creating digest
2677         authorization.
2678
2679 2001-12-01  Hrvoje Niksic  <hniksic@arsdigita.com>
2680
2681         * cookies.c (path_matches): Return 0 if PREFIX doesn't begin with
2682         '/'.
2683
2684 2001-12-01  Hrvoje Niksic  <hniksic@arsdigita.com>
2685
2686         * cookies.c (path_matches): FULL_PATH doesn't begin with '/', but
2687         PREFIX does.
2688
2689 2001-12-01  Hrvoje Niksic  <hniksic@arsdigita.com>
2690
2691         * cookies.c (check_domain_match): Reimplement to match Netscape's
2692         "preliminary specification" for cookies.
2693
2694 2001-12-01  Hrvoje Niksic  <hniksic@arsdigita.com>
2695
2696         * url.c (replace_attr_refresh_hack): New function.
2697         (convert_links): Call replace_attr_refresh_hack for Refresh
2698         links.  It will add the "TMOUT; URL=" junk before the link.
2699
2700         * html-url.c (collect_tags_mapper): Set ID to the ID of the
2701         "content" attribute, not "http-equiv".
2702         (collect_tags_mapper): Don't use OFFSET to hack the raw_* values;
2703         instead, store the information that this entry belongs to a
2704         "refresh" link.
2705
2706 2001-12-01  Hrvoje Niksic  <hniksic@arsdigita.com>
2707
2708         * version.c: Wget 1.8-beta1 is released.
2709
2710 2001-12-01  Hrvoje Niksic  <hniksic@arsdigita.com>
2711
2712         * recur.c (retrieve_tree): Allow -p retrievals to exceed maximum
2713         depth by more than one.
2714
2715 2001-11-30  Hrvoje Niksic  <hniksic@arsdigita.com>
2716
2717         * retr.c (retrieve_url): Don't allow more than 20 redirections.
2718
2719 2001-11-30  Hrvoje Niksic  <hniksic@arsdigita.com>
2720
2721         * recur.c (retrieve_tree): Skip the non-inline entries when
2722         enqueuing the children of a leaf HTML node in -p mode.
2723         (descend_url_p): Ignore opt.no_parent when in -p mode and UPOS is
2724         "inline".
2725
2726         * html-url.c (get_urls_html): Don't accept dash_p_leaf_HTML.
2727         (collect_tags_mapper): When an entry is "inline", mark it as such.
2728
2729         * recur.c (descend_url_p): Fix test when checking for
2730         acceptance/rejection rules.
2731
2732 2001-10-31 Daniel BODEA <dali@dali-designs.com>
2733
2734         * netrc.c (search_netrc): When slack_default is 0, still look for
2735         an account with matching password, just not the "default account".
2736         HTTP Authorization using .netrc should now work as expected.
2737
2738 2001-11-30  T. Bharath  <TBharath@responsenetworks.com>
2739
2740         * http.c (persistent_available_p): Call SHUTDOWN_SSL if
2741         test_socket_open fails.
2742
2743 2001-11-30  Hrvoje Niksic  <hniksic@arsdigita.com>
2744
2745         * progress.c (display_image): Just print one CR to reset the
2746         cursor position.
2747
2748 2001-11-30  Christian Fraenkel  <c.fraenkel@gmx.net>
2749
2750         * init.c: New command `ssl_egd_sock'.
2751
2752         * main.c (main): New option `--sslegdsock'.
2753
2754         * gen_sslfunc.c (ssl_init_prng): Seed the RNG using EGD.
2755
2756 2001-11-29  Hrvoje Niksic  <hniksic@arsdigita.com>
2757
2758         * cmpt.c (memmove): Include a simple memmove implementation.
2759
2760 2001-11-29  Hrvoje Niksic  <hniksic@arsdigita.com>
2761
2762         * headers: Guard against header files being included twice.
2763
2764 2001-11-29  Hrvoje Niksic  <hniksic@arsdigita.com>
2765
2766         * gen-md5.c: Use unsigned char * as the buffer argument to
2767         gen_md5_update.
2768
2769 2001-11-29  Hrvoje Niksic  <hniksic@arsdigita.com>
2770
2771         * connect.h: Declare select_fd.
2772
2773 2001-11-29  Hrvoje Niksic  <hniksic@arsdigita.com>
2774
2775         * recur.c (descend_url_p): When resolving no_parent, compare with
2776         start_url, not parent url.  Otherwise link from /a/b/ to /a/c/
2777         wouldn't be followed, although the download started from /a/.
2778
2779 2001-01-23  Herold Heiko  <Heiko.Herold@previnet.it>
2780
2781         * config.h.ms, mswindows.h: defined HAVE_ISATTY, use _isatty for
2782         MS VC; somebody with Borland compiler please check and provide
2783         patch if possible;
2784
2785         * cmpt.c: provided a usleep emulation.
2786
2787 2001-11-29  Hrvoje Niksic  <hniksic@arsdigita.com>
2788
2789         * host.c (address_list_new): Initialize al->faulty.
2790
2791 2001-11-29  Hrvoje Niksic  <hniksic@arsdigita.com>
2792
2793         * http.c (http_process_range): Accept the broken output of
2794         "JavaWebServer/1.1.1".
2795
2796 2001-11-28  Hrvoje Niksic  <hniksic@arsdigita.com>
2797
2798         * progress.c (dot_set_params): If PARAMS is unspecified, use
2799         dot_style, if available.
2800
2801         * init.c: Ditto.
2802
2803         * main.c (main): Resurect --dot-style.
2804
2805         * progress.c (dot_finish): Print the quantity if we're left at the
2806         beginning of a row.
2807
2808 2001-11-27  Hrvoje Niksic  <hniksic@arsdigita.com>
2809
2810         * cmpt.c (random): Removed.
2811
2812         * retr.c (sleep_between_retrievals): Use the more portable rand()
2813         instead of random().
2814
2815 2001-11-27  Ian Abbott <abbotti@mev.co.uk>
2816
2817         * retr.c (retrieve_from_file): Initialize `new_file' to NULL to
2818         prevent seg fault.
2819
2820 2001-11-27  Hrvoje Niksic  <hniksic@arsdigita.com>
2821
2822         * connect.c (connect_to_many): Use address_list_set_faulty to
2823         prevent the faulty address from being reused.
2824
2825         * host.c (address_list_set_faulty): New function.
2826         (address_list_get_bounds): New function, instead of
2827         address_list_count.
2828
2829 2001-11-27  Hrvoje Niksic  <hniksic@arsdigita.com>
2830
2831         * url.c (convert_links): Don't translate %d-%d.
2832
2833         * main.c (print_help): Remove stray HAVE_RANDOM code.
2834
2835 2001-11-27  Hrvoje Niksic  <hniksic@arsdigita.com>
2836
2837         * ftp.c (getftp): Improve output after sending PASV.  Don't
2838         attempt to "look up" the IP address we already know; call
2839         connect_to_one directly.
2840
2841 2001-11-27  Hrvoje Niksic  <hniksic@arsdigita.com>
2842
2843         * progress.c: Change the default progress implementation to "bar".
2844
2845 2001-11-27  Hrvoje Niksic  <hniksic@arsdigita.com>
2846
2847         * progress.c (bar_create): Print two newlines.
2848
2849 2001-11-27  Hrvoje Niksic  <hniksic@arsdigita.com>
2850
2851         * cmpt.c (random): New function, a simple-minded replacement for
2852         random() on systems that don't have it.
2853
2854 2001-11-26  Hrvoje Niksic  <hniksic@arsdigita.com>
2855
2856         * config.h.in: Put a HAVE_USLEEP stub.
2857
2858         * cmpt.c (usleep): Replacement implementation of usleep using
2859         select.
2860
2861         * init.c: New option init_rate.
2862
2863         * main.c (main): New option --limit-rate.
2864
2865         * retr.c (limit_bandwidth): New function.
2866         (get_contents): Call it to limit the bandwidth used when
2867         downloading.
2868
2869         * progress.c (dot_update): Would print the wrong download speed on
2870         rows other than the first one when the download was continued.
2871         (dot_finish): Ditto.
2872
2873 2001-11-26  Ian Abbott <abbotti@mev.co.uk>
2874
2875         * http.c (gethttp): fix undeclared variable 'err' when compiled
2876         with HAVE_SSL.
2877
2878 2001-11-26  Hrvoje Niksic  <hniksic@arsdigita.com>
2879
2880         * progress.c: Don't allocate new timers; use the timing data
2881         propagated from the caller.
2882
2883         * retr.c (get_contents): Allocate and use a timer.
2884
2885 2001-11-26  Hrvoje Niksic  <hniksic@arsdigita.com>
2886
2887         * http.c (last_host_ip): Made into an address_list.
2888         (invalidate_persistent): Release pc_last_host_ip.
2889         (register_persistent): Use lookup_host.
2890         (persistent_available_p): Check for equality of hosts using
2891         address_list_match_all.  Call address_list_release.
2892         (http_cleanup): New function.
2893
2894         * ftp.c (getftp): Use lookup_host and connect_to_many.
2895
2896         * http.c (gethttp): Use lookup_host and connect_to_many.
2897
2898         * connect.c (make_connection): Removed.
2899         (connect_to_one): New function.
2900         (connect_to_many): Ditto.
2901         (set_connection_host_name): Ditto.
2902
2903         * host.c (lookup_host): New function; new return type.
2904         (address_list_new): New function.
2905         (address_list_count): Ditto.
2906         (address_list_copy_one): Ditto.
2907         (address_list_delete): Ditto.
2908         (address_list_release): Ditto.
2909         (pretty_print_address): Ditto.
2910
2911 2001-11-26  Hrvoje Niksic  <hniksic@arsdigita.com>
2912
2913         * recur.c (retrieve_tree): In case of followed redirection,
2914         blacklist the pre-redirection URL.
2915
2916 2001-11-26  Hrvoje Niksic  <hniksic@arsdigita.com>
2917
2918         * recur.c (descend_redirect_p): New function.
2919         (retrieve_tree): Make sure redirections are not blindly followed.
2920
2921 2001-11-04  Alan Eldridge  <alane@geeksrus.net>
2922
2923         * config.h.in: added HAVE_RANDOM.
2924
2925         * options.h: added random_wait to struct options.
2926
2927         * main.c (print_help [HAVE_RANDOM], main): added arg parsing, help
2928         for --random-wait.
2929
2930         * retr.c (sleep_between_retrievals) [HAVE_RANDOM]: added
2931         implementation of random wait times.
2932
2933         * init.c (commands): added "randomwait" keyword.
2934
2935 2001-11-25  Hrvoje Niksic  <hniksic@arsdigita.com>
2936
2937         * recur.c (descend_url_p): Be more conservative with blacklisting
2938         URLs.
2939         (convert_all_links): Print how many files have been converted, and
2940         how long it took.
2941
2942         * progress.c (create_image): Place the number of downloaded bytes
2943         right after the progress bar.
2944
2945         * utils.c (suffix): Return a pointer into the string.
2946
2947 2001-11-25  Hrvoje Niksic  <hniksic@arsdigita.com>
2948
2949         * url.c (convert_links): Handle CO_NULLIFY_BASE.
2950
2951         * recur.c (retrieve_tree): Ignore download-ignorable children.
2952         (convert_all_links): Specify CO_NULLIFY_BASE when link_base_p.
2953
2954         * html-url.c (handle_link): Return the newly created urlpos.
2955         (collect_tags_mapper): When dealing with BASE, store the base
2956         reference and mark it as download-ignorable.
2957
2958 2001-11-25  Hrvoje Niksic  <hniksic@arsdigita.com>
2959
2960         * url.c (convert_links): Attempt to quote '?' as "%3F" when
2961         linking to local files.  Given up on the attempt, as it breaks
2962         local browsing.
2963
2964 2001-11-25  Hrvoje Niksic  <hniksic@arsdigita.com>
2965
2966         * main.c (private_initialize): Removed.
2967         (main): Don't call private_initialize.
2968
2969         * http.c: Call lookup_host.
2970
2971         * host.c (host_init): Removed.
2972         (add_host_to_cache): Initialize host_name_address_map here, on
2973         demand.
2974         (ngethostbyname): Commented out.
2975
2976         * connect.c (make_connection): Remove dead code; use lookup_host.
2977
2978         * host.c (store_hostaddress): Renamed to lookup_host and reversed
2979         the args.
2980         Removed host_address_name_map and host_slave_master_map.
2981
2982 2001-11-25  Hrvoje Niksic  <hniksic@arsdigita.com>
2983
2984         * progress.c (dot_create): Align the "[ skipping ... ]" string
2985         with the dots.
2986
2987         * retr.c (rate): Split into two functions: calc_rate and
2988         retr_rate.
2989
2990         * progress.c (create_image): Draw a dummy progress bar even when
2991         total size is unknown.
2992         (display_image): Place the text cursor at the end of the "image".
2993
2994 2001-11-25  Hrvoje Niksic  <hniksic@arsdigita.com>
2995
2996         * url.c (reencode_string): Use unsigned char, not char --
2997         otherwise the hex digits come out wrong for 8-bit chars such as
2998         nbsp.
2999         (lowercase_str): New function.
3000         (url_parse): Canonicalize u->url if needed.
3001         (get_urls_file): Parse each URL, and return only the valid ones.
3002         (free_urlpos): Call url_free.
3003         (mkstruct): Add :port if the port is non-standard.
3004         (mkstruct): Append the query string to the file name, if any.
3005         (urlpath_length): Use strpbrk_or_eos.
3006         (uri_merge_1): Handle the cases where LINK is an empty string,
3007         where LINK consists only of query, and where LINK consists only of
3008         fragment.
3009         (convert_links): Count and report both kinds of conversion.
3010         (downloaded_file): Use a hash table, not a list.
3011         (downloaded_files_free): Free the hash table.
3012
3013         * retr.c (retrieve_from_file): Ditto.
3014
3015         * main.c (main): Call either retrieve_url or retrieve_tree
3016         for each URL, not both.
3017
3018         * retr.c (register_all_redirections): New function.
3019         (register_redirections_mapper): Ditto.
3020         (retrieve_url): Register the redirections.
3021         (retrieve_url): Make the string "Error parsing proxy ..." 
3022         translatable.
3023
3024         * res.c (add_path): Strip leading slash from robots.txt paths so
3025         that the path representations are "compatible".
3026         (free_specs): Free each individual path, too.
3027         (res_cleanup): New function.
3028         (cleanup_hash_table_mapper): Ditto.
3029
3030         * recur.c (url_queue_new): New function.
3031         (url_queue_delete): Ditto.
3032         (url_enqueue): Ditto.
3033         (url_dequeue): Ditto.
3034         (retrieve_tree): New function, replacement for recursive_retrieve.
3035         (descend_url_p): New function.
3036         (register_redirection): New function.
3037
3038         * progress.c (create_image): Cosmetic changes.
3039
3040         * init.c (cleanup): Do all those complex cleanups only if
3041         DEBUG_MALLOC is defined.
3042
3043         * main.c: Removed --simple-check and the corresponding
3044         simple_host_check in init.c.
3045
3046         * html-url.c (handle_link): Parse the URL here, and propagate the
3047         parsed URL to the caller, who would otherwise have to parse it
3048         again.
3049
3050         * host.c (xstrdup_lower): Moved to utils.c.
3051         (realhost): Removed.
3052         (same_host): Ditto.
3053
3054 2001-11-24  Hrvoje Niksic  <hniksic@arsdigita.com>
3055
3056         * utils.c (path_simplify): Preserver the (non-)existence of
3057         leading slash.  Return non-zero if changes were made.
3058
3059 2001-11-24  Hrvoje Niksic  <hniksic@arsdigita.com>
3060
3061         * progress.c (bar_update): Don't modify bp->total_length if it is
3062         zero.
3063
3064 2001-11-24  Hrvoje Niksic  <hniksic@arsdigita.com>
3065
3066         * retr.c (retrieve_url): When the redirection URL doesn't parse,
3067         print the correct error message rather than "UNKNOWN".
3068
3069 2001-11-24  Hrvoje Niksic  <hniksic@arsdigita.com>
3070
3071         * progress.c (bar_finish): If the timer didn't record any time
3072         since the download beginning, fake 1ms.
3073
3074 2001-11-24  Hrvoje Niksic  <hniksic@arsdigita.com>
3075
3076         * recur.c (recursive_retrieve): Fix typo.
3077
3078 2001-11-23  Hrvoje Niksic  <hniksic@arsdigita.com>
3079
3080         * progress.c (create_image): Don't translate "%ld ".
3081
3082 2001-11-23  Hrvoje Niksic  <hniksic@arsdigita.com>
3083
3084         * progress.c (bar_set_params): Allow the user to force the use of
3085         the bar.
3086
3087 2001-11-23  Lemble Gregory  <gregory.lemble@st.com>
3088
3089         * gen_sslfunc.c (ssl_init_prng): New function; seed the SSL RNG.
3090
3091 2001-11-23  Hrvoje Niksic  <hniksic@arsdigita.com>
3092
3093         * progress.c: Renamed dp_* functions to dot_* for greater clarity
3094         and consistency with bar_*.
3095         (print_download_speed): Get rid of the unneeded '@' character.
3096         (create_image): Fix download rate geometry.
3097
3098         * progress.c (print_elapsed): Remove spurious space.
3099         (print_elapsed): Renamed to print_download_speed, since that's
3100         what it does.
3101
3102 2001-11-23  Hrvoje Niksic  <hniksic@arsdigita.com>
3103
3104         * progress.c (bar_update): If the downloaded amount becomes larger
3105         than the expected amount, adjust the expected amount accordingly.
3106
3107 2001-11-23  Hrvoje Niksic  <hniksic@arsdigita.com>
3108
3109         * utils.c (determine_screen_width): New function.
3110
3111         * main.c (main): New option `--progress=TYPE'.
3112         (main): Implement compatibility with the old option `--dot-style'.
3113
3114         * init.c: Removed cmd_spec_dotstyle -- that logic is now in
3115         dp_set_params.
3116         (cmd_spec_progress): New function.
3117
3118         * retr.c (get_contents): Use the progress_* functions instead of
3119         the old show_progress().
3120         (show_progress): Removed.
3121         (rate): Print "xxxx.xx K/s" instead of "KB/s".  Ditto for MB/s,
3122         etc.
3123
3124         * progress.c (set_progress_implementation): New function.
3125         (valid_progress_implementation_p): Ditto.
3126         (progress_create): Ditto.
3127         (progress_update): Ditto.
3128         (progress_finish): Ditto.
3129         (dp_create): Ditto.
3130         (dp_update): Ditto.
3131         (dp_finish): Ditto.
3132         (dp_set_params): Ditto.
3133         (print_elapsed): Ditto.
3134
3135 2001-11-22  Hrvoje Niksic  <hniksic@arsdigita.com>
3136
3137         * retr.c (show_progress): Use it.
3138
3139         * log.c (log_set_flush): New function.
3140
3141 2001-11-22  Hrvoje Niksic  <hniksic@arsdigita.com>
3142
3143         * utils.c (path_simplify): Don't remove trailing slashes.
3144
3145         * ftp.c (ftp_get_listing): Use it.
3146
3147         * utils.c (file_merge): New function.
3148
3149         * url.c (opt_url): Removed.
3150
3151         * recur.c (recursive_retrieve): Inline "opt_url" logic.
3152
3153         * main.c (main): Use xfree(), not free().
3154
3155         * url.c (rewrite_url_maybe): Renamed to rewrite_shorthand_url.
3156
3157         * ftp.c (ccon): Move `ccon' typedef here, since it's only used
3158         internally.
3159
3160         * config.h.in: Include a stub for HAVE_STRPBRK.
3161
3162         * cmpt.c (strpbrk): Include a replacement for systems without
3163         strpbrk().
3164
3165         * ftp.c: Use url_set_dir and url_set_file when modifying the URL.
3166
3167         * url.c (url_set_dir): New function.
3168         (url_set_file): Ditto.
3169
3170         * ftp-basic.c (ftp_process_type): Process FTP type here; the URL
3171         parser makes the URL "params" available, so we can do that in this
3172         function.
3173
3174         * retr.c: Ditto.
3175
3176         * ftp.c: Ditto; pass the local file information in `ccon'.
3177
3178         * http.c: Get rid of the ugly kludge that had URL being replaced
3179         with the proxy URL when proxy retrieval was requested.  Use a
3180         separate parameter to http_loop and gethttp for the proxy URL.
3181
3182         * http.c: Changed to reflect the fact that local file, proxy, and
3183         referer information are no longer stored in struct url.  The local
3184         file information is passed in `struct hstat' now.
3185
3186         * url.c: Reworked URL parsing to be more regular.  Reencode the
3187         URL using reencode_string.
3188         Removed non-URL-related information from struct url.  This
3189         includes fields `proxy', `local', and `referer'.
3190
3191 2001-11-22  Jochen Hein  <jochen@jochen.org>
3192
3193         * main.c (main): Split the copyright notice for easier
3194         translation.
3195
3196 2001-08-21  Dave Turner <dct25@hermes.cam.ac.uk>
3197
3198         * ftp-basic.c (ftp_size): New function to send non-standard SIZE
3199           command to server to request file size.
3200         * ftp.h (ftp_size): Export it.
3201         * ftp.c (getftp): Use new ftp_size function if restoring
3202           transfer of a file with unknown size.
3203
3204 2001-11-20  Hrvoje Niksic  <hniksic@arsdigita.com>
3205
3206         * url.c (parseurl): Don't depend on the now-obsolete TYPE.
3207
3208 2001-11-19  Hrvoje Niksic  <hniksic@arsdigita.com>
3209
3210         * url.c (getproxy): Handle URL shorthands.
3211
3212 2001-11-19  Hrvoje Niksic  <hniksic@arsdigita.com>
3213
3214         * main.c: Remove --wait / --waitretry backwards compatibility
3215         code.
3216         
3217 2001-11-19  Hrvoje Niksic  <hniksic@arsdigita.com>
3218
3219         * main.c (main): Use it.
3220
3221         * url.c (rewrite_url_maybe): New function.
3222
3223 2001-11-19  Hrvoje Niksic  <hniksic@arsdigita.com>
3224
3225         * url.c: Clean up handling of URL schemes.
3226
3227 2001-05-13  Hrvoje Niksic  <hniksic@arsdigita.com>
3228
3229         * url.c: Get rid of `protostrings'.
3230         (skip_proto): Don't use protostrings.
3231         (has_proto): Ditto.
3232
3233 2001-11-18  Hrvoje Niksic  <hniksic@arsdigita.com>
3234
3235         * Makefile.in: Conditionally compile getopt.o.
3236
3237 2001-11-18  Hrvoje Niksic  <hniksic@arsdigita.com>
3238
3239         * md5.h: Renamed to gnu-md5.h.
3240
3241         * md5.c: Renamed to gnu-md5.c.
3242
3243         * http.c: Ditto.
3244
3245         * ftp-opie.c: Use the new macros.
3246
3247         * sysdep.h: Define md5-related macros.
3248
3249         * config.h.in: Define HAVE_SOLARIS_MD5 or HAVE_BUILTIN_MD5
3250         depending on which md5 implementation is used.
3251
3252 2001-11-18  Hrvoje Niksic  <hniksic@arsdigita.com>
3253
3254         * res.c (res_register_specs): Initialize OLD and HP_OLD to appease
3255         the compiler.
3256
3257 2001-11-18  Hrvoje Niksic  <hniksic@arsdigita.com>
3258
3259         * http.c (gethttp): Print the whole response line when printing
3260         headers is requested.
3261
3262 2001-05-12  Hrvoje Niksic  <hniksic@arsdigita.com>
3263
3264         * res.c: New file.  Implement all RES-related code here.
3265
3266 2001-11-18  Hrvoje Niksic  <hniksic@arsdigita.com>
3267
3268         * version.c: Wget 1.7.1 is released.
3269
3270 2001-11-16  Hrvoje Niksic  <hniksic@arsdigita.com>
3271
3272         * headers.c (header_extract_number): Ignore trailing whitespace.
3273
3274 2001-08-24  Ian Abbott  <abbotti@mev.co.uk>
3275
3276         * html-url.c (collect_tags_mapper): Fix bug converting links
3277         with -k option for tags with multiple link attributes by
3278         handling links in the order they appear.
3279
3280 2001-08-15  Ian Abbott  <abbotti@mev.co.uk>
3281
3282         * ftp.c (ftp_loop_internal): Avoid a potential buffer overflow in
3283           the call to the 'rate' function by moving it past the error
3284           checking for the 'getftp' function return value.
3285
3286 2001-11-16  Hrvoje Niksic  <hniksic@arsdigita.com>
3287
3288         * html-parse.c (advance_declaration): Use 0x22 instead of '"' or
3289         '\"'.  Different compilers' assert macros are broken in different
3290         ways.
3291
3292 2001-09-29  Christian Fraenkel  <c.fraenkel@gmx.net>
3293
3294         * http.c (gethttp): print debug output for errors occuring during
3295         the ssl handshake.
3296
3297 2001-11-16  Chris Seawood  <cls@seawood.org>
3298
3299         * init.c: Ditto.
3300
3301         * host.c: Ditto.
3302
3303         * connect.c: Ditto.
3304
3305         * sysdep.h: Support compilation under BEOS.
3306
3307 2001-06-08  Edward J. Sabol  <sabol@alderaan.gsfc.nasa.gov>
3308
3309         * url.c (url_equal): Fix a memory leak when parseurl returns an
3310         error on the second URL. Also, since url_equal is not used at the
3311         moment, do not compile it.
3312
3313         * url.h: Ditto for the prototype of url_equal.
3314
3315 2001-11-16  Hrvoje Niksic  <hniksic@arsdigita.com>
3316
3317         * html-parse.c (map_html_tags): Support XML-style empty tags.
3318
3319 2001-06-26  Hrvoje Niksic  <hniksic@arsdigita.com>
3320
3321         * wget.h (DO_REALLOC_FROM_ALLOCA): Check for do_realloc_newsize in
3322         loop condition because we're no longer setting SIZEVAR here.
3323
3324 2001-06-26  Hrvoje Niksic  <hniksic@arsdigita.com>
3325
3326         * wget.h (DO_REALLOC_FROM_ALLOCA): Set SIZEVAR after the memcpy()
3327         call because it needs the old value.
3328
3329 2001-06-18  Hrvoje Niksic  <hniksic@arsdigita.com>
3330
3331         * cookies.c (ATTR_NAME_CHAR): Allow almost any character to be in
3332         an attribute name.
3333
3334 2001-06-18  Hrvoje Niksic  <hniksic@arsdigita.com>
3335
3336         * url.c (url_filename): Make sure that slashes that sneak in to
3337         u->file via query string get protected.
3338         (file_name_protect_query_string): New function.
3339
3340 2001-06-14  Hrvoje Niksic  <hniksic@arsdigita.com>
3341
3342         * recur.c (recursive_retrieve): Also check undesirable_urls with
3343         canonicalized URL.
3344
3345 2001-06-14  Hrvoje Niksic  <hniksic@arsdigita.com>
3346
3347         * http.c (gethttp): Search `.netrc' with real host, not the proxy
3348         one.
3349
3350 2001-06-14  Hrvoje Niksic  <hniksic@arsdigita.com>
3351
3352         * sysdep.h (MAP_FAILED): Provide MAP_FAILED for systems that don't
3353         define it.
3354
3355 2001-06-09  Jan Prikryl  <prikryl@cg.tuwien.ac.at>
3356
3357         * ftp.h: Provide correct prototype for ftp_parse_ls().
3358
3359 2001-06-04  Hrvoje Niksic  <hniksic@arsdigita.com>
3360
3361         * version.c: Wget 1.7 is released.
3362
3363 2001-06-03  Karl Eichwalder  <ke@suse.de>
3364
3365         * ftp-ls.c (ftp_parse_ls): Fix typo.
3366
3367 2001-05-27  Hrvoje Niksic  <hniksic@arsdigita.com>
3368
3369         * all: Update copyright information.
3370
3371 2001-05-26  Hrvoje Niksic  <hniksic@arsdigita.com>
3372
3373         * http.c (gethttp): Indicate that the continued download failed
3374         for *this* file.
3375
3376 2001-05-26  Hrvoje Niksic  <hniksic@arsdigita.com>
3377
3378         * version.c: Wget 1.7-pre1 is released.
3379
3380 2001-05-26  Hrvoje Niksic  <hniksic@arsdigita.com>
3381
3382         * version.c: Updated version to 1.7-pre1.
3383
3384 2001-05-14  Hrvoje Niksic  <hniksic@arsdigita.com>
3385
3386         * gen_sslfunc.c: Don't include <sys/time.h> directly.
3387
3388 2001-05-14  Hrvoje Niksic  <hniksic@arsdigita.com>
3389
3390         * http.c (gethttp): Use real URL data for cookies, not the proxy
3391         stuff.
3392
3393 2001-05-12  Hrvoje Niksic  <hniksic@arsdigita.com>
3394
3395         * main.c (print_help): Document `--no-http-keep-alive'.
3396
3397         * utils.c (numdigit): Handle negative numbers *correctly*.
3398
3399         * hash.c (make_nocase_string_hash_table): Use term "nocase" rather
3400         than the confusing "unsigned".
3401
3402         * utils.c (string_set_contains): Renamed from string_set_exists.
3403
3404         * hash.c (hash_table_contains): Renamed from hash_table_exists.
3405
3406         * cookies.c: Move case-insensitive hash tables to hash.c.
3407
3408 2001-05-09  Hrvoje Niksic  <hniksic@arsdigita.com>
3409
3410         * http.c (gethttp): Before concluding that the file is already
3411         fully retrieved, make sure that the file existed and `Range' was
3412         actually requested.
3413
3414 2001-05-09  Hrvoje Niksic  <hniksic@arsdigita.com>
3415
3416         * cookies.c (eliminate_dups): New function.
3417         (build_cookies_request): Use it.
3418         (build_cookies_request): Set chain_store_size after reallocating
3419         all_chains.
3420         (check_domain_match): Annotated for easier future debugging.
3421         (store_cookie): In the debug message, print whether the cookie is
3422         permanent.
3423
3424 2001-05-08  Hrvoje Niksic  <hniksic@arsdigita.com>
3425
3426         * http.c (http_loop): Reset no_truncate before deciding whether to
3427         set it.
3428         (gethttp): Further clarify "-c conflicts with existing file" error
3429         message, based on input from Herold Heiko.
3430
3431 2001-05-07  Hrvoje Niksic  <hniksic@arsdigita.com>
3432
3433         * http.c (http_loop): If restval is set, set no_truncate to 1
3434         unconditionally.
3435
3436 2001-05-02  Jan Prikryl  <prikryl@cg.tuwien.ac.at>
3437
3438         * ftp-ls.c (ftp_parse_winnt_ls): Assure months are being correctly
3439         converted. Pointed out by <Stefan.Weil@de.heidelberg.com>.
3440         (ftp_parse_vms_ls): Ditto.
3441
3442 2001-04-30  Hrvoje Niksic  <hniksic@arsdigita.com>
3443
3444         * init.c (cmd_address): Zero SIN before using it; apparently
3445         needed on *BSD.
3446
3447 2001-04-29  Hrvoje Niksic  <hniksic@arsdigita.com>
3448
3449         * ftp.c (ftp_loop_internal): Don't set NO_TRUNCATE if the file is
3450         empty.
3451
3452 2001-04-29  Hrvoje Niksic  <hniksic@arsdigita.com>
3453
3454         * main.c (main): Make `--cookies' respect its argument.
3455
3456 2001-04-28  Hrvoje Niksic  <hniksic@arsdigita.com>
3457
3458         * main.c (main): Removed undocumented option `--email-address'.
3459
3460         * netrc.c: Use the latest read_whole_line.
3461
3462         * init.c (defaults): Set opt.ftp_pass to "-wget@".
3463
3464         * mswindows.c (pwd_cuserid): Ditto.
3465
3466         * utils.c (pwd_cuserid): Removed.
3467
3468         * host.c (ftp_getaddress): Removed.
3469
3470 2001-04-28  Hrvoje Niksic  <hniksic@arsdigita.com>
3471
3472         (http_loop): Allocate space for filename_plus_orig_suffix with
3473         alloca; this is more efficient and removes the need to free it
3474         before each and every return.
3475
3476 2001-04-28  Hrvoje Niksic  <hniksic@arsdigita.com>
3477
3478         * http.c (gethttp): Return RETRUNNEEDED when the retrieval is
3479         unneeded because the file is already there and fully downloaded,
3480         and -c is specified.
3481         (http_loop): Handle RETRUNNEEDED.
3482
3483         * wget.h (uerr_t): New value RETRUNNEEDED.
3484
3485         * http.c (http_loop): Set no_truncate for files that both exist
3486         and are non-empty.
3487         (gethttp): Consider the download finished when restval >= contlen,
3488         not only when restval==contlen.
3489         (gethttp): Handle redirection before giving up due to -c.
3490         (gethttp): Clarify error message which explains that -c will not
3491         truncate the file.
3492         (gethttp): When returning CONTNOTSUPPORTED, don't forget to free
3493         the stuff that needs freeing and release the socket.
3494
3495 2001-04-27  Hrvoje Niksic  <hniksic@arsdigita.com>
3496
3497         * main.c (print_help): Wget booleans accept "off", not "no".
3498
3499 2001-04-27  Hrvoje Niksic  <hniksic@arsdigita.com>
3500
3501         * http.c (http_loop): If allow_cache is zero, always disable
3502         caching, not only when retrieving through proxy.
3503
3504         * init.c: Ditto.
3505
3506         * options.h (struct options): Rename proxy_cache to allow_cache.
3507
3508 2001-04-27  Hrvoje Niksic  <hniksic@arsdigita.com>
3509
3510         * http.c (mktime_from_utc): Improve documentation.
3511         (http_atotm): Put format strings into a separate array.
3512
3513 2001-04-27  Hrvoje Niksic  <hniksic@arsdigita.com>
3514
3515         * safe-ctype.h: Instead of throwing #error when isalpha is
3516         defined, redefine it to something that will throw a compile-time
3517         error if actually *used*.  Do the same for the rest of the
3518         standard C macros.
3519
3520 2001-04-26  Hrvoje Niksic  <hniksic@arsdigita.com>
3521
3522         * url.c (getproxy): Ignore empty proxy vars.
3523
3524 2001-04-25  Hrvoje Niksic  <hniksic@arsdigita.com>
3525
3526         * http.c (http_loop): Would load cookies every time.
3527
3528         * cookies.c (load_cookies): Handle cookies whose values contain
3529         embedded spaces.
3530
3531 2001-04-25  Hrvoje Niksic  <hniksic@arsdigita.com>
3532
3533         * utils.c: Define each DIGITS_* in one line.
3534
3535 2001-04-25  Roger L. Beeman  <beeman@cisco.com>
3536
3537         * http.c (http_atotm): Initialize t.tm_isdst to 0.
3538         (mktime_from_utc): Prevent mktime() from having discontinuities at
3539         DST transition points.
3540
3541 2001-04-25  Hrvoje Niksic  <hniksic@arsdigita.com>
3542
3543         * html-url.c (get_urls_html): Fix documentation.
3544
3545 2001-04-25  Hrvoje Niksic  <hniksic@arsdigita.com>
3546
3547         * url.c (UNSAFE_CHAR): Reimplement using a static table.
3548         (url_init): Removed.
3549         (init_unsafe_char_table): Removed.
3550
3551 2001-04-25  Hrvoje Niksic  <hniksic@arsdigita.com>
3552
3553         * snprintf.c (dopr): Replace ISDIGIT with '0' <= ch && ch <= '9'.
3554
3555 2001-04-25  Hrvoje Niksic  <hniksic@arsdigita.com>
3556
3557         * utils.c: Document timer functions.
3558
3559         * retr.c (rate): Use it.
3560         (rate): Print in GB/s if transfer rate exceeds 1 GB/s.
3561
3562         * utils.c (wtimer_granularity): New function.
3563
3564 2001-04-24  Hrvoje Niksic  <hniksic@arsdigita.com>
3565
3566         * retr.c (show_progress): Ditto.
3567
3568         * ftp.c (getftp): Ditto.
3569
3570         * http.c (gethttp): Use new timer functions.
3571
3572         * utils.c (wtimer_allocate): New function.
3573         (wtimer_new): Ditto.
3574         (wtimer_delete): Ditto.
3575         (wtimer_reset): Ditto.
3576         (wtimer_elapsed): Ditto.
3577
3578 2001-04-24  Hrvoje Niksic  <hniksic@arsdigita.com>
3579
3580         * utils.c (long_to_string): New, faster version.  Favors smaller
3581         numbers; much of the calculation is now done at compile-time.
3582
3583 2001-04-24  Hrvoje Niksic  <hniksic@arsdigita.com>
3584
3585         * utils.c (numdigit): Handle negative numbers.
3586
3587 2001-04-23  Hrvoje Niksic  <hniksic@arsdigita.com>
3588
3589         * retr.c (show_progress): Print the download rate even when the
3590         percentages are not available.
3591
3592 2001-04-21  Hrvoje Niksic  <hniksic@arsdigita.com>
3593
3594         * ftp.c (getftp): Adjust expected_bytes if the length is
3595         authoritative.
3596
3597 2001-04-14  Hrvoje Niksic  <hniksic@arsdigita.com>
3598
3599         * url.c: Don't declare `construct'.
3600
3601         * hash.c (grow_hash_table): Speed up rehashing; inline storing of
3602         mappings to new locations.
3603         (hash_table_new): Make resize_threshold a field in the hash table,
3604         so we don't have to recalculate it in each hash_table_put.
3605         (grow_hash_table): Update resize_threshold.
3606         (MAX): Remove unused macro.
3607         (prime_size): Made static.
3608
3609 2001-04-14  Hrvoje Niksic  <hniksic@arsdigita.com>
3610
3611         * retr.c (retrieve_url): Call uri_merge, not url_concat.
3612
3613         * html-url.c (collect_tags_mapper): Call uri_merge, not
3614         url_concat.
3615
3616         * url.c (mkstruct): Use encode_string instead of xstrdup followed
3617         by URL_CLEANSE.
3618         (path_simplify_with_kludge): Deleted.
3619         (contains_unsafe): Deleted.
3620         (construct): Renamed to uri_merge_1.
3621         (url_concat): Renamed to uri_merge.
3622
3623 2001-04-13  Hrvoje Niksic  <hniksic@arsdigita.com>
3624
3625         * url.c (str_url): Use encode_string instead of the unnecessary
3626         CLEANDUP.
3627         (encode_string_maybe): New function, returns input string if no
3628         encoding is needed.
3629         (encode_string): Call encode_string_maybe to do the dirty work,
3630         xstrdup if no work needed.
3631
3632 2001-04-13  Hrvoje Niksic  <hniksic@arsdigita.com>
3633
3634         * wget.h (XDIGIT_TO_xchar): Define here.
3635
3636         * url.c (decode_string): Use new name.
3637         (encode_string): Ditto.
3638
3639         * http.c (XDIGIT_TO_xchar): Rename HEXD2asc to XDIGIT_TO_xchar.
3640         (dump_hash): Use new name.
3641
3642         * wget.h: Rename ASC2HEXD and HEXD2ASC to XCHAR_TO_XDIGIT and
3643         XDIGIT_TO_XCHAR respectively.
3644
3645 2001-04-13  Hrvoje Niksic  <hniksic@arsdigita.com>
3646
3647         * init.c: Include cookies.h.
3648
3649         * cookies.h: Declare cookies_cleanup.
3650
3651         * cookies.c (check_domain_match): Remove unused variable.
3652         (save_cookies): Remove extraneous argument from debug statement.
3653
3654         * host.c (same_host): Don't call skip_url.
3655
3656         * url.c (skip_url): Removed.  Removed its calls from various
3657         functions in url.c.
3658
3659 2001-04-13  Hrvoje Niksic  <hniksic@arsdigita.com>
3660
3661         * cookies.c (unsigned_string_hash): Use the new code in
3662         string_hash as reference.
3663
3664         * hash.c (hash_table_map): Allow deletion and change of the
3665         element processed by MAPFUN.
3666         (string_hash): Use the function from glib.
3667
3668 2001-04-12  Hrvoje Niksic  <hniksic@arsdigita.com>
3669
3670         * config.h.in: Include #undef stub.
3671
3672         * hash.c (hash_table_remove): Rewrite to actually clear deleted
3673         entries instead of just marking them as deleted.
3674
3675 2001-04-12  Hrvoje Niksic  <hniksic@arsdigita.com>
3676
3677         * hash.h: Declare hash_table_get_pair and hash_table_count.
3678
3679 2001-04-12  Hrvoje Niksic  <hniksic@arsdigita.com>
3680
3681         * cookies.c: Declare http_atotm.
3682
3683 2001-04-12  Hrvoje Niksic  <hniksic@arsdigita.com>
3684
3685         * ftp-ls.c (ftp_parse_unix_ls): Use octal constants for
3686         permissions.  A compiler that doesn't accept octal constants is
3687         seriously broken and shouldn't be used -- octal constants were
3688         present in K&R C!
3689
3690 2001-01-20  Karl Eichwalder  <ke@suse.de>
3691
3692         * Makefile.in: Provide and use DESTDIR according to the Coding
3693         Standards.
3694
3695 2001-04-12  Hrvoje Niksic  <hniksic@arsdigita.com>
3696
3697         * ftp-ls.c (ftp_parse_vms_ls): Make seconds optional in time
3698         specification.
3699
3700 2001-04-11  Hrvoje Niksic  <hniksic@arsdigita.com>
3701
3702         * url.c (parseurl): Don't strip trailing slash when u->dir is "/"
3703         because that strips the *leading* slash, thus forcing relative
3704         FTP retrieval.
3705
3706 2001-04-10  Jan Prikryl  <prikryl@cg.tuwien.ac.at>
3707
3708         * ftp.c (getftp): Convert initial FTP directory from VMS to UNIX
3709         notation for VMS servers. 
3710         (ftp_retrieve_dirs): Do not prepend '/' to f->name when
3711         odir is an empty string.
3712
3713 2001-04-10  Jan Prikryl  <prikryl@cg.tuwien.ac.at>
3714
3715         * ftp-ls.c (ftp_parse_winnt_ls): Made the fix for AM/PM more
3716         effective. Suggested by Edward J. Sabol.
3717
3718 2001-04-10  Hrvoje Niksic  <hniksic@arsdigita.com>
3719
3720         * cookies.c (build_cookies_request): Use and sort cookies from all
3721         matching domains.
3722         (build_cookies_request): Check for duplicates before generating
3723         the `Cookies' header.
3724
3725         * main.c (main): Don't load cookies here.
3726         (main): Make loadcookies and savecookies call the correct command.
3727
3728         * http.c (http_loop): Load cookies on-demand.
3729
3730 2001-04-09  Hrvoje Niksic  <hniksic@arsdigita.com>
3731
3732         * http.c (gethttp): Fix indentation of SSL ifdef.
3733
3734 2001-04-09  Hrvoje Niksic  <hniksic@arsdigita.com>
3735
3736         * ftp.c (ftp_retrieve_dirs): Don't forcibly prepend "/" to u->dir;
3737         that hack is no longer necessary.
3738         (getftp): Prepend initial directory to *non*-absolute u->dir's.
3739
3740 2001-04-09  Hrvoje Niksic  <hniksic@arsdigita.com>
3741
3742         * init.c (cmd_file): New function.
3743         (enable_tilde_expansion): New variable.
3744         (run_wgetrc): Use it.
3745         (cmd_file): Use it.
3746
3747 2001-04-08  Hrvoje Niksic  <hniksic@arsdigita.com>
3748
3749         * init.c: Include cookie-related options.
3750
3751         * main.c (main): Include cookie-specific options.
3752         (main): Load cookies before download is finished.
3753         (main): Save cookies when done.
3754
3755         * http.c (gethttp): Process the `Set-Cookie' header.
3756         (gethttp): Include cookies in the response.
3757
3758         * cookies.c: New file.
3759
3760 2001-04-08  Hrvoje Niksic  <hniksic@arsdigita.com>
3761
3762         * utils.c (datetime_str): New function.
3763
3764 2001-04-08  Jan Prikryl  <prikryl@cg.tuwien.ac.at>
3765
3766         * ftp-ls.c (ftp_parse_winnt_ls): The AM/PM change did assume
3767         12:01PM == 00:01, which was obviously wrong. Taken care of this
3768         anomaly.
3769
3770         * ChangeLog: Removed an excess conflict marker. Reformatted the
3771         entry by Philipp Thomas from 2001-03-09.
3772
3773         * ftp-ls.c (ftp_parse_winnt_ls): Ensure that adjusted PM hours lay
3774         between 0 and 23. Elminate unused variable `sec'.
3775
3776 2001-04-08  Hrvoje Niksic  <hniksic@arsdigita.com>
3777
3778         * hash.c (hash_table_count): New function.
3779
3780 2001-04-06  Hrvoje Niksic  <hniksic@arsdigita.com>
3781
3782         * utils.c (read_file): Cast MAP_FAILED to char *.  Enforced by
3783         Digital Unix cc.
3784
3785 2001-04-06  Hrvoje Niksic  <hniksic@arsdigita.com>
3786
3787         * config.h.in: Oops, do the namespace tweaks only on systems we
3788         know about.
3789
3790 2001-04-06  Hrvoje Niksic  <hniksic@arsdigita.com>
3791
3792         * hash.c: Include <string.h>.
3793
3794 2001-04-06  Hrvoje Niksic  <hniksic@arsdigita.com>
3795
3796         * config.h.in: Define "compilation environment" options that work
3797         under Linux and Solaris.  To be reviewed on other OS'es.
3798
3799 2001-04-06  Hrvoje Niksic  <hniksic@arsdigita.com>
3800
3801         * http.c (gethttp): Prepend literal newline with `\n\'.
3802
3803 2001-04-06  Hrvoje Niksic  <hniksic@arsdigita.com>
3804
3805         * sysdep.h: Don't define VERY_LONG_FORMAT.
3806
3807         * utils.c (very_long_to_string): New function.
3808         (legible_very_long): Use it; don't use VERY_LONG_FORMAT.
3809
3810 2001-04-04  Christian Fraenkel  <christian.fraenkel@gmx.net>
3811
3812         * url.c (parse_uname): Would run past the end of the string if the
3813         username was present, but the URL did not contain a slash, e.g.
3814         http://foo:bar@myhost.
3815
3816 2001-04-03  KOJIMA Hajime  <kjm@rins.ryukoku.ac.jp>
3817
3818         * http.c (http_atotm): Use %A instead of %a to match full
3819         weekday.  (On most systems there is no difference.)
3820
3821 2001-04-03  Paul Bludov  <paul@ozero.net>
3822
3823         * mswindows.c (sleep): Use SleepEx() instead of Sleep().
3824         (ws_changetitle): Use alloca() instead of malloc() to avoid memory
3825         leak.
3826         (ws_mypath): Use GetModuleFileName instead of argv[0].
3827         (ws_startup): Use data.wVersion for comparison.
3828
3829 2001-04-02  Hrvoje Niksic  <hniksic@arsdigita.com>
3830
3831         * http.c (http_loop): Ditto.
3832
3833         * ftp.c (ftp_loop_internal): Made the check whether to continue
3834         retrieval `-O'-friendly.
3835
3836 2001-04-02  Hrvoje Niksic  <hniksic@arsdigita.com>
3837
3838         * netrc.c (parse_netrc): Don't trim the line endings explicitly;
3839         they will be handled as whitespace.
3840         (parse_netrc): Correctly handle lines that end with whitespace.
3841
3842 2001-04-02  Hrvoje Niksic  <hniksic@arsdigita.com>
3843
3844         * retr.c (retrieve_url): New variable global_download_count used
3845         to identify first retrieval.
3846
3847         * ftp.c (getftp): Ditto.
3848
3849         * http.c (gethttp): Rewind opt.dfp only on first retrieval.
3850
3851 2001-04-02  Hrvoje Niksic  <hniksic@arsdigita.com>
3852
3853         * init.c (cmd_address): Heap-allocate the address that gets stored
3854         to CLOSURE.  Old code would simply assign an address on the stack.
3855
3856 2001-04-01  Nicolas Lichtmaier <nick@debian.org>
3857
3858         * ftp.c (ftp_get_listing): Propagate error status.
3859         (ftp_retrieve_glob): Use it.
3860         (ftp_loop): Ditto.
3861
3862 2001-04-01  Nicolas Lichtmaier <nick@debian.org>
3863
3864         * main.c (main): Add -C to the string that is the third arg to
3865         getopt_long().
3866
3867 2001-04-01  Hrvoje Niksic  <hniksic@arsdigita.com>
3868
3869         * ftp.c (getftp): Don't start the download from scratch if `-c'
3870         was specified, but the file is already fully downloaded.
3871
3872         * http.c (gethttp): Don't truncate a pre-existing file if `-c' was
3873         specified and the server doesn't support continued download.
3874         (gethttp): Don't start the download from scratch if `-c' was
3875         specified, but the file is already fully downloaded.
3876
3877 2001-03-31  Hrvoje Niksic  <hniksic@arsdigita.com>
3878
3879         (recursive_retrieve): Don't clear the hash tables at this point at
3880         all; it interferes with the normal operation of register_download.
3881
3882 2001-03-31  Hrvoje Niksic  <hniksic@arsdigita.com>
3883
3884         * recur.c (recursive_retrieve): Clear the hash tables only when
3885         they are defined.
3886
3887 2001-03-31  Hrvoje Niksic  <hniksic@arsdigita.com>
3888
3889         * http.c (gethttp): Make sure the socket is closed with
3890         CLOSE_INVALIDATE before we have drained the body.
3891
3892 2001-03-31  Hrvoje Niksic  <hniksic@arsdigita.com>
3893
3894         * retr.c (retrieve_url): Call register_download() for downloaded
3895         files and register_html() for downloaded HTML files.
3896
3897         * recur.c (register_download): New function; register here that a
3898         file has been downloaded, rather than in recursive_retrieve().
3899         (register_html): New function; enqueue the location of HTML files
3900         here rather than in recursive_retrieve().
3901
3902 2001-03-31  Hrvoje Niksic  <hniksic@arsdigita.com>
3903
3904         * main.c (print_help): Use multiple fputs instead of a single ugly
3905         printf().
3906         (main): Consistently assign numbers >128 to options without a
3907         corresponding character.
3908
3909 2001-03-09  Philipp Thomas  <pthomas@suse.de>
3910
3911         * safe-ctype.h: New file. Locale independent ctype.h replacement
3912         taken from libiberty.
3913
3914         * safe-ctype.c: New file. Tables for above.
3915
3916         * Makefile.in: Add safe-ctype$o to OBJS.  Add dependencies for
3917         safe-ctype$o.
3918
3919         * cmpt.c: Remove include of ctype.h. Use ISSPACE instead of
3920         isspace.
3921
3922         * ftp-basic.c: Don't include ctype.h.
3923
3924         * ftp-ls.c: Likewise.
3925
3926         * ftp.c: Likewise.
3927
3928         * headers.c: Likewise.
3929
3930         * host.c: Likewise.
3931
3932         * html-parse.c: Likewise.
3933
3934         * html-url.c: Likewise.
3935
3936         * http.c: Likewise.
3937
3938         * init.c: Likewise.
3939
3940         * main.c: Likewise. Set LC_CTYPE along with LC_MESSAGES.
3941
3942         * netrc.c: Likewise.
3943
3944         * recur.c: Likewise.
3945
3946         * retr.c: Likewise.
3947
3948         * snprintf.c: Replace ctype.h with safe-ctype.h. Use ISDIGIT
3949         instead of isdigit.
3950
3951         * sysdep.h: Remove defines of ctype macros as they aren't needed
3952         for safe-ctype-h.
3953
3954         * url.c: Don't include ctype.h.
3955
3956         * utils.c: Likewise.
3957
3958         * wget.h: Include safe-ctype.h.
3959
3960 2001-03-27  Dan Harkless  <wget@harkless.org>
3961
3962         * Makefile.in: Moved top_builddir out of "User configuration
3963         section" of top Makefile and analogous spot in this one.
3964
3965 2001-03-17  Dan Harkless  <wget@harkless.org>
3966
3967         * Makefile.in: Include @SSL_INCLUDES@ substition in INCLUDES.
3968         Define top_builddir.  Link wget with libtool so the user doesn't
3969         have to supply a bunch of custom environment variables to 
3970         correctly link with the OpenSSL shared libraries.
3971
3972 2001-03-06  Hack Kampbjorn  <hack@hackdata.com>
3973
3974         * http.c (gethttp): skip :port in host header if it is the
3975         DEFAULT_HTTPS_PORT when using SSL.
3976
3977         * url.c: move the #define of DEFAULT_HTTP_PORT, DEFAULT_FTP_PORT
3978         and DEFAULT_HTTPS_PORT to the header file so it can be use in the
3979         rest of the code. 
3980         * url.h: Ditto
3981
3982 2001-03-01  Jonas Jensen  <bones@huleboer.dk>
3983
3984         * retr.c (show_progress): Correctly calculate the number of bytes
3985         in the first line of the download that have been actually
3986         downloaded in this run.
3987
3988 2001-02-23  Dan Harkless  <wget@harkless.org>
3989
3990         * main.c (print_help): --help documentation for -N said it would
3991         re-download files if they had the _same_ timestamp on server.
3992         (print_help): -nr belongs in "FTP options" section of --help
3993         output, not "Recursive retrieval" section.  Alphabetized FTP
3994         options by long option name.
3995
3996 2001-02-16  Dan Harkless  <wget@harkless.org>
3997
3998         * init.c (commands): Hack Kampbjørn <hack@hackdata.com> discovered
3999         that "httpsproxy" had been inserted into commands[] out of
4000         alphabetical order, causing "BUG: unknown command `httpuser'".
4001
4002 2001-02-13  Jan Prikryl  <prikryl@cg.tuwien.ac.at>
4003
4004         * ftp-ls.c (ftp_parse_ls): Added support of ST_MACOS (Unix-like
4005         listing without correct permissons).
4006
4007         * ftp.h (stype): Added ST_MACOS to identify the NetPresenz MacOS
4008         FTP server. 
4009
4010         * ftp.c (ftp_retrieve_list): New mirroring logic: A remote file
4011         shall be donwloaded only when it's newer than the local copy or
4012         when it has the same timeestamp but its size is different. ST_VMS
4013         and ST_MACOS as special cases that lie about file size. 
4014
4015         * ftp-ls.c (ftp_parse_ls): Support for ST_MACOS.
4016
4017         * Makefile.in: Removed dependency on ftpparse library due to unclear
4018         copyright issues and absence of any feedback to our queries. 
4019
4020         * ftp-ls.c: Removed dependency on ftpparse library due to unclear
4021         copyright issues and absence of any feedback to our queries.   
4022         (ftp_parse_ls): Added a warning message when remote server system
4023         does not seem to be suported by wget. 
4024         (ftp_parse_vms_ls): New function for parsing VMS ftp
4025         server listing output.
4026         (clean_line): New function responsible for removing
4027         end-of-line characters from FTP listing texts.
4028
4029         * ftp.c (getftp): Global variables pwd and host_type are now
4030         member of the ccon structure under names ccon.id and ccon.rs. 
4031
4032         * ftp.h (struct ccon): Added formed global variables from ftp.c,
4033         enum stype rs (remote system identification) and char *id (initial
4034         working directory), as suggested by Hrvoje.
4035
4036         * url.c (parse_uname): Added support for passwords containing '@'
4037         characters.
4038         (skip_uname): Ditto.
4039
4040 2001-02-11  Hrvoje Niksic  <hniksic@arsdigita.com>
4041
4042         * ftp.c (ftp_loop): Reset con.
4043
4044 2001-01-06  Jan Prikryl  <prikryl@cg.tuwien.ac.at>
4045
4046         * url.c (parse_uname): Added support for passwords containing '@'
4047         characters.
4048         (skip_uname): Ditto.
4049
4050 2001-02-11  Hack Kampbjørn  <hack@hackdata.com>
4051
4052         * url.c (parseurl): Debug-print u->ftp_type.
4053
4054 2001-02-11  Hrvoje Niksic  <hniksic@arsdigita.com>
4055
4056         * ftp.c (ftp_loop_internal): Disable padding.
4057         (getftp): Ditto.
4058
4059         * http.c (http_loop): Disable padding.
4060
4061         * retr.c (show_progress): Use it to enable padding.
4062
4063         * retr.c (rate): Optional parameter PAD for padding the rate.
4064
4065 2001-02-10  Hrvoje Niksic  <hniksic@arsdigita.com>
4066
4067         * retr.c (show_progress): Make sure that the last output line
4068         includes progress.
4069
4070 2001-02-10  Jonas Jensen  <bones@huleboer.dk>
4071
4072         * retr.c (show_progress): Print the download rate along with the
4073         percentages.
4074         Along with Anders Thorsby <anders@thorsby.dk>.
4075
4076 2001-02-10  Tim Mooney  <mooney@dogbert.cc.ndsu.NoDak.edu>
4077
4078         * ftp.h: Rename enums `command' to `wget_ftp_command' and
4079         `fstatus' to `wget_ftp_status' because old names clash with Tru64
4080         net/if.h.
4081
4082 2001-02-08  Christian Fraenkel <christian.fraenkel@gmx.net>
4083
4084         * gen_sslfunc.c: verify_callback is now static
4085
4086         * gen_sslfunc.c (init_ssl): load certificate if specified
4087
4088         * gen_sslfunc.c (ssl_printerr): new function
4089
4090         * init.c: added new --sslcertfile and --sslcertkey switches
4091
4092         * main.c: ditto
4093
4094         * options.h: ditto
4095
4096         * http.c (gethttp): abort when init_ssl fails
4097
4098 2001-01-23  Herold Heiko  <Heiko.Herold@previnet.it>
4099
4100         * mswindows.h: Include <malloc.h>; it's needed for alloca().
4101
4102 2001-01-10  Dan Harkless  <wget@harkless.org>
4103
4104         * url.c (str_url): Clarified this function's comment header after
4105         Hrvoje answered my question on the list as to when hide != 1.
4106         Also Hrvoje pointed out I need to use xstrdup() on the string literal.
4107
4108 2001-01-06  Hrvoje Niksic  <hniksic@arsdigita.com>
4109
4110         * connect.c (bindport): Declare addrlen as int.  Diagnosed by
4111         Drazen Kacar <dave@arsdigita.com>.
4112         (conaddr): Ditto.
4113
4114 2001-01-09  Dan Harkless  <wget@harkless.org>
4115
4116         * html-url.c: A bunch of fixup of `--page-requisites'-related
4117         comments to reflect Hrvoje's changes to my code when transplanting
4118         it into this new file, to fix spelling mistakes, to clarify, etc.
4119
4120         * url.c (write_backup_file): Clarified a comment.
4121         (str_url): Henrik van Ginhoven pointed out on the list that we
4122         shouldn't give away the number of characters in the password by
4123         replacing each character with a 'x'.  Use "<password>" instead.
4124
4125         * ftp.c (ftp_retrieve_dirs): The bug where recursion into FTP
4126         directories didn't work if logging in put you in a directory other
4127         than "/" is fixed now.  Removed the comment here warning of the bug.
4128
4129         * main.c (print_help): --continue's description was misleading.
4130         We don't "restart", we "resume".  Also, better to say
4131         "partially-downloaded file" rather than just "existing file".
4132
4133 2001-01-06  Dan Harkless  <wget@harkless.org>
4134
4135         * ChangeLog: The '[Not in 1.6 branch.]'s were decided not to be
4136         the best way to go about my aim.  Removed them in favor of:
4137
4138         * ChangeLog-branches/1.6_branch.ChangeLog: New file.
4139
4140 2001-01-04  Hrvoje Niksic  <hniksic@arsdigita.com>
4141
4142         * url.c (replace_attr): New function, to be used by both
4143         TO_COMPLETE and TO_RELATIVE case in convert_links.
4144         (find_fragment): New function for finding URL fragments.
4145         (replace_attr): Better handle the case where the original string
4146         is not quoted.  Use find_fragment.
4147         (convert_links): Use replace_attr().
4148
4149 2000-12-31  Dan Harkless  <wget@harkless.org>
4150
4151         * ChangeLog: Since this flat file doesn't have multiple branches,
4152         looking at the dates would make you think that things went into
4153         1.6 that actually just went into the 1.7-dev branch.  Added "[Not
4154         in 1.6 branch.]" where appropriate to clarify.
4155         
4156 2000-12-30  Dan Harkless  <wget@harkless.org>
4157
4158         * ftp.c, http.c:  Applied Hack Kampbjørn <hack@hackdata.com>'s
4159         patch to deal with h_errno not being defined in netdb.h under Cygwin.
4160
4161 2000-12-18  Csaba Raduly  <csaba.raduly@sophos.com>
4162
4163         * sysdep.h: Include <malloc.h> and <io.h> under Watcom.
4164
4165 2000-12-17  Igor Khristophorov  <igor@atdot.org>
4166
4167         * http.c (check_end): Fix test for '+' or '-'.
4168
4169 2000-12-17  Hrvoje Niksic  <hniksic@arsdigita.com>
4170
4171         * url.c (parseurl): Rename inner loop var from i to ind to avoid
4172         clash with the function top-level-declared variable i.
4173         (str_url): Likewise, rename inner-loop i to j.
4174
4175         * recur.c (parse_robots): Don't declare LEN at top of function.
4176         (robots_match): Renamed parameter FORBIDDEN to avoid hiding of
4177         global variable.
4178
4179         * main.c (main): Change erroneous use of bitwise and to logical.
4180
4181         * init.c (cmd_address): Don't heap-allocate `sin'; it can be on
4182         the stack because it will be copied to closure.
4183
4184         Thanks to Csaba Raduly's run of PC-LINT over the sources.
4185
4186 2000-12-17  Hrvoje Niksic  <hniksic@arsdigita.com>
4187
4188         * http.c (basic_authentication_encode): Use xmalloc(), not
4189         malloc().  Thanks to Csaba Raduly's run of PC-LINT over the
4190         sources.
4191
4192 2000-12-17  Csaba Raduly  <csaba.raduly@sophos.com>
4193
4194         * sysdep.h: Test for __EMX__ rather than for EMXOS2 for OS/2
4195         compilation.
4196
4197 2000-12-17  Hrvoje Niksic  <hniksic@arsdigita.com>
4198
4199         * mswindows.c: Include <errno.h>.
4200
4201         * gen_sslfunc.c: Include <errno.h>.
4202
4203         * ftp-basic.c: Don't attempt to declare errno or h_errno because
4204         they're not used.
4205
4206         * main.c: Include <errno.h> because errno is used.
4207
4208         * ftp.c: Ditto.
4209
4210         * http.c: Include <netdb.h> for h_errno.
4211
4212 2000-12-13  Hrvoje Niksic  <hniksic@arsdigita.com>
4213
4214         * html-parse.c (advance_declaration): MSVC assert() chokes on
4215         '\"'.  Use '"' instead.
4216
4217 2000-12-11  Hrvoje Niksic  <hniksic@arsdigita.com>
4218
4219         * utils.c (xfree_real): Removed.
4220         (xfree_debug): Just call free().
4221
4222         * wget.h (xfree): Make it an alias for free.
4223
4224 2000-12-11  Hrvoje Niksic  <hniksic@arsdigita.com>
4225
4226         * http.c (http_loop): Furthermore, touch output_document only if
4227         it is known to be an existing regular file.
4228
4229 2000-12-11  Hrvoje Niksic  <hniksic@arsdigita.com>
4230
4231         * ftp.c (ftp_retrieve_list): Ditto.
4232
4233         * http.c (http_loop): Touch output_document if that is used for
4234         output.
4235
4236 2000-12-06  Hrvoje Niksic  <hniksic@arsdigita.com>
4237
4238         * http.c: Include gen_sslfunc.h after including Wget's headers.
4239         (persistent_available_p): Needed coma before `int ssl'.
4240
4241 2000-12-06  Hrvoje Niksic  <hniksic@arsdigita.com>
4242
4243         * ftp.c (ftp_loop_internal): Ditto.
4244
4245         * http.c (http_loop): Use it.
4246
4247         * retr.c (sleep_between_retrievals): New function that handles the
4248         logic of opt.wait and opt.waitretry.
4249
4250 2000-12-06  Hrvoje Niksic  <hniksic@arsdigita.com>
4251
4252         * rbuf.h: Implement only a single version of RBUF_READCHAR, using
4253         rbuf_read_bufferful when the buffer is depleted.
4254
4255         * rbuf.c (rbuf_read_bufferful): New function.
4256
4257 2000-12-06  Hrvoje Niksic  <hniksic@arsdigita.com>
4258
4259         * gen_sslfunc.h: Use ansi2knr style function declarations.
4260
4261         * gen_sslfunc.c: Reformat according to the GNU coding standards.
4262         More should be done.
4263
4264         * http.c (persistent_available_p): Place the cheap SSL test nearer
4265         the top of the function.
4266         (CLOSE_FINISH, CLOSE_INVALIDATE): Define only one version of each.
4267
4268 2000-12-05  Hrvoje Niksic  <hniksic@arsdigita.com>
4269
4270         * url.c (init_unsafe_char_table): Reinstate space as an unsafe
4271         char.
4272
4273 2000-12-03  Christian Fraenkel <christian.fraenkel@gmx.net>
4274
4275         * Makefile.in: added gen_sslfunc object
4276         * config.h.in: added HAVE_SSL define
4277         * connect.c: changed select_fd from static int to int
4278         * connect.h: ditto
4279         * gen_sslfunc.h: New file
4280         * gen_sslfunc.c: ditto
4281         * http.c: added HTTPS fuctionality
4282         * retrc.c: ditto
4283         * url.c: ditto
4284         * init.c: added opt.httpsproxy
4285         * options.h: ditto
4286         * rbuf.h: added alternate rbuf struct
4287         * wget.h: added CONSSLERR
4288         * rbuf.c: ditto
4289
4290         * http.c: Added HTTPS fuctionality.
4291
4292         * retrc.c: Ditto.
4293
4294         * url.c: Ditto.
4295
4296         * init.c: Added opt.httpsproxy.
4297
4298         * options.h: Ditto.
4299
4300         * rbuf.h: Added alternate rbuf struct.
4301
4302         * wget.h: Added CONSSLERR.
4303
4304         * rbuf.c: Ditto.
4305
4306 2000-11-30  Jan Prikryl  <prikryl@cg.tuwien.ac.at>
4307
4308         * ftp-ls.c (ftp_parse_unix_ls): Added second parameter
4309         "ignore_perms" to ignore file and directory permissions for
4310         Windows NT FTP server listings.
4311         (ftp_parse_winnt_ls): New function.
4312         (ftp_parse_ls): Parses UNIX and Windows NT listings
4313         separately. Simple heuristics for distinguishing between UNIX and
4314         MS-DOS-like FTP listing provided by Windows NT FTP service.
4315
4316 2000-11-18  Jan Prikryl  <prikryl@cg.tuwien.ac.at>
4317
4318         * ftpparse.c, ftpparse.h: New files.
4319
4320         * ftp-ls.c (ftp_parse_ls): Use ftp_parse_unix_ls for UNIX servers
4321         only. Use ftp_parse_nonunix_ls otherwise.
4322         (ftp_parse_nonunix_ls): Stub to the ftpparse library handling all
4323         exotic FTP servers.
4324
4325         * ftp.h (stype): New enum, distinguishes UNIX, VMS, and "other"
4326         FTP servers.
4327
4328         * ftp.c: New static wariables host_type, pwd, and pwd_len. 
4329         (getftp): Support for VMS. Support for FTP servers that do not
4330         place you in the root directory after login.
4331         (ftp_retrieve_list): VMS is silent about the real file size, issue
4332         a more appropriate message.
4333         (ftp_get_listing): Pass host_type to ftp_parse_ls.
4334
4335         * ftp-basic.c (ftp_pwd, ftp_syst): New functions.
4336
4337 2000-11-30  Jan Prikryl  <prikryl@cg.tuwien.ac.at>
4338
4339         * ftp-ls.c (ftp_parse_unix_ls): Added second parameter
4340         "ignore_perms" to ignore file and directory permissions for
4341         Windows NT FTP server listings.
4342         (ftp_parse_winnt_ls): New function.
4343         (ftp_parse_ls): Parses UNIX and Windows NT listings
4344         separately. Simple heuristics for distinguishing between UNIX
4345         and MS-DOS-like FTP listing provided by Windows NT FTP service.
4346
4347 2000-11-29  John Summerfield  <summer@OS2.ami.com.au>
4348
4349         * netrc.c (parse_netrc): Get rid of line ending.
4350
4351 2000-11-25  Hrvoje Niksic  <hniksic@arsdigita.com>
4352
4353         * ftp.c (ftp_retrieve_list): Undo typo "fix" until resolution by
4354         Dan.
4355
4356 2000-11-24  Karl Eichwalder  <ke@suse.de>
4357
4358         * main.c (print_help): Untabify.
4359
4360 2000-11-23  Hrvoje Niksic  <hniksic@arsdigita.com>
4361
4362         * utils.c (xrealloc_debug): Do the unregister/register thing only
4363         if the pointer has actually changed.
4364         (xmalloc_real): Declare `static' in DEBUG_MALLOC builds.
4365         (xfree_real): Ditto.
4366         (xrealloc_real): Ditto.
4367         (xstrdup_real): Ditto.
4368
4369 2000-11-22  Hrvoje Niksic  <hniksic@arsdigita.com>
4370
4371         * ftp.c (getftp): ftp_getaddress() returns a malloc'ed copy of the
4372         string; no need to strdup() it.
4373         (getftp): Make pwd_len a local variable.
4374         (ftp_loop): Free PWD before returning.
4375
4376         * init.c (cleanup): Free opt.ftp_pass only if it's non-NULL.
4377
4378 2000-11-22  Hrvoje Niksic  <hniksic@arsdigita.com>
4379
4380         * all: Use xfree() instead of free.
4381
4382         * utils.c (xfree): New function.
4383
4384 2000-11-21  Hrvoje Niksic  <hniksic@arsdigita.com>
4385
4386         * url.c (convert_links): HTML-quote the converted string.
4387
4388         * utils.c (html_quote_string): Move here from ftp-ls.c
4389         (html_quote_string): Make non-static; declare in utils.h.
4390         (html_quote_string): Convert SP to &#32;.
4391
4392 2000-11-21  Hrvoje Niksic  <hniksic@arsdigita.com>
4393
4394         * ftp.c (getftp): Reformat Jan's code according to GNU coding
4395         standards; remove (debugging?) printf's; use '\0' for the ASCII
4396         zero character.  Use alloca() instead of malloc() for
4397         inter-function temporary allocations.
4398
4399 2000-11-18  Jan Prikryl  <prikryl@cg.tuwien.ac.at>
4400
4401         * ftpparse.c, ftpparse.h: New files.
4402
4403         * ftp-ls.c (ftp_parse_ls): Use ftp_parse_unix_ls for UNIX servers
4404         only. Use ftp_parse_nonunix_ls otherwise.
4405         (ftp_parse_nonunix_ls): Stub to the ftpparse library handling all
4406         exotic FTP servers.
4407
4408         * ftp.h (stype): New enum, distinguishes UNIX, VMS, and "other"
4409         FTP servers.
4410
4411         * ftp.c: New static wariables host_type, pwd, and pwd_len. 
4412         (getftp): Support for VMS. Support for FTP servers that do not
4413         place you in the root directory after login.
4414         (ftp_retrieve_list): VMS is silent about the real file size, issue
4415         a more appropriate message.
4416         (ftp_get_listing): Pass host_type to ftp_parse_ls.
4417
4418         * ftp-basic.c (ftp_pwd, ftp_syst): New functions.
4419
4420 2000-11-21  Hrvoje Niksic  <hniksic@arsdigita.com>
4421
4422         * hash.c (hash_table_put): Don't overwrite deleted mappings.
4423
4424 2000-11-21  Hrvoje Niksic  <hniksic@arsdigita.com>
4425
4426         * hash.c (find_mapping): New function.
4427         (hash_table_get): Use it.
4428         (hash_table_get_pair): Ditto.
4429         (hash_table_exists): Ditto.
4430         (hash_table_remove): Ditto.
4431         (hash_table_remove): Really delete the entry if the mapping
4432         following LOCATION is empty.
4433
4434         * utils.c (string_set_add): Check whether the element has existed
4435         before.
4436
4437         * hash.c (hash_table_get_pair): New function.
4438
4439 2000-11-20  Hrvoje Niksic  <hniksic@arsdigita.com>
4440
4441         * http.c (http_process_type): Ignore trailing whitespace; use
4442         strdupdelim().
4443
4444         * recur.c (recursive_retrieve): Use the new `convert' field.
4445         (convert_all_links): Ditto.
4446         (convert_all_links): Don't respect meta_disallow_follow.
4447
4448         * html-url.c (handle_link): Fill out link_relative_p and
4449         link_complete_p.
4450
4451         * url.h (struct _urlpos): Make elements more readable.
4452
4453         * recur.c (recursive_retrieve): Call slist_prepend instead of
4454         slist_append.
4455         (convert_all_links): Call slist_nreverse before iterating through
4456         urls_html.
4457
4458         * utils.c (slist_prepend): New function.
4459         (slist_nreverse): Ditto.
4460
4461 2000-11-20  Hrvoje Niksic  <hniksic@arsdigita.com>
4462
4463         * http.c (check_end): Constify.
4464
4465 2000-11-20  Hrvoje Niksic  <hniksic@arsdigita.com>
4466
4467         * http.c (http_loop): If username and password are known, try the
4468         `Basic' authentication scheme by default.
4469
4470         * connect.h: Declare test_socket_open.
4471
4472 2000-11-20  Hrvoje Niksic  <hniksic@arsdigita.com>
4473
4474         * version.c: Bump version from 1.5.3+dev to 1.7-dev.
4475
4476 2000-11-20  Hrvoje Niksic  <hniksic@arsdigita.com>
4477
4478         * http.c (gethttp): Don't use the return value of sprintf().
4479         (gethttp): Inhibit keep-alive if opt.http_keep_alive is 0.
4480
4481 2000-11-20  Hrvoje Niksic  <hniksic@arsdigita.com>
4482
4483         * recur.c (recursive_retrieve): Print the "so we don't load"
4484         debugging message only if we really don't load.
4485
4486         * http.c (gethttp): Inhibit keep-alive if proxy is being used.
4487         (gethttp): Don't request keep-alive if keep-alive is inhibited.
4488
4489 2000-11-19  Hrvoje Niksic  <hniksic@arsdigita.com>
4490
4491         * http.c (gethttp): Make the HTTP persistent connections more
4492         robust.
4493
4494 2000-11-19  Hrvoje Niksic  <hniksic@arsdigita.com>
4495
4496         * retr.c (get_contents): If use_expected, make sure that the
4497         appropriate amount of data is being read.
4498
4499         * http.c (gethttp): Check for both `Keep-Alive: ...' and
4500         `Connection: Keep-Alive'.
4501
4502         * wget.h (DEBUGP): Call debug_logprintf only if opt.debug is
4503         turned on.
4504
4505 2000-11-19  Hrvoje Niksic  <hniksic@arsdigita.com>
4506
4507         * http.c (connection_available_p): Use it.
4508
4509         * connect.c (test_socket_open): New function.
4510
4511         * http.c (gethttp): Support persistent connections.  Based on the
4512         ideas, and partly on code, by Sam Horrocks <sam@daemoninc.com>.
4513         (register_persistent): New function.
4514         (connection_available_p): Ditto.
4515         (invalidate_connection): Ditto.
4516
4517 2000-11-19  Hrvoje Niksic  <hniksic@arsdigita.com>
4518
4519         * url.c (convert_links): Handle UREL2ABS case.
4520
4521         * recur.c (recursive_retrieve): Instead of the list
4522         urls_downloaded, use hash tables dl_file_url_map and
4523         dl_url_file_map.
4524         (convert_all_links): Use them to retrieve data.
4525
4526         * host.c (clean_hosts): Free the hash tables.
4527
4528         * main.c (private_initialize): Call host_init().
4529
4530         * host.c (store_hostaddress): Use a saner, hash table-based data
4531         model.
4532         (realhost): Ditto.
4533         (host_init): Initialize the hash tables.
4534
4535 2000-11-18  Hrvoje Niksic  <hniksic@arsdigita.com>
4536
4537         * utils.c (slist_append): Eviscerate NOSORT.  Hash tables are now
4538         used for what the sorted slists used to be used for.
4539         (slist_contains): Don't rely on the list being sorted.
4540         (slist_append): Simplify the code.
4541
4542         * recur.c (recursive_cleanup): Use free_string_set.
4543
4544         * utils.c (string_set_add, string_set_exists, string_set_free):
4545         New functions for easier freeing of hash tables whose keys are
4546         strdup'ed strings.
4547
4548         * recur.c (recursive_retrieve): Use the hash table functions for
4549         storing undesirable URLs.
4550
4551         * hash.c: New file.
4552
4553 2000-11-17  Hrvoje Niksic  <hniksic@arsdigita.com>
4554
4555         * main.c (private_initialize): Call url_init.
4556         (main): Call private_initialize.
4557
4558         * url.c (unsafe_char_table): New table.
4559         (UNSAFE_CHAR): Use it.
4560         (init_unsafe_char_table): New function.
4561         (url_init): New function; call init_unsafe_char_table.
4562
4563 2000-11-16  Hrvoje Niksic  <hniksic@arsdigita.com>
4564
4565         * mswindows.h: Define snprintf and vsnprintf to _snprintf and
4566         _vsnprintf respectively.
4567
4568 2000-11-15  Hrvoje Niksic  <hniksic@arsdigita.com>
4569
4570         * config.h.in: Do the _XOPEN_SOURCE and _SVID_SOURCE things only
4571         on Linux.
4572
4573 2000-11-15  Hrvoje Niksic  <hniksic@arsdigita.com>
4574
4575         * html-url.c (handle_link): Handle HTML fragment identifiers.
4576
4577         * recur.c (recursive_retrieve): If norobot info is respected and
4578         the file is specified not to be followed by robots, respect that.
4579
4580         * html-url.c (collect_tags_mapper): Handle <meta name=robots
4581         content=X>.  For us the important cases are where X is NONE or
4582         where X contains NOFOLLOW.
4583         (get_urls_html): Propagate that information to the caller.
4584
4585 2000-11-13  Hrvoje Niksic  <hniksic@arsdigita.com>
4586
4587         * url.c (convert_links): Unlink the file we might be reading from
4588         before writing to it.
4589         (convert_links): Use alloca instead of malloc for
4590         filename_plus_orig_suffix.
4591
4592 2000-11-12  Hrvoje Niksic  <hniksic@arsdigita.com>
4593
4594         * host.c (realhost): Add HOST to the list with quality==0 only if
4595         it wasn't already there.
4596         Based on analysis by Lu Guohan <feng@public.bjnet.edu.cn>.
4597
4598 2000-11-10  Hrvoje Niksic  <hniksic@arsdigita.com>
4599
4600         * url.c (get_urls_file): Ditto.
4601         (convert_links): Ditto.
4602
4603         * html-url.c (get_urls_html): Use read_file() instead of
4604         load_file().
4605
4606         * utils.c (read_file): New function, instead of the old
4607         load_file().
4608         (read_file_free): Ditto.
4609
4610         * url.c (findurl): Search only for the supported protocols.
4611         (convert_links): Use fwrite() when writing out a region of
4612         characters.
4613
4614 2000-11-10  Hrvoje Niksic  <hniksic@arsdigita.com>
4615
4616         * ftp-ls.c: Move html_quote_string and ftp_index here.
4617
4618         * url.c: Remove get_urls_html, since that's now in html-url.c.
4619
4620         * html-url.c: New file.
4621
4622         * html-parse.c: New file.
4623
4624 2000-11-10  Hrvoje Niksic  <hniksic@arsdigita.com>
4625
4626         * init.c (run_wgetrc): Don't bother killing off '\r' since
4627         pars_line() skips whitespace at end of line anyway.
4628         (parse_line): Oops, it didn't.  Now it does.
4629
4630         * recur.c (parse_robots): Ditto here.
4631
4632         * ftp-ls.c (ftp_parse_unix_ls): Kill off the newline character
4633         manually because read_whole_line no longer does.
4634
4635         * utils.c (read_whole_line): Rewrite to: a) use less memory
4636         (reallocates to needed size after work), b) work faster -->
4637         fgets() instead of getc, c) be more correct --> doesn't kill the
4638         newline character at the end of line.
4639
4640 2000-11-10  Hrvoje Niksic  <hniksic@arsdigita.com>
4641
4642         * init.c (comind): Initialize MAX to array size - 1.
4643
4644 2000-11-08  Hrvoje Niksic  <hniksic@arsdigita.com>
4645
4646         * url.c (construct): Changed last_slash[-1] to *(last_slash - 1).
4647         Suggested by Edward J. Sabol.
4648
4649 2000-11-08  Hrvoje Niksic  <hniksic@arsdigita.com>
4650
4651         * url.c (construct): Handle the case where host name is not
4652         followed by a slash.
4653
4654 2000-11-06  Hrvoje Niksic  <hniksic@arsdigita.com>
4655
4656         * init.c: commands[] need to be sorted!  ("base" wasn't.)
4657
4658 2000-11-05  Hrvoje Niksic  <hniksic@arsdigita.com>
4659
4660         * wget.h (DO_REALLOC_FROM_ALLOCA): Use braces to disambiguate
4661         `if'.
4662
4663 2000-11-05  Hrvoje Niksic  <hniksic@arsdigita.com>
4664
4665         * url.c (construct): Insert unneeded initialization for the
4666         compiler to shut up.
4667
4668         * config.h.in: Define _XOPEN_SOURCE to 500 to get the prototype
4669         for strptime() (*duh*).  Define _SVID_SOURCE to get S_IFLNK which
4670         otherwise gets lost when you define _XOPEN_SOURCE.
4671
4672         * utils.c (touch): Include the file name in the error message.
4673         From Debian.
4674
4675 2000-11-05  Hrvoje Niksic  <hniksic@arsdigita.com>
4676
4677         * log.c (logvprintf): Use vsnprintf() in all cases.  If necessary,
4678         resize the buffer to fit the formated message.  That way, messages
4679         of arbitrary size may be printed.
4680         (logvprintf): Use saved_append() to optionally log the last
4681         several lines of output.
4682         (logputs): Ditto.
4683         (log_close): Adapt to new data structures.
4684         (log_dump): Ditto.
4685         (redirect_output): Print messages to stderr, not to stdout.
4686
4687         * log.c (saved_append_1): New function.  Replaces the old logging
4688         system ("log all output until 10M characters") with a new, much
4689         more reasonable one ("log last screenful of text").
4690         (saved_append): New function; call saved_append_1.
4691         (free_log_line): New function.
4692
4693 2000-11-05  Hrvoje Niksic  <hniksic@arsdigita.com>
4694
4695         * url.c (construct): Fix comment.
4696         (find_last_char): Document.
4697
4698 2000-11-04  Hrvoje Niksic  <hniksic@arsdigita.com>
4699
4700         * snprintf.c: New file.
4701
4702 2000-11-03  Hrvoje Niksic  <hniksic@arsdigita.com>
4703
4704         * wget.h: If HAVE_STDARG_H is not defined, don't declare argument
4705         types to logprintf() and debug_logprintf().
4706
4707 2000-11-02  Hrvoje Niksic  <hniksic@arsdigita.com>
4708
4709         * ftp.c (ftp_loop_internal): Hide the password from the URL when
4710         printing non-verbose.  Problem spotted by Dariusz Mlynarczyk
4711         <darekm@bydg.lomac.com.pl>.
4712
4713 2000-11-02  Junio Hamano  <junio@twinsun.com>
4714
4715         * ftp-basic.c (ftp_login): Make comparison case-insensitive.
4716
4717 2000-11-02  Tyler Riddle  <triddle@liquidmarket.com>
4718
4719         * http.c (known_authentication_scheme_p): Recognize NTML
4720         authentication.
4721         (create_authorization_line): Treat NTML the same as `Basic'.
4722
4723 2000-11-02  Hrvoje Niksic  <hniksic@arsdigita.com>
4724
4725         * retr.c (retrieve_url): Free url before returning.
4726         (retrieve_url): Free mynewloc before returning.
4727         Spotted by Mark A. Mankins <Mankins_Mark@prc.com>.
4728
4729 2000-11-02  Hrvoje Niksic  <hniksic@arsdigita.com>
4730
4731         * url.c (parseurl): Remove possible reading past the end of
4732         sup_protos[].  Spotted by Mark A. Mankins <Mankins_Mark@prc.com>.
4733
4734 2000-11-01  Hrvoje Niksic  <hniksic@arsdigita.com>
4735
4736         * main.c (main): In case of opt.downloaded overflowing, print
4737         <overflow> instead of a totally bogus random value.
4738
4739         * retr.c (retrieve_from_file): Ditto.
4740
4741         * recur.c (recursive_retrieve): Ditto.
4742
4743         * main.c (main): Ditto.
4744
4745         * http.c (http_loop): Ditto.
4746
4747         * ftp.c (ftp_loop_internal): Use downloaded_increase() instead of
4748         `+=', and downloaded_exceeds_quota() instead of the simple-minded
4749         check.
4750         (ftp_retrieve_list): Ditto.
4751         (ftp_retrieve_dirs): Ditto.
4752         (ftp_retrieve_glob): Ditto.
4753
4754         * retr.c (downloaded_increase): New function.  Notice overflows of
4755         opt.downloaded.
4756         (downloaded_exceeds_quota): Make sure that opt.downloaded is not
4757         used if it overflowed.
4758
4759         * options.h (struct options): New member downloaded_overflow.
4760
4761 2000-11-01  Hrvoje Niksic  <hniksic@arsdigita.com>
4762
4763         * wget.h (enum): Remove extra space after last enumeration.
4764
4765 2000-11-01  Hrvoje Niksic  <hniksic@arsdigita.com>
4766
4767         * main.c (main): Use legible_very_long() for printing
4768         opt.downloaded.
4769
4770         * utils.c (legible_1): New function that operates on strings and
4771         does the brunt of legible()'s work.
4772         (legible): Use legible_1().
4773         (legible_very_long): New function; dump the argument with
4774         sprintf(), and call legible_1().
4775
4776         * options.h (struct options): Use VERY_LONG_TYPE for
4777         opt.downloaded.
4778
4779         * sysdep.h (VERY_LONG_TYPE): Define it to have a 64-bit or greater
4780         type.
4781
4782         * config.h.in: Make sure that SIZEOF_LONG and SIZEOF_LONG_LONG get
4783         defined.  Define HAVE_LONG_LONG if long long is available.
4784
4785 2000-11-01  Hrvoje Niksic  <hniksic@arsdigita.com>
4786
4787         * utils.c (long_to_string): Update with a later, better version.
4788
4789 2000-11-01  Hrvoje Niksic  <hniksic@arsdigita.com>
4790
4791         * url.c (path_simplify_with_kludge): New function.
4792         (path_simplify_with_kludge): Disable it.  Instead...
4793         (parse_dir): ...make sure that at this point the right thing is
4794         done, i.e. that "query" part of the URL (?...) is always assigned
4795         to the file, never to the directory portion of the path.
4796
4797 2000-11-01  Hrvoje Niksic  <hniksic@arsdigita.com>
4798
4799         * retr.c (retrieve_url): Detect redirection cycles.
4800
4801 2000-11-01  Hrvoje Niksic  <hniksic@arsdigita.com>
4802
4803         * url.c (get_urls_html): Decode HTML entities using
4804         html_decode_entities.
4805
4806         * html.c (htmlfindurl): Don't count the `#' in numeric entities
4807         (&#NNN;) as an HTML fragemnt.
4808         (html_decode_entities): New function.
4809
4810 2000-11-01  Hrvoje Niksic  <hniksic@arsdigita.com>
4811
4812         * html.c (htmlfindurl): Fix recognition of # HTML fragments.
4813
4814 2000-11-01  Hrvoje Niksic  <hniksic@arsdigita.com>
4815
4816         * url.c (construct): Rewritten for clarity.  Avoids the
4817         unnecessary copying and stack-allocation the old version
4818         performed.
4819
4820 2000-10-31  Hrvoje Niksic  <hniksic@arsdigita.com>
4821
4822         * ftp.c (getftp): Ditto.
4823
4824         * http.c (gethttp): Rewind the stream when retrying from scratch.
4825
4826 2000-10-31  Hrvoje Niksic  <hniksic@arsdigita.com>
4827
4828         * retr.c (retrieve_url): Use url_concat() to handle relative
4829         redirections instead of /ad hoc/ code.
4830
4831         * url.c (url_concat): New function encapsulating weird
4832         construct().
4833         (urllen_http_hack): New function.
4834         (construct): When constructing new URLs, recognize that `?' does
4835         not form part of the file name in HTTP.
4836
4837 2000-10-13  Adrian Aichner  <adrian@xemacs.org>
4838
4839         * retr.c: Add msec timing support for WINDOWS.
4840         * retr.c (reset_timer): GetSystemTime() on WINDOWS.
4841         * retr.c (elapsed_time): Calculate delta time to msec on WINDOWS.
4842
4843 2000-10-27  Dan Harkless  <wget@harkless.org>
4844
4845         * retr.c (retrieve_url): Manually applied T. Bharath
4846         <TBharath@responsenetworks.com>'s patch to get wget to grok
4847         illegal relative URL redirects.  Reformatted and re-commented it.
4848
4849 2000-10-23  Dan Harkless  <wget@harkless.org>
4850
4851         * connect.c (make_connection and bindport): Manually applied Rob
4852         Mayoff <mayoff@dqd.com>'s 1.5.3 patch to add --bind-address,
4853         changing coding style to GNU's.
4854
4855         * ftp.c (ftp_loop_internal): --delete-after wasn't implemented for
4856         files downloaded via FTP.  Per a comment, .listing files were not
4857         counted towards number of bytes and files downloaded because they're 
4858         deleted anyway.  Well, they aren't under -nr, so count them then.
4859
4860         * init.c: Manually applied Rob Mayoff's 1.5.3 patch to add
4861         --bind-address, alphabetizing, changing coding style to GNU's,
4862         commenting, and renaming cmd_ip_address() to cmd_address() to
4863         imply hostnames also okay.
4864                 
4865         * main.c (main): --delete-after didn't delete the root of the
4866         tree.  Ignore --convert-links if --delete-after was specified.
4867         Manually applied Rob Mayoff's 1.5.3 patch to add --bind-address,
4868         fixing duplicate use of added-since-1.5.3 case value.
4869         (print_help): Clarified that --delete-after deletes local files.
4870         Rob forgot to add a line for his new --bind-address option.
4871                 
4872         * options.h (struct options): Manually applied Rob Mayoff's patch
4873         to add --bind-address (bind_address structure member).
4874                 
4875         * recur.c (recursive_retrieve): Improved comment; added DEBUGP().
4876         Ignore --convert-links if --delete-after was specified.
4877                 
4878         * retr.c (retrieve_from_file): Just added a DEBUGP().
4879                 
4880 2000-10-19  Dan Harkless  <wget@harkless.org>
4881
4882         * ftp.c (ftp_loop_internal): downloaded_file() enumerators changed.
4883         (getftp): Applied Piotr Sulecki <Piotr.Sulecki@ios.krakow.pl>'s
4884         patch to work around FTP servers that incorrectly respond to the
4885         "REST" command with the remaining size rather than the total file size.
4886                 
4887         * http.c (gethttp): Improved a comment and added code to tack on
4888         ".html" to text/html files without that extension when -E specified.
4889         (http_loop): Use new downloaded_file() enumerators and deal with
4890         the case of gethttp() called xrealloc() on u->local.
4891
4892         * init.c (commands): Added new "htmlextension" command.
4893         Also renamed John Daily's cmd_quad() to the more descriptive
4894         cmd_lockable_boolean(), alpha-sorted the CMD_DECLARE()s and
4895         removed duplicate cmd_boolean() declaration.
4896
4897         * main.c (print_help): Added my new -E / --html-extension option.
4898         (main): Undocumented --email-address option previously used -E synonym.
4899         Stole it away for the much more deserving --html-extension's use.
4900
4901         * options.h (struct options): Added html_extension field.
4902
4903         * url.c (convert_links): URL X that we saved as X.html locally due
4904         to -E needs to be backed up as X.orig, not X.html.orig.  Added comments.
4905         (downloaded_file): Now remembers if we added .html extension to a file.
4906
4907         * url.h (downloaded_file_t): Added extra enumerators to support above.
4908         (downloaded_file): Now takes and returns a downloaded_file_t.
4909
4910         * wget.h (unnamed "dt" enum): Added ADDED_HTML_EXTENSION enumerator.
4911         
4912 2000-10-09  Dan Harkless  <wget@harkless.org>
4913
4914         * html.c (htmlfindurl): Added unneeded initialization to quiet warning.
4915                 
4916         * main.c (print_help): Clarified what --retr-symlinks does.
4917         
4918 2000-09-15  John Daily  <jdaily@cyberdude.com>
4919
4920         * init.c: Add support for "always" and "never" values to allow
4921         .wgetrc to override commandline (useful e.g. with .pm files
4922         calling `wget --passive-ftp' when your firewall doesn't allow that).
4923
4924         * ftp.c (getftp): passive_ftp is first option to support always/never.
4925
4926 2000-08-30  Dan Harkless  <wget@harkless.org>
4927
4928         * ftp.c (ftp_retrieve_list): Use new INFINITE_RECURSION #define.
4929         
4930         * html.c: htmlfindurl() now takes final `dash_p_leaf_HTML' parameter.
4931         Wrapped some > 80-column lines.  When -p is specified and we're at a 
4932         leaf node, do not traverse <A>, <AREA>, or <LINK> tags other than 
4933         <LINK REL="stylesheet">.
4934         
4935         * html.h (htmlfindurl): Now takes final `dash_p_leaf_HTML' parameter.
4936         
4937         * init.c: Added new -p / --page-requisites / page_requisites option.
4938
4939         * main.c (print_help): Clarified that -l inf and -l 0 both allow
4940         infinite recursion.  Changed the unhelpful --mirrior description
4941         to simply give the options it's equivalent to.  Added new -p option.
4942         (main): Added some comments; handle new -p / --page-requisites.
4943         
4944         * options.h (struct options): Added new page_requisites field.
4945
4946         * recur.c: Changed "URL-s" to "URLs" and "HTML-s" to "HTMLs".
4947         Calculate and pass down new `dash_p_leaf_HTML' parameter to
4948         get_urls_html().  Use new INFINITE_RECURSION #define.
4949
4950         * retr.c: Changed "URL-s" to "URLs".  get_urls_html() now takes
4951         final `dash_p_leaf_HTML' parameter.
4952
4953         * url.c: get_urls_html() and htmlfindurl() now take final
4954         `dash_p_leaf_HTML' parameter.
4955
4956         * url.h (get_urls_html): Now takes final `dash_p_leaf_HTML' parameter.
4957
4958         * wget.h: Added some comments and new INFINITE_RECURSION #define.
4959         
4960 2000-08-23  Dan Harkless  <wget@harkless.org>
4961
4962         * main.c (print_help): -B / --base was not mentioned.
4963
4964 2000-08-22  Dan Harkless  <wget@harkless.org>
4965
4966         * main.c (print_help): Modified -nc description to mention that it
4967         also prevents the creation of multiple versions of the same file
4968         with ".<number>" suffixes.
4969
4970 2000-07-14  Jan Prikryl  <prikryl@cg.tuwien.ac.at>
4971
4972         * retr.c (retrieve_url): Consistently strdup opt.referer when
4973         setting u->referer.
4974
4975 2000-06-09  Dan Harkless  <wget@harkless.org>
4976
4977         * main.c (print_help): --help output for --waitretry was over 80 cols.
4978
4979 2000-06-09  Hrvoje Niksic  <hniksic@iskon.hr>
4980
4981         * url.c (encode_string): Fix comment.
4982         Suggested by Herold Heiko <Heiko.Herold@previnet.it>.
4983
4984 2000-06-01  Const Kaplinsky  <const@ce.cctpu.edu.ru>
4985
4986         * ftp.c (ftp_retrieve_list): Change permissions only on plain
4987         files.
4988
4989 2000-06-01  Hrvoje Niksic  <hniksic@iskon.hr>
4990
4991         * url.c (str_url): Print the port number only if it's different
4992         from the default port number for that protocol.
4993
4994 2000-05-22  Dan Harkless  <wget@harkless.org>
4995
4996         * main.c (print_help): Added --help line for Damir Dzeko
4997         <ddzeko@zesoi.fer.hr>'s until-now-undocumented --referer option.
4998         Removed comments that --referer and --waitretry were undocumented.
4999         Changed "`.wgetrc' command" to "`.wgetrc'-style command" on --help
5000         line for --execute.
5001
5002 2000-05-18  Hrvoje Niksic  <hniksic@iskon.hr>
5003
5004         * ftp.c (getftp): Ditto.
5005
5006         * http.c (gethttp): Check for return value of fclose/fflush.
5007
5008 2000-04-12  Hrvoje Niksic  <hniksic@iskon.hr>
5009
5010         * host.c (store_hostaddress): Instead of shifting ADDR, start
5011         copying from the correct address.
5012
5013 2000-04-12  Hrvoje Niksic  <hniksic@iskon.hr>
5014
5015         * http.c (gethttp): Don't free REQUEST -- it was allocated with
5016         alloca().
5017         Pointed out by Gisle Vanem <gvanem@eunet.no>.
5018
5019 2000-04-04  Dan Harkless  <wget@harkless.org>
5020
5021         * host.c (store_hostaddress): R. K. Owen's patch introduces a
5022         "left shift count >= width of type" warning on 32-bit
5023         architectures.  Got rid of it by tricking the compiler w/ a variable.
5024         
5025         * url.c (UNSAFE_CHAR): The macro didn't include all the illegal
5026         characters per RFC1738, namely everything above '~'.  It also
5027         generated a warning on OSes where char =~ unsigned char.  Fixed.
5028         
5029 1998-10-17  Hrvoje Niksic  <hniksic@srce.hr>
5030
5031         * http.c (http_process_type): Removed needless strdup(), a memory
5032         leak.
5033
5034 1998-09-25  Hrvoje Niksic  <hniksic@srce.hr>
5035
5036         * html.c (htmlfindurl): Set PH to the first occurrence of `#'.
5037
5038 1998-09-25  Simon Munton  <simonm@m4data.co.uk>
5039
5040         * init.c (wgetrc_file_name): Don't free HOME under Windows.
5041
5042 1998-12-01  "R. K. Owen"  <rkowen@Nersc.GOV>
5043
5044         * host.c (store_hostaddress): Fix for big endian 64-bit machines.
5045
5046 1998-12-01  Hrvoje Niksic  <hniksic@srce.hr>
5047
5048         * url.c (UNSAFE_CHAR): New macro.
5049         (contains_unsafe): Use it.
5050         (encode_string): Ditto.
5051
5052 1998-12-01  Hrvoje Niksic  <hniksic@srce.hr>
5053
5054         * main.c (i18n_initialize): Use LC_MESSAGES only if available.
5055
5056 2000-03-31  Hrvoje Niksic  <hniksic@srce.hr>
5057
5058         * Use TOUPPER/TOLOWER.
5059
5060 1998-12-22  Alexander V. Lukyanov  <lav@yars.free.net>
5061
5062         * ftp-opie.c (btoe): Zero-terminate OSTORE.
5063
5064 2000-03-21  Hrvoje Niksic  <hniksic@iskon.hr>
5065
5066         * wget.h (DO_REALLOC_FROM_ALLOCA): Ditto.
5067
5068         * sysdep.h (ISALNUM): New macro.
5069         (TOLOWER): Ditto.
5070         (TOUPPER): Ditto.
5071
5072 2000-03-10  Dan Harkless  <wget@harkless.org>
5073
5074         * html.c (idmatch): Implemented checking of my new --follow-tags
5075         and --ignore-tags options.
5076         
5077         * init.c (commands): Added comment reminding people adding new
5078         entries doing allocation to add corresponding freeing in cleanup().
5079         (commands): Added new followtags and ignoretags commands.
5080         (cleanup): Free storage for new followtags and ignoretags.
5081         
5082         * main.c: Use of "comma-separated list" was random -- normalized
5083         it.  Did some alphabetization.  Added comments pointing out
5084         "Options without arguments" and "Options accepting an argument"
5085         sections of long_options[].  Added new options --follow-tags and
5086         -G / --ignore-tags.  Added comment that Damir's --referer is
5087         currently undocumented.  Added comment that Heiko's --waitretry is
5088         partially undocumented (mentioned in --help but not in
5089         wget.texi).  Moved improperly sorted 24, 129, and 'G' cases.
5090         
5091         * options.h (struct options): Added new fields follow_tags and
5092         ignore_tags. 
5093         
5094         * wget.h: Added "#define EQ 0" so we can say "strcmp(a, b) == EQ".
5095         
5096 2000-03-02  Dan Harkless  <wget@harkless.org>
5097
5098         * ftp.c (ftp_loop_internal): Heiko introduced "suggest explicit
5099         braces to avoid ambiguous `else'" warnings.  Eliminated them.
5100         
5101         * http.c (gethttp): Dan Berger's query string patch is totally
5102         bogus.  If you have two different URLs, gen_page.cgi?page1 and
5103         get_page.cgi?page2, they'll both be saved as get_page.cgi and the
5104         second will overwrite the first.  Also, parameters to implicit
5105         CGIs, like "http://www.host.com/db/?2000-03-02" cause the URLs to
5106         be printed with trailing garbage characters, and could seg fault.
5107         Backing out the patch, which Dan B. informed me by email was just
5108         a kludge to download StarOffice from Sun made necessary due to
5109         wget's unconditional escaping of certain characters (room for an
5110         option there?).
5111         (http_loop): Heiko introduced "suggest explicit braces to avoid
5112         ambiguous `else'" warnings.  Eliminated them.
5113         
5114         * main.c: Heiko's --wait / --waitretry backwards compatibility
5115         code looks to have been totally untested -- automatic variable
5116         'wr' was used without being initialized, and a long int was passed
5117         into setval()'s char* val parameter.
5118         
5119         * recur.c (parse_robots): Applied Edward J. Sabol
5120         <sabol@alderaan.gsfc.nasa.gov>'s patch for Guan Yang's reported
5121         problem with "User-agent:<space>*<space>" lines in robots.txt.
5122         
5123         * url.c (parseurl, str_url): Removing Dan Berger's code (see
5124         http.c above for explanation).
5125         
5126 1999-08-25  Heiko Herold  <Heiko.Herold@previnet.it>
5127
5128         * ftp.c: Respect new option waitretry.
5129
5130 2000-01-30  Damir Dzeko  <ddzeko@zesoi.fer.hr>
5131
5132         * http.c (gethttp): Send custom Referer, if required.
5133
5134 1999-09-24  Charles G Waldman  <cgw@fnal.gov>
5135
5136         * netrc.c (parse_netrc): Allow passwords to contain spaces.
5137
5138         * netrc.c (parse_netrc): New function.
5139
5140 1999-09-17  Dan Berger  <dberger@ix.netcom.com>
5141
5142         * http.c (gethttp): Send it.
5143
5144         * url.c (parseurl): Detect query string in HTTP URL-s.
5145         (str_url): Print it.
5146
5147 2000-03-02  HIROSE Masaaki  <hirose31@t3.rim.or.jp>
5148
5149         * html.c (html_allow): Add <link href=...> and <script src=...>.
5150
5151 1999-05-02  andrew deryabin  <djsf@softhome.net>
5152
5153         * http.c (gethttp): Specify port in `Host' header only if it's
5154         different from 80.
5155
5156 1998-11-03  Edward J. Sabol  <sabol@alderaan.gsfc.nasa.gov>
5157
5158         * recur.c (recursive_retrieve): If a finite maximum depth is
5159         specified, and we're are already at that depth, don't download the
5160         HTML file for parsing.
5161
5162 2000-03-01  Dan Harkless  <wget@harkless.org>
5163
5164         * ftp.c (ftp_loop_internal): Call new downloaded_file() function,
5165         even though we don't do conversion on HTML files retrieved via
5166         FTP, so _current_ usage of downloaded_file() makes this call unneeded. 
5167         (ftp_retrieve_list): Added a comment saying where we need to
5168         stat() a .orig file if FTP'd HTML file conversion is ever implemented.
5169         (ftp_retrieve_list): "Local file '%s' is more recent," is sometimes
5170         a lie -- reworded as "Server file no newer than local file '%s' --".
5171         
5172         * http.c (http_loop): Fixed a typo and clarified a comment.
5173         (http_loop): When -K and -N are specified together, compare size
5174         and timestamp of server file X against local file X.orig (if
5175         extant) rather than converted local file X.
5176         (http_loop): "Local file '%s' is more recent," is sometimes a lie
5177         -- reworded as "Server file no newer than local file '%s' --".
5178         (http_loop): Call new downloaded_file() function to prevent
5179         wrongful overwriting of .orig file when -N is specified.
5180         
5181         * url.c (convert_links): When -K specified, only rename X to
5182         X.orig if downloaded_file() returns TRUE.  Otherwise when we skip
5183         file X due to -N, we clobber an X.orig from a previous invocation.
5184         (convert_links): Call the failsafe xstrdup(), not the real strdup().
5185         (convert_links): Added a note asking anyone who understands how
5186         multiple URLs can correspond to a single file to comment it.
5187         (downloaded_file): Added this new function.
5188         
5189         * url.h (downloaded_file): Added prototype for this new function
5190         as well as its downloaded_file_t enum type.
5191
5192         * wget.h (boolean): Added this new typedef and TRUE and FALSE #defines.
5193
5194 2000-02-29  Dan Harkless  <wget@harkless.org>
5195
5196         * version.c: Upped version to developer-only "1.5.3+dev".
5197
5198 2000-02-18  Dan Harkless  <wget@harkless.org>
5199
5200         * init.c (backup_converted): Added this new option.
5201
5202         * main.c (-K / --backup-converted): Added this new option.
5203
5204         * options.h (backup_converted): Added this new option.
5205
5206         * url.c (convert_links): When backup_converted is specified, save
5207         file X as X.orig before converting.
5208
5209         * url.h (urlpos): Fixed typo -- said "Rekative" instead of "Relative".
5210
5211 1998-09-21  Hrvoje Niksic  <hniksic@srce.hr>
5212
5213         * version.c: Wget 1.5.3 is released.
5214
5215 1998-09-21  Hrvoje Niksic  <hniksic@srce.hr>
5216
5217         * host.c (ftp_getaddress): Don't warn when reverse-lookup of local 
5218         address doesn't yield FQDN.
5219
5220 1998-09-21  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
5221
5222         * cmpt.c (strerror): Fix declaration of sys_errlist.
5223
5224 1998-09-11  Hrvoje Niksic  <hniksic@srce.hr>
5225
5226         * main.c (main): Don't use an array subscript as the first
5227         argument to STRDUP_ALLOCA.
5228         From Kaveh R. Ghazi.
5229
5230 1998-09-11  Szakacsits Szabolcs  <szaka@sienet.hu>
5231
5232         * html.c (htmlfindurl): Download table background.
5233
5234 1998-09-11  Hans Grobler  <grobh@conde.ee.sun.ac.za>
5235
5236         * init.c (parse_line): Would free *com before allocating it.
5237         (parse_line): Would free com instead of *com.
5238
5239 1998-09-10  Howard Gayle  <howard@fjst.com>
5240
5241         * url.c (get_urls_html): Would drop the last character of the
5242         link.
5243
5244 1998-09-10  Hrvoje Niksic  <hniksic@srce.hr>
5245
5246         * http.c (http_loop): Don't print status code if quiet.
5247
5248 1998-09-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5249
5250         * log.c: Use <stdarg.h> only when __STDC__.
5251
5252 1998-09-10  Adam D. Moss  <adam@foxbox.org>
5253
5254         * html.c (htmlfindurl): Download <layer src=...>.
5255
5256 1998-09-10  Howard Gayle  <howard@fjst.com>
5257
5258         * ftp.c (ftp_retrieve_list): Don't update the time stamp of a file 
5259         not retrieved.
5260
5261 1998-06-27  Hrvoje Niksic  <hniksic@srce.hr>
5262
5263         * utils.c: Include <libc.h> on NeXT.
5264
5265 1998-06-26  Heinz Salzmann  <heinz.salzmann@intermetall.de>
5266
5267         * url.c (get_urls_html): Fix calculation of URL position.
5268
5269 1998-06-23  Hrvoje Niksic  <hniksic@srce.hr>
5270
5271         * version.c: Wget 1.5.2 is released.
5272
5273 1998-06-23  Dave Love  <d.love@dl.ac.uk>
5274
5275         * ftp.c, init.c, netrc.c: Include errno.h.
5276
5277         * http.c: Include errno.h and time header.
5278
5279         * Makefile.in (exext): Define.
5280         (install.bin, uninstall.bin): Use it.
5281
5282 1998-06-21  Hrvoje Niksic  <hniksic@srce.hr>
5283
5284         * http.c (http_loop): Don't attempt to compare local and remote
5285         sizes if the remote size is unknown.
5286
5287 1998-06-16  Hrvoje Niksic  <hniksic@srce.hr>
5288
5289         * url.c (get_urls_html): Use malloc() instead of alloca in the
5290         loop.
5291
5292 1998-06-13  Hrvoje Niksic  <hniksic@srce.hr>
5293
5294         * version.c: Wget 1.5.2-b4 is released.
5295
5296 1998-06-13  Hrvoje Niksic  <hniksic@srce.hr>
5297
5298         * url.c (get_urls_html): Ignore spaces before and after the URI.
5299
5300 1998-06-08  Wanderlei Antonio Cavassin  <cavassin@conectiva.com.br>
5301
5302         * ftp.c (getftp): Translate `done'.
5303
5304 1998-06-06  Hrvoje Niksic  <hniksic@srce.hr>
5305
5306         * version.c: Wget 1.5.2-b3 is released.
5307
5308 1998-06-06  Alexander Kourakos  <awk@bnt.com>
5309
5310         * init.c (cleanup): Close dfp, don't free it.
5311
5312 1998-06-06  Hrvoje Niksic  <hniksic@srce.hr>
5313
5314         * utils.c (make_directory): Twiddle.
5315
5316         * config.h.in: Added template for access().
5317
5318 1998-06-05  Mathieu Guillaume  <mat@cythere.com>
5319
5320         * html.c (htmlfindurl): Download <input src=...>
5321
5322 1998-06-03  Hrvoje Niksic  <hniksic@srce.hr>
5323
5324         * utils.c (file_exists_p): Use access() with two arguments.
5325
5326 1998-05-27  Martin Kraemer  <Martin.Kraemer@mch.sni.de>
5327
5328         * netrc.c (parse_netrc): Correct logic.
5329
5330 1998-05-27  Hrvoje Niksic  <hniksic@srce.hr>
5331
5332         * ftp.c (getftp): Added `break'; suggested by Lin Zhe Min
5333         <ljm@ljm.wownet.net>.
5334
5335 1998-05-24  Hrvoje Niksic  <hniksic@srce.hr>
5336
5337         * version.c: Wget 1.5.2-b2 is released.
5338
5339 1998-05-18  Juan Jose Rodriguez  <jcnsoft@jal1.telmex.net.mx>
5340
5341         * mswindows.h: Don't translate mkdir to _mkdir under Borland.
5342
5343 1998-05-17  Hrvoje Niksic  <hniksic@srce.hr>
5344
5345         * retr.c (elapsed_time): Return correct value when
5346         HAVE_GETTIMEOFDAY is undefined.
5347
5348 1998-05-13  Hrvoje Niksic  <hniksic@srce.hr>
5349
5350         * version.c: Wget 1.5.2-b1 is released.
5351
5352 1998-05-08  Hrvoje Niksic  <hniksic@srce.hr>
5353
5354         * getopt.c (_getopt_internal): Use exec_name instead of argv[0].
5355         (_getopt_internal): Don't translate `#if 0'-ed strings.
5356
5357 1998-05-06  Douglas E. Wegscheid  <wegscd@whirlpool.com>
5358
5359         * mswindows.c (ws_handler): Use fork_to_background().
5360
5361 1998-05-05  Hrvoje Niksic  <hniksic@srce.hr>
5362
5363         * version.c: Wget 1.5.1 is released.
5364
5365 1998-05-05  Hrvoje Niksic  <hniksic@srce.hr>
5366
5367         * http.c (parse_http_status_line): Avoid `minor' and `major'
5368         names.
5369
5370 1998-05-02  Hrvoje Niksic  <hniksic@srce.hr>
5371
5372         * utils.c (mkdirhier): Renamed to make_directory.
5373
5374 1998-05-01  Hrvoje Niksic  <hniksic@srce.hr>
5375
5376         * mswindows.c (fork_to_background): Define under Windows.
5377
5378         * utils.c (fork_to_background): New function.
5379
5380         * html.c (htmlfindurl): Removed rerdundant casts.
5381
5382 1998-05-01  Douglas E. Wegscheid  <wegscd@whirlpool.com>
5383
5384         * mswindows.c (ws_mypath): Cache the path.
5385
5386 1998-04-30  Douglas E. Wegscheid  <wegscd@whirlpool.com>
5387
5388         * ftp.h: Prefix enum ftype members with FT_.
5389
5390         * ftp-ls.c, ftp.c, html.h: Adjust accordingly.
5391
5392         * mswindows.h: Use stat under Borland, _stat under MSVC.
5393
5394 1998-04-28  Hrvoje Niksic  <hniksic@srce.hr>
5395
5396         * http.c (known_authentication_scheme_p): New function.
5397         (gethttp): Handle authorization more correctly.
5398
5399         * ftp-basic.h: Removed.
5400
5401         * cmpt.h: Removed.
5402
5403         * utils.c: Include <unistd.h> before <pwd.h>; needed under SunOS
5404         with gcc 2.8.
5405         (numdigit): Use `while' loop.
5406
5407         * http.c (create_authorization_line): Detect authentication
5408         schemes case-insensitively.
5409
5410         * http.c (extract_header_attr): Use strdupdelim().
5411         (digest_authentication_encode): Move declaration of local
5412         variables to smaller scope.
5413         (digest_authentication_encode): Reset REALM, OPAQUE and NONCE.
5414         (create_authorization_line): Detect authentication schemes
5415         case-insensitively.
5416
5417         * utils.c (touch): Constify.
5418
5419         * http.c (gethttp): Report a nicer error when no data is received.
5420
5421         * rbuf.h (RBUF_READCHAR): Ditto.
5422
5423         * ftp-basic.c (ftp_response): Use sizeof.
5424
5425 1998-04-27  Hrvoje Niksic  <hniksic@srce.hr>
5426
5427         * retr.c (print_percentage): EXPECTED is long, not int.
5428         (print_percentage): Use floating-point arithmetic to avoid
5429         overflow with large files' sizes multiplied with 100.
5430
5431 1998-04-27  Gregor Hoffleit  <flight@mathi.uni-heidelberg.de>
5432
5433         * config.h.in: Added pid_t stub.
5434
5435         * sysdep.h (S_ISREG): Moved here from mswindows.h (NeXT doesn't
5436         define it).
5437
5438 1998-04-20  Hrvoje Niksic  <hniksic@srce.hr>
5439
5440         * version.c: Wget 1.5.0 is released.
5441
5442 1998-04-18  Hrvoje Niksic  <hniksic@srce.hr>
5443
5444         * url.c (str_url): Ditto.
5445
5446         * ftp-basic.c (ftp_rest): Use new name.
5447
5448         * utils.c (long_to_string): Renamed from prnum().
5449
5450 1998-04-16  Hrvoje Niksic  <hniksic@srce.hr>
5451
5452         * version.c: Wget 1.5-b17 is released.
5453
5454 1998-04-08  Hrvoje Niksic  <hniksic@srce.hr>
5455
5456         * headers.c (header_get): New argument FLAGS.
5457
5458         * http.c (gethttp): If request is malformed, bail out of the
5459         header loop.
5460         (gethttp): Check for empty header *after* the status line checks.
5461         (gethttp): Disallow continuations for status line.
5462
5463 1998-04-08  Hrvoje Niksic  <hniksic@srce.hr>
5464
5465         * version.c: Wget 1.5-b16 is released.
5466
5467 1998-04-08  Hrvoje Niksic  <hniksic@srce.hr>
5468
5469         * init.c (commands): Renamed `always_rest' to `continue'.
5470
5471 1998-04-05  Hrvoje Niksic  <hniksic@srce.hr>
5472
5473         * all: Use it.
5474
5475         * log.c (logputs): New argument.
5476         (logvprintf): Ditto.
5477         (logprintf): Ditto.
5478
5479 1998-04-04  Hrvoje Niksic  <hniksic@srce.hr>
5480
5481         * http.c (http_atotm): Update comment.
5482
5483         * main.c (i18n_initialize): Set LC_MESSAGES, not LC_ALL.
5484
5485         * wget.h: Renamed ENABLED_NLS to HAVE_NLS.
5486
5487         * main.c (i18n_initialize): New function.
5488         (main): Use it.
5489
5490         * log.c: Include <unistd.h>.
5491
5492         * retr.c (show_progress): Cast alloca to char *.
5493
5494 1998-04-04  Hrvoje Niksic  <hniksic@srce.hr>
5495
5496         * version.c: Wget 1.5-b15 is released.
5497
5498 1998-04-04  Hrvoje Niksic  <hniksic@srce.hr>
5499
5500         * utils.h: Declare file_non_directory_p().
5501
5502 1998-04-03  Hrvoje Niksic  <hniksic@srce.hr>
5503
5504         * main.c (main): It's `tries', not `numtries' now.
5505
5506 1998-04-01  Hrvoje Niksic  <hniksic@srce.hr>
5507
5508         * init.c (getperms): Removed.
5509
5510 1998-04-01  Tim Charron  <tcharron@interlog.com>
5511
5512         * log.c (logvprintf): Don't use ARGS twice.
5513
5514 1998-04-01  John  <john@futuresguide.com>
5515
5516         * mswindows.c: Cleaned up.
5517
5518 1998-04-01  Hrvoje Niksic  <hniksic@srce.hr>
5519
5520         * version.c: Wget 1.5-b14 is released.
5521
5522 1998-04-01  Hrvoje Niksic  <hniksic@srce.hr>
5523
5524         * ftp-opie.c (STRLEN4): New macro.
5525         (btoe): Use it.
5526
5527 1998-04-01  Junio Hamano  <junio@twinsun.com>
5528
5529         * http.c: Document all the Digest functions.
5530
5531 1998-04-01  Hrvoje Niksic  <hniksic@srce.hr>
5532
5533         * utils.c (file_non_directory_p): Renamed from isfile().
5534
5535         * mswindows.h (S_ISREG): New macro, suggested by Tim Adam.
5536
5537 1998-03-31  Hrvoje Niksic  <hniksic@srce.hr>
5538
5539         * utils.c (mkdirhier): Use 0777 instead of opt.dirmode.
5540
5541         * init.c (cmd_spec_dotstyle): Use 48 dots per line for binary
5542         style.
5543         (cmd_permissions): Removed.
5544
5545         * config.h.in: Add template for WORDS_BIGENDIAN.
5546
5547 1998-03-31  Junio Hamano  <junio@twinsun.com>
5548
5549         * http.c (HEXD2asc): New macro.
5550         (dump_hash): Use it.
5551
5552 1998-03-31  Hrvoje Niksic  <hniksic@srce.hr>
5553
5554         * version.c: Wget 1.5-b13 is released.
5555
5556 1998-03-31  Hrvoje Niksic  <hniksic@srce.hr>
5557
5558         * main.c (main): Don't try to use `com'.
5559
5560 1998-03-30  Hrvoje Niksic  <hniksic@srce.hr>
5561
5562         * init.c (cmd_permissions): New function.
5563
5564 1998-03-30  Hrvoje Niksic  <hniksic@srce.hr>
5565
5566         * version.c: Wget 1.5-b12 is released.
5567
5568 1998-03-30  Hrvoje Niksic  <hniksic@srce.hr>
5569
5570         * init.c (commands): Renamed `numtries' to `tries'.
5571         (cmd_spec_debug): Removed.
5572         (home_dir): Under Windows, return `C:\' if HOME is undefined.
5573
5574 1998-03-29  Hrvoje Niksic  <hniksic@srce.hr>
5575
5576         * config.h.in: Define _XOPEN_SOURCE.
5577
5578         * init.c (check_user_specified_header): New function.
5579         (cmd_spec_header): Use it.
5580         (cmd_spec_useragent): New function.
5581
5582 1998-03-29  Hrvoje Niksic  <hniksic@srce.hr>
5583
5584         * version.c: Wget 1.5-b11 is released.
5585
5586 1998-03-28  Hrvoje Niksic  <hniksic@srce.hr>
5587
5588         * wget.h: Include <libintl.h> only if NLS is enabled.
5589
5590 1998-03-26  Hrvoje Niksic  <hniksic@srce.hr>
5591
5592         * options.h (struct options): Made `wait' a long.
5593         (struct options): Ditto for `timeout'.
5594
5595 1998-03-19  Hrvoje Niksic  <hniksic@srce.hr>
5596
5597         * utils.c (exists): Renamed to file_exists_p.
5598         (file_exists_p): Use access() if available.
5599
5600 1998-03-17  Hrvoje Niksic  <hniksic@srce.hr>
5601
5602         * utils.c (memfatal): Set save_log_p to 0 to avoid potential
5603         infloop.
5604
5605         * log.c: do_logging -> save_log_p.
5606
5607         * config.h.in: Added template for HAVE_VSNPRINTF.
5608
5609 1998-03-16  Hrvoje Niksic  <hniksic@srce.hr>
5610
5611         * init.c: Ditto.
5612
5613         * http.c: Protect declaration against non-ANSI compiler.
5614
5615         * log.c (logvprintf): Use vsnprintf() if available.
5616
5617         * getopt.c (main): Don't translate test stuff.
5618
5619 1998-03-16  Hrvoje Niksic  <hniksic@srce.hr>
5620
5621         * version.c: Wget 1.5-b10 is released.
5622
5623 1998-03-11  Hrvoje Niksic  <hniksic@srce.hr>
5624
5625         * ftp.c (getftp): Don't translate "CWD %s".
5626
5627         * wget.h (GCC_FORMAT_ATTR): Renamed from FORMAT_ATTR.
5628
5629 1998-03-07  Hrvoje Niksic  <hniksic@srce.hr>
5630
5631         * ftp-opie.c (btoe): Use memcpy() instead of strncat().
5632
5633         * log.c (logputs): New function.
5634         (logvprintf): Renamed from vlogmsg; use logputs().
5635
5636         * retr.c (show_progress): Print `[100%]' when the retrieval is
5637         finished.
5638
5639         * init.c (run_wgetrc): Use FILE, not PATH.
5640         (wgetrc_file_name): Ditto.
5641
5642 1998-03-07  Tim Adam  <tma@osa.com.au>
5643
5644         * recur.c (parse_robots): Correctly reset `entries' on empty
5645         disallow.
5646
5647 1998-03-07  Hrvoje Niksic  <hniksic@srce.hr>
5648
5649         * init.c (cmd_spec_debug): Use cmd_boolean().
5650
5651 1998-02-23  Hrvoje Niksic  <hniksic@srce.hr>
5652
5653         * http.c (gethttp): Create proxy-authorization correctly.
5654
5655 1998-02-22  Hrvoje Niksic  <hniksic@srce.hr>
5656
5657         * md5.c: Ditto.
5658
5659         * getopt.c: Use ANSI function definitions.
5660
5661         * ftp-opie.c: New file.
5662
5663         * options.h: Don't redefine EXTERN.
5664
5665         * init.c: Sort it correctly.
5666
5667 1998-02-22  Hrvoje Niksic  <hniksic@srce.hr>
5668
5669         * version.c: Wget 1.5-b9 is released.
5670
5671 1998-02-22  Hrvoje Niksic  <hniksic@srce.hr>
5672
5673         * recur.c (recursive_retrieve): Reset `first_time'.
5674
5675         * ftp.c (getftp): Added `default' clause to switches of uerr_t.
5676
5677         * rbuf.c (rbuf_peek): Simplified.
5678         (rbuf_flush): Use MINVAL.
5679
5680         * wget.h (MINVAL): Moved from url.h.
5681
5682         * rbuf.h (RBUF_FD): New macro.
5683
5684         * url.c (add_url): Add to the head of the list.
5685
5686         * ftp.c (ftp_retrieve_list): Set the permissions to downloaded
5687         file.
5688         (getftp): Set the default permissions to 0600.
5689
5690 1998-02-21  Hrvoje Niksic  <hniksic@srce.hr>
5691
5692         * url.c (get_urls_html): Ditto.
5693         (convert_links): Ditto.
5694
5695         * recur.c (parse_robots): Ditto.
5696
5697         * html.c (ftp_index): Ditto.
5698
5699         * ftp-ls.c (ftp_parse_unix_ls): Open file as binary.
5700
5701         * init.c (defaults): Initialize `opt' to zero via memset.
5702
5703         * http.c (digest_authentication_encode): goto considered harmful.
5704
5705 1998-02-19  Hrvoje Niksic  <hniksic@srce.hr>
5706
5707         * ftp.c (delelement): Simplify and fix leak.
5708
5709 1998-02-18  Hrvoje Niksic  <hniksic@srce.hr>
5710
5711         * http.c (dump_hash): Use HEXD2ASC instead of home-grown stuff.
5712
5713         * url.h (HEXD2ASC): Removed warning.
5714
5715         * init.c (comind): Use binary search.
5716         (commands): Reorganized.
5717         (setval): Ditto.
5718         (cmd_boolean): New function.
5719         (cmd_number): Ditto.
5720         (cmd_number_inf): Ditto.
5721         (cmd_string): Ditto.
5722         (cmd_vector): Ditto.
5723         (cmd_directory_vector): Ditto.
5724         (cmd_bytes): Ditto.
5725         (cmd_time): Ditto.
5726         (cmd_spec_debug): Ditto.
5727         (cmd_spec_dirmode): Ditto.
5728         (cmd_spec_dirstruct): Ditto.
5729         (cmd_spec_dotstyle): Ditto.
5730         (cmd_spec_header): Ditto.
5731         (cmd_spec_htmlify): Ditto.
5732         (cmd_spec_mirror): Ditto.
5733         (cmd_spec_outputdocument): Ditto.
5734         (cmd_spec_recursive): Ditto.
5735         (settime): Merged with cmd_time().
5736         (setbytes): Merged with cmd_bytes().
5737         (setonoff): Merged with cmd_boolean().
5738         (onoff): Ditto.
5739
5740 1998-02-17  Hrvoje Niksic  <hniksic@srce.hr>
5741
5742         * Makefile.in (distclean): Remove `config.h'.
5743
5744 1998-02-17  Hrvoje Niksic  <hniksic@srce.hr>
5745
5746         * version.c: Wget 1.5-b8 is released.
5747
5748 1998-02-17  Hrvoje Niksic  <hniksic@srce.hr>
5749
5750         * http.c (digest_authentication_encode): New function.
5751         (create_authorization_line): Use it.
5752         (dump_hash): New function.
5753         (digest_authentication_encode): Use it.
5754
5755         * fnmatch.c: Renamed from `mtch.c'.
5756
5757 1998-02-15  Karl Eichwalder  <ke@suse.de>
5758
5759         * main.c (main): Tag "Written by..." string as translatable.
5760
5761 1998-02-15  Hrvoje Niksic  <hniksic@srce.hr>
5762
5763         * wget.h (FREE_MAYBE): New macro.
5764
5765         * http.c (create_authorization_line): Don't use ANSI C string
5766         concatenation feature.
5767         (basic_authentication_encode): Use alloca() for temporary
5768         variables.
5769
5770         * recur.h: Ditto.
5771
5772         * http.c: Ditto.
5773
5774         * headers.h: Ditto.
5775
5776         * ftp-basic.c: Protect declaration against non-ANSI compiler.
5777
5778         * http.c (create_authorization_line): Cast `unsigned char *' to
5779         `char *' for sprintf, to shut up the noisy Digital Unix cc.
5780
5781 1998-02-15  Hrvoje Niksic  <hniksic@srce.hr>
5782
5783         * version.c: Wget 1.5-b7 is released.
5784
5785 1998-02-15  Hrvoje Niksic  <hniksic@srce.hr>
5786
5787         * cmpt.c (strstr): Synched with glibc-2.0.6.
5788
5789         * ftp-basic.c (calculate_skey_response): Ditto.
5790         (calculate_skey_response): Use alloca().
5791
5792         * http.c (create_authorization_line): Work with FSF's version of
5793         md5.c.
5794
5795         * md5.c: New file, from GNU libc.
5796
5797 1998-02-14  Hrvoje Niksic  <hniksic@srce.hr>
5798
5799         * url.h (URL_CLEANSE): Name the temporary variable more carefully.
5800
5801 1998-02-13  Hrvoje Niksic  <hniksic@srce.hr>
5802
5803         * http.c (basic_authentication_encode): New function, instead of
5804         the macro.
5805
5806 1998-02-13  Junio Hamano  <junio@twinsun.com>
5807
5808         * http.c: Add HTTP-DA support.
5809         * ftp-basic.c: Add Opie/S-key support.
5810         * config.h.in, Makefile.in: Add HTTP-DA and Opie/S-key support.
5811         * md5.c, md5.h: New files.
5812
5813 1998-02-13  Hrvoje Niksic  <hniksic@srce.hr>
5814
5815         * http.c (http_process_range): Renamed from hprocrange().
5816         (http_process_range): Parse the whole header.
5817
5818         * headers.c: New file.
5819         (header_process): New function.
5820         (header_get): Renamed from fetch_next_header.
5821
5822         * all: Include utils.h only where necessary.
5823
5824         * wget.h: Declare xmalloc(), xrealloc() and xstrdup() here.
5825
5826         * wget.h: Add provisions for dmalloc.
5827
5828 1998-02-12  Hrvoje Niksic  <hniksic@srce.hr>
5829
5830         * version.c: Wget 1.5-b6 is released.
5831
5832 1998-02-12  Hrvoje Niksic  <hniksic@srce.hr>
5833
5834         * ftp.c (ftp_loop): Determine `filename' more precisely.
5835
5836         * init.c (setval): Don't set `opt.quiet' if output-document is
5837         `-'.
5838
5839         * log.c (log_init): Print to STDERR instead of STDOUT.
5840         (vlogmsg): Use STDERR by default.
5841         (logflush): Ditto.
5842
5843 1998-02-11  Simon Josefsson  <jas@pdc.kth.se>
5844
5845         * host.c: Use addr_in again.
5846
5847 1998-02-08  Karl Eichwalder  <karl@suse.de>
5848
5849         * http.c (gethttp): Fixed typo.
5850
5851 1998-02-08  Hrvoje Niksic  <hniksic@srce.hr>
5852
5853         * version.c: Wget 1.5-b5 is released.
5854
5855 1998-02-08  Hrvoje Niksic  <hniksic@srce.hr>
5856
5857         * retr.c (show_progress): Use it.
5858
5859         * log.c (logflush): New function.
5860
5861         * wget.h: Utilize __attribute__ if on gcc.
5862
5863 1998-02-07  Hrvoje Niksic  <hniksic@srce.hr>
5864
5865         * http.c (base64_encode_line): New argument LENGTH.
5866         (BASIC_AUTHENTICATION_ENCODE): Use it.
5867         (BASIC_AUTHENTICATION_ENCODE): Take length of HEADER into account.
5868
5869         * main.c (main): Fixed fprintf() format mismatch.
5870
5871 1998-02-06  Hrvoje Niksic  <hniksic@srce.hr>
5872
5873         * version.c: Wget 1.5-b4 is released.
5874
5875 1998-02-03  Simon Josefsson  <jas@pdc.kth.se>
5876
5877         * host.c: use sockaddr_in instead of addr_in.
5878
5879 1998-02-04  Hrvoje Niksic  <hniksic@srce.hr>
5880
5881         * init.c (cleanup): Use it.
5882
5883         * recur.c (recursive_cleanup): New function.
5884
5885         * retr.c (retrieve_from_file): Ditto.
5886
5887         * main.c (main): Use it.
5888
5889         * recur.c (recursive_reset): New function.
5890
5891         * retr.c (retrieve_from_file): Ditto.
5892
5893         * main.c (main): Simplify call to recursive_retrieve().
5894
5895         * recur.c (recursive_retrieve): Removed FLAGS argument.
5896
5897         * http.c (gethttp): Changed call to iwrite().
5898
5899 1998-02-03  Hrvoje Niksic  <hniksic@srce.hr>
5900
5901         * url.c (get_urls_html): Ditto.
5902         (free_urlpos): Ditto.
5903         (mkstruct): Ditto.
5904         (construct): Ditto.
5905
5906         * retr.c (retrieve_url): Move declaration of local variables to
5907         smaller scope.
5908
5909         * url.c (urlproto): Use it.
5910         (parseurl): Ditto.
5911         (str_url): Ditto.
5912         (get_urls_html): Ditto.
5913
5914         * utils.h (ARRAY_SIZE): New macro.
5915
5916         * url.c (proto): Moved from url.h.
5917
5918         * url.h (URL_CLEANSE): Reformatted.
5919         (USE_PROXY_P): Renamed from USE_PROXY.
5920
5921         * ftp-basic.c: Adjust to the new interface of iwrite().
5922
5923         * ftp-basic.c (ftp_port): Use alloca().
5924
5925 1998-02-03  Hrvoje Niksic  <hniksic@srce.hr>
5926
5927         * version.c: Wget 1.5-b3 is released.
5928
5929         * host.c (ftp_getaddress): Don't print to stderr directly.
5930
5931         * init.c (setbytes): Support `g' for gigabytes.
5932         (cmdtype): New specification CTIME.
5933         (setval): Use it with settime().
5934         (commands): Use it for WAIT and TIMEOUT.
5935
5936 1998-02-02  Hrvoje Niksic  <hniksic@srce.hr>
5937
5938         * http.c (BASIC_AUTHENTICATION_ENCODE): New macro.
5939         (gethttp): Use it.
5940
5941         * utils.c (unique_name_1): Moved from url.c.
5942         (unique_name): Ditto.
5943
5944         * url.c (url_filename): Ditto.
5945
5946         * log.c (redirect_output): Changed call to unique_name().
5947
5948         * url.c (unique_name_1): Renamed from unique_name().
5949         (unique_name): Changed interface.
5950
5951         * init.c (enum cmdid): Moved from init.h.
5952         (cmdtype): Ditto.
5953         (struct cmd): Ditto.
5954
5955         * main.c (main): Use it.
5956         (main): Moved `--backups' to not have a short option.
5957
5958         * options.h (struct options): New member BACKGROUND.
5959
5960         * main.c (print_help): Rearranged.
5961         (main): New long options for -n* short options: --no-directories,
5962         --no-host-directories, --non-verbose, --no-host-lookup and
5963         --dont-remove-listing.
5964
5965 1998-02-01  Hrvoje Niksic  <hniksic@srce.hr>
5966
5967         * main.c (main): Use log_close().
5968
5969         * log.c: New variable LOGFP.
5970         (vlogmsg): Use it.
5971         (redirect_output): Don't open /dev/null; set LOGFP to stdin
5972         instead.
5973         (log_close): New function.
5974
5975         * options.h (struct options): Removed LFILE.
5976
5977         * log.c (log_enable): Removed.
5978
5979         * main.c (main): Use it.
5980
5981         * log.c (log_init): New function.
5982
5983         * url.c (get_urls_html): Removed needless assignment to BASE.
5984
5985         * host.c (add_hlist): Don't set CMP needlessly.
5986
5987         * utils.c (match_backwards): Ditto.
5988         (in_acclist): Ditto.
5989
5990         * url.c (findurl): Ditto.
5991
5992         * netrc.c (parse_netrc): Ditto.
5993
5994         * log.c (log_dump): Ditto.
5995
5996         * html.c (html_quote_string): Ditto.
5997
5998         * ftp-basic.c (ftp_request): Made static.
5999
6000         * connect.c: Made global variables static.
6001
6002         * url.c (construct): Ditto.
6003
6004         * init.c (init_path): Avoid assignment inside `if'-condition.
6005
6006         * ftp.c: Don't include in.h or winsock.h.
6007
6008         * ftp.c (ftp_loop): Use SZ.
6009
6010         * connect.c (bindport): Cast &addrlen to int *.
6011         (conaddr): Ditto.
6012
6013         * init.c (initialize): Don't use SYSTEM_WGETRC unconditionally.
6014
6015 1998-01-31  Hrvoje Niksic  <hniksic@srce.hr>
6016
6017         * ftp.c (getftp): Initialize opt.ftp_pass here.
6018         (ftp_retrieve_dirs): Use alloca().
6019
6020         * init.c (defaults): Don't initialize opt.ftp_pass.
6021
6022         * sysdep.h (S_ISLNK): Declare for OS/2; ditto for lstat.
6023         From Ivan F. Martinez <ivanfm@ecodigit.com.br>.
6024
6025 1998-01-31  Hrvoje Niksic  <hniksic@srce.hr>
6026
6027         * recur.c (parse_robots): Check for comments more correctly.
6028
6029         * host.c (ftp_getaddress): Use STRDUP_ALLOCA.
6030         (ftp_getaddress): Add diagnostics when reverse-lookup yields only
6031         hostname.
6032
6033 1998-01-31  Hrvoje Niksic  <hniksic@srce.hr>
6034
6035         * version.c: Wget 1.5-b2 is released.
6036
6037         * netrc.c (NETRC_FILE_NAME): Moved from netrc.h.
6038
6039         * utils.c (proclist): Pass FNM_PATHNAME to fnmatch().
6040
6041         * ftp-basic.c (ftp_pasv): Avoid unnecessary casting to unsigned
6042         char.
6043
6044         * log.c: Don't attempt to hide arguments from ansi2knr.
6045
6046         * cmpt.c: Synched strptime() and mktime() with glibc-2.0.6.
6047
6048         * ansi2knr.c: Use a later version, from fileutils-3.16l alpha.
6049
6050         * ftp.c (getftp): Ditto.
6051
6052         * http.c (gethttp): Use it.
6053
6054         * retr.c (get_contents): New argument EXPECTED; pass it to
6055         show_progress().
6056         (show_progress): New argument EXPECTED; use it to display
6057         percentages.
6058
6059         * init.c (setval): Ditto.
6060
6061         * http.c (gethttp): Ditto.
6062         (http_loop): Ditto.
6063
6064         * ftp.c (getftp): Ditto.
6065         (ftp_loop_internal): Ditto.
6066
6067         * ftp-ls.c (ftp_parse_unix_ls): Use abort() instead of assert(0).
6068
6069         * sysdep.h (CLOSE): Simplify; use DEBUGP.
6070
6071         * netrc.c (search_netrc): Use alloca().
6072
6073         * init.c (defaults): Initialize no_flush.
6074
6075         * log.c (vlogmsg): Don't flush if no_flush.
6076
6077         * options.h (struct options): New variable no_flush.
6078
6079         * main.c (main): Don't play games with buffering.
6080
6081         * log.c (vlogmsg): Flush the output after every message.
6082
6083 1998-01-31  Hrvoje Niksic  <hniksic@srce.hr>
6084
6085         * init.c (parse_line): Ditto.
6086
6087         * url.c (get_urls_html): Ditto.
6088
6089         * main.c (main): Don't cast to unsigned char.
6090
6091         * init.c (run_wgetrc): Don't cast to unsigned char.
6092         (parse_line): Accept char instead of unsigned char.
6093
6094         * html.c (htmlfindurl): Use char instead of unsigned char.
6095
6096         * all: Use them.
6097
6098         * sysdep.h: Add wrappers to ctype macros to make them
6099         eight-bit-clean:
6100
6101 1998-01-30  Hrvoje Niksic  <hniksic@srce.hr>
6102
6103         * html.c (htmlfindurl): Download <img lowsrc=...>
6104
6105         * main.c (main): Ignore SIGPIPE.
6106
6107         * connect.c (select_fd): New argument WRITEP.
6108         (iwrite): Call select_fd().
6109
6110 1997-02-27  Fila Kolodny <fila@ibi.com>
6111
6112         * ftp.c (ftp_retrieve_list): If retrieving symlink and the proper
6113         one already exists, just skip it.
6114
6115 1998-01-30  Hrvoje Niksic  <hniksic@srce.hr>
6116
6117         * http.c (gethttp): Cosmetic changes.
6118
6119         * http.c (check_end): Allow `+D...' instead of `GMT'.
6120         From Fabrizio Pollastri <pollastri@cstv.to.cnr.it>.
6121
6122         * url.c (process_ftp_type): New function.
6123         (parseurl): Use it.
6124
6125         * connect.c (iwrite): Allow writing in a few chunks.
6126         (bindport): Made SRV static, so addr can point to it.
6127         (select_fd): Removed HPUX kludge.
6128
6129         * host.c (free_hlist): Incorporated into clean_hosts().
6130
6131 1998-01-29  Hrvoje Niksic  <hniksic@srce.hr>
6132
6133         * host.c (hlist): Made static.
6134         (search_address): Cosmetic change.
6135
6136 1998-01-29  Hrvoje Niksic  <hniksic@srce.hr>
6137
6138         * version.c: Wget v1.5-b1 is released.
6139
6140         * http.c (hgetlen): Use sizeof() to get the header length.
6141         (hgetrange): Ditto.
6142         (hgettype): Ditto.
6143         (hgetlocation): Ditto.
6144         (hgetmodified): Ditto.
6145         (haccepts_none): Ditto.
6146
6147         * main.c (main): Updated `--version' and `--help' output, as per
6148         Francois Pinard's suggestions.
6149
6150         * main.c: Include locale.h; call setlocale(), bindtextdomain() and 
6151         textdomain().
6152
6153         * config.h.in: Define stubs for I18N3.
6154
6155         * wget.h: Include libintl.h.
6156
6157 1998-01-28  Hrvoje Niksic  <hniksic@srce.hr>
6158
6159         * url.c (mkstruct): Check for opt.cut_dirs.
6160         (mkstruct): alloca()-te more, xmalloc() less.
6161
6162         * utils.c (load_file): Check for ferror().
6163
6164         * url.c (get_urls_file): Close only the files we opened.
6165         (get_urls_html): Ditto.
6166         (count_slashes): New function.
6167
6168         * http.h: Removed.
6169
6170         * http.c (gethttp): Respect username and password provided by
6171         proxy URL.
6172         (base64_encode_line): Write into an existing buffer instead of
6173         malloc-ing a new one.
6174         (struct http_stat): Moved from http.h
6175
6176         * retr.c (retrieve_url): Free SUF.
6177
6178         * all: Removed lots of unnecessary .h dependencies.
6179
6180         * html.c (global_state): Made static.
6181
6182         * utils.h (ALLOCA_ARRAY): New macro.
6183
6184         * main.c (main): New option `--cut-dirs'.
6185
6186         * url.c (construct): Use alloca() for T.
6187
6188         * utils.c (mkdirhier): Use STRDUP_ALLOCA.
6189
6190         * host.c (_host_t): Moved from host.h.
6191         (struct host): Renamed from _host_t.
6192         (store_hostaddress): Use STRDUP_ALLOCA for INET_S.
6193         (realhost): Ditto.
6194
6195         * host.h: Don't include url.h.
6196
6197         * ftp.c (LIST_FILENAME): Moved from ftp.h.
6198
6199         * init.c (DEFAULT_FTP_ACCT): Moved from ftp.h.
6200
6201         * main.c (main): Enable log if the output goes to a TTY.
6202
6203         * connect.h: Removed unused constant `BACKLOG'.
6204
6205         * config.h.in: Check for isatty().
6206
6207         * Makefile.in (LINK): Use CFLAGS when linking.
6208
6209 1998-01-27  Hrvoje Niksic  <hniksic@srce.hr>
6210
6211         * mswindows.c (ws_hangup): Use redirect_output().
6212
6213         * main.c (redirect_output_signal): New function; use
6214         redirect_output().
6215
6216         * log.c (redirect_output): New function, based on hangup(), which
6217         is deleted.
6218
6219         * log.c (vlogmsg): New function.
6220
6221         * wget.h (DEBUGP): Use debug_logmsg().
6222
6223         * main.c (hangup): Use it.
6224
6225         * log.c (log_dump): New function.
6226
6227         * utils.h (DO_REALLOC): Use `long' for various sizes.
6228
6229         * http.c (hskip_lws): Use `while', for clarity.
6230         (HTTP_DYNAMIC_LINE_BUFFER): New constant.
6231         (fetch_next_header): Use it instead of DYNAMIC_LINE_BUFFER.
6232
6233         * ftp-basic.c (FTP_DYNAMIC_LINE_BUFFER): New constant.
6234         (ftp_response): Use it instead of DYNAMIC_LINE_BUFFER.
6235
6236         * utils.c (DYNAMIC_LINE_BUFFER): Moved from utils.c.
6237         (LEGIBLE_SEPARATOR): Ditto.
6238         (FILE_BUFFER_SIZE): Ditto.
6239
6240         * retr.c (BUFFER_SIZE): Moved from retr.h.
6241
6242         * log.c: New file.
6243         (logmsg): Moved from utils.c.
6244         (debug_logmsg): New function.
6245
6246         * mswindows.h: Include it here.
6247
6248         * init.c: Ditto.
6249
6250         * utils.c: Don't include <windows.h>.
6251
6252 1998-01-25  Hrvoje Niksic  <hniksic@srce.hr>
6253
6254         * host.c (ftp_getaddress): Ditto.
6255
6256         * main.c (main): Use it.
6257
6258         * utils.h (STRDUP_ALLOCA): New macro.
6259
6260         * init.c: Prepend `wget: ' to error messages printed on stderr.
6261
6262         * utils.c (mkdirhier): Renamed from mymkdir.
6263         (touch): Renamed from my_touch.
6264         (pwd_cuserid): Renamed from my_cuserid().
6265
6266 1998-01-24  Andy Eskilsson  <andy.eskilsson@telelogic.se>
6267
6268         * utils.c (accdir): Process wildcards.
6269         (proclist): New function.
6270         (accdir): Use it to avoid code repetition.
6271
6272 1998-01-24  Hrvoje Niksic  <hniksic@srce.hr>
6273
6274         * recur.c (parse_robots): Respect opt.useragent; use alloca().
6275
6276         * http.c (gethttp): Construct useragent accordingly.
6277
6278         * version.c: Changed version string to numbers-only.
6279
6280         * main.c (print_help): List all the options.
6281
6282         * mswindows.c (windows_main_junk): Initialize argv0 here.
6283
6284 1998-01-24  Karl Heuer  <kwzh@gnu.org>
6285
6286         * netrc.c (search_netrc): Initialize `l' only after processing
6287         netrc.
6288
6289         * main.c (main): Don't trap SIGHUP if it's being ignored.
6290
6291 1998-01-24  Hrvoje Niksic  <hniksic@srce.hr>
6292
6293         * all: Use logmsg().
6294
6295         * utils.c (time_str): Moved from retr.c.
6296         (logmsg): New function.
6297         (logmsg_noflush): Ditto.
6298
6299         * rbuf.c: New file, moved buf_* functions here.
6300
6301         * ftp.c (ftp_expected_bytes): Moved from ftp-basic.c.
6302
6303         * ftp-basic.c (ftp_rest): Use prnum().
6304
6305         * ftp-basic.c: Ditto.
6306
6307         * ftp.c: Use the new reading functions and macros.
6308
6309         * retr.c (buf_initialize): New function.
6310         (buf_initialized_p): Ditto.
6311         (buf_uninitialize): Ditto.
6312         (buf_fd): Ditto.
6313
6314         * http.c (fetch_next_header): Use the BUF_READCHAR macro for
6315         efficiency.
6316         (gethttp): Use alloca() where appropriate.
6317
6318         * retr.c (buf_readchar): Use it.
6319         (buf_peek): Use rstreams.
6320
6321         * retr.h (BUF_READCHAR): New macro.
6322
6323         * init.c (home_dir): Rewritten for clarity.
6324         (init_path): Ditto.
6325
6326         * mswindows.c (ws_backgnd): Made static.
6327         (read_registry): Ditto.
6328         (ws_cleanup): Ditto.
6329         (ws_handler): Ditto.
6330
6331 1998-01-23  Hrvoje Niksic  <hniksic@srce.hr>
6332
6333         * alloca.c: New file.
6334
6335         * Makefile.in (ALLOCA): Define.
6336
6337         * mswindows.c (ws_help): Constify.
6338         (ws_help): Use alloca.
6339
6340         * mswindows.c: Reformat.
6341
6342         * all: Added _(...) annotations for I18N snarfing and translation.
6343
6344         * host.c (ftp_getaddress): Nuke SYSINFO.
6345         (ftp_getaddress): Don't use getdomainname().
6346         (ftp_getaddress): Use uname(), where available.
6347
6348         * http.c (gethttp): Protect a stray fprintf().
6349
6350         * init.c (settime): New function.
6351         (setval): Treat WAIT specially, allowing suffixes like `m' for
6352         minutes, etc.
6353
6354 1998-01-21  Hrvoje Niksic  <hniksic@srce.hr>
6355
6356         * url.c (get_urls_html): Use alloca() for TEMP.
6357
6358 1998-01-21  Jordan Mendelson  <jordy@wserv.com>
6359
6360         * url.c (rotate_backups): New function.
6361
6362         * http.c (gethttp): Ditto.
6363
6364         * ftp.c (getftp): Rotate backups.
6365
6366 1997-12-18  Hrvoje Niksic  <hniksic@srce.hr>
6367
6368         * all: Renamed nmalloc(), nrealloc() and nstrdup() to xmalloc(),
6369         xrealloc() and xstrdup().  Use the new functions.
6370
6371         * url.c (decode_string): Made static.
6372         (has_proto): Ditto.
6373         (parse_dir): Ditto.
6374         (parse_uname): Ditto.
6375         (mkstruct): Ditto.
6376         (construct): Ditto.
6377         (construct_relative): Ditto.
6378
6379         * retr.c (show_progress): Made static.
6380
6381         * recur.c (robots_url): Made static.
6382         (retrieve_robots): Ditto.
6383         (parse_robots): Ditto.
6384         (robots_match): Ditto.
6385
6386         * main.h: Removed.
6387
6388         * main.c (printhelp): Made static.
6389         (hangup): Ditto.
6390
6391         * init.c (comind): Made static.
6392         (defaults): Ditto.
6393         (init_path): Ditto.
6394         (run_wgetrc): Ditto.
6395         (onoff): Ditto.
6396         (setonoff): Ditto.
6397         (setnum): Ditto.
6398         (myatoi): Ditto.
6399         (getperms): Ditto.
6400         (setbytes): Ditto.
6401
6402         * http.c (fetch_next_header): Made static.
6403         (hparsestatline): Ditto.
6404         (hskip_lws): Ditto.
6405         (hgetlen): Ditto.
6406         (hgetrange): Ditto.
6407         (hgettype): Ditto.
6408         (hgetlocation): Ditto.
6409         (hgetmodified): Ditto.
6410         (haccepts_none): Ditto.
6411         (gethttp): Ditto.
6412         (base64_encode_line): Ditto.
6413         (mktime_from_utc): Ditto.
6414         (http_atotm): Ditto.
6415
6416         * html.c (idmatch): Made static.
6417
6418         * host.c (search_host): Made static.
6419         (search_address): Ditto.
6420         (free_hlist): Ditto.
6421
6422         * ftp.c (getftp): Made static.
6423         (ftp_loop_internal): Ditto.
6424         (ftp_get_listing): Ditto.
6425         (ftp_retrieve_list): Ditto.
6426         (ftp_retrieve_dirs): Ditto.
6427         (ftp_retrieve_glob): Ditto.
6428         (freefileinfo): Ditto.
6429         (delelement): Ditto.
6430
6431         * ftp-ls.c (symperms): Made static.
6432         (ftp_parse_unix_ls): Ditto.
6433
6434         * connect.c (select_fd): Made static.
6435
6436         * utils.c (xmalloc): Renamed from nmalloc.
6437         (xrealloc): Renamed from nrealloc.
6438         (xstrdup): Renamed from nstrdup.
6439
6440         * getopt.c (exchange): Use alloca.
6441
6442         * mswindows.c (mycuserid): Use strncpy.
6443
6444         * New files mswindows.c, mswindows.h, sysdep.h.  winjunk.c,
6445         systhings.h, windecl.h and winjunk.h removed.
6446
6447         * mswindows.c (sleep): New function.
6448
6449         * utils.c: Include <windows.h> under Windows.
6450
6451 1997-06-12  Darko Budor  <dbudor@zesoi.fer.hr>
6452
6453         * url.h (URL_UNSAFE): Change default under Windows.
6454
6455         * retr.c (retrieve_from_file): Respect opt.delete_after.
6456
6457         * main.c (main): Call ws_help on Windows.
6458
6459         * winjunk.c (windows_main_junk): New function.
6460
6461         * main.c (main): Junk-process argv[0].
6462
6463         * http.c (mktime_from_utc): Return -1 if mktime failed.
6464
6465         * http.c (http_loop): Ditto.
6466
6467         * ftp.c (ftp_loop_internal): Change title on Windows when using a
6468         new URL.
6469
6470         * winjunk.c (getdomainname): Lots of functions.
6471
6472 1997-06-12  Hrvoje Niksic  <hniksic@srce.hr>
6473
6474         * cmpt.c (strptime_internal): Handle years more correctly for
6475         `%y'.
6476
6477 1997-06-09  Mike Thomas <mthomas@reality.ctron.com>
6478
6479         * http.c (gethttp): Allocate enough space for
6480         `Proxy-Authorization' header.
6481
6482 1997-05-10  Hrvoje Niksic  <hniksic@srce.hr>
6483
6484         * version.c: Wget/1.4.5 is released.
6485
6486 1997-05-10  Hrvoje Niksic  <hniksic@srce.hr>
6487
6488         * retr.c (get_contents): Check return value of fwrite more
6489         carefully.
6490
6491 1997-03-30  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
6492
6493         * cmpt.c (strptime_internal) [case 'Y']: Always subtract 1900 from
6494         year, regardless of century.
6495
6496 1997-03-30  Hrvoje Niksic  <hniksic@srce.hr>
6497
6498         * utils.c (isfile): Use `lstat' instead of `stat'.
6499
6500 1997-03-29  Hrvoje Niksic  <hniksic@srce.hr>
6501
6502         * utils.c (numdigit): Use explicit test.
6503
6504 1997-03-21  Hrvoje Niksic  <hniksic@srce.hr>
6505
6506         * http.c (http_loop): Always use `url_filename' to get u->local.
6507
6508 1997-03-20  Hrvoje Niksic  <hniksic@srce.hr>
6509
6510         * url.c: Recognize https.
6511
6512 1997-03-13  Hrvoje Niksic  <hniksic@srce.hr>
6513
6514         * recur.c (recursive_retrieve): Lowercase just the host name.
6515
6516 1997-03-09  Hrvoje Niksic  <hniksic@srce.hr>
6517
6518         * url.c (get_urls_file): Use the correct test.
6519         (get_urls_html): Ditto.
6520
6521 1997-03-07  Hrvoje Niksic  <hniksic@srce.hr>
6522
6523         * connect.c: Reverted addrlen to int.
6524
6525         * init.c (parse_line): Check for -1 instead of NONE.
6526
6527         * version.c: Changed version to 1.4.5.
6528
6529 1997-02-17  Hrvoje Niksic  <hniksic@srce.hr>
6530
6531         * init.c: New option netrc.
6532         (initialize): Don't parse .netrc.
6533
6534         * cmpt.c (recursive): Return rp.
6535         (strptime_internal): Match the long strings first, the abbreviated
6536         second.
6537
6538 1997-02-16  Hrvoje Niksic  <hniksic@srce.hr>
6539
6540         * http.c (check_end): New function.
6541         (http_atotm): Use it.
6542  
6543 1997-02-13  gilles Cedoc  <gilles@cedocar.fr>
6544
6545         * http.c (gethttp): Use them.
6546
6547         * init.c: New options proxy_user and proxy_passwd.
6548
6549 1997-02-14  Hrvoje Niksic  <hniksic@srce.hr>
6550
6551         * ftp.c (ftp_retrieve_list): Create links even if not relative.
6552
6553 1997-02-10  Hrvoje Niksic  <hniksic@srce.hr>
6554
6555         * recur.c (recursive_retrieve): Lowercase the host name, if the
6556         URL is not "optimized".
6557
6558         * host.c (realhost): Return l->hostname, even if it matches with
6559         host.
6560
6561 1997-02-10  Marin Purgar  <pmc@asgard.hr>
6562
6563         * connect.c: Make addrlen size_t instead of int.
6564         (conaddr): Ditto.
6565
6566 1997-02-09  Gregor Hoffleit  <flight@mathi.uni-heidelberg.DE>
6567
6568         * systhings.h: Define S_ISLNK on NeXT too.
6569
6570 1997-02-09  Hrvoje Niksic  <hniksic@srce.hr>
6571
6572         * version.c: Released 1.4.3.
6573
6574         * url.c: Futher update to list of protostrings.
6575         (skip_proto): Skip `//' correctly for FTP and HTTP.
6576
6577         * url.c (get_urls_html): Handle bogus `http:' things a little
6578         different.
6579
6580         * main.c (main): Removed `follow-ftp' from `f'.
6581         (main): Dumped the `prefix-files' and `file-prefix' options and
6582         features; old and bogus.
6583         (main): Exit on failed setval() in `-e'.
6584
6585         * http.c (fetch_next_header): Use it to detect header continuation
6586         correctly.
6587
6588         * retr.c (buf_peek): New function.
6589
6590 1997-02-08  Hrvoje Niksic  <hniksic@srce.hr>
6591
6592         * wget.h: Include time.h and stuff.
6593
6594 1997-02-08  Roger Beeman  <beeman@cisco.com>
6595
6596         * ftp.c: Include <time.h>
6597
6598 1997-02-07  Hrvoje Niksic  <hniksic@srce.hr>
6599
6600         * url.c (findurl): Would read over buffer limits.
6601
6602 1997-02-06  Hrvoje Niksic  <hniksic@srce.hr>
6603
6604         * ftp-ls.c (ftp_parse_unix_ls): Allow spaces in file names.
6605
6606 1997-02-05  Hrvoje Niksic  <hniksic@srce.hr>
6607
6608         * http.c (http_atotm): Initialize tm.is_dst.
6609
6610 1997-02-02  Hrvoje Niksic  <hniksic@srce.hr>
6611
6612         * http.c (gethttp): Don't print the number of retrieved headers.
6613
6614         * main.c (main): New option `--no-clobber', alias for `-nc'.
6615
6616         * url.c: Recognize `https://'.
6617
6618 1997-02-01  Hrvoje Niksic  <hniksic@srce.hr>
6619
6620         * host.c (herrmsg): Don't use h_errno.
6621
6622 1997-01-30  Hrvoje Niksic  <hniksic@srce.hr>
6623
6624         * host.c (accept_domain): Use it.
6625
6626         * main.c (main): New option `--exclude-domains'.
6627
6628         * retr.c (retrieve_url): Use it.
6629         (retrieve_url): Bail out when an URL is redirecting to itself.
6630
6631         * url.c (url_equal): New function.
6632
6633 1997-01-29  Hrvoje Niksic  <hniksic@srce.hr>
6634
6635         * connect.c: Include arpa/inet.h instead of arpa/nameser.h.
6636
6637         * http.c (mk_utc_time): New function.
6638         (http_atotm): Use it; handle time zones correctly.
6639
6640 1997-01-28  Hrvoje Niksic  <hniksic@srce.hr>
6641
6642         * http.c: Ditto.
6643
6644         * ftp-basic.c: Use it instead of WRITE.
6645
6646         * connect.c (iwrite): New function.
6647
6648 1997-01-27  Hrvoje Niksic  <hniksic@srce.hr>
6649
6650         * cmpt.c (mktime): New function.
6651
6652         * netrc.c: Include <sys/types.h>.
6653
6654         * main.c (main): Wouldn't recognize --spider.
6655
6656         * retr.c (rate): Use `B', `KB' and `MB'.
6657         (reset_timer,elapsed_time): Moved from utils.c.
6658
6659         * ftp.c (ftp_retrieve_list): Ditto.
6660
6661         * http.c (http_loop): Don't touch the file if opt.dfp.
6662
6663 1997-01-24  Hrvoje Niksic  <hniksic@srce.hr>
6664
6665         * cmpt.c: New file.
6666
6667         * ftp.c (ftp_retrieve_glob): New argument semantics.
6668         (ftp_retrieve_dirs): Use it.
6669         (ftp_loop): Ditto.
6670
6671         * html.c (htmlfindurl): Recognize `'' as the quote char.
6672
6673 1997-01-23  Hrvoje Niksic  <hniksic@srce.hr>
6674
6675         * ftp.c (ftp_loop_internal): Use it.
6676
6677         * utils.c (remove_link): New function.
6678
6679 1997-01-22  Hrvoje Niksic  <hniksic@srce.hr>
6680
6681         * retr.c (retrieve_url): Require STRICT redirection URL.
6682
6683         * url.c (parseurl): New argument STRICT.
6684
6685         * http.c (hparsestatline): Be a little-bit less strict about
6686         status line format.
6687
6688 1997-01-21  Hrvoje Niksic  <hniksic@srce.hr>
6689
6690         * http.c (gethttp): Use it.
6691
6692         * main.c (main): Don't use '<digit>' as options.
6693
6694         * init.c: New option ignore_length.
6695
6696         * http.c (gethttp): Ditto.
6697         (http_loop): Check for redirection without Location:.
6698         (gethttp): Don't print Length unless RETROKF.
6699
6700         * ftp.c (getftp): Use it.
6701
6702         * url.c (mkalldirs): New function.
6703
6704         * utils.c (mymkdir): Don't check for existing non-directory.
6705
6706         * url.c (mkstruct): Don't create the directory.
6707
6708 1997-01-20  Hrvoje Niksic  <hniksic@srce.hr>
6709
6710         * init.c (setval): Removed NO_RECURSION checks.
6711
6712 1997-01-19  Hrvoje Niksic  <hniksic@srce.hr>
6713
6714         * version.c: "Released" 1.4.3-pre2.
6715
6716         * recur.c (recursive_retrieve): Bypass host checking only if URL
6717         is ftp AND parent URL is not ftp.
6718
6719         * ftp-basic.c (ftp_request): Print out Turtle Power.
6720
6721         * ftp.c (ftp_loop): Call ftp_retrieve_glob with 0 if there's no
6722         wildcard.
6723         (ftp_retrieve_glob): Call ftp_loop_internal even on empty list, if
6724         not glob.
6725
6726         * http.c (gethttp): Be a little bit smarter about status codes.
6727
6728         * recur.c (recursive_retrieve): Always reset opt.recursive when
6729         dealing with FTP.
6730
6731 1997-01-18  Hrvoje Niksic  <hniksic@srce.hr>
6732
6733         * retr.c (retrieve_url): New variable location_changed; use it for
6734         tests instead of mynewloc.
6735         (retrieve_url): Allow heuristic adding of html.
6736
6737         * url.c (url_filename): Don't use the `%' in Windows file names.
6738
6739         * http.c (http_loop): Always time-stamp the local file.
6740
6741         * http.c (http_loop): Ditto.
6742
6743         * ftp.c (ftp_retrieve_list): Use it.
6744
6745         * utils.c (my_touch): New function.
6746
6747         * ftp.c (ftp_retrieve_list): Use #ifdef HAVE_STRUCT_UTIMBUF
6748         instead of #ifndef NeXT.
6749
6750         * utils.c (strptime): New version, by Ulrich Drepper.
6751
6752 1997-01-17  Hrvoje Niksic  <hniksic@srce.hr>
6753
6754         * http.c (haccepts_none): Renamed from `haccepts_bytes'.
6755         (gethttp): If haccepts_none(), disable ACCEPTRANGES.
6756         (http_loop): Would remove ACCEPTRANGES.
6757
6758         * ftp.c (getftp): Call ftp_list with NULL.
6759
6760 1997-01-15  Hrvoje Niksic  <hniksic@srce.hr>
6761
6762         * html.c (ftp_index): Don't print minutes and seconds if we don't
6763         know them; beautify the output.
6764
6765         * ftp.c (getftp): Don't close the socket on FTPNSFOD.
6766
6767 1997-01-14  Hrvoje Niksic  <hniksic@srce.hr>
6768
6769         * utils.c (strptime): New function.
6770         (strptime): Don't use get_alt_number.
6771         (strptime): Don't use locale.
6772         (match_string): Made it a function.
6773
6774 1997-01-12  Hrvoje Niksic  <hniksic@srce.hr>
6775
6776         * http.c (http_atotm): New function.
6777         (http_loop): Use it.
6778
6779         * atotm.c: Removed from the distribution.
6780
6781         * http.c (base64_encode_line): Rewrite.
6782
6783 1997-01-09  Hrvoje Niksic  <hniksic@srce.hr>
6784
6785         * ftp.c (getftp): Use ftp_expected_bytes; print size.
6786
6787         * ftp-basic.c (ftp_response): Use ftp_last_respline.
6788         (ftp_expected_bytes): New function.
6789
6790         * ftp.c (getftp): Print the unauthoritative file length.
6791
6792         * ftp-ls.c: Renamed from ftp-unix.c.
6793         (ftp_parse_ls): Moved from ftp.c.
6794         (ftp_parse_unix_ls): Recognize seconds in time spec.
6795         (ftp_parse_unix_ls): Recognize year-less dates of the previous
6796         year.
6797
6798 1997-01-08  Hrvoje Niksic  <hniksic@srce.hr>
6799
6800         * ftp-basic.c: Don't declare errno if #defined.
6801
6802         * host.c (ftp_getaddress): Check for sysinfo legally.
6803
6804 1997-01-08  Darko Budor  <dbudor@diana.zems.fer.hr>
6805
6806         * connect.c (iread): Use READ.
6807
6808 1996-12-23  Hrvoje Niksic  <hniksic@srce.hr>
6809
6810         * url.c: Recognize finger, rlogin, tn3270, mid and cid as valid
6811         schemes.
6812
6813 1996-12-22  Hrvoje Niksic  <hniksic@srce.hr>
6814
6815         * host.c (ftp_getaddress): Allow `.' in hostname.
6816
6817 1996-12-26  Darko Budor <dbudor@zems.fer.hr>
6818
6819         * wget.h: READ and WRITE macros for use instead of read and write
6820         on sockets, grep READ *.c, grep WRITE *.c
6821
6822         * wsstartup.c: new file - startup for winsock
6823
6824         * wsstartup.h: new file
6825
6826         * win32decl.h: new file - fixup for <errno.h> and winsock trouble
6827
6828         * configure.bat: Configure utility for MSVC
6829
6830         * src/Makefile.ms,config.h.ms: new files for use with MSVC 4.x
6831
6832 1996-12-22  Hrvoje Niksic  <hniksic@srce.hr>
6833
6834         * version.c: Released 1.4.3-pre.
6835
6836         * utils.c (prnum): Accept long.
6837         (legible): Use prnum().
6838
6839         * connect.c (make_connection): Accept port as short.
6840         (bindport): Ditto.
6841
6842         * http.c (gethttp): Use search_netrc.
6843
6844 1996-12-21  Hrvoje Niksic  <hniksic@srce.hr>
6845
6846         * ftp.c (getftp): Use search_netrc.
6847
6848         * netrc.c (free_netrc): New function.
6849
6850         * init.c (home_dir): New function.
6851
6852         * url.c (convert_links): Allow REL2ABS changes.
6853
6854 1996-12-21  Gordon Matzigkeit  <gord@gnu.ai.mit.edu>
6855
6856         * netrc.c: New file.
6857         (parse_netrc, maybe_add_to_list): New functions.
6858
6859 1996-12-17  Hrvoje Niksic  <hniksic@srce.hr>
6860
6861         * retr.c (retrieve_url): Reset opt.recursion before calling
6862         ftp_loop if it is reached through newloc.
6863
6864         * init.c (run_wgetrc): Print the wgetrc path too, when reporting
6865         error; don't use "Syntax error", since we don't know if it is
6866         really a syntax error.
6867
6868 1996-12-16  Hrvoje Niksic  <hniksic@srce.hr>
6869
6870         * utils.c (acceptable): Extract the filename part of the path.
6871
6872         * recur.c (recursive_retrieve): Call acceptable() with the right
6873         argument; would bug out on wildcards.
6874
6875         * init.c (parse_line): Likewise.
6876
6877         * html.c (htmlfindurl): Cast to char * when calling stuff.
6878
6879 1996-12-15  Hrvoje Niksic  <hniksic@srce.hr>
6880
6881         * ftp.c (getftp): Use ftp_pasv.
6882
6883         * ftp-basic.c (ftp_request): Accept NULL value.
6884         (ftp_pasv): New function.
6885
6886         * options.h (struct options): Add passive FTP option.
6887
6888 1996-12-15  Hrvoje Niksic  <hniksic@srce.hr>
6889
6890         * url.c (parseurl): Debug output.
6891
6892         * utils.c (path_simplify): New one, adapted from bash's
6893         canonicalize_pathname().
6894
6895 1996-12-14  Hrvoje Niksic  <hniksic@srce.hr>
6896
6897         * ftp.c (getftp): Don't discard the buffer.
6898
6899         * retr.c (get_contents): New parameter nobuf.
6900
6901 1996-12-13  Shawn McHorse  <riffraff@txdirect.net>
6902
6903         * html.c (htmlfindurl): Recognize <meta contents="d; URL=...".
6904
6905         * init.c (setval): Strip the trailing slashes on CVECDIR.
6906
6907 1996-12-13  Hrvoje Niksic  <hniksic@srce.hr>
6908
6909         * init.c: Make excludes and includes under CVECDIR instead of
6910         CVEC.
6911
6912 1996-12-13  Shawn McHorse  <riffraff@txdirect.net>
6913
6914         * url.c (get_urls_html): Skip "http:".
6915
6916 1996-12-13  Hrvoje Niksic  <hniksic@srce.hr>
6917
6918         * utils.c (strcasecmp): From glibc.
6919         (strncasecmp): Also.
6920         (strstr): Also.
6921
6922         * url.c: Added javascript: to the list of URLs prefixes.
6923
6924 1996-12-12  Shawn McHorse  <riffraff@txdirect.net>
6925
6926         * recur.c (retrieve_robots): Print the warning message only if
6927         verbose.
6928
6929 1996-12-12  Gregor Hoffleit  <flight@mathi.uni-heidelberg.DE>
6930
6931         * ftp.c (ftp_retrieve_list): Use NeXT old utime interface.
6932
6933 1996-12-12  Hrvoje Niksic  <hniksic@srce.hr>
6934
6935         * systhings.h: New file.
6936
6937         * ../configure.in: Check for utime.h
6938
6939         * ftp.c: Check whether we have unistd.h.
6940
6941 1996-11-27  Hrvoje Niksic  <hniksic@srce.hr>
6942
6943         * recur.c (recursive_retrieve): Send the canonical URL as referer.
6944         (recursive_retrieve): Call get_urls_html with the canonical URL.
6945
6946 1996-12-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6947
6948         * (configure.in, config.h.in, src/Makefile.in, src/*.[ch]): Add
6949         ansi2knr support for compilers which don't support ANSI style
6950         function prototypes and signatures.
6951
6952         * (aclocal.m4, src/ansi2knr.c, src/ansi2knr.1): New files.
6953
6954 1996-11-26  Hrvoje Niksic  <hniksic@srce.hr>
6955
6956         * url.c: Use it; Recognize paths ending with "." and ".." as
6957         directories.
6958         (url_filename): Append .n whenever file exists and could be a
6959         directory.
6960
6961         * url.h (ISDDOT): New macro.
6962
6963         * init.c (parse_line): Use unsigned char.
6964
6965         * url.c (get_urls_html): Cast to unsigned char * when calling
6966         htmlfindurl.
6967
6968         * html.c (htmlfindurl): Use unsigned char.
6969
6970         * version.c: Changed version to 1.4.3.
6971
6972 1996-11-25  Hrvoje Niksic  <hniksic@srce.hr>
6973
6974         * version.c: Released 1.4.2.
6975
6976         * ftp.c (getftp): Simplified assertion.
6977         (ftp_loop_internal): Remove symlink before downloading.
6978         (ftp_retrieve_list): Unlink the symlink name before attempting to
6979         create a symlink!
6980
6981         * options.h (struct options): Renamed print_server_response to
6982         server_response.
6983
6984         * ftp.c (rel_constr): Removed.
6985         (ftp_retrieve_list): Don't use it.
6986         (ftp_retrieve_list): Use opt.retr_symlinks.
6987
6988 1996-11-24  Hrvoje Niksic  <hniksic@srce.hr>
6989
6990         * main.c (main): New option retr_symlinks.
6991
6992         * url.c (convert_links): Print verbose message.
6993
6994 1996-11-24  Hrvoje Niksic  <hniksic@srce.hr>
6995
6996         * http.c (http_loop): Reset newloc in the beginning of function;
6997         would cause FMR in retrieve_url.
6998
6999 1996-11-23  Hrvoje Niksic  <hniksic@srce.hr>
7000
7001         * recur.c (convert_all_links): Find the URL of each HTML document,
7002         and feed it to get_urls_html; would bug out.
7003         (convert_all_links): Check for l2 instead of dl; removed dl.
7004
7005         * url.c (convert_links): Don't refer to freed newname.
7006
7007         * recur.c (recursive_retrieve): Add this_url to urls_downloaded.
7008
7009         * main.c (main): Print the OS_TYPE in the debug output, too.
7010
7011         * recur.c (recursive_retrieve): Check for opt.delete_after.
7012
7013         * main.c (main): New option delete-after.
7014
7015         * init.c (setval): Cleaned up.
7016
7017 1996-11-21  Hrvoje Niksic  <hniksic@srce.hr>
7018
7019         * Makefile.in (wget): Make `wget' the default target.
7020
7021         * ftp.c (ftp_loop_internal): Move noclobber checking out of the
7022         loop.
7023         (ftp_retrieve_list): Warn about non-matching sizes.
7024
7025         * http.c (http_loop): Made -nc non-dependent on opt.recursive.
7026
7027         * init.c (setnum): Renamed from setnuminf; New argument flags.
7028         (setval): Use it.
7029
7030         * main.c (main): Sorted the options.
7031         (main): New option --wait.
7032
7033 1996-11-21  Shawn McHorse  <riffraff@txdirect.net>
7034
7035         * html.c (htmlfindurl): Reset s->in_quote after getting out of
7036         quotes.
7037
7038 1996-11-20  Hrvoje Niksic  <hniksic@srce.hr>
7039
7040         * version.c: Changed version to 1.4.2.
7041
7042 1996-11-20  Hrvoje Niksic  <hniksic@srce.hr>
7043
7044         * version.c: Released 1.4.1.
7045
7046         * html.c (html_quote_string): New function.
7047         (ftp_index): Use it.
7048         (htmlfindurl): A more gentle ending debug message.
7049
7050         * ftp.c (ftp_loop): Check for opt.htmlify.
7051
7052         * init.c: New command htmlify.
7053
7054         * ftp.c (getftp): Nicer error messages, with `'-encapsulated
7055         strings.
7056         (ftp_loop): Print size of index.html.
7057
7058         * init.c (setval): Implement "styles".
7059
7060         * main.c (main): New option dotstyle.
7061
7062 1996-11-19  Hrvoje Niksic  <hniksic@srce.hr>
7063
7064         * ftp.c (getftp): Close the master socket in case of errors, after
7065         bindport().
7066
7067         * connect.c (bindport): Initialize msock to -1.
7068
7069         * ftp.c (getftp): Initialize dtsock to -1.
7070
7071         * connect.c (closeport): Don't close sock if sock == -1.
7072
7073 1996-11-18  Hrvoje Niksic  <hniksic@srce.hr>
7074
7075         * init.c (setnuminf): Nuked default value -- just leave unchanged.
7076         (setval): Don't send default values.
7077         (defaults): Use DEFAULT_TIMEOUT -- aaargh.
7078
7079         * options.h (struct options): Use long for dot_bytes.
7080
7081         * init.c (setquota): Renamed to setbytes.
7082         (setval): Use setbytes on DOTBYTES.
7083
7084 1996-11-17  Hrvoje Niksic  <hniksic@srce.hr>
7085
7086         * ftp.c (getftp): Initialize con->dltime.
7087
7088         * recur.c (recursive_retrieve): Use same_host instead of
7089         try_robots; simply load robots_txt whenever the host is changed.
7090         (recursive_retrieve): Free forbidden before calling parse_robots.
7091
7092 1996-11-16  Hrvoje Niksic  <hniksic@srce.hr>
7093
7094         * retr.c (show_progress): Use them.
7095
7096         * options.h (struct options): New options dot_bytes, dots_on_line
7097         and dot_spacing.
7098
7099 1996-11-16  Mark Boyns  <boyns@sdsu.edu>
7100
7101         * recur.c (recursive_retrieve): Retrieve directories regardless of
7102         acc/rej rules; check for empty u->file.
7103
7104 1996-11-14  Hrvoje Niksic  <hniksic@srce.hr>
7105
7106         * init.c (setval): Use it.
7107
7108         * utils.c (merge_vecs): New function.
7109
7110         * init.c (setval): Reset the list-type functions when encountering
7111         "".
7112
7113 1996-11-14  Shawn McHorse  <riffraff@txdirect.net>
7114
7115         * recur.c (recursive_retrieve): Use base_url instead of this_url
7116         for no_parent.
7117
7118 1996-11-14  Shawn McHorse  <riffraff@txdirect.net>
7119
7120         * html.c (htmlfindurl): Reset s->in_quote after exiting the quote.
7121
7122 1996-11-13  Hrvoje Niksic  <hniksic@srce.hr>
7123
7124         * utils.c (sepstring): Rewrote; don't use strtok.
7125
7126         * recur.c (recursive_retrieve): Enter assorted this_url to slist
7127         when running the first time.
7128         (retrieve_robots): Warn to ignore errors when robots are loaded.
7129
7130         * utils.c (load_file): Moved from url.c.
7131
7132         * http.c: Made static variables const too in h* functions.
7133
7134         * main.c (main): Renamed --continue-ftp to --continue.
7135
7136         * recur.c (recursive_retrieve): Use it.
7137
7138         * utils.c (frontcmp): New function.
7139
7140         * url.c (accdir): New function.
7141
7142         * html.c (htmlfindurl): Recognize <area href=...>.
7143
7144         * ftp.c (ftp_retrieve_dirs): Implemented opt.includes.
7145
7146         * init.c (setval): Free the existing opt.excludes and
7147         opt.includes, if available.
7148
7149         * main.c (main): New option -I.
7150
7151 1996-11-12  Hrvoje Niksic  <hniksic@srce.hr>
7152
7153         * ftp.c (ftp_retrieve_glob): Do not weed out directories.
7154
7155         * version.c: Changed version to 1.4.1.
7156
7157 1996-11-11  Hrvoje Niksic  <hniksic@srce.hr>
7158
7159         * version.c: Released 1.4.0.
7160
7161 1996-11-10  Hrvoje Niksic  <hniksic@srce.hr>
7162
7163         * main.c (main): Free com and val after parse_line.
7164         (printhelp): Reorder the listing.
7165
7166         * http.c: More robust header parsing.
7167
7168         * http.c: Allow any number of spaces, or no spaces, precede ':'.
7169         (hskip_lws): New function.
7170         (haccepts_bytes): New function.
7171         (gethttp): Use it.
7172
7173         * init.c (setval): Check header sanity.
7174         (setval): Allow resetting of headers.
7175
7176 1996-11-10  Hrvoje Niksic  <hniksic@srce.hr>
7177
7178         * http.c (http_loop): Don't use has_wildcards.
7179
7180         * http.c (gethttp): Free all_headers -- would leak.
7181
7182         * recur.c (recursive_retrieve): Initialize depth to 1 instead of
7183         0 -- this fixes a long-standing bug in -rl.
7184
7185 1996-11-09  Hrvoje Niksic  <hniksic@srce.hr>
7186
7187         * ftp.c: Use -1 as "impossible" value for con->fd.
7188
7189         * url.h (URL_SEPARATOR): Don't treat `*' and `+' as separators.
7190
7191         * init.c (parse_line): Use isalpha.
7192
7193         * ftp-unix.c: Use HAVE_UNISTD_H.
7194
7195         * mtch.c (has_wildcards): Don't match \.
7196
7197         * http.c (http_loop): Warn on HTTP wildcard usage.
7198
7199 1996-11-08  Hrvoje Niksic  <hniksic@srce.hr>
7200
7201         * url.c (url_filename): Do not create numbered suffixes if
7202         opt.noclobber -- would bug out on -nc.
7203
7204 1996-11-07  Hrvoje Niksic  <hniksic@srce.hr>
7205
7206         * recur.c (parse_robots): Don't chuck out the commands without
7207         arguments (`Disallow:<empty>' didn't work).
7208         (parse_robots): Compare versions lowercase.
7209         (parse_robots): Match on base_version, not version_string!
7210         (parse_robots): Handle comments properly.
7211         (parse_robots): Match versions in a sane way.
7212
7213         * init.c: Print nicer error messages.
7214
7215         * version.c: Changed version to 1.4.0.
7216
7217 1996-11-06  Hrvoje Niksic  <hniksic@srce.hr>
7218
7219         * version.c: Released 1.4.0-test2.
7220
7221         * init.c (run_wgetrc): Close fp.
7222
7223         * ftp.c (ftp_retrieve_dirs): Allocate the correct length for
7224         u->dir.
7225
7226 1996-11-06  Hrvoje Niksic  <hniksic@srce.hr>
7227
7228         * init.c (setquota): Allow inf as quota specification.
7229
7230 1996-11-05  Hrvoje Niksic  <hniksic@srce.hr>
7231
7232         * ftp.c (ftp_retrieve_dirs): Return QUOTEXC if quota exceeded.
7233         (ftp_retrieve_glob): Return QUOTEXC on quota exceeded.
7234
7235         * main.c (main): Check for quota by comparison with downloaded
7236         stuff, not from status.
7237
7238         * connect.c (select_fd): Should compile on HPUX without warnings now.
7239
7240         * ftp.c (ftp_get_listing): Check whether ftp_loop_internal
7241         returned RETROK.
7242
7243 1996-11-04  Hrvoje Niksic  <hniksic@srce.hr>
7244
7245         * ftp.c (ftp_retrieve_glob): Print the pattern nicely.
7246         (getftp): Return FTPRETRINT on control connection error.
7247
7248         * html.c (htmlfindurl): Recognize <embed src=...> and
7249         <bgsound src=...>.
7250         (ftp_index): Handle username and password correctly.
7251
7252         * main.c (main): Made `-np' a synonim for --no-parent.
7253
7254 1996-11-02  Hrvoje Niksic  <hniksic@srce.hr>
7255
7256         * ftp.c (ftp_loop): Check for opt.ftp_glob too before calling
7257         ftp_retrieve_glob.
7258
7259         * version.c: Changed version to 1.4.0-test2.
7260
7261 1996-11-02  Hrvoje Niksic  <hniksic@srce.hr>
7262
7263         * version.c: Released 1.4.0-test1.
7264
7265         * url.c (str_url): Don't use sprintf when creating %2F-prefixed
7266         directory.
7267         (convert_links): Removed definition of make_backup.
7268
7269         * http.h: Removed definition of MAX_ERROR_LENGTH.
7270
7271         * host.c (ftp_getaddress): Check for "(none)" domains.
7272
7273         * ftp.c (ftp_retrieve_dirs): Docfix.
7274
7275         * http.c (gethttp): Use ou->referer instead of u->referer.
7276
7277         * retr.c (retrieve_url): Reset u to avoid freeing pointers twice;
7278         this was known to cause coredumps on Linux.
7279
7280         * html.c (ftp_index): Cast the argument to local_time to time_t *.
7281
7282 1996-11-01  Hrvoje Niksic  <hniksic@srce.hr>
7283
7284         * connect.c (select_fd): Use exceptfds -- once and for all.
7285
7286         * retr.c (retrieve_from_file): Free filename after
7287         recursive_retrieve.
7288         (retrieve_from_file): Send RFIRST_TIME to recursive_retrieve on
7289         first-time retrieval.
7290         (retrieve_from_file): Return uerr_t; new argument, count.
7291         (retrieve_from_file): Break on QUOTEXC.
7292
7293         * init.c (setquota): Fixed a bug that caused rejection of
7294         non-postfixed values..
7295
7296 1996-10-30  Hrvoje Niksic  <hniksic@srce.hr>
7297
7298         * version.c: Changed name to wget.
7299
7300         * connect.c (iread): Smarter use of select.
7301         (select_fd): Set errno on timeout.  If not timeout, return 1
7302         instead of 0.
7303
7304 1996-10-29  Hrvoje Niksic  <hniksic@srce.hr>
7305
7306         * ftp.c (ftp_loop_internal): Don't use con->cmd before
7307         establishing it.
7308
7309 1996-10-26  Hrvoje Niksic  <hniksic@srce.hr>
7310
7311         * http.c (gethttp): Send correct referer when using proxy.
7312         (gethttp): Use struct urlinfo ou to access the relevant data; send
7313         correct authorization in all cases.
7314
7315         * host.c (same_host): Use skip_uname to skip username and
7316         password.
7317
7318         * url.c (skip_uname): New function.
7319         (parseurl): Use it.
7320
7321         * host.c (same_host): Do not assume HTTP -- same_host should now
7322         be totally foolproof.
7323
7324         * url.c (skip_proto): New function.
7325         (parse_uname): Use it.
7326
7327         * http.c (gethttp): Create local user and passwd from what is
7328         given.
7329
7330         * url.c (parseurl): Check for HTTP username and password too.
7331
7332 1996-10-25  Hrvoje Niksic  <hniksic@srce.hr>
7333
7334         * config.h.in: Removed #define gethostbyname R...
7335
7336 1996-10-22  Hrvoje Niksic  <hniksic@srce.hr>
7337
7338         * version.c: Changed version to 1.4.0-test1.
7339
7340 1996-10-21  Hrvoje Niksic  <hniksic@srce.hr>
7341
7342         * version.c: "Released" 1.4b29.
7343
7344         * recur.c (recursive_retrieve): Check for no_parent.
7345
7346         * init.c (setval): Option update.
7347
7348         * main.c (main): New option no-parent.
7349
7350         * options.h (struct options): New variable no_parent.
7351
7352         * recur.c (recursive_retrieve): Only files are checked for
7353         opt.accepts and opt.rejects.
7354         (recursive_retrieve): Check directories for opt.excludes.
7355         (recursive_retrieve): Make the dir absolute when checking
7356         opt.excludes.
7357
7358         * html.c (htmlfindurl): Recognize <applet code=...> and <script
7359         src=...>
7360
7361 1996-10-18  Hrvoje Niksic  <hniksic@srce.hr>
7362
7363         * ftp.c (getftp): Do not line-break assert entries at all.
7364         (ftp_retrieve_dirs): docfix.
7365
7366         * connect.c (select_fd): Use fd + 1 as nfds.
7367
7368         * version.c: Changed version to 1.4b29.
7369
7370 1996-10-18  Hrvoje Niksic  <hniksic@srce.hr>
7371
7372         * version.c: "Released" 1.4b28.
7373
7374         * ftp.c (ftp_loop_internal): Check whether f->size == len and
7375         don't continue the loop if it is.
7376         (ftp_get_listing): Remove list_filename on unsuccesful loop.
7377
7378 1996-10-17  Hrvoje Niksic  <hniksic@srce.hr>
7379
7380         * ftp.c (ftp_loop_internal): Use strcpy to initialize tmp.
7381         (getftp): Do not use multiline assert.
7382
7383         * http.c (hparsestatline): Use mjr and mnr instead of major and
7384         minor, which don't compile on Ultrix.
7385         (http_loop): Use strcpy() to initialize tmp.
7386
7387         * all: Geturl -> Fetch
7388
7389 1996-10-17  Hrvoje Niksic  <hniksic@srce.hr>
7390
7391         * recur.c (parse_robots): Fixed an off-by-one bug when looking for
7392         ':'.
7393
7394         * html.c (htmlfindurl): Fixed several possible off-by-one bugs by
7395         moving `bufsize &&' to the beginning of each check in for-loops.
7396
7397         * recur.c (parse_robots): Close fp on exit.
7398
7399         * url.c (mymkdir): Check for each directory before creating.
7400
7401 1996-10-16  Hrvoje Niksic  <hniksic@srce.hr>
7402
7403         * version.c: Changed version to 1.4b28.
7404
7405 1996-10-16  Hrvoje Niksic  <hniksic@srce.hr>
7406
7407         * version.c: "Released" 1.4b27.
7408
7409         * init.c (parse_line): Use isspace.
7410         (parse_line): Free *com on all errors.
7411
7412         * ftp.c (ftp_loop): Change FTPOK to RETROK before exiting.
7413         (delelement): Use next instead of f->next and prev instead of
7414         f->prev.
7415         (delelement): Free the members of the deleted element.
7416
7417         * http.c (http_loop): Do not return RETROK on code != 20x.
7418
7419         * init.c (cleanup): Free opt.user_header.
7420         (cleanup): Free opt.domains.
7421
7422         * url.c (freelists): Moved to cleanup().
7423
7424         * http.c (hparsestatline): Docfix.
7425
7426         * main.c (main): Return with error status on unsuccesful
7427         retrieval.
7428
7429         * init.c (setval): Do not remove listing when mirroring.
7430
7431         * url.c (url_filename): Use opt.fileprefix.
7432
7433         * ftp.c (ftp_get_listing): Use url_filename to get filename for
7434         .listing.
7435
7436         * main.c (main): New option: -rn.
7437
7438 1996-10-15  Hrvoje Niksic  <hniksic@srce.hr>
7439
7440         * Makefile.in (RM): Added RM = rm -f.
7441
7442         * host.c (clean_hosts): New function.
7443         (free_hlist): Just free the list, no reset.
7444
7445         * version.c: Changed version to 1.4b27.
7446
7447 1996-10-13  Hrvoje Niksic  <hniksic@srce.hr>
7448
7449         * version.c: "Released" 1.4b26.
7450
7451         * retr.c (retrieve_from_file): If call get_urls_html with
7452         opt.spider to make it silent in spider mode.
7453
7454         * url.c (str_url): Use CLEANDUP instead of URL_CLEANSE.
7455
7456         * url.h (CLEANDUP): New macro.
7457
7458         * http.c (gethttp): Fixed a bug that freed location only when it
7459         was NULL.
7460
7461         * retr.c (retrieve_url): Free url if it will not be stored,
7462         i.e. newloc is NULL.
7463
7464         * html.c (htmlfindurl): Handle exiting from quotes correctly; the
7465         old version would bug out on <a href="x#a"href="y">.
7466
7467         * html.h (state_t): New member in_quote.
7468
7469         * html.c (htmlfindurl): Free s->attr at the beginning of
7470         attr-loop.
7471
7472         * recur.c (recursive_retrieve): Recognize RCLEANUP.
7473         (tried_robots): Make hosts a global variable.
7474         (recursive_retrieve): Free constr after URL host optimization.
7475         (tried_robots): Free urlinfo before exiting.
7476
7477         * utils.c (free_slist): New function.
7478
7479         * recur.c (recursive_retrieve): Use flags to add cleanup
7480         possibility.
7481
7482         * main.c (main): Free filename after recursive_retrieve.
7483
7484         * http.c (gethttp): Store successful responses too.
7485
7486 1996-10-12  Hrvoje Niksic  <hniksic@srce.hr>
7487
7488         * all: Constified the whole source.  This required some minor
7489         changes in many functions in url.c, possibly introducing bugs -- I
7490         hope not.
7491
7492         * ftp-basic.c: Removed last_respline.
7493
7494         * http.c (gethttp): Free type.
7495
7496         * host.c (same_host): Free real1 and real2.
7497
7498         * main.c (main): New option --spider.
7499
7500         * retr.c (get_contents): Don't reset errno.
7501
7502         * main.c (main): Sorted the options.
7503
7504         * connect.c (iread): Set errno to ETIMEDOUT only if it was left
7505         uninitialized by select().
7506
7507         * http.c (http_loop): Print the time when the connection is
7508         closed.
7509         (gethttp): Debug-print the HTTP request.
7510
7511 1996-10-11  Hrvoje Niksic  <hniksic@srce.hr>
7512
7513         * connect.c (iread): Do not try reading after timeout.
7514
7515         * main.c (main): Would bug out on -T.
7516
7517         * connect.c (select_fd): Do not use exceptfds.
7518         (iread): Set ETIMEDOUT on select_fd <= 0.
7519
7520         * version.c: Changed version to 1.4b26.
7521
7522 1996-10-10  Hrvoje Niksic  <hniksic@srce.hr>
7523
7524         * version.c: "Released" 1.4b25.
7525
7526         * ftp-unix.c (ftp_parse_unix_ls): Ignore lines without file name
7527         or link name.
7528
7529         * http.c (gethttp): Add errcode to struct hstat.
7530         (http_loop): Use it.
7531
7532         * url.c (no_proxy_match): Simplify using char** for no_proxy.
7533
7534         * options.h (struct options): Make opt.no_proxy a vector.
7535
7536         * utils.c (sepstring): Use !*s instead of !strlen(s).
7537
7538         * init.c (setval): Set opt.maxreclevel to 0 on --mirror.
7539         (getperms): Use ISODIGIT instead of isdigit.
7540
7541         * ftp.c (getftp): Print time.
7542
7543         * main.c (main): Use legible output of downloaded quantity.
7544
7545         * ftp.c (getftp): Use elapsed_time().
7546         (ftp_loop_internal): Use rate().
7547
7548         * http.c (http_loop): Add download ratio output; Use rate().
7549
7550         * utils.c (rate): New function.
7551
7552 1996-10-09  Hrvoje Niksic  <hniksic@srce.hr>
7553
7554         * http.c (http_loop): Use timer.
7555
7556         * ftp.c: Split to ftp-basic.c and ftp.c
7557
7558         * utils.c (reset_timer): New function.
7559         (elapsed_time): New function.
7560
7561         * retr.c (show_progress): Make bytes_in_line and offs long; should
7562         work on 16-bit machines.
7563
7564 1996-10-08  Hrvoje Niksic  <hniksic@srce.hr>
7565
7566         * url.c (in_acclist): New argument backward.
7567
7568         * ftp.c (ftp_retrieve_glob): Use acceptable() to determine whether
7569         a file should be retrieved according to suffix.
7570         (ftp_get_listing): Check the return value of unlink; Do not call
7571         ftp_retrieve_dirs if depth reached maxreclevel.
7572         (ftp_retrieve_dirs): Check whether the directory is in
7573         exclude-list.
7574
7575         * main.c (main): Print the version number at the beginning of
7576         DEBUG output.
7577         (main): Use strrchr when creating exec_name.
7578
7579         * ftp.c (ftp_retrieve_glob): Do not close control connection.
7580
7581         * version.c: Changed version to 1.4b25.
7582
7583 1996-10-07  Hrvoje Niksic  <hniksic@srce.hr>
7584
7585         * version.c: "Released" 1.4b24.
7586
7587         * Makefile.in: Rewrite.
7588
7589         * ftp.c (ftp_loop_internal): Likewise.
7590
7591         * retr.c (time_str): Check for failed time().
7592
7593         * html.c (htmlfindurl): Recognize <fig src> and <overlay src> from
7594         HTML3.0.
7595
7596         * retr.c (time_str): Return time_t *.
7597
7598         * connect.c (bindport): Close msock on unsuccesful bind.
7599         (bindport): The same for getsockname and listen.
7600
7601         * retr.c (retrieve_url): Allow any number of retries on
7602         proxy.
7603
7604         * http.c (gethttp): Do not treat errno == 0 as timeout.
7605         (http_loop): Likewise.
7606         (http_loop): Cosmetic changes.
7607
7608         * connect.c (iread): Set errno to ETIMEDOUT in case of timeout.
7609
7610         * retr.c (get_contents): Reset errno.
7611
7612         * ftp.c (getftp): Minor fixes.
7613
7614 1996-10-06  Hrvoje Niksic  <hniksic@srce.hr>
7615
7616         * http.c: Do not use backups.
7617
7618         * geturl.1 (WARNING): Warn that man-page could be obsolete.
7619
7620         * getopt.c (getopt_long): Moved to getopt.c
7621
7622         * geturl.texi: Enhanced.
7623
7624         * main.c (main): Use it.
7625
7626         * recur.c (convert_all_links): New function.
7627
7628         * utils.c (add_slist): New argument flags.
7629
7630         * recur.c (recursive_retrieve): Update a list of downloaded URLs.
7631         (parse_robots): Do not chuck out empty value fields.
7632         (parse_robots): Make yourself welcome on empty Disallow.
7633
7634         * version.c: Changed version to 1.4b24.
7635
7636 1996-10-06  Hrvoje Niksic  <hniksic@srce.hr>
7637
7638         * version.c: "Released" 1.4b23.
7639
7640         * ftp.c (ftp_loop_internal): Get the time after getftp.
7641
7642         * Makefile.in (install.info): New target.
7643         (install): Use it.
7644
7645         * http.c (http_loop): Fix output when doing -O.
7646
7647 1996-10-05  Hrvoje Niksic  <hniksic@srce.hr>
7648
7649         * geturl.texi: New file.
7650
7651         * main.c (main): Do not print the warnings and download summary if
7652         opt.quiet is set.
7653
7654         * version.c: Changed version to 1.4b23.
7655
7656 1996-10-05  Hrvoje Niksic  <hniksic@srce.hr>
7657
7658         * "Released" 1.4b22.
7659
7660         * atotm.c (atotm): Use True and False instead of TRUE and FALSE,
7661         to avoid redefinition warnings.
7662
7663         * host.c (store_hostaddress): Use memcpy() to copy the address
7664         returned by inet_addr.
7665
7666         * version.c: Changed version to 1.4b22.
7667
7668 1996-10-04  Hrvoje Niksic  <hniksic@srce.hr>
7669
7670         * version.c: "Released" 1.4b21.
7671
7672         * ftp-unix.c (ftp_parse_ls): Renamed to ftp_parse_unix_ls.
7673
7674         * ftp.c (ftp_port): Use conaddr.
7675         (getftp): Print the file length.
7676         (ftp_retrieve_list): Check the stamps of plain files only.
7677
7678         * connect.c (closeport): Do not call shutdown().
7679         (conaddr): New function.
7680
7681         * html.c (ftp_index): Made it dfp-aware.
7682
7683         * init.c (cleanup): New name of freemem. Close opt.dfp.
7684
7685         * ftp.c (getftp): Use opt.dfp if it is set.
7686
7687         * ftp-unix.c (ftp_parse_ls): Recognize time in h:mm format.
7688
7689         * ftp.c (ftp_retrieve_dirs): Fixed a bug that caused incorrect
7690         CWDs to be sent with recursive FTP retrievals.
7691
7692 1996-10-03  Hrvoje Niksic  <hniksic@srce.hr>
7693
7694         * recur.c (parse_robots): Made it more compliant with "official"
7695         specifications.
7696
7697         * http.c: New function.
7698
7699         * ftp-unix.c (ftp_parse_ls): Added better debug output.
7700
7701         * ftp.c (getftp): Print out the LIST in case of
7702         opt.print_server_response.
7703
7704         * version.c: Changed version to 1.4b21.
7705
7706 1996-10-01  Hrvoje Niksic  <hniksic@srce.hr>
7707
7708         * version.c: "Released" 1.4b20.
7709
7710         * README: Update.
7711
7712         * http.c (gethttp): Preset lengths of various headers instead of
7713         calculating them dynamically.
7714         (gethttp): Check for 206 partial contents.
7715
7716 1996-09-30  Hrvoje Niksic  <hniksic@srce.hr>
7717
7718         * configure.in: Set SYSTEM_GETURLRC to $libdir/geturlrc
7719
7720         * http.c (gethttp): Send the port number in the Host: header.
7721
7722 1996-09-29  Hrvoje Niksic  <hniksic@srce.hr>
7723
7724         * http.c (gethttp): Send host: header.
7725         (gethttp): Add the possibility of user-defined headers.
7726         (gethttp): Move decision about pragma: no-cache to http_loop,
7727         where it belongs.
7728         (gethttp): Pass a struct instead of enormous argument list.
7729         (http_loop): Use a new, fancier display format.
7730         (ftp_loop): Likewise.
7731
7732         * main.c: (hangup): Turn off buffering of the new log file.
7733
7734         * install-sh: Likewise.
7735
7736         * config.sub: Replace with the one in autoconf-2.10
7737
7738         * geturl.1: Update.
7739
7740         * init.c: New options httpuser and httppasswd.
7741
7742         * http.c: (base64_encode_line): New function.
7743         (gethttp): Send authentication.
7744
7745         * connect.c (make_connection): Use store_hostaddress.
7746
7747 1996-09-28  Hrvoje Niksic  <hniksic@srce.hr>
7748
7749         * host.c (store_hostaddress): New function.
7750
7751         * NEWS: Update.
7752
7753         * http.c (hgetrange): New function.
7754         (gethttp): Use ranges.
7755
7756         * utils.c (numdigit): Accept long instead of int.
7757
7758         * http.c (http_loop): Add restart capabilities.
7759
7760         * ftp.c (ftp_retrieve_glob): Fixed a bug that could cause matchres
7761         being used uninitialized.
7762         (ftp_retrieve_list): Similar fix.
7763
7764         * host.c (add_hlist): Fixed a bug that could cause cmp being used
7765         uninitialized.
7766
7767         * url.c (construct_relative): New function.
7768
7769         * recur.c (recursive_retrieve): Use it.
7770
7771         * retr.c (convert_links): New function.
7772
7773 1996-09-27  Hrvoje Niksic  <hniksic@srce.hr>
7774
7775         * url.c (free_urlpos): New function.
7776
7777         * recur.c (recursive_retrieve): Adapt.
7778
7779         * url.c (get_urls_html): Return a linked list instead of a vector.
7780
7781         * url.c (get_urls_file): Return a linked list instead of a vector.
7782
7783         * geturl.1: Update.
7784
7785         * http.c (gethttp): Implement it.
7786
7787         * init.c (setval): New option: SAVEHEADERS
7788
7789         * ftp.c (ftp_loop_internal): Do not set restval if listing is to
7790         be retrieved. Lack of this test caused bugs when the connection
7791         was lost during listing.
7792
7793         * retr.c (retrieve_url): Fixed a bug that caused
7794         coredumps. *newloc is now reset by default.
7795         (retrieve_url): Lift the twenty-tries limit on proxies.
7796
7797         * version.c: Changed version to 1.4b20.
7798
7799 1996-09-20  Hrvoje Niksic  <hniksic@srce.hr>
7800
7801         * version.c: "Released" 1.4b19.
7802
7803 1996-09-19  Hrvoje Niksic  <hniksic@srce.hr>
7804
7805         * ftp.c (ftp_loop_internal): Renamed from ftp_1fl_loop.
7806         (getftp): Changed prototype to accept ccon *.
7807
7808 1996-09-17  Hrvoje Niksic  <hniksic@srce.hr>
7809
7810         * ftp.c (ftp_retrieve_list): Fixed a bug that caused setting
7811         incorrect values to files pointed to by symbolic links.
7812         (ftp_1fl_loop): Do not count listings among the downloaded URL-s.
7813
7814 1996-09-16  Hrvoje Niksic  <hniksic@srce.hr>
7815
7816         * url.c (mkstruct): Do not prepend "./" in front of a pathname.
7817
7818         * main.c (main): New option: --user-agent.
7819
7820         * geturl.1: Ditto.
7821
7822         * init.h: Ditto.
7823
7824         * init.c (setval): Ditto.
7825
7826         * main.c (main): Rename "server-headers" to "server-response".
7827
7828         * ftp-unix.c (ftp_parse_ls): Check for asterisks at the end of
7829         executables in 'ls -F' listings.
7830
7831 1996-09-15  Hrvoje Niksic  <hniksic@srce.hr>
7832
7833         * url.c (parseurl): Remove realloc() and sprintf().
7834         (str_url): Get rid of sprintf().
7835
7836         * recur.c (recursive_retrieve): Enable FTP recursion through proxy
7837         servers.
7838
7839         * url.h (URL_CLEANSE): Made it else-resistant.
7840         (USE_PROXY): New macro.
7841
7842 1996-09-14  Hrvoje Niksic  <hniksic@srce.hr>
7843
7844         * NEWS: Update.
7845
7846         * version.c: Changed version to 1.4b19.
7847
7848 1996-09-14  Hrvoje Niksic  <hniksic@srce.hr>
7849
7850         * version.c: "Released" 1.4b18.
7851
7852         * url.c: Made it reallocate space exponentially.
7853
7854 1996-09-14  Drazen Kacar  <dave@fly.cc.fer.hr>
7855
7856         * html.c (htmlfindurl): Added <frame src> and <iframe src> among
7857         the list of stuff to fetch.
7858
7859 1996-09-13  Hrvoje Niksic  <hniksic@srce.hr>
7860
7861         * url.c (get_urls_html): Fixed a bug that caused SIGSEGV's with
7862         -Fi.
7863
7864         * html.c (htmlfindurl): Rewrite.
7865
7866         * http.c (gethttp): Use opt.proxy_cache.
7867
7868         * main.c (main): Added --cache option.
7869
7870         * ftp.c (ftp_response): Print server response if opt.print_server
7871         response is set.
7872         (getftp): Print newlines after each request if the server response
7873         is to be printed.
7874         (ftp_response): Copy the last response line to last_respline.
7875
7876         * http.c (gethttp): Add Pragma: nocache for retried
7877         proxy-retrievals.
7878
7879         * ftp.c (getftp): Use it.
7880
7881         * retr.c (buf_discard): New function.
7882
7883         * ftp.c (ftp_response): Use buf_readchar().
7884         (getftp): Flush the control connection buffer before calling
7885         get_contents().
7886
7887         * retr.c (buf_readchar): New function.
7888         (buf_flush): New function.
7889         (get_contents): Use buf_readchar() instead of read(x, x, 1).
7890         (get_contents): Use buf_flush.
7891
7892 1996-09-12  Hrvoje Niksic  <hniksic@srce.hr>
7893
7894         * ftp.c: Incorporate changes to ftp_response.
7895
7896         * ftp.c (ftp_response): Allocate the server response dynamically,
7897         as in read_whole_line and fetch_next_header.
7898
7899         * utils.c (read_whole_line): Fixed a bug that prevented reading
7900         the last line if it is not \n-terminated. Also fixed a possible
7901         memory overflow.
7902
7903         * http.c (fetch_next_header): Return malloc-ed string as large as
7904         needed.
7905         (gethttp): Use new fetch_next_header.
7906
7907 1996-09-12  Hrvoje Niksic  <hniksic@srce.hr>
7908
7909         * http.c (hgetlen): Compute the header length the first time only.
7910         (hgettype): Ditto.
7911         (hgetlocation): Ditto.
7912         (hgetmodified): Ditto.
7913
7914 1996-09-11  Hrvoje Niksic  <hniksic@srce.hr>
7915
7916         * sample.geturlrc: Update.
7917
7918 1996-09-10  Hrvoje Niksic  <hniksic@srce.hr>
7919
7920         * http.c (http_loop): Ditto.
7921
7922         * ftp.c (getftp): Open the output file as binary.
7923
7924         * version.c: Changed version to 1.4b18.
7925
7926 1996-09-10  Hrvoje Niksic  <hniksic@srce.hr>
7927
7928         * version.c: "Released" 1.4b17.
7929
7930         * ftp-unix.c (ftp_parse_ls): If unable to open file, return NULL
7931         instead of failed assertion.
7932
7933 1996-09-09  Hrvoje Niksic  <hniksic@srce.hr>
7934
7935         * ftp.c (ftp_get_listing): Add a numbered suffix to LIST_FILENAME
7936         if a file of that name already exists.
7937
7938 1996-09-05  Hrvoje Niksic  <hniksic@srce.hr>
7939
7940         * ftp.c (ftp_1fl_loop): Handler FTPPORTERR and FOPENERR correctly.
7941
7942         * config.h.in: Define gethostbyname as Rgethostbyname when using
7943         Socks.
7944
7945         * configure.in: Check for -lresolv if using Socks.
7946
7947         * version.c: Changed version to 1.4b17.
7948
7949 1996-07-15  Hrvoje Niksic  <hniksic@srce.hr>
7950
7951         * version.c: "Released" 1.4b16.
7952
7953         * http.c (gethttp): More intelligent check for first line of HTTP
7954         response.
7955         (gethttp): Would bug out on time-stamping.
7956
7957         * version.c: Changed version to 1.4b16.
7958
7959 1996-07-11  Hrvoje Niksic  <hniksic@srce.hr>
7960
7961         * version.c: Released 1.4b15.
7962
7963         * http.c (http_loop): Print \n after the loop entry, not before.
7964
7965         * url.c (url_filename): Use ISDOT.
7966
7967         * url.h (ISDOT): New macro.
7968
7969         * recur.c (recursive_retrieve): Change only opt.recursive for
7970         following FTP.
7971
7972 1996-07-11  Antonio Rosella <antonio.rosella@agip.it>
7973
7974         * socks/geturl.cgi: Fixed version No.
7975
7976         * socks/download-netscape.html: Ditto.
7977
7978         * socks/download.html: Changed socks.html to download.html.
7979
7980 1996-07-11  Hrvoje Niksic  <hniksic@srce.hr>
7981
7982         * url.c (url_filename): Check for opt.dirstruct instead for
7983         opt.recursive && opt.dirstruct.
7984
7985         * init.c (defaults): Ditto.
7986         (defaults): Reset dirstruct by default.
7987         (setval): Set opt.dirstruct whenever setting recursive.
7988
7989         * init.h: Removed FORCEDIRHIER.
7990
7991         * INSTALL: Added -L to socks-description.
7992
7993         * version.c: Changed version to 1.4b15.
7994
7995 1996-07-10  Hrvoje Niksic  <hniksic@srce.hr>
7996
7997         * version.c: "Released" 1.4b14.
7998
7999         * geturl.1: Update AUTHOR to include Rosella as contributor.
8000
8001         * NEWS: Update.
8002
8003         * socks/geturl.cgi: Simplified command creation, nuked <blink>.
8004
8005         * socks/geturl.cgi: Wrap nutscape extensions within if $netscape.
8006         (cal_time): Fix == to eq.
8007
8008         * socks/geturl.cgi: GPL-ized with permission of A. Rosella.
8009
8010         * geturl.1 (hostname): Moved URL CONVENTIONS to the beginning.
8011
8012         * Makefile.in: Use @VERSION@.
8013
8014         * configure.in: Check version from version.c.
8015
8016         * socks/geturl.cgi: Changed /pub/bin/perl to /usr/bin/perl.
8017
8018         * socks/download.html: Created from download-netscape.html, made
8019         HTML-2.0 compliant.
8020
8021         * recur.c (recursive_retrieve): Set opt.force_dir_hier when
8022         following FTP links from recursions.
8023
8024 1996-07-09  Hrvoje Niksic  <hniksic@srce.hr>
8025
8026         * url.c (mymkdir): Fixed a bug that prevented mymkdir() to create
8027         absolute directories correctly.
8028
8029         * version.c: Changed version to 1.4b14.
8030
8031 1996-07-09  Hrvoje Niksic  <hniksic@srce.hr>
8032
8033         * version.c: "Released" 1.4b13.
8034
8035         * url.c (make_backup): New function.
8036
8037         * http.c (http_loop): Make a backup copy of the local file (using
8038         rename(2)) before opening it.
8039
8040         * main.c (main): Added --backups.
8041
8042         * host.c (ftp_getaddress): Bail out on failed mycuserid().
8043         (ftp_getaddress): Check for leading dot on MY_DOMAIN.
8044         (ftp_getaddress): Check for empty, null or (null) domain.
8045
8046         * url.c (get_urls_html): If this_url is NULL, the base must have a
8047         protocol.
8048         (parseurl): Use has_proto.
8049
8050         * retr.c (retrieve_url): Warn when proxy is used with more than 20
8051         retries.
8052
8053         * url.c (mkstruct): Create the directory (calling mymkdir()) only
8054         if it is not already there.
8055         (has_proto): New function.
8056         (get_urls_html): Eliminate the remaining call to findurl -- use
8057         has_proto.
8058
8059         * geturl.1: Ditto.
8060
8061         * main.c: Change -X to -x.
8062
8063         * url.c (url_filename): Simplify creation of filename if
8064         prefix_files is set.
8065         (url_filename): Simplify everything. And I do mean *everything*.
8066         (mkstruct): Add dir_prefix before hostname.
8067         (path_simplify): Fixed a bug that caused writing outside the path
8068         string in case of "." and ".." path strings.
8069
8070 1996-07-06  Hrvoje Niksic  <hniksic@srce.hr>
8071
8072         * init.c: Added --mirror.
8073
8074         * main.c (main): Added -X to force saving of directory hierarchy.
8075
8076         * ftp.c (ftp_retrieve_list): Added recursion depth counter.
8077         (ftp_retrieve_list): Check whether quota is exceeded.
8078
8079         * url.c (get_urls_html): Skip leading blanks for absolute URIs.
8080
8081         * http.c (gethttp): Use referer if present.
8082
8083         * recur.c (recursive_retrieve): Set u->referer before calling
8084         retrieve_url.
8085
8086         * url.c (newurl): Use memset to nullify the struct members.
8087         (freeurl): Free the referer field too.
8088
8089         * url.h: Added referer to urlinfo.
8090
8091         * geturl.1: Updated the manual to document some of the new features.
8092
8093         * utils.c (numdigit): Moved from url.c.
8094
8095         * README: Rewritten.
8096
8097         * config.h.in: Add the support for socks.
8098
8099         * configure.in: Add the support for socks.
8100
8101         * url.c (url_filename): If the dir_prefix is ".", work with just
8102         the file name.
8103         (url_filename): Do not look for .n extensions if timestamping if
8104         turned on.
8105
8106         * retr.c (show_progress): Skip the over-abundant restval data, and
8107         print the rest of it with ',' instead of '.'.
8108
8109 1996-07-05  Hrvoje Niksic  <hniksic@srce.hr>
8110
8111         * retr.c (show_progress): Changed second arg. to long (as it
8112         should be).
8113         (show_progress): Moved to retr.c.
8114         (get_contents): Moved to retr.c.
8115
8116         * version.c: Change version to 1.4b13.
8117
8118 1996-07-05  Hrvoje Lacko <hlacko@fly.cc.fer.hr>
8119
8120         * url.c (in_acclist): Would return after the first suffix.
8121
8122 1996-07-04  Hrvoje Niksic  <hniksic@srce.hr>
8123
8124         * version.c: "Released" 1.4b12.
8125
8126         * url.c (path_simplify): More kludgifications.
8127         (get_urls_html): Use new parameters for htmlfindurl.
8128
8129         * html.c: Removed memorizing "parser states", since the new
8130         organization does not require them.
8131
8132         * init.c (run_geturlrc): Use read_whole_line.
8133
8134         * ftp-unix.c (ftp_parse_ls): Use read_whole_line.
8135
8136         * recur.c (parse_robots): Use read_whole_line.
8137
8138         * utils.c (read_whole_line): New function.
8139
8140         * recur.c (tried_robots): Use add_slist/in_slist, *much* cleaner.
8141
8142         * host.c (ngethostbyname): Call inet_addr just once. Yet to be
8143         tested on OSF and Ultrix.
8144         (add_hlist): New function.
8145         (free_hlist): New function.
8146         (search_host): New function.
8147         (search_address): New function.
8148         (realhost): Use search_host, search_address and add_hlist.
8149         (same_host): Replaced realloc() with strdupdelim(), made
8150         case-insensitive, fixed a memory leak.
8151
8152         * html.c (ftp_index): Fixed tm_min and tm_sec to be tm_hour and
8153         tm_min, like intended.
8154
8155         * version.c: Change user agent information to
8156         Geturl/version.
8157
8158 1996-07-03  Hrvoje Niksic  <hniksic@srce.hr>
8159
8160         * utils.c: Renamed nmalloc.c to utils.c, .h likewise.
8161
8162         * url.c (acceptable): Always accept directories.
8163
8164         * ftp-unix.c (ftp_parse_ls): Support brain-damaged "ls -F"-loving
8165         servers by stripping trailing @ from symlinks and trailing / from
8166         directories.
8167
8168         * ftp.c (ftp_loop): Debugged the "enhanced" heuristics. :-)
8169
8170         * url.c (skip_url): Use toupper instead of UCASE.
8171
8172         * host.c (sufmatch): Made it case-insensitive.
8173
8174         * url.c (match_backwards_or_pattern): Fixed i == -1 to j == -1.
8175         (match_backwards): New function, instead of
8176         match_backwards_or_pattern.
8177
8178         * recur.c (recursive_retrieve): Increased performance by
8179         introducing inl, which reduces number of calls to in_slist to only
8180         one.
8181
8182         * ftp.c (ftp_loop): Enhanced the heuristics that decides which
8183         routine to use.
8184
8185         * main.c (printhelp): Removed the warranty stuff.
8186
8187 1996-07-02  Hrvoje Niksic  <hniksic@srce.hr>
8188
8189         * url.c (add_slist): Simplify.
8190         (match_backwards_or_pattern): New function.
8191         (in_acclist): Use match_backwards_or_pattern.
8192         (matches): Remove.
8193
8194 1996-06-30  Hrvoje Niksic  <hniksic@srce.hr>
8195
8196         * ftp.c (ftp_loop): Call ftp_index on empty file names, if not
8197         recursive.
8198
8199         * html.c (ftp_index): Fixed to work. Beautified the output.
8200
8201         * ftp.c (ftp_retrieve_glob): Another argument to control whether
8202         globbing is to be used.
8203         (ftp_retrieve_list): Compare the time-stamps of local and remote
8204         files to determine whether to download.
8205
8206 1996-06-29  Hrvoje Niksic  <hniksic@srce.hr>
8207
8208         * ftp.c (rel_constr): New function.
8209
8210         * retr.c (retrieve_from_file): Check for text/html before
8211         retrieving recursively.
8212
8213         * main.c (main): Check whether the file is HTML before going into
8214         recursive HTML retrieving.
8215
8216         * ftp.c (ftp_retrieve_list): Manage directories.
8217         (ftp_retrieve_glob): Pass all the file-types to ftp_retrieve_list.
8218         (ftp_1fl_loop): Fixed a bug that caused con->com to be incorrectly
8219         initialized, causing bugchecks in getftp to fail.
8220
8221         * configure.in: Check for symlink.
8222
8223         * ftp.c (ftp_retrieve_list): Added support for symlinks.
8224
8225         * version.c: "Released" 1.4b10.
8226
8227         * atotm.c (atotm): Redeclared as time_t.
8228
8229         * init.c: New variable "timestamping".
8230
8231         * main.c (main): New option 'N'.
8232
8233         * http.c (hgetlocation): Case-insensitive match.
8234         (hgetmodified): New function.
8235         (http_loop): Implement time-stamping.
8236
8237 1996-06-28  Hrvoje Niksic  <hniksic@srce.hr>
8238
8239         * version.c: Changed version to 1.4b10
8240
8241         * atotm.c: New file, from phttpd.
8242
8243         * options.h (struct options): New parameter timestamping.
8244
8245         * version.c: 1.4b9 "released".
8246
8247         * recur.c (recursive_retrieve): Used linked list (ulist) for
8248         faster storing of URLs.
8249
8250         * url.c (get_urls_html): Removed the old kludge with comparing the
8251         outputs of htmlfindurl and findurl.
8252         (get_urls_html): Added better protocol support here.
8253         (create_hash): Removed, as well as add_hash and in_hash.
8254         (addslist): New function.
8255         (in_slist): ditto
8256
8257         * version.c: Released 1.4b8, changed version to b9.
8258
8259 1996-06-27  Hrvoje Niksic  <hniksic@srce.hr>
8260
8261         * ftp.c (freefileinfo): New function.
8262         (delelement): New function.
8263
8264         * everywhere: GPL!
8265
8266         * ftp.c (ftp_loop): Use ccon.
8267         (ftp_retrieve_glob): Likewise.
8268
8269         * ftp.h: Define ccon, to define status of control connection.
8270
8271         * ftp.c (ftp_get_listing): New function.
8272         (ftp_retrieve_more): New function.
8273         (ftp_retrieve_glob): New function.
8274
8275 1996-06-25  Hrvoje Niksic  <hniksic@srce.hr>
8276
8277         * configure.in: Removed the search for cuserid().
8278
8279         * init.c (getmode): Renamed to getperms.
8280
8281 1996-06-24  Hrvoje Niksic  <hniksic@srce.hr>
8282
8283         * version.c: New version.
8284
8285         * main.c (hangup): New function, that handles hangup. Hangup
8286         signal now causes geturl to stop writing on stdout, and to write
8287         to a log file.
8288
8289         * ftp.c (getftp): "Released" 1.4b7.
8290
8291         * html.c (htmlfindurl): Ignore everything inside <head>...</head>.
8292         (ftp_index): Use fileinfo/urlinfo.
8293
8294         * ftp-unix.c (ftp_parse_ls): New function.
8295         (symperms): New function.
8296
8297         * ftp.c (ftp_1fl_loop): New function, to handle 1-file loops.
8298
8299         * retr.c (retrieve_url): Added FTP support.
8300
8301 1996-06-23  Hrvoje Niksic  <hniksic@srce.hr>
8302
8303         * geturl.h: Removed NOTFTP2HTML enum.
8304         Added DO_LOGIN, DO_CWD and DO_LIST. LIST_ONLY is obsolete.
8305
8306         * ftp.c (getftp): Resynched with urlinfo.
8307         (getftp): Removed HMTL-ization of index.html from getftp.
8308
8309         * version.c: 1.4b6 "released".
8310
8311         * options.h (options): New struct, to keep options in.
8312
8313         * http.c (http_loop,gethttp): Synched with proxy.
8314
8315         * retr.c (retrieve_url): Implemented proxy retrieval.
8316
8317         * main.c (main): Use retrieve_from_file.
8318
8319 1996-06-22  Hrvoje Niksic  <hniksic@srce.hr>
8320
8321         * retr.c (retrieve_from_file): New function.
8322
8323         * url.c (parseurl): Modified to return URLOK if all OK. Protocol
8324         can be found in u->proto.
8325
8326         * ftp.c (ftp_response): Fixed to accept multi-line responses as
8327         per RFC 959.
8328
8329         * recr.c (recursive_retrieve): Take newloc from retrieve_url.
8330
8331         * url.c (mymkdir): Removed the file of the same name, if one
8332         exists.
8333         (isfile): New function.
8334         (mkstruct): Fixed the '/' glitches.
8335         (path_simplify): Hacked to treat something/.. correctly.
8336
8337 1996-06-21  Hrvoje Niksic  <hniksic@srce.hr>
8338
8339         * http.c (gethttp): Close the socket after error in headers.
8340         (http_loop): HEOF no longer a fatal header.
8341
8342         * loop.c (retrieve_url): When dt is NULL, do not modify it. This
8343         simplifies the syntax of calling retrieve_url.
8344
8345         * recr.c (recursive_retrieve): Modified to use get_urls_html.
8346
8347         * url.c (get_urls_file): New function.
8348         (get_urls_html): New function.
8349
8350         * recr.c (recursive_retrieve): Patched up to conform to the
8351         standards.
8352
8353         * http.c (gethttp): Synched with the rest...
8354         (gethttp): Treat only CONREFUSED specially, with connection
8355         errors.
8356
8357         * init.c,geturl.1,http.c (http_loop): Removed kill_error.
8358
8359 1996-06-20  Hrvoje Niksic  <hniksic@srce.hr>
8360
8361         * http.c (http_loop): New function.
8362
8363         * loop.c: Removed *lots* of stuff from retrieve_url.
8364
8365         * url.c (parseurl): Changed to work with urlinfo. Integrated
8366         username finding and path parsing.
8367         (newurl): New function.
8368         (freeurl): New function.
8369         (mkstruct): Removed the old bogosities, made it urlinfo-compliant.
8370         (url_filename): Likewise.
8371         (path_simplify): Accept relative paths too.
8372         (opt_url): Made urlinfo-compliant, removed bogosities.
8373         (path_simplify): Expanded to accept relative paths.
8374         (str_url): A replacement for hide_url
8375         (decode_string): Fixed a bug that caused malfunctioning when
8376         encountering an illegal %.. combination.
8377         (opt_url): Removed the argument. Dot-optimizations are now default.
8378
8379         * nmalloc.c (strdupdelim): New function.
8380
8381         * url.h: Added the urlinfo structure
8382
8383 1996-06-19  Hrvoje Niksic  <hniksic@srce.hr>
8384
8385         * url.c (hide_url): Thrown out the protocol assertion. Do not
8386         change the URL if the protocol if not recognized.
8387         (findurl): Put continue instead of break.
8388
8389 1996-06-18  Hrvoje Niksic  <hniksic@srce.hr>
8390
8391         * sample.geturlrc: Changed the defaults to be commented out and
8392         harmless (previous defaults caused pains if copied to
8393         ~/.geturlrc).
8394
8395         * http.c (gethttp): Print the HTTP request in debug mode.
8396
8397         * connect.c (iread): Added EINTR check loop to select-ing
8398         too. EINTR is now correctly handled with select().
8399
8400         * TODO: new file
8401
8402 1996-05-07  Hrvoje Niksic  <hniksic@srce.hr>
8403
8404         * host.c (same_host): Made the function a little bit more
8405         intelligent regarding diversified URL syntaxes.
8406
8407         * url.c (skip_url): Spaces are now skipped after URL:
8408
8409         * Released 1.3.1 with the patch to prevent crashing when sending
8410         NULL to robot* functions and the patch to compile "out of the box"
8411         on AIX.
8412
8413         * recr.c (recursive_retrieve): Added checking whether this_url is
8414         NULL when calling the robot functions.
8415
8416         * ChangeLog: New file.