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