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