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