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