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