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