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