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