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