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