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