1 2003-10-08 Hrvoje Niksic <hniksic@xemacs.org>
3 * main.c (print_help): Fix typo; stured -> stored.
5 2003-10-08 Hrvoje Niksic <hniksic@xemacs.org>
7 * getopt.c: Add definitions of getopt_long and getopt_long_only.
9 2003-10-08 Hrvoje Niksic <hniksic@xemacs.org>
11 * config.h.in: Renamed DEBUG to ENABLE_DEBUG. ENABLE_DEBUG is, I
12 think, a better name, because it implies that debugging output is
13 merely possible, not "on by default", as might be construed from
16 2003-10-08 Hrvoje Niksic <hniksic@xemacs.org>
18 * ftp.c (has_insecure_name_p): Define it here.
20 * utils.c (has_wildcards_p): Define it here.
22 * sysdep.h: Declare fnmatch-related macros here, if not using
23 system fnmatch(). Update .c files to not declare fnmatch.h
26 * cmpt.c (fnmatch): Moved here. Use it only under non-GNU libc.
28 2003-10-08 Hrvoje Niksic <hniksic@xemacs.org>
30 * getopt.c: Newer version, imported from Free libit.
32 2003-10-07 Hrvoje Niksic <hniksic@xemacs.org>
34 * cookies.c (struct cookie): Remove unused backpointer to cookie
37 2003-10-07 Hrvoje Niksic <hniksic@xemacs.org>
39 * cmpt.c (memmove): Comment out, since it's no longer used.
41 * cookies.c (cookie_jar_generate_cookie_header): Allocate room for
43 (find_chains_of_host): Assume that the caller has allocated DEST
44 to be sufficiently large to take all the data.
45 (eliminate_dups): Run through the array and eliminate dups on the
46 fly instead of using memmove.
47 (cookie_jar_process_set_cookie): Free cookie->domain before
50 2003-10-05 Gisle Vanem <giva@bgnett.no>
52 * mswindows.c (set_sleep_mode): Fix type of
53 _SetThreadExecutionState.
55 2003-10-05 Hrvoje Niksic <hniksic@xemacs.org>
57 * utils.c (file_size): Return -1 if fopen() returns NULL. Prior
58 to this patch, wget --post-file=nosuchfile dumped core.
60 2003-10-04 Gisle Vanem <giva@bgnett.no>
62 * mswindows.c (run_with_timeout): Use WaitForSingleObject to wait
63 for thread termination.
65 2003-10-04 Hrvoje Niksic <hniksic@xemacs.org>
67 * log.c: Use `...' in function definitions; ansi2knr will convert
68 them to va_dcl. This allowed removal of the ugly VA_START_1 and
71 2003-10-03 Gisle Vanem <giva@bgnett.no>
73 * connect.c: And don't include them here.
75 * mswindows.h: Include winsock headers here.
77 2003-10-03 Hrvoje Niksic <hniksic@xemacs.org>
79 * html-parse.c (convert_and_copy): Move variable declarations
82 2003-10-02 Gisle Vanem <giva@bgnett.no>
84 * mswindows.c (run_with_timeout): For Windows: Run the 'fun' in a
85 thread via a helper function. Continually query the thread's
86 exit-code until finished or timed out.
88 2003-10-02 Hrvoje Niksic <hniksic@xemacs.org>
90 * wget.h (XMALLOC_ARRAY): Removed.
91 (ALLOCA_ARRAY): Ditto.
93 * html-parse.c: Renamed alloca_p to resized.
94 (GROW_ARRAY): Renamed DO_REALLOC_FROM_ALLOCA to GROW_ARRAY and
95 returned it to html-parse.c, since nothing else was using it.
97 2003-10-02 Hrvoje Niksic <hniksic@xemacs.org>
99 * retr.c (retrieve_url): Initialize DUMMY storage for DT. Caught
102 2003-10-02 Hrvoje Niksic <hniksic@xemacs.org>
104 * html-parse.c (convert_and_copy): Handle numeric entities in
106 (convert_and_copy): Copy the contents directly to the pool without
107 a stack-allocated intermediary.
109 2003-10-02 Hrvoje Niksic <hniksic@xemacs.org>
111 * utils.c (alarm_set): New function; use either setitimer or alarm
113 (alarm_cancel): New function; cancel the alarm set up by
115 (run_with_timeout): Use them.
117 2003-10-01 Hrvoje Niksic <hniksic@xemacs.org>
119 * url.c (url_parse): Don't leak memory when a reencoded URL turns
122 * url.c (parse_errors): Mark error messages for translation.
123 (url_error): Translate error messages returned to the caller.
125 2003-10-01 Hrvoje Niksic <hniksic@xemacs.org>
127 * ftp.c (ftp_loop_internal): Initialize TMRATE to NULL to shut up
130 2003-09-26 Gisle Vanem <giva@bgnett.no>
132 * src/mswindows.c: Added ws_percenttitle() showing progress in the
133 window titlebar. Called from retr.c. Secured ws_mypath().
135 * windows/config.h.ms: alloca() prototype not needed. Removed
136 "#undef ENABLE_NLS"; should be in Makefile IMHO. Moved
137 WGET_USE_STDARG from mswindows.h to config.ms.h because of #ifdef
138 in log.c. (MSVC's vararg.h and stdarg.h are incompatible).
140 2003-09-29 Aaron Hawley <Aaron.Hawley@uvm.edu>
142 * ftp.c (getftp): --spider option should now work with FTP
144 (ftp_loop_internal): quiet reports and calculations of downloads
145 when --spider option set, nor try deleting when --delete-after
147 (ftp_loop): --spider will skip HTML-ification of .listing file.
149 2003-09-26 Gisle Vanem <giva@bgnett.no>
151 * mswindows.c (read_registry): Removed.
152 (set_sleep_mode): New function.
153 (windows_main_junk): Call it.
155 2003-09-26 Gisle Vanem <giva@bgnett.no>
157 * mswindows.c (read_registry): Fix invocation of registry
160 * mswindows.c (read_registry): Condition definitions of sleep and
161 usleep with not HAVE_SLEEP and HAVE_USLEEP respectively. Define
162 HAVE_SLEEP and HAVE_USLEEP under __DMC__.
164 2003-09-24 Hrvoje Niksic <hniksic@xemacs.org>
166 * url.c (url_escape_1): Revert unintentional change to lowercase
168 (url_escape_dir): Document that this function depends on the
169 output of url_escape_1.
171 2003-09-23 Hrvoje Niksic <hniksic@xemacs.org>
173 * progress.c (create_image): Print the current ETA if we're done
175 (create_image): Change '-' display char to '+' in the progress bar.
177 * Makefile.in (clean): Remove .libs.
179 2003-09-23 Hrvoje Niksic <hniksic@xemacs.org>
181 * cookies.c (struct cookie): New flag domain_exact.
182 (update_cookie_field): Skip leading dot in domain.
183 (find_matching_chains): Match numeric addresses exactly; don't
184 needlessly copy HOST to the stack.
185 (matching_cookie): Added argument HOST. If cookie->domain_exact
186 is set, check that HOST is equal to cookie->domain.
187 (cookie_jar_load): Only use TAB as delimiter. Document the
188 meaning of DOMAIN-FLAG. Skip leading dot in domain.
189 (cookie_jar_load): Don't ignore DOMAIN-FLAG -- instead, set
190 domain_exact to true if DOMAIN-FLAG is false.
191 (save_cookies_mapper): If domain_exact is false, prepend the
192 domain with dot, like Mozilla does.
194 2003-09-22 Hrvoje Niksic <hniksic@xemacs.org>
196 * progress.c (create_image): Print the initial part of the
197 download with '-' characters, analogous to how dot progress prints
198 the initial part with ','.
200 * hash.c (ptrhash): New function.
202 (hash_table_new): Default to identity hash table.
204 2003-09-22 Hrvoje Niksic <hniksic@xemacs.org>
206 * safe-ctype.h (_sch_test): The cast of BIT to unsigned char was
207 broken -- _sch_istable bitmasks are 16-bit, not 8-bit! Cast BIT
208 to unsigned short instead.
210 2003-09-22 Hrvoje Niksic <hniksic@xemacs.org>
212 * url.c (path_simplify): Instead of calls to memmove, handle "./"
213 and "../" by advancing pointers.
215 2003-09-22 Hrvoje Niksic <hniksic@xemacs.org>
217 * retr.c (getproxy): Moved from url.c.
219 * convert.c: Split off link conversion from url.c into separate
220 file. Also included the book-keeping stuff from recur.c.
222 2003-09-21 Hrvoje Niksic <hniksic@xemacs.org>
224 * init.c: Improved documentation of functions.
225 (cmd_boolean): Attempt to make code that tries to avoid calling
226 strcmp for "speed" a bit more readable.
228 * init.c (simple_atof): Report error on encountering non-digit,
230 (simple_atoi): Replacement for myatoi(), calling interface
231 compatible with simple_atof. Updated myatoi's callers.
233 2003-09-21 Bertrand Demiddelaer <bert@b3rt.org>
235 * url.c (path_simplify): Would read two bytes past the end of the
236 string in the "./" case.
238 2003-09-21 Matthew J. Mellon <mellon@tymenet.com>
240 * http.c (gethttp): Recognize content-type "application/xhtml+xml"
241 as what Wget considers "text/html".
243 2003-09-21 Hrvoje Niksic <hniksic@xemacs.org>
245 * connect.c (connect_with_timeout): Made timeout type double.
247 * options.h (struct options): New members read_timeout,
248 dns_timeout, and connect_timeout.
251 2003-09-21 Hrvoje Niksic <hniksic@xemacs.org>
253 * init.c (simple_atof): New function.
255 (cmd_bytes): Accept things like "1.5k" and such. Use simple_atof
258 * retr.c (limit_bandwidth): Adjust each sleep by the error of the
261 2003-09-21 Hrvoje Niksic <hniksic@xemacs.org>
263 * main.c (main): Use setoptval() for setting the options. Use
264 run_command for `-e'.
266 * init.c (parse_line): Rewritten to return COMIND right away.
267 Changed linkage to static.
268 (run_wgetrc): Use the available comind when calling setval, so it
269 doesn't have to be computed twice.
270 (setval_internal): New function, runs the command's action without
272 (setoptval): New function, does what setval used to do, but exits
274 (run_command): New function.
276 2003-09-21 Hrvoje Niksic <hniksic@xemacs.org>
278 * connect.c (select_fd): Change MAXTIME's type to double. Handle
281 * retr.c (sleep_between_retrievals): In the random-wait case, use
282 random_float() to wait between 0 and 2*opt.wait seconds.
284 * utils.c (run_with_timeout): Accept `double' timeouts. Correctly
285 handle timeout values in (0, 1) range.
286 (random_float): New function.
288 * options.h (struct options): Change the types of wait, waitretry,
289 and timeout to double.
291 * init.c (cmd_time): Accept floating point time.
293 2003-09-20 Hrvoje Niksic <hniksic@xemacs.org>
295 * retr.c (get_contents): Cosmetic fixes.
297 2003-09-20 Hrvoje Niksic <hniksic@xemacs.org>
299 * url.c (uri_merge): Get rid of uri_merge_1.
300 (uri_merge): Merge "foo//", "bar" as "foo//bar", not "foo///bar",
301 i.e. don't add an extra slash merely because BASE ends with two
303 (parse_credentials): Renamed from parse_uname. Rewrittern in
304 standard [beg, end) calling style.
305 (url_skip_credentials): Renamed from url_skip_uname. Made static.
306 (url_skip_credentials): Include # and ; as terminators. Old code
307 would mistakenly consider "http://foo.com#hniksic@iskon.hr" to
309 (url_skip_scheme): Removed because it was unused.
310 (url_has_scheme): Require "scheme" to be at least one char long.
312 2003-09-19 Hrvoje Niksic <hniksic@xemacs.org>
314 * url.c (url_file_name): Expect NULL dir_prefix.
316 * init.c (cmd_file): Use a macro to prevent multiple #ifdef
318 (defaults): Set dir_prefix to NULL by default.
320 2003-09-19 Hrvoje Niksic <hniksic@xemacs.org>
322 * safe-ctype.h (_sch_test): Cast BIT to unsigned char, like latest
325 2003-09-19 Hrvoje Niksic <hniksic@xemacs.org>
327 * wget.h (BOUNDED_TO_ALLOCA): Evaluate PLACE only once.
328 (ARRAY_SIZE): Renamed to countof. All callers updated.
330 2003-09-19 Hrvoje Niksic <hniksic@xemacs.org>
332 * main.c (main): New option --strict-comments.
334 * html-parse.c (find_comment_end): New function: simple BM search
336 (map_html_tags): Use it if looking at a comment and not in strict
339 2003-09-17 Aurelien Marchand <artaxerxes@users.sf.net>
341 * ftp.h: Added OS400 system in enum
342 * ftp-basic.c: recognize OS400 systems
343 * ftp.c: don't prepend the CWD if talking to OS400, since it
344 breaks the change in library
346 2003-09-18 Hrvoje Niksic <hniksic@xemacs.org>
348 * retr.c (get_contents): Pass the correct argument to ssl_iread.
350 2003-09-18 Hrvoje Niksic <hniksic@xemacs.org>
352 * safe-ctype.h: Don't #define ctype.h macros to errors because
353 that loses when someone #include's ctype.h after safe-ctype.h.
355 2003-09-17 Hrvoje Niksic <hniksic@xemacs.org>
357 * url.c: Undef U, W, C after use.
359 2003-09-17 Hrvoje Niksic <hniksic@xemacs.org>
361 * init.c (cmd_spec_restrict_file_names): Allow the OS setting to
362 be augmented by ",nocontrol" which means don't escape the control
363 characters, but otherwise keep OS settings.
365 * url.c (file_unsafe_char): Deleted.
366 (append_uri_pathel): Query filechr_table directly.
367 (filechr_table): Separated Unix, Windows, and control-unsafe
370 2003-09-17 Hrvoje Niksic <hniksic@xemacs.org>
372 * url.c (url_escape_1): New function.
373 (url_escape): Use it.
374 (sync_path): Handle pathological cases where u->file and u->dir
375 contain really strange characters.
379 2003-09-16 Hrvoje Niksic <hniksic@xemacs.org>
381 * url.c (url_file_name): Don't reallocate FNAME if the file
382 doesn't exist, as is usually the case.
384 * utils.c (unique_name): New flag allow_passthrough.
386 2003-09-16 Hrvoje Niksic <hniksic@xemacs.org>
388 * utils.c (wtimer_sys_diff): Convert the time difference to signed
389 __int64, then to double. This works around MS VC++ 6 which can't
390 convert unsigned __int64 to double directly.
392 2003-09-16 Hrvoje Niksic <hniksic@xemacs.org>
394 * Makefile.in (clean): Also remove the core.<number> files
395 produced by recent Linux systems.
397 2003-09-16 Hrvoje Niksic <hniksic@xemacs.org>
399 * http.c (post_file): Don't pad the file if it's not large
400 enough. Bail out instead.
402 2003-09-15 Hrvoje Niksic <hniksic@xemacs.org>
404 * retr.c (get_contents): Reduce the buffer size to the amount of
405 data that may pass through for one second. This prevents long
406 sleeps when limiting bandwidth.
408 * connect.c (connect_to_one): Reduce the socket's RCVBUF when
409 bandwidth limitation to small values is requested.
411 2003-09-15 Hrvoje Niksic <hniksic@xemacs.org>
413 * progress.c (update_speed_ring): Moved the speed ring update to a
414 separate function and documented it better.
416 * progress.c: Use `double' for most timers to support granularity
419 2003-09-15 Hrvoje Niksic <hniksic@xemacs.org>
421 * wget.h (XDIGIT_TO_XCHAR): Implement as index into a literal
423 (XDIGIT_TO_xchar): Ditto.
425 2003-09-15 Hrvoje Niksic <hniksic@xemacs.org>
427 * utils.c: Change the type of timer-related functions from long to
428 double, for better precision. On machines supporting gettimeofday
429 the timers now work with granularity of less than one millisecond.
431 2003-09-15 Hrvoje Niksic <hniksic@xemacs.org>
433 * cookies.c (parse_set_cookies): Fixed the parser to handle more
435 (test_cookies): New function, contains a test suite for
438 2003-09-15 Hrvoje Niksic <hniksic@xemacs.org>
440 * url.c (strpbrk_or_eos): Implement as a macro under Gcc.
442 2003-09-15 Hrvoje Niksic <hniksic@xemacs.org>
444 * cookies.c (parse_set_cookies): Allow trailing space in
445 set-cookies header. Also, allow any amount of whitespace, not
446 only one character. Allow empty set-cookies header without
449 2003-09-14 Hrvoje Niksic <hniksic@xemacs.org>
451 * url.c (append_uri_pathel): Use opt.restrict_file_names when
452 calling file_unsafe_char.
454 * init.c: New command restrict_file_names.
456 * main.c (main): New option --restrict-file-names[=windows,unix].
458 * url.c (url_file_name): Renamed from url_filename.
459 (url_file_name): Add directory and hostdir prefix here, not in
461 (append_dir_structure): New function, does part of the work that
462 used to be in mkstruct. Iterates over path elements in u->path,
463 calling append_uri_pathel on each one to append it to the file
465 (append_uri_pathel): URL-unescape a path element and reencode it
466 with a different set of rules, more appropriate for handling of
468 (file_unsafe_char): New function, uses a lookup table to decide
469 whether a character should be escaped for use in file name.
470 (append_string): New utility function.
471 (append_char): Ditto.
472 (file_unsafe_char): New argument restrict_for_windows, decide
473 whether Windows file names should be escaped in run-time.
475 * connect.c: Include <stdlib.h> to get prototype for abort().
477 2003-09-14 Hrvoje Niksic <hniksic@xemacs.org>
479 * utils.c (wtimer_sys_set): Extracted the code that sets the
481 (wtimer_reset): Call it.
482 (wtimer_sys_diff): Extracted the code that calculates the
483 difference between two system times here.
484 (wtimer_elapsed): Call it.
485 (wtimer_elapsed): Don't return a value smaller than the previous
486 one, which could previously happen when system time is set back.
487 Instead, reset start time to current time and note the elapsed
488 offset for future calculations. The returned times are now
489 guaranteed to be monotonically nondecreasing.
491 2003-09-10 Hrvoje Niksic <hniksic@xemacs.org>
493 * host.c (lookup_host): Print the result of the DNS lookup.
495 2003-09-10 Hrvoje Niksic <hniksic@xemacs.org>
497 * init.c (cmd_boolean): Accept yes/no along with on/off.
498 (cmd_lockable_boolean): Ditto.
500 2003-09-10 Hrvoje Niksic <hniksic@xemacs.org>
502 * init.c: New command dns_cache.
504 * main.c (main): New option --dns-cache[=off].
506 2003-09-09 Hrvoje Niksic <hniksic@xemacs.org>
508 * config.h.in: Initialize HAVE_GETADDRINFO and ENABLE_IPV6.
510 * all: Use #ifdef ENABLE_IPV6 instead of the older INET6. Use
511 HAVE_GETADDRINFO for getaddrinfo-related stuff.
513 2003-09-09 Hrvoje Niksic <hniksic@xemacs.org>
515 * url.c (url_parse): Return an error if the URL contains a [...]
516 IPv6 numeric address and we don't support IPv6.
518 2003-09-05 Hrvoje Niksic <hniksic@xemacs.org>
520 * url.c (is_valid_ipv6_address): Modified to not require
521 zero-terminated strings.
522 (is_valid_ipv4_address): Ditto.
524 2003-09-05 Mauro Tortonesi <mauro@deepspace6.net>
526 src/url.c: added RFC 2732 compliance for URL parsing. The
527 functions is_*_address valid are a modified version of
528 glibc 2.3.2 inet_pton's code.
530 2003-09-03 Ahmon Dancy <dancy@dancysoft.com>
532 * main.c init.c options.h: Added --retry-connrefused option so
533 that Connection Refused failures are treated as non-fatal (when
534 trying to retrieve from busy servers).
536 * wget.h: New CONNECT_ERROR macro for encapsulating this
539 * ftp.c http.c : Use CONNECT_ERROR macro in places where
540 ECONNREFUSED was checked.
542 2003-01-11 Ian Abbott <abbotti@mev.co.uk>
544 * ftp.c (ftp_retrieve_glob): Reject insecure filenames as determined
545 by calling new function has_insecure_name_p. This is based on a
548 * fnmatch.c (has_insecure_name_p): New function: returns non-zero
549 if filename starts with `/' or contains `../' and is therefore
552 * fnmatch.h: Declare has_insecure_name_p().
554 2002-08-03 Hrvoje Niksic <hniksic@xemacs.org>
556 * init.c (cmd_file): Allocate RESULT correctly.
558 2002-07-24 Hrvoje Niksic <hniksic@xemacs.org>
560 * recur.c (retrieve_tree): Check whether downloaded_html_set is
561 non-NULL before using it.
563 2002-05-27 Hrvoje Niksic <hniksic@arsdigita.com>
565 * html-parse.c (NAME_CHAR_P): Allow almost any character here.
567 2002-05-24 Hrvoje Niksic <hniksic@arsdigita.com>
569 * progress.c (bar_set_params): Fall back to dot progress if the
570 terminal type is "emacs".
572 2002-05-20 Hrvoje Niksic <hniksic@arsdigita.com>
574 * log.c: Don't #undef WGET_USE_STDARG.
576 2002-05-16 Hrvoje Niksic <hniksic@arsdigita.com>
578 * hash.c (prime_size): Store the offset of the prime number in the
579 prime table. When searching, start with the given offset.
580 (hash_table_new): Pass the pointer to ht->prime_offset to
582 (grow_hash_table): Ditto.
583 (prime_size): Make 13 the first prime to make empty hash tables
586 2002-05-16 Ian Abbott <abbotti@mev.co.uk>
588 * recur.c (download_child_p): Minor optimization to avoid an
589 unnecessary additional call to schemes_are_similar_p function.
591 2002-05-16 Ian Abbott <abbotti@mev.co.uk>
593 * url.c (schemes_are_similar_p): New function to test enumerated
594 scheme codes for similarity.
598 * recur.c (download_child_p): Use it to compare schemes. This
599 also fixes a bug that allows hosts to be spanned (without the
600 -H option) when the parent scheme is https and the child's is
603 2002-05-14 Bill Richardson <bill@riverstonenet.com>
605 * ftp.c (getftp): Don't ftruncate stdout.
607 * http.c (gethttp): Don't ftruncate stdout.
609 2002-05-09 Ian Abbott <abbotti@mev.co.uk>
611 * cmpt.c (strptime_internal): Synched with glibc-2.1.3.
613 (get_alt_number): Ditto.
614 (__isleap): New function-like macro used by strptime.
615 (day_of_the_week): New function used by strptime.
616 (day_of_the_year): Ditto.
617 (__mon_yday): Now shared by mktime and strptime implementations.
619 2002-05-08 Hrvoje Niksic <hniksic@arsdigita.com>
621 * cookies.c (check_domain_match): Use match_tail in case
624 * utils.c (match_tail): Allow the caller to specify case
627 * cookies.c (store_cookie): When expiry_time is 0, print it as
628 undefined, not indefinite.
630 2002-05-07 Ian Abbott <abbotti@mev.co.uk>
632 * cookies.c (cookie_jar_process_set_cookie): Do not store
635 2002-04-21 Hrvoje Niksic <hniksic@arsdigita.com>
637 * cookies.c (check_domain_match): Allow cookies to be set for
638 subdomains of unknown top-level domains under some circumstances.
640 2002-04-21 Thomas Lussnig <thomas.lussnig@bewegungsmelder.de>
643 - allow checking of server cert
644 - allow defining client cert type
645 - allow limit of ssl protocol
646 - check more return values
647 - added debug message on break
649 2002-04-21 Hrvoje Niksic <hniksic@arsdigita.com>
651 * recur.c (download_child_p): Revert order of items in check
652 number 6 for clarity.
654 2002-04-20 Hrvoje Niksic <hniksic@arsdigita.com>
660 * http.c: Use the new interface.
662 * cookies.c: Provide an OO-style "cookie jar" interface to enable
663 separate cookie jars.
665 * http.c (http_atotm): Declare argument as const.
667 2002-04-20 Hrvoje Niksic <hniksic@arsdigita.com>
669 * cookies.c (cookie_new): Default to PORT_ANY.
670 (find_cookie_chain_exact): Only search by DOMAIN.
671 (find_matching_cookie): Also check that PORT matches.
672 (store_cookie): Only match the domain.
673 (set_cookie_header_cb): When a cookie "fakes" a domain, assume it
674 is valid for that host rather than discarding it completely.
675 (find_matching_chains): Don't search by PORT.
676 (matching_cookie): Also match PORT.
677 (load_cookies): Set the port if specified, otherwise leave it as
679 (save_cookies_mapper): Save the port if specified, otherwise leave
682 2002-04-19 Thomas Lussnig <thomas.lussnig@bewegungsmelder.de>
684 * init.c: The option `egdfile' was not in sort order.
686 2002-04-16 Hrvoje Niksic <hniksic@arsdigita.com>
688 * ftp.c (getftp): Treat directories that begin with <letter>: as
690 (getftp): Strip trailing slashes from con->id before merging it
693 2002-04-16 Hrvoje Niksic <hniksic@arsdigita.com>
695 * http.c (gethttp): If Content-Type is not given, assume
698 2002-04-15 Hrvoje Niksic <hniksic@arsdigita.com>
700 * recur.c (download_child_p): Don't ignore rejection of HTML
701 documents that are themselves leaves of recursion.
703 2002-04-15 Ian Abbott <abbotti@mev.co.uk>
705 Makefile.in: Updated several dependencies for object files to take
706 account of nested include files.
708 2002-04-15 Ian Abbott <abbotti@mev.co.uk>
710 Makefile.in: The target `connect$o' (connect.o) now depends on
713 2002-04-15 Ian Abbott <abbotti@mev.co.uk>
715 * host.c (SET_H_ERRNO): New function-like macro to set `h_errno'.
716 (gethostbyname_with_timeout): Use it.
718 * utils.c: Don't define `SETJMP()', `run_with_timeout_env' or
719 `abort_run_with_timeout()' when `USE_SIGNAL_TIMEOUT' is undefined.
721 2002-04-15 Hrvoje Niksic <hniksic@arsdigita.com>
723 * host.c (getaddrinfo_with_timeout): New function.
724 (gethostbyname_with_timeout): Ditto.
725 (lookup_host): Use them.
727 2002-04-14 Hrvoje Niksic <hniksic@arsdigita.com>
729 * utils.c (number_to_string): Handle the case when n < -INT_MAX.
731 2002-04-14 Hrvoje Niksic <hniksic@arsdigita.com>
733 * init.c (comind): Use a marginally faster implementation of
734 binary search. To quote Martin Buchholz, "a nanosecond saved is a
737 2002-04-14 Hrvoje Niksic <hniksic@arsdigita.com>
739 * main.c (print_help): Document `--post-data' and `--post-file'.
741 2002-04-14 Hrvoje Niksic <hniksic@arsdigita.com>
743 * http.c (gethttp): Ditto.
745 * retr.c (retrieve_url): Initialize variables to appease the
748 * gen_sslfunc.c (ssl_iread): Don't handle EINTR when calling
752 * connect.c (select_fd): Rewrite to handle EINTR. Set errno to
753 ETIMEDOUT in case of timeout.
754 (iread): No need to handle EINTR when calling select_fd.
757 2002-04-14 Hrvoje Niksic <hniksic@arsdigita.com>
759 * retr.c (retrieve_url): Make sure that POST is not honored for
762 * http.c (gethttp): Send the POST data when requested.
763 (post_file): New function.
766 * main.c (main): Ditto.
768 * init.c: Add new options.
770 * options.h (struct options): New options post_data and
773 2002-04-14 Hrvoje Niksic <hniksic@arsdigita.com>
775 * connect.c (connect_with_timeout): Firing SIGALRM can result in
776 connect() exiting with EINTR. Treat EINTR the same as ETIMEDOUT.
778 2002-04-13 Hrvoje Niksic <hniksic@arsdigita.com>
780 * connect.c (connect_with_timeout): Use it.
782 * utils.c (run_with_timeout): New function.
784 2002-04-13 Hrvoje Niksic <hniksic@arsdigita.com>
786 * url.c (getproxy): Accept a struct url argument. This obviates
787 the need for USE_PROXY_P.
789 * retr.c (retrieve_url): Allow proxy to be a non-FTP URL.
791 * ftp.c (getftp): Recognize FWTK-style proxy.
793 2002-04-12 Hrvoje Niksic <hniksic@arsdigita.com>
795 * config.h.in: Only define _VA_LIST when compiled with gcc.
797 2002-04012 Ian Abbott <abbotti@mev.co.uk>
799 * http.c (http_loop): Compensate for MS Windows two-second
800 granularity of file modification time when comparing timestamps.
802 * ftp.c (ftp_retrieve_list): Ditto.
804 2002-04-12 Ian Abbott <abbotti@mev.co.uk>
806 * utils.c (has_html_suffix_p): New function to test filename for
807 common html extensions.
809 * utils.h: Declare it.
811 * http.c (http_loop): Use it instead of previous test.
813 * retr.c (retrieve_url): Ditto.
815 * recur.c (download_child_p): Ditto.
817 2002-04-12 Hrvoje Niksic <hniksic@arsdigita.com>
819 * config.h.in: Define _VA_LIST on Solaris to prevent stdio.h from
821 From Kevin Rodgers <kevinr@ihs.com>.
823 2002-04-12 Ian Abbott <abbotti@mev.co.uk>
825 * Makefile.in: Specify libtool mode explicitly when linking.
827 2002-04-12 Hrvoje Niksic <hniksic@arsdigita.com>
829 * connect.c (connect_with_timeout): New function.
830 (connect_to_one): Use it.
832 * config.h.in: Add stubs for HAVE_SIGSETJMP, HAVE_SIGBLOCK, and
835 2002-04-11 Hrvoje Niksic <hniksic@arsdigita.com>
837 * log.c: Set WGET_USE_STDARG if __STDC__ is defined and stdarg.h
840 2002-04-11 Hrvoje Niksic <hniksic@arsdigita.com>
842 * progress.c (bar_create): If INITIAL is larger than TOTAL, fix
844 (bar_finish): Likewise.
846 2002-04-11 Hrvoje Niksic <hniksic@arsdigita.com>
848 * html-url.c (tag_handle_form): New function. Pick up form
849 actions and mark them for conversion only.
851 2002-04-11 Hrvoje Niksic <hniksic@arsdigita.com>
853 * progress.c (struct progress_implementation): Use PARAMS when
854 declaring the parameters of *create, *update, *finish, and
859 * http.c: Reformat some function definitions so that ansi2knr can
862 * hash.c (struct hash_table): Use the PARAMS macro around
863 parameters in the declaration of hash_function and test_function.
864 (prime_size): Spell 2580823717UL and 3355070839UL as (unsigned
865 long)0x99d43ea5 and (unsigned long)0xc7fa5177 respectively, so
866 that pre-ANSI compilers can read them.
867 (find_mapping): Use PARAMS when declaring EQUALS.
868 (hash_table_put): Ditto.
870 * ftp.h: Wrap the parameters of ftp_index declaration in PARAMS.
872 * cookies.c (cookie_new): Use (unsigned long)0 instead of 0UL,
873 which was unsupported by pre-ANSI compilers.
875 From Nelson H. F. Beebe <beebe@math.utah.edu>, for the most part.
877 2002-04-11 Hrvoje Niksic <hniksic@arsdigita.com>
879 * url.c (url_filename): Use compose_file_name regardless of
880 whether opt.dirstruct is set.
881 (mkstruct): Don't handle the query and the reencoding of DIR; that
882 is done in compose_file_name.
884 2002-04-10 Hrvoje Niksic <hniksic@arsdigita.com>
886 * wget.h: Ditto for extern char *exec_name.
888 * options.h: Don't guard against OPTIONS_DEFINED_HERE -- it is
889 perfectly legal to follow an `extern' with a non-`extern' ones,
890 provided the types match.
892 * main.c: Don't define OPTIONS_DEFINED_HERE.
894 2002-04-10 Hrvoje Niksic <hniksic@arsdigita.com>
896 * progress.c (create_image): Revert to calculating ETA based on
897 average download speed.
898 (create_image): Don't print ETA until the download has been active
899 for at least 3 seconds.
900 (create_image): When ETA is not available, don't print anything.
901 The previous version would print --:--.
903 2002-04-10 Hrvoje Niksic <hniksic@arsdigita.com>
905 * progress.c (bar_update): Keep updating a subinterval until it
906 reaches or exceeds a watermark. That way the measurement will be
907 guaranteed to span a configurable minimum of time. The current
908 default is 3s in 30 100ms intervals.
910 2002-04-09 Hrvoje Niksic <hniksic@arsdigita.com>
912 * progress.c (bar_update): Maintain an array of the time it took
913 to perform previous 30 network reads.
914 (create_image): Calculate the download speed and ETA based on the
915 last 30 reads, not the entire download.
916 (create_image): Make sure that the ETA is not changed more than
919 2002-04-09 Ian Abbott <abbotti@mev.co.uk>
921 * mswindows.c (borland_utime): New function conditionally defined
922 when `HACK_BCC_UTIME_BUG' is defined. A reimplementation of
923 `utime()' as Borland's `utime()' function is broken on Windows 9x
924 systems. (Original patch by Chin-yuan Kuo <sr1111111@yahoo.com.tw>.)
926 2002-04-08 Hrvoje Niksic <hniksic@arsdigita.com>
928 * ftp.c (ftp_loop): Propagate the result of ftp_retrieve_glob.
930 2002-03-26 Ian Abbott <abbotti@mev.co.uk>
932 * Makefile.in: Updated several dependencies for object files.
934 2002-03-20 Ian Abbott <abbotti@mev.co.uk>
936 * mswindows.c: Include "utils.h".
938 2002-03-18 Ian Abbott <abbotti@mev.co.uk>
940 * host.h: Don't include netdb.h on windows.
942 2002-02-19 Hrvoje Niksic <hniksic@arsdigita.com>
944 * recur.c (retrieve_tree): Handle the case when start_url doesn't
947 2002-02-19 Andreas Damm <andreas-sourceforge@radab.org>
949 * wget.h (DO_REALLOC_FROM_ALLOCA): Multiply with sizeof(type) when
950 calling xmalloc and memcpy.
952 2002-02-19 Hrvoje Niksic <hniksic@arsdigita.com>
954 * host.h: Include Unix-specific includes #ifndef WINDOWS.
955 Patch originally provided by Christian Lackas.
957 2002-02-11 Christian Lackas <delta@lackas.net>
959 * recur.c: recurive downloading for https fixed.
961 2002-02-19 Alan Eldridge <alane@geeksrus.net>
963 * host.h: Also include <netinet/in.h> and <sys/socket.h>.
965 * ftp-basic.c: Also include <netinet/in.h>.
967 2002-02-05 Ian Abbott <abbotti@mev.co.uk>
969 * http.c (gethttp): when -c used, mark already fully retrieved
970 file as successfully retrieved.
972 2002-02-19 Hrvoje Niksic <hniksic@arsdigita.com>
974 * url.c (url_parse): Don't treat '?' as query string separator
975 when parsing FTP URLs.
977 2002-02-01 Hrvoje Niksic <hniksic@arsdigita.com>
979 * html-url.c (tag_handle_meta): Don't crash on <meta
980 http-equiv=refresh> where content is missing.
982 2002-01-31 Herold Heiko <Heiko.Herold@previnet.it>
984 * ftp-basic.c, host.c: don't include sys/socket.h, arpa/inet.h,
987 2002-01-30 Hrvoje Niksic <hniksic@arsdigita.com>
989 * retr.c (retrieve_url): Remove redirection cycle detection. This
990 is because some sites legitimately redirect the user back to the
991 same location, e.g. after an authorization check performed by
992 another page. MAX_REDIRECTIONS is still used to prevent infinite
995 2002-01-26 Hrvoje Niksic <hniksic@arsdigita.com>
997 * http.c (gethttp): Wrap host name in square brackets if it
1000 2002-01-26 Hrvoje Niksic <hniksic@arsdigita.com>
1002 * url.c (url_parse): Allow all hex digits, not only decimal ones,
1003 to form an IP address.
1005 2002-01-26 Hrvoje Niksic <hniksic@arsdigita.com>
1007 * url.c (urlchr_table): Make square braces reserved, so we can
1008 parse http://[::1]/.
1009 (url_parse): Handle host in braces.
1010 (url_string): If url->host contains colons, wrap it in braces.
1012 2002-01-24 Hrvoje Niksic <hniksic@arsdigita.com>
1014 * connect.c (resolve_bind_address): New function.
1015 (connect_to_one): Use it.
1018 * init.c: Don't resolve bind-address here.
1020 * host.c (wget_sockaddr_set_address): Would bug out with ADDR == NULL.
1022 2002-01-24 Hrvoje Niksic <hniksic@arsdigita.com>
1024 * host.c (lookup_host): Use sizeof(ip4_address) to calculate the
1026 (address_list_new): Use map_ipv4_to_ip.
1027 (wget_sockaddr_set_address): Convert ADDR to IPv4 before using it
1030 2002-01-24 Hrvoje Niksic <hniksic@arsdigita.com>
1032 * source: Integrated IPv6 support.
1033 Written by Thomas Lussnig <thomas.lussnig@bewegungsmelder.de>.
1035 2002-01-15 Ian Abbott <abbotti@mev.co.uk>
1037 * init.c (cmd_file): Change `\' to `/' for Windows (yes, really!)
1038 (cmd_directory): New function. Like cmd_file(), but strips
1039 trailing directory separators.
1040 (commands): Change action for "dirprefix" from `cmd_file' to
1043 * utils.c (make_directory): Allow intermediate `mkdir' calls to
1044 fail, as not all path components that do not exist should be
1045 directory components, especially under Windows.
1047 2002-01-17 Hrvoje Niksic <hniksic@arsdigita.com>
1049 * netrc.c (parse_netrc): Skip leading whitespace before testing
1050 whether the line is empty. Empty lines still contain the line
1053 2002-01-15 Hrvoje Niksic <hniksic@arsdigita.com>
1055 * gen_sslfunc.c (ssl_iread): Call select on the file descriptor
1056 only if no data is pending in SSL buffers.
1057 From tony@bluetail.com.
1059 2002-01-14 Hrvoje Niksic <hniksic@arsdigita.com>
1061 * headers.c (header_get): Strip trailing whitespace from the
1064 2002-01-14 Hrvoje Niksic <hniksic@arsdigita.com>
1066 * url.c (parse_uname): URL-decode *USER and *PASSWD.
1068 2002-01-07 Ian Abbott <abbotti@mev.co.uk>
1070 * url.c (uri_merge_1): Deal with "net path" relative URL (one that
1073 2002-01-14 Hrvoje Niksic <hniksic@arsdigita.com>
1075 * http.c (gethttp): Invalidate SOCK if get_contents encountered an
1078 2001-12-24 Hrvoje Niksic <hniksic@arsdigita.com>
1080 * version.c: Wget 1.8.1 is released.
1082 2001-12-19 Hrvoje Niksic <hniksic@arsdigita.com>
1084 * version.c: Wget 1.8.1-pre3 is released.
1086 2001-12-19 Hrvoje Niksic <hniksic@arsdigita.com>
1088 * recur.c (retrieve_tree): Enqueue the canonical representation of
1089 start_url, so that the test against dl_url_file_map works.
1091 2001-12-19 Hrvoje Niksic <hniksic@arsdigita.com>
1093 * log.c (logputs): Check for requested verbosity before printing
1096 2001-12-19 Hrvoje Niksic <hniksic@arsdigita.com>
1098 * html-url.c (tag_handle_link): Treat the "shortcut icon" link as
1101 2001-12-18 Hrvoje Niksic <hniksic@arsdigita.com>
1103 * recur.c (retrieve_tree): Make a copy of file obtained from
1104 dl_url_file_map because the code calls xfree(file) later.
1106 2001-12-18 Hrvoje Niksic <hniksic@arsdigita.com>
1108 * recur.c (register_html): Maintain a hash table of HTML files
1109 along with the list. Disallow duplicates.
1110 (retrieve_tree): Use downloaded_html_set to check whether the file
1111 found in dl_url_file_map is an HTML file, and descend into it if
1113 (convert_all_links): Don't guard against duplicates in
1114 downloaded_html_list, since they are no longer possible.
1116 2001-12-18 Ian Abbott <abbotti@mev.co.uk>
1118 * recur.c (retrieve_tree): Pass on referring URL when retrieving
1121 2001-12-17 Hrvoje Niksic <hniksic@arsdigita.com>
1123 * version.c: Wget 1.8.1-pre2 is released.
1125 2001-12-17 Hrvoje Niksic <hniksic@arsdigita.com>
1127 * retr.c (sleep_between_retrievals): Simplify indentation.
1129 2001-12-17 Hrvoje Niksic <hniksic@arsdigita.com>
1131 * gen_sslfunc.c (ssl_init_prng): Use random_number to get a byte
1132 of "randomness" at a time.
1133 (ssl_init_prng): Don't seed the PRNG; random_number will do that.
1135 * retr.c (sleep_between_retrievals): Use it. Make sure that the
1136 random amount averages in opt.wait.
1137 (sleep_between_retrievals): Don't seed the PRNG; random_number
1140 * utils.c (random_number): New function.
1142 2001-12-14 Hrvoje Niksic <hniksic@arsdigita.com>
1144 * url.c (path_simplify): Move here from utils.c, and make static.
1146 2001-12-13 Hrvoje Niksic <hniksic@arsdigita.com>
1148 * init.c (wgetrc_file_name): Print correct message when loading
1149 getenv("WGETRC") fails.
1151 2001-12-13 Hrvoje Niksic <hniksic@arsdigita.com>
1153 * recur.c (register_download): Don't abort when one URL references
1154 two different files.
1156 2001-12-13 Hrvoje Niksic <hniksic@arsdigita.com>
1158 * http.c (gethttp): Check for conn->scheme, not u->scheme, before
1161 2001-12-13 Hrvoje Niksic <hniksic@arsdigita.com>
1163 * version.c: Wget 1.8.1-pre1 is released.
1165 2001-12-13 Hrvoje Niksic <hniksic@arsdigita.com>
1167 * res.c (matches): Fix broken URL in the docstring.
1169 2001-12-13 Hrvoje Niksic <hniksic@arsdigita.com>
1171 * html-url.c (tag_url_attributes): Mark <embed href=...> as
1174 2001-12-12 Hrvoje Niksic <hniksic@arsdigita.com>
1176 * url.c (get_urls_file): Cosmetic changes.
1178 2001-12-12 Hrvoje Niksic <hniksic@arsdigita.com>
1180 * html-url.c (append_one_url): Resurrect warning when unable to
1181 resolve a relative link.
1183 2001-12-12 Hrvoje Niksic <hniksic@arsdigita.com>
1185 * html-url.c (collect_tags_mapper): Break into several functions.
1186 (tag_url_attributes): Collect <embed href=...>.
1188 2001-12-11 Hrvoje Niksic <hniksic@arsdigita.com>
1190 * host.c: New type ipv4_address. Use it consistently instead of
1191 `unsigned char[4]' and `unsigned char *'.
1192 (pretty_print_address): Accept a `const void *', to require even
1195 2001-12-11 Hrvoje Niksic <hniksic@arsdigita.com>
1197 * ftp-ls.c (ftp_parse_vms_ls): Fix obvious memory leaks.
1199 2001-12-10 Hrvoje Niksic <hniksic@arsdigita.com>
1201 * main.c (main): Initialize progress after fork_to_background, so
1202 that it knows when to use dots.
1204 * mswindows.c (ws_hangup): Call log_request_redirect_output.
1206 * utils.c (fork_to_background): Print the PID of the child
1209 * log.c (log_request_redirect_output): Set a flag that output
1210 redirection has been requested. Doing anything else in a signal
1212 (check_redirect_output): New function: check whether redirection
1213 has been requested and, if so, call redirect_output().
1214 (logputs): Call check_redirect_output.
1216 (debug_logprintf): Ditto.
1217 (redirect_output): Print clearer messages.
1219 * main.c (redirect_output_signal): Don't call
1220 redirect_output_signal directly. Instead, call
1221 log_request_redirect_output.
1223 * utils.c (memfatal): Ditto.
1225 * progress.c (display_image): Use it.
1227 * log.c (log_set_save_context): New function: allow the caller to
1228 turn off saving log context lines.
1230 2001-12-10 Hrvoje Niksic <hniksic@arsdigita.com>
1232 * host.c (address_list_set_faulty): Uncomment a sanity check.
1234 2001-12-10 Hrvoje Niksic <hniksic@arsdigita.com>
1236 * utils.c (long_to_string): Return a pointer after where the
1238 (long_to_string): Rename to number_to_string.
1240 2001-12-10 Hrvoje Niksic <hniksic@arsdigita.com>
1242 * utils.c (path_simplify): Correctly handle the unlikely case that
1243 b starts out as path + 1.
1245 2001-12-10 Hrvoje Niksic <hniksic@arsdigita.com>
1247 * utils.c (path_simplify): Rewrite, with better comments, and
1248 without the use of strcpy to move overlapping blocks.
1250 2001-12-09 Hrvoje Niksic <hniksic@arsdigita.com>
1252 * init.c (cmd_spec_progress): Resurrect. Check whether VAL is a
1253 valid progress type before setting it.
1255 2001-12-09 Hrvoje Niksic <hniksic@arsdigita.com>
1257 * main.c (main): Remove stray debugging message.
1259 2001-12-09 Hrvoje Niksic <hniksic@arsdigita.com>
1261 * progress.c (create_image): Fix ETA padding when hours are prined.
1263 2001-12-09 Hrvoje Niksic <hniksic@arsdigita.com>
1265 * version.c: Wget 1.8 is released.
1267 2001-12-09 Hrvoje Niksic <hniksic@arsdigita.com>
1269 * url.c (reencode_string): Declare static.
1271 * res.c (registered_specs): Declare static.
1273 * progress.c (current_impl_locked): Declare static.
1275 * log.c (flush_log_p): Declare static.
1276 (needs_flushing): Ditto.
1278 * http.c (digest_authentication_encode): Declare static.
1280 * html-url.c (init_interesting): Declare static.
1282 * host.c (host_name_addresses_map): Declare static.
1284 * cookies.c (find_matching_chains): Declare static.
1286 * ftp-ls.c (ftp_parse_vms_ls): Warn about the memory leak
1289 * utils.c (path_simplify): Remove unused variable STUB_CHAR.
1291 * host.c (address_list_set_faulty): Document that INDEX is
1294 * url.c (rewrite_shorthand_url): Remove unused variable PATH.
1296 2001-12-08 Hrvoje Niksic <hniksic@arsdigita.com>
1298 * version.c: Wget 1.8-pre2 is released.
1300 2001-12-06 Hrvoje Niksic <hniksic@arsdigita.com>
1302 * progress.c (progress_handle_sigwinch): Set up the signal again.
1304 * utils.c: Include <sys/termios.h>, where Solaris defines
1307 * progress.c (bar_create): Don't use the last column on the screen.
1308 (create_image): Pad ETA to constant size. Pad SIZE to nine digits
1309 only until it exceeded them.
1311 2001-12-06 Hrvoje Niksic <hniksic@arsdigita.com>
1313 * version.c: Wget 1.8-pre1 is released.
1315 2001-12-06 Hrvoje Niksic <hniksic@arsdigita.com>
1317 * progress.c (progress_create): Make sure that, when the output is
1318 redirected, the progress implementation gets changed to the
1320 (bar_set_params): Set current_impl_locked to 1 when "force" is
1322 (progress_create): Don't change the progress implementation if
1323 current_impl_locked is non-zero.
1325 * main.c (redirect_output_signal): Call
1326 progress_schedule_redirect.
1328 * progress.c (progress_schedule_redirect): New function.
1330 2001-12-06 Hrvoje Niksic <hniksic@arsdigita.com>
1332 * log.c (logvprintf): Restructure to allow being called multiple
1334 (logprintf): Call logvprintf in a loop.
1335 (debug_logprintf): Ditto.
1337 2001-12-06 Hrvoje Niksic <hniksic@arsdigita.com>
1339 * gen_sslfunc.c (ssl_init_prng): Allow the user to disable EGD by
1340 setting egd_file it to empty string.
1342 * main.c (main): Change the option name from --sslegdsock to
1345 2001-12-06 Hrvoje Niksic <hniksic@arsdigita.com>
1347 * gen_sslfunc.c (ssl_init_prng): Make the printed message
1350 2001-12-06 Hrvoje Niksic <hniksic@arsdigita.com>
1352 * url.c (scheme_disable): New function.
1354 * main.c (main): Call ssl_init_prng from here rather than from
1355 init_ssl, so that it has a chance to disable support for https
1356 before a URL has been resolved.
1358 * gen_sslfunc.c (ssl_init_prng): Seed with rand() if all else
1360 (ssl_init_prng): Disable support for https if seeding the PRNG
1363 2001-12-06 Hrvoje Niksic <hniksic@arsdigita.com>
1365 * utils.c (read_whole_line): Handle lines beginning with \0.
1367 2001-12-05 Hrvoje Niksic <hniksic@arsdigita.com>
1369 * recur.c (convert_all_links): Guard against duplicates in
1370 downloaded_html_files.
1371 (register_download): Don't invalidate similar-looking URLs.
1372 (match_except_index): New function.
1374 2001-12-05 Hrvoje Niksic <hniksic@arsdigita.com>
1376 * utils.c (path_simplify): Document with test cases.
1378 2001-12-04 Hrvoje Niksic <hniksic@arsdigita.com>
1380 * gen_sslfunc.c: Ditto.
1382 * rbuf.c: Include <string.h>.
1384 2001-12-04 Hrvoje Niksic <hniksic@arsdigita.com>
1386 * recur.c (retrieve_tree): Check whether the URL was already
1387 downloaded before downloading it again.
1388 (descend_child_p): Renamed to download_child_p.
1389 (register_download): When one URL is downloaded to a file already
1390 "owned" by another URL, delete all references that map any URL to
1392 (register_delete_file): New function.
1393 (retrieve_tree): Use it after deleting a file.
1395 * url.c (url_parse): Re-canonicalize the URL also if the path is
1396 empty, so that e.g. "http://www.server.com" ->
1397 "http://www.server.com/".
1398 (lowercase_str): Use ISUPPER instead of !ISLOWER.
1400 * retr.c (retrieve_url): Use the canonical URL form when calling
1401 register_download().
1403 2001-12-04 Ian Abbott <abbotti@mev.co.uk>
1405 * snprintf.c (dopr): Use `unsigned int' as the second argument to
1406 va_arg when casting to `unsigned short' is intended.
1408 2001-12-04 Herold Heiko <Heiko.Herold@previnet.it>
1410 * gen_sslfunc.c: on windows provide ssl crypto random
1411 initialization through RAND_screen(); could possibly
1412 be not enough for strong ssl communication (see the
1413 relevant manual page from the openssl package).
1415 2001-12-04 Hrvoje Niksic <hniksic@arsdigita.com>
1417 * url.c (local_quote_string): Reenable quoting of question marks,
1418 but only when `--html-extension' is used.
1420 2001-12-03 Hrvoje Niksic <hniksic@arsdigita.com>
1422 * version.c: Wget 1.8-beta3 is released.
1424 2001-12-03 Hrvoje Niksic <hniksic@arsdigita.com>
1426 * snprintf.c (dopr): Cast the result of va_arg to short int and
1427 short unsigned int where these types are expected to be used.
1429 2001-12-03 Hrvoje Niksic <hniksic@arsdigita.com>
1431 * snprintf.c (dopr): Replace `short int' and `unsigned short int'
1432 with `int' when using it as the second argument to `va_arg'.
1434 2001-12-03 Hrvoje Niksic <hniksic@arsdigita.com>
1436 * host.c (address_list_new_one): New function.
1437 (lookup_host): Use it.
1439 2001-12-03 Andre Majorel <amajorel@teaser.fr>
1441 * host.c (lookup_host): Don't initialize TMPSTORE directly because
1444 2001-12-03 Hrvoje Niksic <hniksic@arsdigita.com>
1446 * ftp-basic.c (ftp_port): Don't return HOSTERR if we fail getting
1451 * http.c: No need to declare h_errno.
1453 * host.c: Declare h_errno.
1455 2001-12-02 Hrvoje Niksic <hniksic@arsdigita.com>
1457 * utils.c (file_merge): If BASE doesn't contain a slash, just
1458 return a copy of FILE.
1460 2001-12-02 Hrvoje Niksic <hniksic@arsdigita.com>
1462 * version.c: Wget 1.8-beta2 is released.
1464 2001-12-01 Hrvoje Niksic <hniksic@arsdigita.com>
1466 * ftp.c (getftp): When PWD fails, assume "/".
1468 * ftp-basic.c (ftp_syst): Fix indentation.
1470 2001-12-01 Hrvoje Niksic <hniksic@arsdigita.com>
1472 * url.c (get_urls_file): If opt.base_href is specified, merge each
1475 2001-12-01 Hrvoje Niksic <hniksic@arsdigita.com>
1477 * main.c (print_help): Don't document the removed `-nh'.
1479 2001-12-01 Hrvoje Niksic <hniksic@arsdigita.com>
1481 * url.c (url_full_path): Document better.
1483 * http.c (gethttp): Use the full path when creating digest
1486 2001-12-01 Hrvoje Niksic <hniksic@arsdigita.com>
1488 * cookies.c (path_matches): Return 0 if PREFIX doesn't begin with
1491 2001-12-01 Hrvoje Niksic <hniksic@arsdigita.com>
1493 * cookies.c (path_matches): FULL_PATH doesn't begin with '/', but
1496 2001-12-01 Hrvoje Niksic <hniksic@arsdigita.com>
1498 * cookies.c (check_domain_match): Reimplement to match Netscape's
1499 "preliminary specification" for cookies.
1501 2001-12-01 Hrvoje Niksic <hniksic@arsdigita.com>
1503 * url.c (replace_attr_refresh_hack): New function.
1504 (convert_links): Call replace_attr_refresh_hack for Refresh
1505 links. It will add the "TMOUT; URL=" junk before the link.
1507 * html-url.c (collect_tags_mapper): Set ID to the ID of the
1508 "content" attribute, not "http-equiv".
1509 (collect_tags_mapper): Don't use OFFSET to hack the raw_* values;
1510 instead, store the information that this entry belongs to a
1513 2001-12-01 Hrvoje Niksic <hniksic@arsdigita.com>
1515 * version.c: Wget 1.8-beta1 is released.
1517 2001-12-01 Hrvoje Niksic <hniksic@arsdigita.com>
1519 * recur.c (retrieve_tree): Allow -p retrievals to exceed maximum
1520 depth by more than one.
1522 2001-11-30 Hrvoje Niksic <hniksic@arsdigita.com>
1524 * retr.c (retrieve_url): Don't allow more than 20 redirections.
1526 2001-11-30 Hrvoje Niksic <hniksic@arsdigita.com>
1528 * recur.c (retrieve_tree): Skip the non-inline entries when
1529 enqueuing the children of a leaf HTML node in -p mode.
1530 (descend_url_p): Ignore opt.no_parent when in -p mode and UPOS is
1533 * html-url.c (get_urls_html): Don't accept dash_p_leaf_HTML.
1534 (collect_tags_mapper): When an entry is "inline", mark it as such.
1536 * recur.c (descend_url_p): Fix test when checking for
1537 acceptance/rejection rules.
1539 2001-10-31 Daniel BODEA <dali@dali-designs.com>
1541 * netrc.c (search_netrc): When slack_default is 0, still look for
1542 an account with matching password, just not the "default account".
1543 HTTP Authorization using .netrc should now work as expected.
1545 2001-11-30 T. Bharath <TBharath@responsenetworks.com>
1547 * http.c (persistent_available_p): Call SHUTDOWN_SSL if
1548 test_socket_open fails.
1550 2001-11-30 Hrvoje Niksic <hniksic@arsdigita.com>
1552 * progress.c (display_image): Just print one CR to reset the
1555 2001-11-30 Christian Fraenkel <c.fraenkel@gmx.net>
1557 * init.c: New command `ssl_egd_sock'.
1559 * main.c (main): New option `--sslegdsock'.
1561 * gen_sslfunc.c (ssl_init_prng): Seed the RNG using EGD.
1563 2001-11-29 Hrvoje Niksic <hniksic@arsdigita.com>
1565 * cmpt.c (memmove): Include a simple memmove implementation.
1567 2001-11-29 Hrvoje Niksic <hniksic@arsdigita.com>
1569 * headers: Guard against header files being included twice.
1571 2001-11-29 Hrvoje Niksic <hniksic@arsdigita.com>
1573 * gen-md5.c: Use unsigned char * as the buffer argument to
1576 2001-11-29 Hrvoje Niksic <hniksic@arsdigita.com>
1578 * connect.h: Declare select_fd.
1580 2001-11-29 Hrvoje Niksic <hniksic@arsdigita.com>
1582 * recur.c (descend_url_p): When resolving no_parent, compare with
1583 start_url, not parent url. Otherwise link from /a/b/ to /a/c/
1584 wouldn't be followed, although the download started from /a/.
1586 2001-01-23 Herold Heiko <Heiko.Herold@previnet.it>
1588 * config.h.ms, mswindows.h: defined HAVE_ISATTY, use _isatty for
1589 MS VC; somebody with Borland compiler please check and provide
1592 * cmpt.c: provided a usleep emulation.
1594 2001-11-29 Hrvoje Niksic <hniksic@arsdigita.com>
1596 * host.c (address_list_new): Initialize al->faulty.
1598 2001-11-29 Hrvoje Niksic <hniksic@arsdigita.com>
1600 * http.c (http_process_range): Accept the broken output of
1601 "JavaWebServer/1.1.1".
1603 2001-11-28 Hrvoje Niksic <hniksic@arsdigita.com>
1605 * progress.c (dot_set_params): If PARAMS is unspecified, use
1606 dot_style, if available.
1610 * main.c (main): Resurect --dot-style.
1612 * progress.c (dot_finish): Print the quantity if we're left at the
1615 2001-11-27 Hrvoje Niksic <hniksic@arsdigita.com>
1617 * cmpt.c (random): Removed.
1619 * retr.c (sleep_between_retrievals): Use the more portable rand()
1620 instead of random().
1622 2001-11-27 Ian Abbott <abbotti@mev.co.uk>
1624 * retr.c (retrieve_from_file): Initialize `new_file' to NULL to
1627 2001-11-27 Hrvoje Niksic <hniksic@arsdigita.com>
1629 * connect.c (connect_to_many): Use address_list_set_faulty to
1630 prevent the faulty address from being reused.
1632 * host.c (address_list_set_faulty): New function.
1633 (address_list_get_bounds): New function, instead of
1636 2001-11-27 Hrvoje Niksic <hniksic@arsdigita.com>
1638 * url.c (convert_links): Don't translate %d-%d.
1640 * main.c (print_help): Remove stray HAVE_RANDOM code.
1642 2001-11-27 Hrvoje Niksic <hniksic@arsdigita.com>
1644 * ftp.c (getftp): Improve output after sending PASV. Don't
1645 attempt to "look up" the IP address we already know; call
1646 connect_to_one directly.
1648 2001-11-27 Hrvoje Niksic <hniksic@arsdigita.com>
1650 * progress.c: Change the default progress implementation to "bar".
1652 2001-11-27 Hrvoje Niksic <hniksic@arsdigita.com>
1654 * progress.c (bar_create): Print two newlines.
1656 2001-11-27 Hrvoje Niksic <hniksic@arsdigita.com>
1658 * cmpt.c (random): New function, a simple-minded replacement for
1659 random() on systems that don't have it.
1661 2001-11-26 Hrvoje Niksic <hniksic@arsdigita.com>
1663 * config.h.in: Put a HAVE_USLEEP stub.
1665 * cmpt.c (usleep): Replacement implementation of usleep using
1668 * init.c: New option init_rate.
1670 * main.c (main): New option --limit-rate.
1672 * retr.c (limit_bandwidth): New function.
1673 (get_contents): Call it to limit the bandwidth used when
1676 * progress.c (dot_update): Would print the wrong download speed on
1677 rows other than the first one when the download was continued.
1678 (dot_finish): Ditto.
1680 2001-11-26 Ian Abbott <abbotti@mev.co.uk>
1682 * http.c (gethttp): fix undeclared variable 'err' when compiled
1685 2001-11-26 Hrvoje Niksic <hniksic@arsdigita.com>
1687 * progress.c: Don't allocate new timers; use the timing data
1688 propagated from the caller.
1690 * retr.c (get_contents): Allocate and use a timer.
1692 2001-11-26 Hrvoje Niksic <hniksic@arsdigita.com>
1694 * http.c (last_host_ip): Made into an address_list.
1695 (invalidate_persistent): Release pc_last_host_ip.
1696 (register_persistent): Use lookup_host.
1697 (persistent_available_p): Check for equality of hosts using
1698 address_list_match_all. Call address_list_release.
1699 (http_cleanup): New function.
1701 * ftp.c (getftp): Use lookup_host and connect_to_many.
1703 * http.c (gethttp): Use lookup_host and connect_to_many.
1705 * connect.c (make_connection): Removed.
1706 (connect_to_one): New function.
1707 (connect_to_many): Ditto.
1708 (set_connection_host_name): Ditto.
1710 * host.c (lookup_host): New function; new return type.
1711 (address_list_new): New function.
1712 (address_list_count): Ditto.
1713 (address_list_copy_one): Ditto.
1714 (address_list_delete): Ditto.
1715 (address_list_release): Ditto.
1716 (pretty_print_address): Ditto.
1718 2001-11-26 Hrvoje Niksic <hniksic@arsdigita.com>
1720 * recur.c (retrieve_tree): In case of followed redirection,
1721 blacklist the pre-redirection URL.
1723 2001-11-26 Hrvoje Niksic <hniksic@arsdigita.com>
1725 * recur.c (descend_redirect_p): New function.
1726 (retrieve_tree): Make sure redirections are not blindly followed.
1728 2001-11-04 Alan Eldridge <alane@geeksrus.net>
1730 * config.h.in: added HAVE_RANDOM.
1732 * options.h: added random_wait to struct options.
1734 * main.c (print_help [HAVE_RANDOM], main): added arg parsing, help
1737 * retr.c (sleep_between_retrievals) [HAVE_RANDOM]: added
1738 implementation of random wait times.
1740 * init.c (commands): added "randomwait" keyword.
1742 2001-11-25 Hrvoje Niksic <hniksic@arsdigita.com>
1744 * recur.c (descend_url_p): Be more conservative with blacklisting
1746 (convert_all_links): Print how many files have been converted, and
1749 * progress.c (create_image): Place the number of downloaded bytes
1750 right after the progress bar.
1752 * utils.c (suffix): Return a pointer into the string.
1754 2001-11-25 Hrvoje Niksic <hniksic@arsdigita.com>
1756 * url.c (convert_links): Handle CO_NULLIFY_BASE.
1758 * recur.c (retrieve_tree): Ignore download-ignorable children.
1759 (convert_all_links): Specify CO_NULLIFY_BASE when link_base_p.
1761 * html-url.c (handle_link): Return the newly created urlpos.
1762 (collect_tags_mapper): When dealing with BASE, store the base
1763 reference and mark it as download-ignorable.
1765 2001-11-25 Hrvoje Niksic <hniksic@arsdigita.com>
1767 * url.c (convert_links): Attempt to quote '?' as "%3F" when
1768 linking to local files. Given up on the attempt, as it breaks
1771 2001-11-25 Hrvoje Niksic <hniksic@arsdigita.com>
1773 * main.c (private_initialize): Removed.
1774 (main): Don't call private_initialize.
1776 * http.c: Call lookup_host.
1778 * host.c (host_init): Removed.
1779 (add_host_to_cache): Initialize host_name_address_map here, on
1781 (ngethostbyname): Commented out.
1783 * connect.c (make_connection): Remove dead code; use lookup_host.
1785 * host.c (store_hostaddress): Renamed to lookup_host and reversed
1787 Removed host_address_name_map and host_slave_master_map.
1789 2001-11-25 Hrvoje Niksic <hniksic@arsdigita.com>
1791 * progress.c (dot_create): Align the "[ skipping ... ]" string
1794 * retr.c (rate): Split into two functions: calc_rate and
1797 * progress.c (create_image): Draw a dummy progress bar even when
1798 total size is unknown.
1799 (display_image): Place the text cursor at the end of the "image".
1801 2001-11-25 Hrvoje Niksic <hniksic@arsdigita.com>
1803 * url.c (reencode_string): Use unsigned char, not char --
1804 otherwise the hex digits come out wrong for 8-bit chars such as
1806 (lowercase_str): New function.
1807 (url_parse): Canonicalize u->url if needed.
1808 (get_urls_file): Parse each URL, and return only the valid ones.
1809 (free_urlpos): Call url_free.
1810 (mkstruct): Add :port if the port is non-standard.
1811 (mkstruct): Append the query string to the file name, if any.
1812 (urlpath_length): Use strpbrk_or_eos.
1813 (uri_merge_1): Handle the cases where LINK is an empty string,
1814 where LINK consists only of query, and where LINK consists only of
1816 (convert_links): Count and report both kinds of conversion.
1817 (downloaded_file): Use a hash table, not a list.
1818 (downloaded_files_free): Free the hash table.
1820 * retr.c (retrieve_from_file): Ditto.
1822 * main.c (main): Call either retrieve_url or retrieve_tree
1823 for each URL, not both.
1825 * retr.c (register_all_redirections): New function.
1826 (register_redirections_mapper): Ditto.
1827 (retrieve_url): Register the redirections.
1828 (retrieve_url): Make the string "Error parsing proxy ..."
1831 * res.c (add_path): Strip leading slash from robots.txt paths so
1832 that the path representations are "compatible".
1833 (free_specs): Free each individual path, too.
1834 (res_cleanup): New function.
1835 (cleanup_hash_table_mapper): Ditto.
1837 * recur.c (url_queue_new): New function.
1838 (url_queue_delete): Ditto.
1839 (url_enqueue): Ditto.
1840 (url_dequeue): Ditto.
1841 (retrieve_tree): New function, replacement for recursive_retrieve.
1842 (descend_url_p): New function.
1843 (register_redirection): New function.
1845 * progress.c (create_image): Cosmetic changes.
1847 * init.c (cleanup): Do all those complex cleanups only if
1848 DEBUG_MALLOC is defined.
1850 * main.c: Removed --simple-check and the corresponding
1851 simple_host_check in init.c.
1853 * html-url.c (handle_link): Parse the URL here, and propagate the
1854 parsed URL to the caller, who would otherwise have to parse it
1857 * host.c (xstrdup_lower): Moved to utils.c.
1858 (realhost): Removed.
1861 2001-11-24 Hrvoje Niksic <hniksic@arsdigita.com>
1863 * utils.c (path_simplify): Preserver the (non-)existence of
1864 leading slash. Return non-zero if changes were made.
1866 2001-11-24 Hrvoje Niksic <hniksic@arsdigita.com>
1868 * progress.c (bar_update): Don't modify bp->total_length if it is
1871 2001-11-24 Hrvoje Niksic <hniksic@arsdigita.com>
1873 * retr.c (retrieve_url): When the redirection URL doesn't parse,
1874 print the correct error message rather than "UNKNOWN".
1876 2001-11-24 Hrvoje Niksic <hniksic@arsdigita.com>
1878 * progress.c (bar_finish): If the timer didn't record any time
1879 since the download beginning, fake 1ms.
1881 2001-11-24 Hrvoje Niksic <hniksic@arsdigita.com>
1883 * recur.c (recursive_retrieve): Fix typo.
1885 2001-11-23 Hrvoje Niksic <hniksic@arsdigita.com>
1887 * progress.c (create_image): Don't translate "%ld ".
1889 2001-11-23 Hrvoje Niksic <hniksic@arsdigita.com>
1891 * progress.c (bar_set_params): Allow the user to force the use of
1894 2001-11-23 Lemble Gregory <gregory.lemble@st.com>
1896 * gen_sslfunc.c (ssl_init_prng): New function; seed the SSL RNG.
1898 2001-11-23 Hrvoje Niksic <hniksic@arsdigita.com>
1900 * progress.c: Renamed dp_* functions to dot_* for greater clarity
1901 and consistency with bar_*.
1902 (print_download_speed): Get rid of the unneeded '@' character.
1903 (create_image): Fix download rate geometry.
1905 * progress.c (print_elapsed): Remove spurious space.
1906 (print_elapsed): Renamed to print_download_speed, since that's
1909 2001-11-23 Hrvoje Niksic <hniksic@arsdigita.com>
1911 * progress.c (bar_update): If the downloaded amount becomes larger
1912 than the expected amount, adjust the expected amount accordingly.
1914 2001-11-23 Hrvoje Niksic <hniksic@arsdigita.com>
1916 * utils.c (determine_screen_width): New function.
1918 * main.c (main): New option `--progress=TYPE'.
1919 (main): Implement compatibility with the old option `--dot-style'.
1921 * init.c: Removed cmd_spec_dotstyle -- that logic is now in
1923 (cmd_spec_progress): New function.
1925 * retr.c (get_contents): Use the progress_* functions instead of
1926 the old show_progress().
1927 (show_progress): Removed.
1928 (rate): Print "xxxx.xx K/s" instead of "KB/s". Ditto for MB/s,
1931 * progress.c (set_progress_implementation): New function.
1932 (valid_progress_implementation_p): Ditto.
1933 (progress_create): Ditto.
1934 (progress_update): Ditto.
1935 (progress_finish): Ditto.
1939 (dp_set_params): Ditto.
1940 (print_elapsed): Ditto.
1942 2001-11-22 Hrvoje Niksic <hniksic@arsdigita.com>
1944 * retr.c (show_progress): Use it.
1946 * log.c (log_set_flush): New function.
1948 2001-11-22 Hrvoje Niksic <hniksic@arsdigita.com>
1950 * utils.c (path_simplify): Don't remove trailing slashes.
1952 * ftp.c (ftp_get_listing): Use it.
1954 * utils.c (file_merge): New function.
1956 * url.c (opt_url): Removed.
1958 * recur.c (recursive_retrieve): Inline "opt_url" logic.
1960 * main.c (main): Use xfree(), not free().
1962 * url.c (rewrite_url_maybe): Renamed to rewrite_shorthand_url.
1964 * ftp.c (ccon): Move `ccon' typedef here, since it's only used
1967 * config.h.in: Include a stub for HAVE_STRPBRK.
1969 * cmpt.c (strpbrk): Include a replacement for systems without
1972 * ftp.c: Use url_set_dir and url_set_file when modifying the URL.
1974 * url.c (url_set_dir): New function.
1975 (url_set_file): Ditto.
1977 * ftp-basic.c (ftp_process_type): Process FTP type here; the URL
1978 parser makes the URL "params" available, so we can do that in this
1983 * ftp.c: Ditto; pass the local file information in `ccon'.
1985 * http.c: Get rid of the ugly kludge that had URL being replaced
1986 with the proxy URL when proxy retrieval was requested. Use a
1987 separate parameter to http_loop and gethttp for the proxy URL.
1989 * http.c: Changed to reflect the fact that local file, proxy, and
1990 referer information are no longer stored in struct url. The local
1991 file information is passed in `struct hstat' now.
1993 * url.c: Reworked URL parsing to be more regular. Reencode the
1994 URL using reencode_string.
1995 Removed non-URL-related information from struct url. This
1996 includes fields `proxy', `local', and `referer'.
1998 2001-11-22 Jochen Hein <jochen@jochen.org>
2000 * main.c (main): Split the copyright notice for easier
2003 2001-08-21 Dave Turner <dct25@hermes.cam.ac.uk>
2005 * ftp-basic.c (ftp_size): New function to send non-standard SIZE
2006 command to server to request file size.
2007 * ftp.h (ftp_size): Export it.
2008 * ftp.c (getftp): Use new ftp_size function if restoring
2009 transfer of a file with unknown size.
2011 2001-11-20 Hrvoje Niksic <hniksic@arsdigita.com>
2013 * url.c (parseurl): Don't depend on the now-obsolete TYPE.
2015 2001-11-19 Hrvoje Niksic <hniksic@arsdigita.com>
2017 * url.c (getproxy): Handle URL shorthands.
2019 2001-11-19 Hrvoje Niksic <hniksic@arsdigita.com>
2021 * main.c: Remove --wait / --waitretry backwards compatibility
2024 2001-11-19 Hrvoje Niksic <hniksic@arsdigita.com>
2026 * main.c (main): Use it.
2028 * url.c (rewrite_url_maybe): New function.
2030 2001-11-19 Hrvoje Niksic <hniksic@arsdigita.com>
2032 * url.c: Clean up handling of URL schemes.
2034 2001-05-13 Hrvoje Niksic <hniksic@arsdigita.com>
2036 * url.c: Get rid of `protostrings'.
2037 (skip_proto): Don't use protostrings.
2040 2001-11-18 Hrvoje Niksic <hniksic@arsdigita.com>
2042 * Makefile.in: Conditionally compile getopt.o.
2044 2001-11-18 Hrvoje Niksic <hniksic@arsdigita.com>
2046 * md5.h: Renamed to gnu-md5.h.
2048 * md5.c: Renamed to gnu-md5.c.
2052 * ftp-opie.c: Use the new macros.
2054 * sysdep.h: Define md5-related macros.
2056 * config.h.in: Define HAVE_SOLARIS_MD5 or HAVE_BUILTIN_MD5
2057 depending on which md5 implementation is used.
2059 2001-11-18 Hrvoje Niksic <hniksic@arsdigita.com>
2061 * res.c (res_register_specs): Initialize OLD and HP_OLD to appease
2064 2001-11-18 Hrvoje Niksic <hniksic@arsdigita.com>
2066 * http.c (gethttp): Print the whole response line when printing
2067 headers is requested.
2069 2001-05-12 Hrvoje Niksic <hniksic@arsdigita.com>
2071 * res.c: New file. Implement all RES-related code here.
2073 2001-11-18 Hrvoje Niksic <hniksic@arsdigita.com>
2075 * version.c: Wget 1.7.1 is released.
2077 2001-11-16 Hrvoje Niksic <hniksic@arsdigita.com>
2079 * headers.c (header_extract_number): Ignore trailing whitespace.
2081 2001-08-24 Ian Abbott <abbotti@mev.co.uk>
2083 * html-url.c (collect_tags_mapper): Fix bug converting links
2084 with -k option for tags with multiple link attributes by
2085 handling links in the order they appear.
2087 2001-08-15 Ian Abbott <abbotti@mev.co.uk>
2089 * ftp.c (ftp_loop_internal): Avoid a potential buffer overflow in
2090 the call to the 'rate' function by moving it past the error
2091 checking for the 'getftp' function return value.
2093 2001-11-16 Hrvoje Niksic <hniksic@arsdigita.com>
2095 * html-parse.c (advance_declaration): Use 0x22 instead of '"' or
2096 '\"'. Different compilers' assert macros are broken in different
2099 2001-09-29 Christian Fraenkel <c.fraenkel@gmx.net>
2101 * http.c (gethttp): print debug output for errors occuring during
2104 2001-11-16 Chris Seawood <cls@seawood.org>
2112 * sysdep.h: Support compilation under BEOS.
2114 2001-06-08 Edward J. Sabol <sabol@alderaan.gsfc.nasa.gov>
2116 * url.c (url_equal): Fix a memory leak when parseurl returns an
2117 error on the second URL. Also, since url_equal is not used at the
2118 moment, do not compile it.
2120 * url.h: Ditto for the prototype of url_equal.
2122 2001-11-16 Hrvoje Niksic <hniksic@arsdigita.com>
2124 * html-parse.c (map_html_tags): Support XML-style empty tags.
2126 2001-06-26 Hrvoje Niksic <hniksic@arsdigita.com>
2128 * wget.h (DO_REALLOC_FROM_ALLOCA): Check for do_realloc_newsize in
2129 loop condition because we're no longer setting SIZEVAR here.
2131 2001-06-26 Hrvoje Niksic <hniksic@arsdigita.com>
2133 * wget.h (DO_REALLOC_FROM_ALLOCA): Set SIZEVAR after the memcpy()
2134 call because it needs the old value.
2136 2001-06-18 Hrvoje Niksic <hniksic@arsdigita.com>
2138 * cookies.c (ATTR_NAME_CHAR): Allow almost any character to be in
2141 2001-06-18 Hrvoje Niksic <hniksic@arsdigita.com>
2143 * url.c (url_filename): Make sure that slashes that sneak in to
2144 u->file via query string get protected.
2145 (file_name_protect_query_string): New function.
2147 2001-06-14 Hrvoje Niksic <hniksic@arsdigita.com>
2149 * recur.c (recursive_retrieve): Also check undesirable_urls with
2152 2001-06-14 Hrvoje Niksic <hniksic@arsdigita.com>
2154 * http.c (gethttp): Search `.netrc' with real host, not the proxy
2157 2001-06-14 Hrvoje Niksic <hniksic@arsdigita.com>
2159 * sysdep.h (MAP_FAILED): Provide MAP_FAILED for systems that don't
2162 2001-06-09 Jan Prikryl <prikryl@cg.tuwien.ac.at>
2164 * ftp.h: Provide correct prototype for ftp_parse_ls().
2166 2001-06-04 Hrvoje Niksic <hniksic@arsdigita.com>
2168 * version.c: Wget 1.7 is released.
2170 2001-06-03 Karl Eichwalder <ke@suse.de>
2172 * ftp-ls.c (ftp_parse_ls): Fix typo.
2174 2001-05-27 Hrvoje Niksic <hniksic@arsdigita.com>
2176 * all: Update copyright information.
2178 2001-05-26 Hrvoje Niksic <hniksic@arsdigita.com>
2180 * http.c (gethttp): Indicate that the continued download failed
2183 2001-05-26 Hrvoje Niksic <hniksic@arsdigita.com>
2185 * version.c: Wget 1.7-pre1 is released.
2187 2001-05-26 Hrvoje Niksic <hniksic@arsdigita.com>
2189 * version.c: Updated version to 1.7-pre1.
2191 2001-05-14 Hrvoje Niksic <hniksic@arsdigita.com>
2193 * gen_sslfunc.c: Don't include <sys/time.h> directly.
2195 2001-05-14 Hrvoje Niksic <hniksic@arsdigita.com>
2197 * http.c (gethttp): Use real URL data for cookies, not the proxy
2200 2001-05-12 Hrvoje Niksic <hniksic@arsdigita.com>
2202 * main.c (print_help): Document `--no-http-keep-alive'.
2204 * utils.c (numdigit): Handle negative numbers *correctly*.
2206 * hash.c (make_nocase_string_hash_table): Use term "nocase" rather
2207 than the confusing "unsigned".
2209 * utils.c (string_set_contains): Renamed from string_set_exists.
2211 * hash.c (hash_table_contains): Renamed from hash_table_exists.
2213 * cookies.c: Move case-insensitive hash tables to hash.c.
2215 2001-05-09 Hrvoje Niksic <hniksic@arsdigita.com>
2217 * http.c (gethttp): Before concluding that the file is already
2218 fully retrieved, make sure that the file existed and `Range' was
2221 2001-05-09 Hrvoje Niksic <hniksic@arsdigita.com>
2223 * cookies.c (eliminate_dups): New function.
2224 (build_cookies_request): Use it.
2225 (build_cookies_request): Set chain_store_size after reallocating
2227 (check_domain_match): Annotated for easier future debugging.
2228 (store_cookie): In the debug message, print whether the cookie is
2231 2001-05-08 Hrvoje Niksic <hniksic@arsdigita.com>
2233 * http.c (http_loop): Reset no_truncate before deciding whether to
2235 (gethttp): Further clarify "-c conflicts with existing file" error
2236 message, based on input from Herold Heiko.
2238 2001-05-07 Hrvoje Niksic <hniksic@arsdigita.com>
2240 * http.c (http_loop): If restval is set, set no_truncate to 1
2243 2001-05-02 Jan Prikryl <prikryl@cg.tuwien.ac.at>
2245 * ftp-ls.c (ftp_parse_winnt_ls): Assure months are being correctly
2246 converted. Pointed out by <Stefan.Weil@de.heidelberg.com>.
2247 (ftp_parse_vms_ls): Ditto.
2249 2001-04-30 Hrvoje Niksic <hniksic@arsdigita.com>
2251 * init.c (cmd_address): Zero SIN before using it; apparently
2254 2001-04-29 Hrvoje Niksic <hniksic@arsdigita.com>
2256 * ftp.c (ftp_loop_internal): Don't set NO_TRUNCATE if the file is
2259 2001-04-29 Hrvoje Niksic <hniksic@arsdigita.com>
2261 * main.c (main): Make `--cookies' respect its argument.
2263 2001-04-28 Hrvoje Niksic <hniksic@arsdigita.com>
2265 * main.c (main): Removed undocumented option `--email-address'.
2267 * netrc.c: Use the latest read_whole_line.
2269 * init.c (defaults): Set opt.ftp_pass to "-wget@".
2271 * mswindows.c (pwd_cuserid): Ditto.
2273 * utils.c (pwd_cuserid): Removed.
2275 * host.c (ftp_getaddress): Removed.
2277 2001-04-28 Hrvoje Niksic <hniksic@arsdigita.com>
2279 (http_loop): Allocate space for filename_plus_orig_suffix with
2280 alloca; this is more efficient and removes the need to free it
2281 before each and every return.
2283 2001-04-28 Hrvoje Niksic <hniksic@arsdigita.com>
2285 * http.c (gethttp): Return RETRUNNEEDED when the retrieval is
2286 unneeded because the file is already there and fully downloaded,
2287 and -c is specified.
2288 (http_loop): Handle RETRUNNEEDED.
2290 * wget.h (uerr_t): New value RETRUNNEEDED.
2292 * http.c (http_loop): Set no_truncate for files that both exist
2294 (gethttp): Consider the download finished when restval >= contlen,
2295 not only when restval==contlen.
2296 (gethttp): Handle redirection before giving up due to -c.
2297 (gethttp): Clarify error message which explains that -c will not
2299 (gethttp): When returning CONTNOTSUPPORTED, don't forget to free
2300 the stuff that needs freeing and release the socket.
2302 2001-04-27 Hrvoje Niksic <hniksic@arsdigita.com>
2304 * main.c (print_help): Wget booleans accept "off", not "no".
2306 2001-04-27 Hrvoje Niksic <hniksic@arsdigita.com>
2308 * http.c (http_loop): If allow_cache is zero, always disable
2309 caching, not only when retrieving through proxy.
2313 * options.h (struct options): Rename proxy_cache to allow_cache.
2315 2001-04-27 Hrvoje Niksic <hniksic@arsdigita.com>
2317 * http.c (mktime_from_utc): Improve documentation.
2318 (http_atotm): Put format strings into a separate array.
2320 2001-04-27 Hrvoje Niksic <hniksic@arsdigita.com>
2322 * safe-ctype.h: Instead of throwing #error when isalpha is
2323 defined, redefine it to something that will throw a compile-time
2324 error if actually *used*. Do the same for the rest of the
2327 2001-04-26 Hrvoje Niksic <hniksic@arsdigita.com>
2329 * url.c (getproxy): Ignore empty proxy vars.
2331 2001-04-25 Hrvoje Niksic <hniksic@arsdigita.com>
2333 * http.c (http_loop): Would load cookies every time.
2335 * cookies.c (load_cookies): Handle cookies whose values contain
2338 2001-04-25 Hrvoje Niksic <hniksic@arsdigita.com>
2340 * utils.c: Define each DIGITS_* in one line.
2342 2001-04-25 Roger L. Beeman <beeman@cisco.com>
2344 * http.c (http_atotm): Initialize t.tm_isdst to 0.
2345 (mktime_from_utc): Prevent mktime() from having discontinuities at
2346 DST transition points.
2348 2001-04-25 Hrvoje Niksic <hniksic@arsdigita.com>
2350 * html-url.c (get_urls_html): Fix documentation.
2352 2001-04-25 Hrvoje Niksic <hniksic@arsdigita.com>
2354 * url.c (UNSAFE_CHAR): Reimplement using a static table.
2355 (url_init): Removed.
2356 (init_unsafe_char_table): Removed.
2358 2001-04-25 Hrvoje Niksic <hniksic@arsdigita.com>
2360 * snprintf.c (dopr): Replace ISDIGIT with '0' <= ch && ch <= '9'.
2362 2001-04-25 Hrvoje Niksic <hniksic@arsdigita.com>
2364 * utils.c: Document timer functions.
2366 * retr.c (rate): Use it.
2367 (rate): Print in GB/s if transfer rate exceeds 1 GB/s.
2369 * utils.c (wtimer_granularity): New function.
2371 2001-04-24 Hrvoje Niksic <hniksic@arsdigita.com>
2373 * retr.c (show_progress): Ditto.
2375 * ftp.c (getftp): Ditto.
2377 * http.c (gethttp): Use new timer functions.
2379 * utils.c (wtimer_allocate): New function.
2380 (wtimer_new): Ditto.
2381 (wtimer_delete): Ditto.
2382 (wtimer_reset): Ditto.
2383 (wtimer_elapsed): Ditto.
2385 2001-04-24 Hrvoje Niksic <hniksic@arsdigita.com>
2387 * utils.c (long_to_string): New, faster version. Favors smaller
2388 numbers; much of the calculation is now done at compile-time.
2390 2001-04-24 Hrvoje Niksic <hniksic@arsdigita.com>
2392 * utils.c (numdigit): Handle negative numbers.
2394 2001-04-23 Hrvoje Niksic <hniksic@arsdigita.com>
2396 * retr.c (show_progress): Print the download rate even when the
2397 percentages are not available.
2399 2001-04-21 Hrvoje Niksic <hniksic@arsdigita.com>
2401 * ftp.c (getftp): Adjust expected_bytes if the length is
2404 2001-04-14 Hrvoje Niksic <hniksic@arsdigita.com>
2406 * url.c: Don't declare `construct'.
2408 * hash.c (grow_hash_table): Speed up rehashing; inline storing of
2409 mappings to new locations.
2410 (hash_table_new): Make resize_threshold a field in the hash table,
2411 so we don't have to recalculate it in each hash_table_put.
2412 (grow_hash_table): Update resize_threshold.
2413 (MAX): Remove unused macro.
2414 (prime_size): Made static.
2416 2001-04-14 Hrvoje Niksic <hniksic@arsdigita.com>
2418 * retr.c (retrieve_url): Call uri_merge, not url_concat.
2420 * html-url.c (collect_tags_mapper): Call uri_merge, not
2423 * url.c (mkstruct): Use encode_string instead of xstrdup followed
2425 (path_simplify_with_kludge): Deleted.
2426 (contains_unsafe): Deleted.
2427 (construct): Renamed to uri_merge_1.
2428 (url_concat): Renamed to uri_merge.
2430 2001-04-13 Hrvoje Niksic <hniksic@arsdigita.com>
2432 * url.c (str_url): Use encode_string instead of the unnecessary
2434 (encode_string_maybe): New function, returns input string if no
2436 (encode_string): Call encode_string_maybe to do the dirty work,
2437 xstrdup if no work needed.
2439 2001-04-13 Hrvoje Niksic <hniksic@arsdigita.com>
2441 * wget.h (XDIGIT_TO_xchar): Define here.
2443 * url.c (decode_string): Use new name.
2444 (encode_string): Ditto.
2446 * http.c (XDIGIT_TO_xchar): Rename HEXD2asc to XDIGIT_TO_xchar.
2447 (dump_hash): Use new name.
2449 * wget.h: Rename ASC2HEXD and HEXD2ASC to XCHAR_TO_XDIGIT and
2450 XDIGIT_TO_XCHAR respectively.
2452 2001-04-13 Hrvoje Niksic <hniksic@arsdigita.com>
2454 * init.c: Include cookies.h.
2456 * cookies.h: Declare cookies_cleanup.
2458 * cookies.c (check_domain_match): Remove unused variable.
2459 (save_cookies): Remove extraneous argument from debug statement.
2461 * host.c (same_host): Don't call skip_url.
2463 * url.c (skip_url): Removed. Removed its calls from various
2466 2001-04-13 Hrvoje Niksic <hniksic@arsdigita.com>
2468 * cookies.c (unsigned_string_hash): Use the new code in
2469 string_hash as reference.
2471 * hash.c (hash_table_map): Allow deletion and change of the
2472 element processed by MAPFUN.
2473 (string_hash): Use the function from glib.
2475 2001-04-12 Hrvoje Niksic <hniksic@arsdigita.com>
2477 * config.h.in: Include #undef stub.
2479 * hash.c (hash_table_remove): Rewrite to actually clear deleted
2480 entries instead of just marking them as deleted.
2482 2001-04-12 Hrvoje Niksic <hniksic@arsdigita.com>
2484 * hash.h: Declare hash_table_get_pair and hash_table_count.
2486 2001-04-12 Hrvoje Niksic <hniksic@arsdigita.com>
2488 * cookies.c: Declare http_atotm.
2490 2001-04-12 Hrvoje Niksic <hniksic@arsdigita.com>
2492 * ftp-ls.c (ftp_parse_unix_ls): Use octal constants for
2493 permissions. A compiler that doesn't accept octal constants is
2494 seriously broken and shouldn't be used -- octal constants were
2497 2001-01-20 Karl Eichwalder <ke@suse.de>
2499 * Makefile.in: Provide and use DESTDIR according to the Coding
2502 2001-04-12 Hrvoje Niksic <hniksic@arsdigita.com>
2504 * ftp-ls.c (ftp_parse_vms_ls): Make seconds optional in time
2507 2001-04-11 Hrvoje Niksic <hniksic@arsdigita.com>
2509 * url.c (parseurl): Don't strip trailing slash when u->dir is "/"
2510 because that strips the *leading* slash, thus forcing relative
2513 2001-04-10 Jan Prikryl <prikryl@cg.tuwien.ac.at>
2515 * ftp.c (getftp): Convert initial FTP directory from VMS to UNIX
2516 notation for VMS servers.
2517 (ftp_retrieve_dirs): Do not prepend '/' to f->name when
2518 odir is an empty string.
2520 2001-04-10 Jan Prikryl <prikryl@cg.tuwien.ac.at>
2522 * ftp-ls.c (ftp_parse_winnt_ls): Made the fix for AM/PM more
2523 effective. Suggested by Edward J. Sabol.
2525 2001-04-10 Hrvoje Niksic <hniksic@arsdigita.com>
2527 * cookies.c (build_cookies_request): Use and sort cookies from all
2529 (build_cookies_request): Check for duplicates before generating
2530 the `Cookies' header.
2532 * main.c (main): Don't load cookies here.
2533 (main): Make loadcookies and savecookies call the correct command.
2535 * http.c (http_loop): Load cookies on-demand.
2537 2001-04-09 Hrvoje Niksic <hniksic@arsdigita.com>
2539 * http.c (gethttp): Fix indentation of SSL ifdef.
2541 2001-04-09 Hrvoje Niksic <hniksic@arsdigita.com>
2543 * ftp.c (ftp_retrieve_dirs): Don't forcibly prepend "/" to u->dir;
2544 that hack is no longer necessary.
2545 (getftp): Prepend initial directory to *non*-absolute u->dir's.
2547 2001-04-09 Hrvoje Niksic <hniksic@arsdigita.com>
2549 * init.c (cmd_file): New function.
2550 (enable_tilde_expansion): New variable.
2551 (run_wgetrc): Use it.
2554 2001-04-08 Hrvoje Niksic <hniksic@arsdigita.com>
2556 * init.c: Include cookie-related options.
2558 * main.c (main): Include cookie-specific options.
2559 (main): Load cookies before download is finished.
2560 (main): Save cookies when done.
2562 * http.c (gethttp): Process the `Set-Cookie' header.
2563 (gethttp): Include cookies in the response.
2565 * cookies.c: New file.
2567 2001-04-08 Hrvoje Niksic <hniksic@arsdigita.com>
2569 * utils.c (datetime_str): New function.
2571 2001-04-08 Jan Prikryl <prikryl@cg.tuwien.ac.at>
2573 * ftp-ls.c (ftp_parse_winnt_ls): The AM/PM change did assume
2574 12:01PM == 00:01, which was obviously wrong. Taken care of this
2577 * ChangeLog: Removed an excess conflict marker. Reformatted the
2578 entry by Philipp Thomas from 2001-03-09.
2580 * ftp-ls.c (ftp_parse_winnt_ls): Ensure that adjusted PM hours lay
2581 between 0 and 23. Elminate unused variable `sec'.
2583 2001-04-08 Hrvoje Niksic <hniksic@arsdigita.com>
2585 * hash.c (hash_table_count): New function.
2587 2001-04-06 Hrvoje Niksic <hniksic@arsdigita.com>
2589 * utils.c (read_file): Cast MAP_FAILED to char *. Enforced by
2592 2001-04-06 Hrvoje Niksic <hniksic@arsdigita.com>
2594 * config.h.in: Oops, do the namespace tweaks only on systems we
2597 2001-04-06 Hrvoje Niksic <hniksic@arsdigita.com>
2599 * hash.c: Include <string.h>.
2601 2001-04-06 Hrvoje Niksic <hniksic@arsdigita.com>
2603 * config.h.in: Define "compilation environment" options that work
2604 under Linux and Solaris. To be reviewed on other OS'es.
2606 2001-04-06 Hrvoje Niksic <hniksic@arsdigita.com>
2608 * http.c (gethttp): Prepend literal newline with `\n\'.
2610 2001-04-06 Hrvoje Niksic <hniksic@arsdigita.com>
2612 * sysdep.h: Don't define VERY_LONG_FORMAT.
2614 * utils.c (very_long_to_string): New function.
2615 (legible_very_long): Use it; don't use VERY_LONG_FORMAT.
2617 2001-04-04 Christian Fraenkel <christian.fraenkel@gmx.net>
2619 * url.c (parse_uname): Would run past the end of the string if the
2620 username was present, but the URL did not contain a slash, e.g.
2621 http://foo:bar@myhost.
2623 2001-04-03 KOJIMA Hajime <kjm@rins.ryukoku.ac.jp>
2625 * http.c (http_atotm): Use %A instead of %a to match full
2626 weekday. (On most systems there is no difference.)
2628 2001-04-03 Paul Bludov <paul@ozero.net>
2630 * mswindows.c (sleep): Use SleepEx() instead of Sleep().
2631 (ws_changetitle): Use alloca() instead of malloc() to avoid memory
2633 (ws_mypath): Use GetModuleFileName instead of argv[0].
2634 (ws_startup): Use data.wVersion for comparison.
2636 2001-04-02 Hrvoje Niksic <hniksic@arsdigita.com>
2638 * http.c (http_loop): Ditto.
2640 * ftp.c (ftp_loop_internal): Made the check whether to continue
2641 retrieval `-O'-friendly.
2643 2001-04-02 Hrvoje Niksic <hniksic@arsdigita.com>
2645 * netrc.c (parse_netrc): Don't trim the line endings explicitly;
2646 they will be handled as whitespace.
2647 (parse_netrc): Correctly handle lines that end with whitespace.
2649 2001-04-02 Hrvoje Niksic <hniksic@arsdigita.com>
2651 * retr.c (retrieve_url): New variable global_download_count used
2652 to identify first retrieval.
2654 * ftp.c (getftp): Ditto.
2656 * http.c (gethttp): Rewind opt.dfp only on first retrieval.
2658 2001-04-02 Hrvoje Niksic <hniksic@arsdigita.com>
2660 * init.c (cmd_address): Heap-allocate the address that gets stored
2661 to CLOSURE. Old code would simply assign an address on the stack.
2663 2001-04-01 Nicolas Lichtmaier <nick@debian.org>
2665 * ftp.c (ftp_get_listing): Propagate error status.
2666 (ftp_retrieve_glob): Use it.
2669 2001-04-01 Nicolas Lichtmaier <nick@debian.org>
2671 * main.c (main): Add -C to the string that is the third arg to
2674 2001-04-01 Hrvoje Niksic <hniksic@arsdigita.com>
2676 * ftp.c (getftp): Don't start the download from scratch if `-c'
2677 was specified, but the file is already fully downloaded.
2679 * http.c (gethttp): Don't truncate a pre-existing file if `-c' was
2680 specified and the server doesn't support continued download.
2681 (gethttp): Don't start the download from scratch if `-c' was
2682 specified, but the file is already fully downloaded.
2684 2001-03-31 Hrvoje Niksic <hniksic@arsdigita.com>
2686 (recursive_retrieve): Don't clear the hash tables at this point at
2687 all; it interferes with the normal operation of register_download.
2689 2001-03-31 Hrvoje Niksic <hniksic@arsdigita.com>
2691 * recur.c (recursive_retrieve): Clear the hash tables only when
2694 2001-03-31 Hrvoje Niksic <hniksic@arsdigita.com>
2696 * http.c (gethttp): Make sure the socket is closed with
2697 CLOSE_INVALIDATE before we have drained the body.
2699 2001-03-31 Hrvoje Niksic <hniksic@arsdigita.com>
2701 * retr.c (retrieve_url): Call register_download() for downloaded
2702 files and register_html() for downloaded HTML files.
2704 * recur.c (register_download): New function; register here that a
2705 file has been downloaded, rather than in recursive_retrieve().
2706 (register_html): New function; enqueue the location of HTML files
2707 here rather than in recursive_retrieve().
2709 2001-03-31 Hrvoje Niksic <hniksic@arsdigita.com>
2711 * main.c (print_help): Use multiple fputs instead of a single ugly
2713 (main): Consistently assign numbers >128 to options without a
2714 corresponding character.
2716 2001-03-09 Philipp Thomas <pthomas@suse.de>
2718 * safe-ctype.h: New file. Locale independent ctype.h replacement
2719 taken from libiberty.
2721 * safe-ctype.c: New file. Tables for above.
2723 * Makefile.in: Add safe-ctype$o to OBJS. Add dependencies for
2726 * cmpt.c: Remove include of ctype.h. Use ISSPACE instead of
2729 * ftp-basic.c: Don't include ctype.h.
2731 * ftp-ls.c: Likewise.
2735 * headers.c: Likewise.
2739 * html-parse.c: Likewise.
2741 * html-url.c: Likewise.
2747 * main.c: Likewise. Set LC_CTYPE along with LC_MESSAGES.
2749 * netrc.c: Likewise.
2751 * recur.c: Likewise.
2755 * snprintf.c: Replace ctype.h with safe-ctype.h. Use ISDIGIT
2758 * sysdep.h: Remove defines of ctype macros as they aren't needed
2761 * url.c: Don't include ctype.h.
2763 * utils.c: Likewise.
2765 * wget.h: Include safe-ctype.h.
2767 2001-03-27 Dan Harkless <wget@harkless.org>
2769 * Makefile.in: Moved top_builddir out of "User configuration
2770 section" of top Makefile and analogous spot in this one.
2772 2001-03-17 Dan Harkless <wget@harkless.org>
2774 * Makefile.in: Include @SSL_INCLUDES@ substition in INCLUDES.
2775 Define top_builddir. Link wget with libtool so the user doesn't
2776 have to supply a bunch of custom environment variables to
2777 correctly link with the OpenSSL shared libraries.
2779 2001-03-06 Hack Kampbjorn <hack@hackdata.com>
2781 * http.c (gethttp): skip :port in host header if it is the
2782 DEFAULT_HTTPS_PORT when using SSL.
2784 * url.c: move the #define of DEFAULT_HTTP_PORT, DEFAULT_FTP_PORT
2785 and DEFAULT_HTTPS_PORT to the header file so it can be use in the
2789 2001-03-01 Jonas Jensen <bones@huleboer.dk>
2791 * retr.c (show_progress): Correctly calculate the number of bytes
2792 in the first line of the download that have been actually
2793 downloaded in this run.
2795 2001-02-23 Dan Harkless <wget@harkless.org>
2797 * main.c (print_help): --help documentation for -N said it would
2798 re-download files if they had the _same_ timestamp on server.
2799 (print_help): -nr belongs in "FTP options" section of --help
2800 output, not "Recursive retrieval" section. Alphabetized FTP
2801 options by long option name.
2803 2001-02-16 Dan Harkless <wget@harkless.org>
2805 * init.c (commands): Hack Kampbjørn <hack@hackdata.com> discovered
2806 that "httpsproxy" had been inserted into commands[] out of
2807 alphabetical order, causing "BUG: unknown command `httpuser'".
2809 2001-02-13 Jan Prikryl <prikryl@cg.tuwien.ac.at>
2811 * ftp-ls.c (ftp_parse_ls): Added support of ST_MACOS (Unix-like
2812 listing without correct permissons).
2814 * ftp.h (stype): Added ST_MACOS to identify the NetPresenz MacOS
2817 * ftp.c (ftp_retrieve_list): New mirroring logic: A remote file
2818 shall be donwloaded only when it's newer than the local copy or
2819 when it has the same timeestamp but its size is different. ST_VMS
2820 and ST_MACOS as special cases that lie about file size.
2822 * ftp-ls.c (ftp_parse_ls): Support for ST_MACOS.
2824 * Makefile.in: Removed dependency on ftpparse library due to unclear
2825 copyright issues and absence of any feedback to our queries.
2827 * ftp-ls.c: Removed dependency on ftpparse library due to unclear
2828 copyright issues and absence of any feedback to our queries.
2829 (ftp_parse_ls): Added a warning message when remote server system
2830 does not seem to be suported by wget.
2831 (ftp_parse_vms_ls): New function for parsing VMS ftp
2832 server listing output.
2833 (clean_line): New function responsible for removing
2834 end-of-line characters from FTP listing texts.
2836 * ftp.c (getftp): Global variables pwd and host_type are now
2837 member of the ccon structure under names ccon.id and ccon.rs.
2839 * ftp.h (struct ccon): Added formed global variables from ftp.c,
2840 enum stype rs (remote system identification) and char *id (initial
2841 working directory), as suggested by Hrvoje.
2843 * url.c (parse_uname): Added support for passwords containing '@'
2845 (skip_uname): Ditto.
2847 2001-02-11 Hrvoje Niksic <hniksic@arsdigita.com>
2849 * ftp.c (ftp_loop): Reset con.
2851 2001-01-06 Jan Prikryl <prikryl@cg.tuwien.ac.at>
2853 * url.c (parse_uname): Added support for passwords containing '@'
2855 (skip_uname): Ditto.
2857 2001-02-11 Hack Kampbjørn <hack@hackdata.com>
2859 * url.c (parseurl): Debug-print u->ftp_type.
2861 2001-02-11 Hrvoje Niksic <hniksic@arsdigita.com>
2863 * ftp.c (ftp_loop_internal): Disable padding.
2866 * http.c (http_loop): Disable padding.
2868 * retr.c (show_progress): Use it to enable padding.
2870 * retr.c (rate): Optional parameter PAD for padding the rate.
2872 2001-02-10 Hrvoje Niksic <hniksic@arsdigita.com>
2874 * retr.c (show_progress): Make sure that the last output line
2877 2001-02-10 Jonas Jensen <bones@huleboer.dk>
2879 * retr.c (show_progress): Print the download rate along with the
2881 Along with Anders Thorsby <anders@thorsby.dk>.
2883 2001-02-10 Tim Mooney <mooney@dogbert.cc.ndsu.NoDak.edu>
2885 * ftp.h: Rename enums `command' to `wget_ftp_command' and
2886 `fstatus' to `wget_ftp_status' because old names clash with Tru64
2889 2001-02-08 Christian Fraenkel <christian.fraenkel@gmx.net>
2891 * gen_sslfunc.c: verify_callback is now static
2893 * gen_sslfunc.c (init_ssl): load certificate if specified
2895 * gen_sslfunc.c (ssl_printerr): new function
2897 * init.c: added new --sslcertfile and --sslcertkey switches
2903 * http.c (gethttp): abort when init_ssl fails
2905 2001-01-23 Herold Heiko <Heiko.Herold@previnet.it>
2907 * mswindows.h: Include <malloc.h>; it's needed for alloca().
2909 2001-01-10 Dan Harkless <wget@harkless.org>
2911 * url.c (str_url): Clarified this function's comment header after
2912 Hrvoje answered my question on the list as to when hide != 1.
2913 Also Hrvoje pointed out I need to use xstrdup() on the string literal.
2915 2001-01-06 Hrvoje Niksic <hniksic@arsdigita.com>
2917 * connect.c (bindport): Declare addrlen as int. Diagnosed by
2918 Drazen Kacar <dave@arsdigita.com>.
2921 2001-01-09 Dan Harkless <wget@harkless.org>
2923 * html-url.c: A bunch of fixup of `--page-requisites'-related
2924 comments to reflect Hrvoje's changes to my code when transplanting
2925 it into this new file, to fix spelling mistakes, to clarify, etc.
2927 * url.c (write_backup_file): Clarified a comment.
2928 (str_url): Henrik van Ginhoven pointed out on the list that we
2929 shouldn't give away the number of characters in the password by
2930 replacing each character with a 'x'. Use "<password>" instead.
2932 * ftp.c (ftp_retrieve_dirs): The bug where recursion into FTP
2933 directories didn't work if logging in put you in a directory other
2934 than "/" is fixed now. Removed the comment here warning of the bug.
2936 * main.c (print_help): --continue's description was misleading.
2937 We don't "restart", we "resume". Also, better to say
2938 "partially-downloaded file" rather than just "existing file".
2940 2001-01-06 Dan Harkless <wget@harkless.org>
2942 * ChangeLog: The '[Not in 1.6 branch.]'s were decided not to be
2943 the best way to go about my aim. Removed them in favor of:
2945 * ChangeLog-branches/1.6_branch.ChangeLog: New file.
2947 2001-01-04 Hrvoje Niksic <hniksic@arsdigita.com>
2949 * url.c (replace_attr): New function, to be used by both
2950 TO_COMPLETE and TO_RELATIVE case in convert_links.
2951 (find_fragment): New function for finding URL fragments.
2952 (replace_attr): Better handle the case where the original string
2953 is not quoted. Use find_fragment.
2954 (convert_links): Use replace_attr().
2956 2000-12-31 Dan Harkless <wget@harkless.org>
2958 * ChangeLog: Since this flat file doesn't have multiple branches,
2959 looking at the dates would make you think that things went into
2960 1.6 that actually just went into the 1.7-dev branch. Added "[Not
2961 in 1.6 branch.]" where appropriate to clarify.
2963 2000-12-30 Dan Harkless <wget@harkless.org>
2965 * ftp.c, http.c: Applied Hack Kampbjørn <hack@hackdata.com>'s
2966 patch to deal with h_errno not being defined in netdb.h under Cygwin.
2968 2000-12-18 Csaba Raduly <csaba.raduly@sophos.com>
2970 * sysdep.h: Include <malloc.h> and <io.h> under Watcom.
2972 2000-12-17 Igor Khristophorov <igor@atdot.org>
2974 * http.c (check_end): Fix test for '+' or '-'.
2976 2000-12-17 Hrvoje Niksic <hniksic@arsdigita.com>
2978 * url.c (parseurl): Rename inner loop var from i to ind to avoid
2979 clash with the function top-level-declared variable i.
2980 (str_url): Likewise, rename inner-loop i to j.
2982 * recur.c (parse_robots): Don't declare LEN at top of function.
2983 (robots_match): Renamed parameter FORBIDDEN to avoid hiding of
2986 * main.c (main): Change erroneous use of bitwise and to logical.
2988 * init.c (cmd_address): Don't heap-allocate `sin'; it can be on
2989 the stack because it will be copied to closure.
2991 Thanks to Csaba Raduly's run of PC-LINT over the sources.
2993 2000-12-17 Hrvoje Niksic <hniksic@arsdigita.com>
2995 * http.c (basic_authentication_encode): Use xmalloc(), not
2996 malloc(). Thanks to Csaba Raduly's run of PC-LINT over the
2999 2000-12-17 Csaba Raduly <csaba.raduly@sophos.com>
3001 * sysdep.h: Test for __EMX__ rather than for EMXOS2 for OS/2
3004 2000-12-17 Hrvoje Niksic <hniksic@arsdigita.com>
3006 * mswindows.c: Include <errno.h>.
3008 * gen_sslfunc.c: Include <errno.h>.
3010 * ftp-basic.c: Don't attempt to declare errno or h_errno because
3013 * main.c: Include <errno.h> because errno is used.
3017 * http.c: Include <netdb.h> for h_errno.
3019 2000-12-13 Hrvoje Niksic <hniksic@arsdigita.com>
3021 * html-parse.c (advance_declaration): MSVC assert() chokes on
3022 '\"'. Use '"' instead.
3024 2000-12-11 Hrvoje Niksic <hniksic@arsdigita.com>
3026 * utils.c (xfree_real): Removed.
3027 (xfree_debug): Just call free().
3029 * wget.h (xfree): Make it an alias for free.
3031 2000-12-11 Hrvoje Niksic <hniksic@arsdigita.com>
3033 * http.c (http_loop): Furthermore, touch output_document only if
3034 it is known to be an existing regular file.
3036 2000-12-11 Hrvoje Niksic <hniksic@arsdigita.com>
3038 * ftp.c (ftp_retrieve_list): Ditto.
3040 * http.c (http_loop): Touch output_document if that is used for
3043 2000-12-06 Hrvoje Niksic <hniksic@arsdigita.com>
3045 * http.c: Include gen_sslfunc.h after including Wget's headers.
3046 (persistent_available_p): Needed coma before `int ssl'.
3048 2000-12-06 Hrvoje Niksic <hniksic@arsdigita.com>
3050 * ftp.c (ftp_loop_internal): Ditto.
3052 * http.c (http_loop): Use it.
3054 * retr.c (sleep_between_retrievals): New function that handles the
3055 logic of opt.wait and opt.waitretry.
3057 2000-12-06 Hrvoje Niksic <hniksic@arsdigita.com>
3059 * rbuf.h: Implement only a single version of RBUF_READCHAR, using
3060 rbuf_read_bufferful when the buffer is depleted.
3062 * rbuf.c (rbuf_read_bufferful): New function.
3064 2000-12-06 Hrvoje Niksic <hniksic@arsdigita.com>
3066 * gen_sslfunc.h: Use ansi2knr style function declarations.
3068 * gen_sslfunc.c: Reformat according to the GNU coding standards.
3069 More should be done.
3071 * http.c (persistent_available_p): Place the cheap SSL test nearer
3072 the top of the function.
3073 (CLOSE_FINISH, CLOSE_INVALIDATE): Define only one version of each.
3075 2000-12-05 Hrvoje Niksic <hniksic@arsdigita.com>
3077 * url.c (init_unsafe_char_table): Reinstate space as an unsafe
3080 2000-12-03 Christian Fraenkel <christian.fraenkel@gmx.net>
3082 * Makefile.in: added gen_sslfunc object
3083 * config.h.in: added HAVE_SSL define
3084 * connect.c: changed select_fd from static int to int
3086 * gen_sslfunc.h: New file
3087 * gen_sslfunc.c: ditto
3088 * http.c: added HTTPS fuctionality
3091 * init.c: added opt.httpsproxy
3093 * rbuf.h: added alternate rbuf struct
3094 * wget.h: added CONSSLERR
3097 * http.c: Added HTTPS fuctionality.
3103 * init.c: Added opt.httpsproxy.
3107 * rbuf.h: Added alternate rbuf struct.
3109 * wget.h: Added CONSSLERR.
3113 2000-11-30 Jan Prikryl <prikryl@cg.tuwien.ac.at>
3115 * ftp-ls.c (ftp_parse_unix_ls): Added second parameter
3116 "ignore_perms" to ignore file and directory permissions for
3117 Windows NT FTP server listings.
3118 (ftp_parse_winnt_ls): New function.
3119 (ftp_parse_ls): Parses UNIX and Windows NT listings
3120 separately. Simple heuristics for distinguishing between UNIX and
3121 MS-DOS-like FTP listing provided by Windows NT FTP service.
3123 2000-11-18 Jan Prikryl <prikryl@cg.tuwien.ac.at>
3125 * ftpparse.c, ftpparse.h: New files.
3127 * ftp-ls.c (ftp_parse_ls): Use ftp_parse_unix_ls for UNIX servers
3128 only. Use ftp_parse_nonunix_ls otherwise.
3129 (ftp_parse_nonunix_ls): Stub to the ftpparse library handling all
3132 * ftp.h (stype): New enum, distinguishes UNIX, VMS, and "other"
3135 * ftp.c: New static wariables host_type, pwd, and pwd_len.
3136 (getftp): Support for VMS. Support for FTP servers that do not
3137 place you in the root directory after login.
3138 (ftp_retrieve_list): VMS is silent about the real file size, issue
3139 a more appropriate message.
3140 (ftp_get_listing): Pass host_type to ftp_parse_ls.
3142 * ftp-basic.c (ftp_pwd, ftp_syst): New functions.
3144 2000-11-30 Jan Prikryl <prikryl@cg.tuwien.ac.at>
3146 * ftp-ls.c (ftp_parse_unix_ls): Added second parameter
3147 "ignore_perms" to ignore file and directory permissions for
3148 Windows NT FTP server listings.
3149 (ftp_parse_winnt_ls): New function.
3150 (ftp_parse_ls): Parses UNIX and Windows NT listings
3151 separately. Simple heuristics for distinguishing between UNIX
3152 and MS-DOS-like FTP listing provided by Windows NT FTP service.
3154 2000-11-29 John Summerfield <summer@OS2.ami.com.au>
3156 * netrc.c (parse_netrc): Get rid of line ending.
3158 2000-11-25 Hrvoje Niksic <hniksic@arsdigita.com>
3160 * ftp.c (ftp_retrieve_list): Undo typo "fix" until resolution by
3163 2000-11-24 Karl Eichwalder <ke@suse.de>
3165 * main.c (print_help): Untabify.
3167 2000-11-23 Hrvoje Niksic <hniksic@arsdigita.com>
3169 * utils.c (xrealloc_debug): Do the unregister/register thing only
3170 if the pointer has actually changed.
3171 (xmalloc_real): Declare `static' in DEBUG_MALLOC builds.
3172 (xfree_real): Ditto.
3173 (xrealloc_real): Ditto.
3174 (xstrdup_real): Ditto.
3176 2000-11-22 Hrvoje Niksic <hniksic@arsdigita.com>
3178 * ftp.c (getftp): ftp_getaddress() returns a malloc'ed copy of the
3179 string; no need to strdup() it.
3180 (getftp): Make pwd_len a local variable.
3181 (ftp_loop): Free PWD before returning.
3183 * init.c (cleanup): Free opt.ftp_pass only if it's non-NULL.
3185 2000-11-22 Hrvoje Niksic <hniksic@arsdigita.com>
3187 * all: Use xfree() instead of free.
3189 * utils.c (xfree): New function.
3191 2000-11-21 Hrvoje Niksic <hniksic@arsdigita.com>
3193 * url.c (convert_links): HTML-quote the converted string.
3195 * utils.c (html_quote_string): Move here from ftp-ls.c
3196 (html_quote_string): Make non-static; declare in utils.h.
3197 (html_quote_string): Convert SP to  .
3199 2000-11-21 Hrvoje Niksic <hniksic@arsdigita.com>
3201 * ftp.c (getftp): Reformat Jan's code according to GNU coding
3202 standards; remove (debugging?) printf's; use '\0' for the ASCII
3203 zero character. Use alloca() instead of malloc() for
3204 inter-function temporary allocations.
3206 2000-11-18 Jan Prikryl <prikryl@cg.tuwien.ac.at>
3208 * ftpparse.c, ftpparse.h: New files.
3210 * ftp-ls.c (ftp_parse_ls): Use ftp_parse_unix_ls for UNIX servers
3211 only. Use ftp_parse_nonunix_ls otherwise.
3212 (ftp_parse_nonunix_ls): Stub to the ftpparse library handling all
3215 * ftp.h (stype): New enum, distinguishes UNIX, VMS, and "other"
3218 * ftp.c: New static wariables host_type, pwd, and pwd_len.
3219 (getftp): Support for VMS. Support for FTP servers that do not
3220 place you in the root directory after login.
3221 (ftp_retrieve_list): VMS is silent about the real file size, issue
3222 a more appropriate message.
3223 (ftp_get_listing): Pass host_type to ftp_parse_ls.
3225 * ftp-basic.c (ftp_pwd, ftp_syst): New functions.
3227 2000-11-21 Hrvoje Niksic <hniksic@arsdigita.com>
3229 * hash.c (hash_table_put): Don't overwrite deleted mappings.
3231 2000-11-21 Hrvoje Niksic <hniksic@arsdigita.com>
3233 * hash.c (find_mapping): New function.
3234 (hash_table_get): Use it.
3235 (hash_table_get_pair): Ditto.
3236 (hash_table_exists): Ditto.
3237 (hash_table_remove): Ditto.
3238 (hash_table_remove): Really delete the entry if the mapping
3239 following LOCATION is empty.
3241 * utils.c (string_set_add): Check whether the element has existed
3244 * hash.c (hash_table_get_pair): New function.
3246 2000-11-20 Hrvoje Niksic <hniksic@arsdigita.com>
3248 * http.c (http_process_type): Ignore trailing whitespace; use
3251 * recur.c (recursive_retrieve): Use the new `convert' field.
3252 (convert_all_links): Ditto.
3253 (convert_all_links): Don't respect meta_disallow_follow.
3255 * html-url.c (handle_link): Fill out link_relative_p and
3258 * url.h (struct _urlpos): Make elements more readable.
3260 * recur.c (recursive_retrieve): Call slist_prepend instead of
3262 (convert_all_links): Call slist_nreverse before iterating through
3265 * utils.c (slist_prepend): New function.
3266 (slist_nreverse): Ditto.
3268 2000-11-20 Hrvoje Niksic <hniksic@arsdigita.com>
3270 * http.c (check_end): Constify.
3272 2000-11-20 Hrvoje Niksic <hniksic@arsdigita.com>
3274 * http.c (http_loop): If username and password are known, try the
3275 `Basic' authentication scheme by default.
3277 * connect.h: Declare test_socket_open.
3279 2000-11-20 Hrvoje Niksic <hniksic@arsdigita.com>
3281 * version.c: Bump version from 1.5.3+dev to 1.7-dev.
3283 2000-11-20 Hrvoje Niksic <hniksic@arsdigita.com>
3285 * http.c (gethttp): Don't use the return value of sprintf().
3286 (gethttp): Inhibit keep-alive if opt.http_keep_alive is 0.
3288 2000-11-20 Hrvoje Niksic <hniksic@arsdigita.com>
3290 * recur.c (recursive_retrieve): Print the "so we don't load"
3291 debugging message only if we really don't load.
3293 * http.c (gethttp): Inhibit keep-alive if proxy is being used.
3294 (gethttp): Don't request keep-alive if keep-alive is inhibited.
3296 2000-11-19 Hrvoje Niksic <hniksic@arsdigita.com>
3298 * http.c (gethttp): Make the HTTP persistent connections more
3301 2000-11-19 Hrvoje Niksic <hniksic@arsdigita.com>
3303 * retr.c (get_contents): If use_expected, make sure that the
3304 appropriate amount of data is being read.
3306 * http.c (gethttp): Check for both `Keep-Alive: ...' and
3307 `Connection: Keep-Alive'.
3309 * wget.h (DEBUGP): Call debug_logprintf only if opt.debug is
3312 2000-11-19 Hrvoje Niksic <hniksic@arsdigita.com>
3314 * http.c (connection_available_p): Use it.
3316 * connect.c (test_socket_open): New function.
3318 * http.c (gethttp): Support persistent connections. Based on the
3319 ideas, and partly on code, by Sam Horrocks <sam@daemoninc.com>.
3320 (register_persistent): New function.
3321 (connection_available_p): Ditto.
3322 (invalidate_connection): Ditto.
3324 2000-11-19 Hrvoje Niksic <hniksic@arsdigita.com>
3326 * url.c (convert_links): Handle UREL2ABS case.
3328 * recur.c (recursive_retrieve): Instead of the list
3329 urls_downloaded, use hash tables dl_file_url_map and
3331 (convert_all_links): Use them to retrieve data.
3333 * host.c (clean_hosts): Free the hash tables.
3335 * main.c (private_initialize): Call host_init().
3337 * host.c (store_hostaddress): Use a saner, hash table-based data
3340 (host_init): Initialize the hash tables.
3342 2000-11-18 Hrvoje Niksic <hniksic@arsdigita.com>
3344 * utils.c (slist_append): Eviscerate NOSORT. Hash tables are now
3345 used for what the sorted slists used to be used for.
3346 (slist_contains): Don't rely on the list being sorted.
3347 (slist_append): Simplify the code.
3349 * recur.c (recursive_cleanup): Use free_string_set.
3351 * utils.c (string_set_add, string_set_exists, string_set_free):
3352 New functions for easier freeing of hash tables whose keys are
3355 * recur.c (recursive_retrieve): Use the hash table functions for
3356 storing undesirable URLs.
3360 2000-11-17 Hrvoje Niksic <hniksic@arsdigita.com>
3362 * main.c (private_initialize): Call url_init.
3363 (main): Call private_initialize.
3365 * url.c (unsafe_char_table): New table.
3366 (UNSAFE_CHAR): Use it.
3367 (init_unsafe_char_table): New function.
3368 (url_init): New function; call init_unsafe_char_table.
3370 2000-11-16 Hrvoje Niksic <hniksic@arsdigita.com>
3372 * mswindows.h: Define snprintf and vsnprintf to _snprintf and
3373 _vsnprintf respectively.
3375 2000-11-15 Hrvoje Niksic <hniksic@arsdigita.com>
3377 * config.h.in: Do the _XOPEN_SOURCE and _SVID_SOURCE things only
3380 2000-11-15 Hrvoje Niksic <hniksic@arsdigita.com>
3382 * html-url.c (handle_link): Handle HTML fragment identifiers.
3384 * recur.c (recursive_retrieve): If norobot info is respected and
3385 the file is specified not to be followed by robots, respect that.
3387 * html-url.c (collect_tags_mapper): Handle <meta name=robots
3388 content=X>. For us the important cases are where X is NONE or
3389 where X contains NOFOLLOW.
3390 (get_urls_html): Propagate that information to the caller.
3392 2000-11-13 Hrvoje Niksic <hniksic@arsdigita.com>
3394 * url.c (convert_links): Unlink the file we might be reading from
3395 before writing to it.
3396 (convert_links): Use alloca instead of malloc for
3397 filename_plus_orig_suffix.
3399 2000-11-12 Hrvoje Niksic <hniksic@arsdigita.com>
3401 * host.c (realhost): Add HOST to the list with quality==0 only if
3402 it wasn't already there.
3403 Based on analysis by Lu Guohan <feng@public.bjnet.edu.cn>.
3405 2000-11-10 Hrvoje Niksic <hniksic@arsdigita.com>
3407 * url.c (get_urls_file): Ditto.
3408 (convert_links): Ditto.
3410 * html-url.c (get_urls_html): Use read_file() instead of
3413 * utils.c (read_file): New function, instead of the old
3415 (read_file_free): Ditto.
3417 * url.c (findurl): Search only for the supported protocols.
3418 (convert_links): Use fwrite() when writing out a region of
3421 2000-11-10 Hrvoje Niksic <hniksic@arsdigita.com>
3423 * ftp-ls.c: Move html_quote_string and ftp_index here.
3425 * url.c: Remove get_urls_html, since that's now in html-url.c.
3427 * html-url.c: New file.
3429 * html-parse.c: New file.
3431 2000-11-10 Hrvoje Niksic <hniksic@arsdigita.com>
3433 * init.c (run_wgetrc): Don't bother killing off '\r' since
3434 pars_line() skips whitespace at end of line anyway.
3435 (parse_line): Oops, it didn't. Now it does.
3437 * recur.c (parse_robots): Ditto here.
3439 * ftp-ls.c (ftp_parse_unix_ls): Kill off the newline character
3440 manually because read_whole_line no longer does.
3442 * utils.c (read_whole_line): Rewrite to: a) use less memory
3443 (reallocates to needed size after work), b) work faster -->
3444 fgets() instead of getc, c) be more correct --> doesn't kill the
3445 newline character at the end of line.
3447 2000-11-10 Hrvoje Niksic <hniksic@arsdigita.com>
3449 * init.c (comind): Initialize MAX to array size - 1.
3451 2000-11-08 Hrvoje Niksic <hniksic@arsdigita.com>
3453 * url.c (construct): Changed last_slash[-1] to *(last_slash - 1).
3454 Suggested by Edward J. Sabol.
3456 2000-11-08 Hrvoje Niksic <hniksic@arsdigita.com>
3458 * url.c (construct): Handle the case where host name is not
3459 followed by a slash.
3461 2000-11-06 Hrvoje Niksic <hniksic@arsdigita.com>
3463 * init.c: commands[] need to be sorted! ("base" wasn't.)
3465 2000-11-05 Hrvoje Niksic <hniksic@arsdigita.com>
3467 * wget.h (DO_REALLOC_FROM_ALLOCA): Use braces to disambiguate
3470 2000-11-05 Hrvoje Niksic <hniksic@arsdigita.com>
3472 * url.c (construct): Insert unneeded initialization for the
3473 compiler to shut up.
3475 * config.h.in: Define _XOPEN_SOURCE to 500 to get the prototype
3476 for strptime() (*duh*). Define _SVID_SOURCE to get S_IFLNK which
3477 otherwise gets lost when you define _XOPEN_SOURCE.
3479 * utils.c (touch): Include the file name in the error message.
3482 2000-11-05 Hrvoje Niksic <hniksic@arsdigita.com>
3484 * log.c (logvprintf): Use vsnprintf() in all cases. If necessary,
3485 resize the buffer to fit the formated message. That way, messages
3486 of arbitrary size may be printed.
3487 (logvprintf): Use saved_append() to optionally log the last
3488 several lines of output.
3490 (log_close): Adapt to new data structures.
3492 (redirect_output): Print messages to stderr, not to stdout.
3494 * log.c (saved_append_1): New function. Replaces the old logging
3495 system ("log all output until 10M characters") with a new, much
3496 more reasonable one ("log last screenful of text").
3497 (saved_append): New function; call saved_append_1.
3498 (free_log_line): New function.
3500 2000-11-05 Hrvoje Niksic <hniksic@arsdigita.com>
3502 * url.c (construct): Fix comment.
3503 (find_last_char): Document.
3505 2000-11-04 Hrvoje Niksic <hniksic@arsdigita.com>
3507 * snprintf.c: New file.
3509 2000-11-03 Hrvoje Niksic <hniksic@arsdigita.com>
3511 * wget.h: If HAVE_STDARG_H is not defined, don't declare argument
3512 types to logprintf() and debug_logprintf().
3514 2000-11-02 Hrvoje Niksic <hniksic@arsdigita.com>
3516 * ftp.c (ftp_loop_internal): Hide the password from the URL when
3517 printing non-verbose. Problem spotted by Dariusz Mlynarczyk
3518 <darekm@bydg.lomac.com.pl>.
3520 2000-11-02 Junio Hamano <junio@twinsun.com>
3522 * ftp-basic.c (ftp_login): Make comparison case-insensitive.
3524 2000-11-02 Tyler Riddle <triddle@liquidmarket.com>
3526 * http.c (known_authentication_scheme_p): Recognize NTML
3528 (create_authorization_line): Treat NTML the same as `Basic'.
3530 2000-11-02 Hrvoje Niksic <hniksic@arsdigita.com>
3532 * retr.c (retrieve_url): Free url before returning.
3533 (retrieve_url): Free mynewloc before returning.
3534 Spotted by Mark A. Mankins <Mankins_Mark@prc.com>.
3536 2000-11-02 Hrvoje Niksic <hniksic@arsdigita.com>
3538 * url.c (parseurl): Remove possible reading past the end of
3539 sup_protos[]. Spotted by Mark A. Mankins <Mankins_Mark@prc.com>.
3541 2000-11-01 Hrvoje Niksic <hniksic@arsdigita.com>
3543 * main.c (main): In case of opt.downloaded overflowing, print
3544 <overflow> instead of a totally bogus random value.
3546 * retr.c (retrieve_from_file): Ditto.
3548 * recur.c (recursive_retrieve): Ditto.
3550 * main.c (main): Ditto.
3552 * http.c (http_loop): Ditto.
3554 * ftp.c (ftp_loop_internal): Use downloaded_increase() instead of
3555 `+=', and downloaded_exceeds_quota() instead of the simple-minded
3557 (ftp_retrieve_list): Ditto.
3558 (ftp_retrieve_dirs): Ditto.
3559 (ftp_retrieve_glob): Ditto.
3561 * retr.c (downloaded_increase): New function. Notice overflows of
3563 (downloaded_exceeds_quota): Make sure that opt.downloaded is not
3564 used if it overflowed.
3566 * options.h (struct options): New member downloaded_overflow.
3568 2000-11-01 Hrvoje Niksic <hniksic@arsdigita.com>
3570 * wget.h (enum): Remove extra space after last enumeration.
3572 2000-11-01 Hrvoje Niksic <hniksic@arsdigita.com>
3574 * main.c (main): Use legible_very_long() for printing
3577 * utils.c (legible_1): New function that operates on strings and
3578 does the brunt of legible()'s work.
3579 (legible): Use legible_1().
3580 (legible_very_long): New function; dump the argument with
3581 sprintf(), and call legible_1().
3583 * options.h (struct options): Use VERY_LONG_TYPE for
3586 * sysdep.h (VERY_LONG_TYPE): Define it to have a 64-bit or greater
3589 * config.h.in: Make sure that SIZEOF_LONG and SIZEOF_LONG_LONG get
3590 defined. Define HAVE_LONG_LONG if long long is available.
3592 2000-11-01 Hrvoje Niksic <hniksic@arsdigita.com>
3594 * utils.c (long_to_string): Update with a later, better version.
3596 2000-11-01 Hrvoje Niksic <hniksic@arsdigita.com>
3598 * url.c (path_simplify_with_kludge): New function.
3599 (path_simplify_with_kludge): Disable it. Instead...
3600 (parse_dir): ...make sure that at this point the right thing is
3601 done, i.e. that "query" part of the URL (?...) is always assigned
3602 to the file, never to the directory portion of the path.
3604 2000-11-01 Hrvoje Niksic <hniksic@arsdigita.com>
3606 * retr.c (retrieve_url): Detect redirection cycles.
3608 2000-11-01 Hrvoje Niksic <hniksic@arsdigita.com>
3610 * url.c (get_urls_html): Decode HTML entities using
3611 html_decode_entities.
3613 * html.c (htmlfindurl): Don't count the `#' in numeric entities
3614 (&#NNN;) as an HTML fragemnt.
3615 (html_decode_entities): New function.
3617 2000-11-01 Hrvoje Niksic <hniksic@arsdigita.com>
3619 * html.c (htmlfindurl): Fix recognition of # HTML fragments.
3621 2000-11-01 Hrvoje Niksic <hniksic@arsdigita.com>
3623 * url.c (construct): Rewritten for clarity. Avoids the
3624 unnecessary copying and stack-allocation the old version
3627 2000-10-31 Hrvoje Niksic <hniksic@arsdigita.com>
3629 * ftp.c (getftp): Ditto.
3631 * http.c (gethttp): Rewind the stream when retrying from scratch.
3633 2000-10-31 Hrvoje Niksic <hniksic@arsdigita.com>
3635 * retr.c (retrieve_url): Use url_concat() to handle relative
3636 redirections instead of /ad hoc/ code.
3638 * url.c (url_concat): New function encapsulating weird
3640 (urllen_http_hack): New function.
3641 (construct): When constructing new URLs, recognize that `?' does
3642 not form part of the file name in HTTP.
3644 2000-10-13 Adrian Aichner <adrian@xemacs.org>
3646 * retr.c: Add msec timing support for WINDOWS.
3647 * retr.c (reset_timer): GetSystemTime() on WINDOWS.
3648 * retr.c (elapsed_time): Calculate delta time to msec on WINDOWS.
3650 2000-10-27 Dan Harkless <wget@harkless.org>
3652 * retr.c (retrieve_url): Manually applied T. Bharath
3653 <TBharath@responsenetworks.com>'s patch to get wget to grok
3654 illegal relative URL redirects. Reformatted and re-commented it.
3656 2000-10-23 Dan Harkless <wget@harkless.org>
3658 * connect.c (make_connection and bindport): Manually applied Rob
3659 Mayoff <mayoff@dqd.com>'s 1.5.3 patch to add --bind-address,
3660 changing coding style to GNU's.
3662 * ftp.c (ftp_loop_internal): --delete-after wasn't implemented for
3663 files downloaded via FTP. Per a comment, .listing files were not
3664 counted towards number of bytes and files downloaded because they're
3665 deleted anyway. Well, they aren't under -nr, so count them then.
3667 * init.c: Manually applied Rob Mayoff's 1.5.3 patch to add
3668 --bind-address, alphabetizing, changing coding style to GNU's,
3669 commenting, and renaming cmd_ip_address() to cmd_address() to
3670 imply hostnames also okay.
3672 * main.c (main): --delete-after didn't delete the root of the
3673 tree. Ignore --convert-links if --delete-after was specified.
3674 Manually applied Rob Mayoff's 1.5.3 patch to add --bind-address,
3675 fixing duplicate use of added-since-1.5.3 case value.
3676 (print_help): Clarified that --delete-after deletes local files.
3677 Rob forgot to add a line for his new --bind-address option.
3679 * options.h (struct options): Manually applied Rob Mayoff's patch
3680 to add --bind-address (bind_address structure member).
3682 * recur.c (recursive_retrieve): Improved comment; added DEBUGP().
3683 Ignore --convert-links if --delete-after was specified.
3685 * retr.c (retrieve_from_file): Just added a DEBUGP().
3687 2000-10-19 Dan Harkless <wget@harkless.org>
3689 * ftp.c (ftp_loop_internal): downloaded_file() enumerators changed.
3690 (getftp): Applied Piotr Sulecki <Piotr.Sulecki@ios.krakow.pl>'s
3691 patch to work around FTP servers that incorrectly respond to the
3692 "REST" command with the remaining size rather than the total file size.
3694 * http.c (gethttp): Improved a comment and added code to tack on
3695 ".html" to text/html files without that extension when -E specified.
3696 (http_loop): Use new downloaded_file() enumerators and deal with
3697 the case of gethttp() called xrealloc() on u->local.
3699 * init.c (commands): Added new "htmlextension" command.
3700 Also renamed John Daily's cmd_quad() to the more descriptive
3701 cmd_lockable_boolean(), alpha-sorted the CMD_DECLARE()s and
3702 removed duplicate cmd_boolean() declaration.
3704 * main.c (print_help): Added my new -E / --html-extension option.
3705 (main): Undocumented --email-address option previously used -E synonym.
3706 Stole it away for the much more deserving --html-extension's use.
3708 * options.h (struct options): Added html_extension field.
3710 * url.c (convert_links): URL X that we saved as X.html locally due
3711 to -E needs to be backed up as X.orig, not X.html.orig. Added comments.
3712 (downloaded_file): Now remembers if we added .html extension to a file.
3714 * url.h (downloaded_file_t): Added extra enumerators to support above.
3715 (downloaded_file): Now takes and returns a downloaded_file_t.
3717 * wget.h (unnamed "dt" enum): Added ADDED_HTML_EXTENSION enumerator.
3719 2000-10-09 Dan Harkless <wget@harkless.org>
3721 * html.c (htmlfindurl): Added unneeded initialization to quiet warning.
3723 * main.c (print_help): Clarified what --retr-symlinks does.
3725 2000-09-15 John Daily <jdaily@cyberdude.com>
3727 * init.c: Add support for "always" and "never" values to allow
3728 .wgetrc to override commandline (useful e.g. with .pm files
3729 calling `wget --passive-ftp' when your firewall doesn't allow that).
3731 * ftp.c (getftp): passive_ftp is first option to support always/never.
3733 2000-08-30 Dan Harkless <wget@harkless.org>
3735 * ftp.c (ftp_retrieve_list): Use new INFINITE_RECURSION #define.
3737 * html.c: htmlfindurl() now takes final `dash_p_leaf_HTML' parameter.
3738 Wrapped some > 80-column lines. When -p is specified and we're at a
3739 leaf node, do not traverse <A>, <AREA>, or <LINK> tags other than
3740 <LINK REL="stylesheet">.
3742 * html.h (htmlfindurl): Now takes final `dash_p_leaf_HTML' parameter.
3744 * init.c: Added new -p / --page-requisites / page_requisites option.
3746 * main.c (print_help): Clarified that -l inf and -l 0 both allow
3747 infinite recursion. Changed the unhelpful --mirrior description
3748 to simply give the options it's equivalent to. Added new -p option.
3749 (main): Added some comments; handle new -p / --page-requisites.
3751 * options.h (struct options): Added new page_requisites field.
3753 * recur.c: Changed "URL-s" to "URLs" and "HTML-s" to "HTMLs".
3754 Calculate and pass down new `dash_p_leaf_HTML' parameter to
3755 get_urls_html(). Use new INFINITE_RECURSION #define.
3757 * retr.c: Changed "URL-s" to "URLs". get_urls_html() now takes
3758 final `dash_p_leaf_HTML' parameter.
3760 * url.c: get_urls_html() and htmlfindurl() now take final
3761 `dash_p_leaf_HTML' parameter.
3763 * url.h (get_urls_html): Now takes final `dash_p_leaf_HTML' parameter.
3765 * wget.h: Added some comments and new INFINITE_RECURSION #define.
3767 2000-08-23 Dan Harkless <wget@harkless.org>
3769 * main.c (print_help): -B / --base was not mentioned.
3771 2000-08-22 Dan Harkless <wget@harkless.org>
3773 * main.c (print_help): Modified -nc description to mention that it
3774 also prevents the creation of multiple versions of the same file
3775 with ".<number>" suffixes.
3777 2000-07-14 Jan Prikryl <prikryl@cg.tuwien.ac.at>
3779 * retr.c (retrieve_url): Consistently strdup opt.referer when
3782 2000-06-09 Dan Harkless <wget@harkless.org>
3784 * main.c (print_help): --help output for --waitretry was over 80 cols.
3786 2000-06-09 Hrvoje Niksic <hniksic@iskon.hr>
3788 * url.c (encode_string): Fix comment.
3789 Suggested by Herold Heiko <Heiko.Herold@previnet.it>.
3791 2000-06-01 Const Kaplinsky <const@ce.cctpu.edu.ru>
3793 * ftp.c (ftp_retrieve_list): Change permissions only on plain
3796 2000-06-01 Hrvoje Niksic <hniksic@iskon.hr>
3798 * url.c (str_url): Print the port number only if it's different
3799 from the default port number for that protocol.
3801 2000-05-22 Dan Harkless <wget@harkless.org>
3803 * main.c (print_help): Added --help line for Damir Dzeko
3804 <ddzeko@zesoi.fer.hr>'s until-now-undocumented --referer option.
3805 Removed comments that --referer and --waitretry were undocumented.
3806 Changed "`.wgetrc' command" to "`.wgetrc'-style command" on --help
3809 2000-05-18 Hrvoje Niksic <hniksic@iskon.hr>
3811 * ftp.c (getftp): Ditto.
3813 * http.c (gethttp): Check for return value of fclose/fflush.
3815 2000-04-12 Hrvoje Niksic <hniksic@iskon.hr>
3817 * host.c (store_hostaddress): Instead of shifting ADDR, start
3818 copying from the correct address.
3820 2000-04-12 Hrvoje Niksic <hniksic@iskon.hr>
3822 * http.c (gethttp): Don't free REQUEST -- it was allocated with
3824 Pointed out by Gisle Vanem <gvanem@eunet.no>.
3826 2000-04-04 Dan Harkless <wget@harkless.org>
3828 * host.c (store_hostaddress): R. K. Owen's patch introduces a
3829 "left shift count >= width of type" warning on 32-bit
3830 architectures. Got rid of it by tricking the compiler w/ a variable.
3832 * url.c (UNSAFE_CHAR): The macro didn't include all the illegal
3833 characters per RFC1738, namely everything above '~'. It also
3834 generated a warning on OSes where char =~ unsigned char. Fixed.
3836 1998-10-17 Hrvoje Niksic <hniksic@srce.hr>
3838 * http.c (http_process_type): Removed needless strdup(), a memory
3841 1998-09-25 Hrvoje Niksic <hniksic@srce.hr>
3843 * html.c (htmlfindurl): Set PH to the first occurrence of `#'.
3845 1998-09-25 Simon Munton <simonm@m4data.co.uk>
3847 * init.c (wgetrc_file_name): Don't free HOME under Windows.
3849 1998-12-01 "R. K. Owen" <rkowen@Nersc.GOV>
3851 * host.c (store_hostaddress): Fix for big endian 64-bit machines.
3853 1998-12-01 Hrvoje Niksic <hniksic@srce.hr>
3855 * url.c (UNSAFE_CHAR): New macro.
3856 (contains_unsafe): Use it.
3857 (encode_string): Ditto.
3859 1998-12-01 Hrvoje Niksic <hniksic@srce.hr>
3861 * main.c (i18n_initialize): Use LC_MESSAGES only if available.
3863 2000-03-31 Hrvoje Niksic <hniksic@srce.hr>
3865 * Use TOUPPER/TOLOWER.
3867 1998-12-22 Alexander V. Lukyanov <lav@yars.free.net>
3869 * ftp-opie.c (btoe): Zero-terminate OSTORE.
3871 2000-03-21 Hrvoje Niksic <hniksic@iskon.hr>
3873 * wget.h (DO_REALLOC_FROM_ALLOCA): Ditto.
3875 * sysdep.h (ISALNUM): New macro.
3879 2000-03-10 Dan Harkless <wget@harkless.org>
3881 * html.c (idmatch): Implemented checking of my new --follow-tags
3882 and --ignore-tags options.
3884 * init.c (commands): Added comment reminding people adding new
3885 entries doing allocation to add corresponding freeing in cleanup().
3886 (commands): Added new followtags and ignoretags commands.
3887 (cleanup): Free storage for new followtags and ignoretags.
3889 * main.c: Use of "comma-separated list" was random -- normalized
3890 it. Did some alphabetization. Added comments pointing out
3891 "Options without arguments" and "Options accepting an argument"
3892 sections of long_options[]. Added new options --follow-tags and
3893 -G / --ignore-tags. Added comment that Damir's --referer is
3894 currently undocumented. Added comment that Heiko's --waitretry is
3895 partially undocumented (mentioned in --help but not in
3896 wget.texi). Moved improperly sorted 24, 129, and 'G' cases.
3898 * options.h (struct options): Added new fields follow_tags and
3901 * wget.h: Added "#define EQ 0" so we can say "strcmp(a, b) == EQ".
3903 2000-03-02 Dan Harkless <wget@harkless.org>
3905 * ftp.c (ftp_loop_internal): Heiko introduced "suggest explicit
3906 braces to avoid ambiguous `else'" warnings. Eliminated them.
3908 * http.c (gethttp): Dan Berger's query string patch is totally
3909 bogus. If you have two different URLs, gen_page.cgi?page1 and
3910 get_page.cgi?page2, they'll both be saved as get_page.cgi and the
3911 second will overwrite the first. Also, parameters to implicit
3912 CGIs, like "http://www.host.com/db/?2000-03-02" cause the URLs to
3913 be printed with trailing garbage characters, and could seg fault.
3914 Backing out the patch, which Dan B. informed me by email was just
3915 a kludge to download StarOffice from Sun made necessary due to
3916 wget's unconditional escaping of certain characters (room for an
3918 (http_loop): Heiko introduced "suggest explicit braces to avoid
3919 ambiguous `else'" warnings. Eliminated them.
3921 * main.c: Heiko's --wait / --waitretry backwards compatibility
3922 code looks to have been totally untested -- automatic variable
3923 'wr' was used without being initialized, and a long int was passed
3924 into setval()'s char* val parameter.
3926 * recur.c (parse_robots): Applied Edward J. Sabol
3927 <sabol@alderaan.gsfc.nasa.gov>'s patch for Guan Yang's reported
3928 problem with "User-agent:<space>*<space>" lines in robots.txt.
3930 * url.c (parseurl, str_url): Removing Dan Berger's code (see
3931 http.c above for explanation).
3933 1999-08-25 Heiko Herold <Heiko.Herold@previnet.it>
3935 * ftp.c: Respect new option waitretry.
3937 2000-01-30 Damir Dzeko <ddzeko@zesoi.fer.hr>
3939 * http.c (gethttp): Send custom Referer, if required.
3941 1999-09-24 Charles G Waldman <cgw@fnal.gov>
3943 * netrc.c (parse_netrc): Allow passwords to contain spaces.
3945 * netrc.c (parse_netrc): New function.
3947 1999-09-17 Dan Berger <dberger@ix.netcom.com>
3949 * http.c (gethttp): Send it.
3951 * url.c (parseurl): Detect query string in HTTP URL-s.
3952 (str_url): Print it.
3954 2000-03-02 HIROSE Masaaki <hirose31@t3.rim.or.jp>
3956 * html.c (html_allow): Add <link href=...> and <script src=...>.
3958 1999-05-02 andrew deryabin <djsf@softhome.net>
3960 * http.c (gethttp): Specify port in `Host' header only if it's
3963 1998-11-03 Edward J. Sabol <sabol@alderaan.gsfc.nasa.gov>
3965 * recur.c (recursive_retrieve): If a finite maximum depth is
3966 specified, and we're are already at that depth, don't download the
3967 HTML file for parsing.
3969 2000-03-01 Dan Harkless <wget@harkless.org>
3971 * ftp.c (ftp_loop_internal): Call new downloaded_file() function,
3972 even though we don't do conversion on HTML files retrieved via
3973 FTP, so _current_ usage of downloaded_file() makes this call unneeded.
3974 (ftp_retrieve_list): Added a comment saying where we need to
3975 stat() a .orig file if FTP'd HTML file conversion is ever implemented.
3976 (ftp_retrieve_list): "Local file '%s' is more recent," is sometimes
3977 a lie -- reworded as "Server file no newer than local file '%s' --".
3979 * http.c (http_loop): Fixed a typo and clarified a comment.
3980 (http_loop): When -K and -N are specified together, compare size
3981 and timestamp of server file X against local file X.orig (if
3982 extant) rather than converted local file X.
3983 (http_loop): "Local file '%s' is more recent," is sometimes a lie
3984 -- reworded as "Server file no newer than local file '%s' --".
3985 (http_loop): Call new downloaded_file() function to prevent
3986 wrongful overwriting of .orig file when -N is specified.
3988 * url.c (convert_links): When -K specified, only rename X to
3989 X.orig if downloaded_file() returns TRUE. Otherwise when we skip
3990 file X due to -N, we clobber an X.orig from a previous invocation.
3991 (convert_links): Call the failsafe xstrdup(), not the real strdup().
3992 (convert_links): Added a note asking anyone who understands how
3993 multiple URLs can correspond to a single file to comment it.
3994 (downloaded_file): Added this new function.
3996 * url.h (downloaded_file): Added prototype for this new function
3997 as well as its downloaded_file_t enum type.
3999 * wget.h (boolean): Added this new typedef and TRUE and FALSE #defines.
4001 2000-02-29 Dan Harkless <wget@harkless.org>
4003 * version.c: Upped version to developer-only "1.5.3+dev".
4005 2000-02-18 Dan Harkless <wget@harkless.org>
4007 * init.c (backup_converted): Added this new option.
4009 * main.c (-K / --backup-converted): Added this new option.
4011 * options.h (backup_converted): Added this new option.
4013 * url.c (convert_links): When backup_converted is specified, save
4014 file X as X.orig before converting.
4016 * url.h (urlpos): Fixed typo -- said "Rekative" instead of "Relative".
4018 1998-09-21 Hrvoje Niksic <hniksic@srce.hr>
4020 * version.c: Wget 1.5.3 is released.
4022 1998-09-21 Hrvoje Niksic <hniksic@srce.hr>
4024 * host.c (ftp_getaddress): Don't warn when reverse-lookup of local
4025 address doesn't yield FQDN.
4027 1998-09-21 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
4029 * cmpt.c (strerror): Fix declaration of sys_errlist.
4031 1998-09-11 Hrvoje Niksic <hniksic@srce.hr>
4033 * main.c (main): Don't use an array subscript as the first
4034 argument to STRDUP_ALLOCA.
4035 From Kaveh R. Ghazi.
4037 1998-09-11 Szakacsits Szabolcs <szaka@sienet.hu>
4039 * html.c (htmlfindurl): Download table background.
4041 1998-09-11 Hans Grobler <grobh@conde.ee.sun.ac.za>
4043 * init.c (parse_line): Would free *com before allocating it.
4044 (parse_line): Would free com instead of *com.
4046 1998-09-10 Howard Gayle <howard@fjst.com>
4048 * url.c (get_urls_html): Would drop the last character of the
4051 1998-09-10 Hrvoje Niksic <hniksic@srce.hr>
4053 * http.c (http_loop): Don't print status code if quiet.
4055 1998-09-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4057 * log.c: Use <stdarg.h> only when __STDC__.
4059 1998-09-10 Adam D. Moss <adam@foxbox.org>
4061 * html.c (htmlfindurl): Download <layer src=...>.
4063 1998-09-10 Howard Gayle <howard@fjst.com>
4065 * ftp.c (ftp_retrieve_list): Don't update the time stamp of a file
4068 1998-06-27 Hrvoje Niksic <hniksic@srce.hr>
4070 * utils.c: Include <libc.h> on NeXT.
4072 1998-06-26 Heinz Salzmann <heinz.salzmann@intermetall.de>
4074 * url.c (get_urls_html): Fix calculation of URL position.
4076 1998-06-23 Hrvoje Niksic <hniksic@srce.hr>
4078 * version.c: Wget 1.5.2 is released.
4080 1998-06-23 Dave Love <d.love@dl.ac.uk>
4082 * ftp.c, init.c, netrc.c: Include errno.h.
4084 * http.c: Include errno.h and time header.
4086 * Makefile.in (exext): Define.
4087 (install.bin, uninstall.bin): Use it.
4089 1998-06-21 Hrvoje Niksic <hniksic@srce.hr>
4091 * http.c (http_loop): Don't attempt to compare local and remote
4092 sizes if the remote size is unknown.
4094 1998-06-16 Hrvoje Niksic <hniksic@srce.hr>
4096 * url.c (get_urls_html): Use malloc() instead of alloca in the
4099 1998-06-13 Hrvoje Niksic <hniksic@srce.hr>
4101 * version.c: Wget 1.5.2-b4 is released.
4103 1998-06-13 Hrvoje Niksic <hniksic@srce.hr>
4105 * url.c (get_urls_html): Ignore spaces before and after the URI.
4107 1998-06-08 Wanderlei Antonio Cavassin <cavassin@conectiva.com.br>
4109 * ftp.c (getftp): Translate `done'.
4111 1998-06-06 Hrvoje Niksic <hniksic@srce.hr>
4113 * version.c: Wget 1.5.2-b3 is released.
4115 1998-06-06 Alexander Kourakos <awk@bnt.com>
4117 * init.c (cleanup): Close dfp, don't free it.
4119 1998-06-06 Hrvoje Niksic <hniksic@srce.hr>
4121 * utils.c (make_directory): Twiddle.
4123 * config.h.in: Added template for access().
4125 1998-06-05 Mathieu Guillaume <mat@cythere.com>
4127 * html.c (htmlfindurl): Download <input src=...>
4129 1998-06-03 Hrvoje Niksic <hniksic@srce.hr>
4131 * utils.c (file_exists_p): Use access() with two arguments.
4133 1998-05-27 Martin Kraemer <Martin.Kraemer@mch.sni.de>
4135 * netrc.c (parse_netrc): Correct logic.
4137 1998-05-27 Hrvoje Niksic <hniksic@srce.hr>
4139 * ftp.c (getftp): Added `break'; suggested by Lin Zhe Min
4140 <ljm@ljm.wownet.net>.
4142 1998-05-24 Hrvoje Niksic <hniksic@srce.hr>
4144 * version.c: Wget 1.5.2-b2 is released.
4146 1998-05-18 Juan Jose Rodriguez <jcnsoft@jal1.telmex.net.mx>
4148 * mswindows.h: Don't translate mkdir to _mkdir under Borland.
4150 1998-05-17 Hrvoje Niksic <hniksic@srce.hr>
4152 * retr.c (elapsed_time): Return correct value when
4153 HAVE_GETTIMEOFDAY is undefined.
4155 1998-05-13 Hrvoje Niksic <hniksic@srce.hr>
4157 * version.c: Wget 1.5.2-b1 is released.
4159 1998-05-08 Hrvoje Niksic <hniksic@srce.hr>
4161 * getopt.c (_getopt_internal): Use exec_name instead of argv[0].
4162 (_getopt_internal): Don't translate `#if 0'-ed strings.
4164 1998-05-06 Douglas E. Wegscheid <wegscd@whirlpool.com>
4166 * mswindows.c (ws_handler): Use fork_to_background().
4168 1998-05-05 Hrvoje Niksic <hniksic@srce.hr>
4170 * version.c: Wget 1.5.1 is released.
4172 1998-05-05 Hrvoje Niksic <hniksic@srce.hr>
4174 * http.c (parse_http_status_line): Avoid `minor' and `major'
4177 1998-05-02 Hrvoje Niksic <hniksic@srce.hr>
4179 * utils.c (mkdirhier): Renamed to make_directory.
4181 1998-05-01 Hrvoje Niksic <hniksic@srce.hr>
4183 * mswindows.c (fork_to_background): Define under Windows.
4185 * utils.c (fork_to_background): New function.
4187 * html.c (htmlfindurl): Removed rerdundant casts.
4189 1998-05-01 Douglas E. Wegscheid <wegscd@whirlpool.com>
4191 * mswindows.c (ws_mypath): Cache the path.
4193 1998-04-30 Douglas E. Wegscheid <wegscd@whirlpool.com>
4195 * ftp.h: Prefix enum ftype members with FT_.
4197 * ftp-ls.c, ftp.c, html.h: Adjust accordingly.
4199 * mswindows.h: Use stat under Borland, _stat under MSVC.
4201 1998-04-28 Hrvoje Niksic <hniksic@srce.hr>
4203 * http.c (known_authentication_scheme_p): New function.
4204 (gethttp): Handle authorization more correctly.
4206 * ftp-basic.h: Removed.
4210 * utils.c: Include <unistd.h> before <pwd.h>; needed under SunOS
4212 (numdigit): Use `while' loop.
4214 * http.c (create_authorization_line): Detect authentication
4215 schemes case-insensitively.
4217 * http.c (extract_header_attr): Use strdupdelim().
4218 (digest_authentication_encode): Move declaration of local
4219 variables to smaller scope.
4220 (digest_authentication_encode): Reset REALM, OPAQUE and NONCE.
4221 (create_authorization_line): Detect authentication schemes
4224 * utils.c (touch): Constify.
4226 * http.c (gethttp): Report a nicer error when no data is received.
4228 * rbuf.h (RBUF_READCHAR): Ditto.
4230 * ftp-basic.c (ftp_response): Use sizeof.
4232 1998-04-27 Hrvoje Niksic <hniksic@srce.hr>
4234 * retr.c (print_percentage): EXPECTED is long, not int.
4235 (print_percentage): Use floating-point arithmetic to avoid
4236 overflow with large files' sizes multiplied with 100.
4238 1998-04-27 Gregor Hoffleit <flight@mathi.uni-heidelberg.de>
4240 * config.h.in: Added pid_t stub.
4242 * sysdep.h (S_ISREG): Moved here from mswindows.h (NeXT doesn't
4245 1998-04-20 Hrvoje Niksic <hniksic@srce.hr>
4247 * version.c: Wget 1.5.0 is released.
4249 1998-04-18 Hrvoje Niksic <hniksic@srce.hr>
4251 * url.c (str_url): Ditto.
4253 * ftp-basic.c (ftp_rest): Use new name.
4255 * utils.c (long_to_string): Renamed from prnum().
4257 1998-04-16 Hrvoje Niksic <hniksic@srce.hr>
4259 * version.c: Wget 1.5-b17 is released.
4261 1998-04-08 Hrvoje Niksic <hniksic@srce.hr>
4263 * headers.c (header_get): New argument FLAGS.
4265 * http.c (gethttp): If request is malformed, bail out of the
4267 (gethttp): Check for empty header *after* the status line checks.
4268 (gethttp): Disallow continuations for status line.
4270 1998-04-08 Hrvoje Niksic <hniksic@srce.hr>
4272 * version.c: Wget 1.5-b16 is released.
4274 1998-04-08 Hrvoje Niksic <hniksic@srce.hr>
4276 * init.c (commands): Renamed `always_rest' to `continue'.
4278 1998-04-05 Hrvoje Niksic <hniksic@srce.hr>
4282 * log.c (logputs): New argument.
4283 (logvprintf): Ditto.
4286 1998-04-04 Hrvoje Niksic <hniksic@srce.hr>
4288 * http.c (http_atotm): Update comment.
4290 * main.c (i18n_initialize): Set LC_MESSAGES, not LC_ALL.
4292 * wget.h: Renamed ENABLED_NLS to HAVE_NLS.
4294 * main.c (i18n_initialize): New function.
4297 * log.c: Include <unistd.h>.
4299 * retr.c (show_progress): Cast alloca to char *.
4301 1998-04-04 Hrvoje Niksic <hniksic@srce.hr>
4303 * version.c: Wget 1.5-b15 is released.
4305 1998-04-04 Hrvoje Niksic <hniksic@srce.hr>
4307 * utils.h: Declare file_non_directory_p().
4309 1998-04-03 Hrvoje Niksic <hniksic@srce.hr>
4311 * main.c (main): It's `tries', not `numtries' now.
4313 1998-04-01 Hrvoje Niksic <hniksic@srce.hr>
4315 * init.c (getperms): Removed.
4317 1998-04-01 Tim Charron <tcharron@interlog.com>
4319 * log.c (logvprintf): Don't use ARGS twice.
4321 1998-04-01 John <john@futuresguide.com>
4323 * mswindows.c: Cleaned up.
4325 1998-04-01 Hrvoje Niksic <hniksic@srce.hr>
4327 * version.c: Wget 1.5-b14 is released.
4329 1998-04-01 Hrvoje Niksic <hniksic@srce.hr>
4331 * ftp-opie.c (STRLEN4): New macro.
4334 1998-04-01 Junio Hamano <junio@twinsun.com>
4336 * http.c: Document all the Digest functions.
4338 1998-04-01 Hrvoje Niksic <hniksic@srce.hr>
4340 * utils.c (file_non_directory_p): Renamed from isfile().
4342 * mswindows.h (S_ISREG): New macro, suggested by Tim Adam.
4344 1998-03-31 Hrvoje Niksic <hniksic@srce.hr>
4346 * utils.c (mkdirhier): Use 0777 instead of opt.dirmode.
4348 * init.c (cmd_spec_dotstyle): Use 48 dots per line for binary
4350 (cmd_permissions): Removed.
4352 * config.h.in: Add template for WORDS_BIGENDIAN.
4354 1998-03-31 Junio Hamano <junio@twinsun.com>
4356 * http.c (HEXD2asc): New macro.
4357 (dump_hash): Use it.
4359 1998-03-31 Hrvoje Niksic <hniksic@srce.hr>
4361 * version.c: Wget 1.5-b13 is released.
4363 1998-03-31 Hrvoje Niksic <hniksic@srce.hr>
4365 * main.c (main): Don't try to use `com'.
4367 1998-03-30 Hrvoje Niksic <hniksic@srce.hr>
4369 * init.c (cmd_permissions): New function.
4371 1998-03-30 Hrvoje Niksic <hniksic@srce.hr>
4373 * version.c: Wget 1.5-b12 is released.
4375 1998-03-30 Hrvoje Niksic <hniksic@srce.hr>
4377 * init.c (commands): Renamed `numtries' to `tries'.
4378 (cmd_spec_debug): Removed.
4379 (home_dir): Under Windows, return `C:\' if HOME is undefined.
4381 1998-03-29 Hrvoje Niksic <hniksic@srce.hr>
4383 * config.h.in: Define _XOPEN_SOURCE.
4385 * init.c (check_user_specified_header): New function.
4386 (cmd_spec_header): Use it.
4387 (cmd_spec_useragent): New function.
4389 1998-03-29 Hrvoje Niksic <hniksic@srce.hr>
4391 * version.c: Wget 1.5-b11 is released.
4393 1998-03-28 Hrvoje Niksic <hniksic@srce.hr>
4395 * wget.h: Include <libintl.h> only if NLS is enabled.
4397 1998-03-26 Hrvoje Niksic <hniksic@srce.hr>
4399 * options.h (struct options): Made `wait' a long.
4400 (struct options): Ditto for `timeout'.
4402 1998-03-19 Hrvoje Niksic <hniksic@srce.hr>
4404 * utils.c (exists): Renamed to file_exists_p.
4405 (file_exists_p): Use access() if available.
4407 1998-03-17 Hrvoje Niksic <hniksic@srce.hr>
4409 * utils.c (memfatal): Set save_log_p to 0 to avoid potential
4412 * log.c: do_logging -> save_log_p.
4414 * config.h.in: Added template for HAVE_VSNPRINTF.
4416 1998-03-16 Hrvoje Niksic <hniksic@srce.hr>
4420 * http.c: Protect declaration against non-ANSI compiler.
4422 * log.c (logvprintf): Use vsnprintf() if available.
4424 * getopt.c (main): Don't translate test stuff.
4426 1998-03-16 Hrvoje Niksic <hniksic@srce.hr>
4428 * version.c: Wget 1.5-b10 is released.
4430 1998-03-11 Hrvoje Niksic <hniksic@srce.hr>
4432 * ftp.c (getftp): Don't translate "CWD %s".
4434 * wget.h (GCC_FORMAT_ATTR): Renamed from FORMAT_ATTR.
4436 1998-03-07 Hrvoje Niksic <hniksic@srce.hr>
4438 * ftp-opie.c (btoe): Use memcpy() instead of strncat().
4440 * log.c (logputs): New function.
4441 (logvprintf): Renamed from vlogmsg; use logputs().
4443 * retr.c (show_progress): Print `[100%]' when the retrieval is
4446 * init.c (run_wgetrc): Use FILE, not PATH.
4447 (wgetrc_file_name): Ditto.
4449 1998-03-07 Tim Adam <tma@osa.com.au>
4451 * recur.c (parse_robots): Correctly reset `entries' on empty
4454 1998-03-07 Hrvoje Niksic <hniksic@srce.hr>
4456 * init.c (cmd_spec_debug): Use cmd_boolean().
4458 1998-02-23 Hrvoje Niksic <hniksic@srce.hr>
4460 * http.c (gethttp): Create proxy-authorization correctly.
4462 1998-02-22 Hrvoje Niksic <hniksic@srce.hr>
4466 * getopt.c: Use ANSI function definitions.
4468 * ftp-opie.c: New file.
4470 * options.h: Don't redefine EXTERN.
4472 * init.c: Sort it correctly.
4474 1998-02-22 Hrvoje Niksic <hniksic@srce.hr>
4476 * version.c: Wget 1.5-b9 is released.
4478 1998-02-22 Hrvoje Niksic <hniksic@srce.hr>
4480 * recur.c (recursive_retrieve): Reset `first_time'.
4482 * ftp.c (getftp): Added `default' clause to switches of uerr_t.
4484 * rbuf.c (rbuf_peek): Simplified.
4485 (rbuf_flush): Use MINVAL.
4487 * wget.h (MINVAL): Moved from url.h.
4489 * rbuf.h (RBUF_FD): New macro.
4491 * url.c (add_url): Add to the head of the list.
4493 * ftp.c (ftp_retrieve_list): Set the permissions to downloaded
4495 (getftp): Set the default permissions to 0600.
4497 1998-02-21 Hrvoje Niksic <hniksic@srce.hr>
4499 * url.c (get_urls_html): Ditto.
4500 (convert_links): Ditto.
4502 * recur.c (parse_robots): Ditto.
4504 * html.c (ftp_index): Ditto.
4506 * ftp-ls.c (ftp_parse_unix_ls): Open file as binary.
4508 * init.c (defaults): Initialize `opt' to zero via memset.
4510 * http.c (digest_authentication_encode): goto considered harmful.
4512 1998-02-19 Hrvoje Niksic <hniksic@srce.hr>
4514 * ftp.c (delelement): Simplify and fix leak.
4516 1998-02-18 Hrvoje Niksic <hniksic@srce.hr>
4518 * http.c (dump_hash): Use HEXD2ASC instead of home-grown stuff.
4520 * url.h (HEXD2ASC): Removed warning.
4522 * init.c (comind): Use binary search.
4523 (commands): Reorganized.
4525 (cmd_boolean): New function.
4526 (cmd_number): Ditto.
4527 (cmd_number_inf): Ditto.
4528 (cmd_string): Ditto.
4529 (cmd_vector): Ditto.
4530 (cmd_directory_vector): Ditto.
4533 (cmd_spec_debug): Ditto.
4534 (cmd_spec_dirmode): Ditto.
4535 (cmd_spec_dirstruct): Ditto.
4536 (cmd_spec_dotstyle): Ditto.
4537 (cmd_spec_header): Ditto.
4538 (cmd_spec_htmlify): Ditto.
4539 (cmd_spec_mirror): Ditto.
4540 (cmd_spec_outputdocument): Ditto.
4541 (cmd_spec_recursive): Ditto.
4542 (settime): Merged with cmd_time().
4543 (setbytes): Merged with cmd_bytes().
4544 (setonoff): Merged with cmd_boolean().
4547 1998-02-17 Hrvoje Niksic <hniksic@srce.hr>
4549 * Makefile.in (distclean): Remove `config.h'.
4551 1998-02-17 Hrvoje Niksic <hniksic@srce.hr>
4553 * version.c: Wget 1.5-b8 is released.
4555 1998-02-17 Hrvoje Niksic <hniksic@srce.hr>
4557 * http.c (digest_authentication_encode): New function.
4558 (create_authorization_line): Use it.
4559 (dump_hash): New function.
4560 (digest_authentication_encode): Use it.
4562 * fnmatch.c: Renamed from `mtch.c'.
4564 1998-02-15 Karl Eichwalder <ke@suse.de>
4566 * main.c (main): Tag "Written by..." string as translatable.
4568 1998-02-15 Hrvoje Niksic <hniksic@srce.hr>
4570 * wget.h (FREE_MAYBE): New macro.
4572 * http.c (create_authorization_line): Don't use ANSI C string
4573 concatenation feature.
4574 (basic_authentication_encode): Use alloca() for temporary
4583 * ftp-basic.c: Protect declaration against non-ANSI compiler.
4585 * http.c (create_authorization_line): Cast `unsigned char *' to
4586 `char *' for sprintf, to shut up the noisy Digital Unix cc.
4588 1998-02-15 Hrvoje Niksic <hniksic@srce.hr>
4590 * version.c: Wget 1.5-b7 is released.
4592 1998-02-15 Hrvoje Niksic <hniksic@srce.hr>
4594 * cmpt.c (strstr): Synched with glibc-2.0.6.
4596 * ftp-basic.c (calculate_skey_response): Ditto.
4597 (calculate_skey_response): Use alloca().
4599 * http.c (create_authorization_line): Work with FSF's version of
4602 * md5.c: New file, from GNU libc.
4604 1998-02-14 Hrvoje Niksic <hniksic@srce.hr>
4606 * url.h (URL_CLEANSE): Name the temporary variable more carefully.
4608 1998-02-13 Hrvoje Niksic <hniksic@srce.hr>
4610 * http.c (basic_authentication_encode): New function, instead of
4613 1998-02-13 Junio Hamano <junio@twinsun.com>
4615 * http.c: Add HTTP-DA support.
4616 * ftp-basic.c: Add Opie/S-key support.
4617 * config.h.in, Makefile.in: Add HTTP-DA and Opie/S-key support.
4618 * md5.c, md5.h: New files.
4620 1998-02-13 Hrvoje Niksic <hniksic@srce.hr>
4622 * http.c (http_process_range): Renamed from hprocrange().
4623 (http_process_range): Parse the whole header.
4625 * headers.c: New file.
4626 (header_process): New function.
4627 (header_get): Renamed from fetch_next_header.
4629 * all: Include utils.h only where necessary.
4631 * wget.h: Declare xmalloc(), xrealloc() and xstrdup() here.
4633 * wget.h: Add provisions for dmalloc.
4635 1998-02-12 Hrvoje Niksic <hniksic@srce.hr>
4637 * version.c: Wget 1.5-b6 is released.
4639 1998-02-12 Hrvoje Niksic <hniksic@srce.hr>
4641 * ftp.c (ftp_loop): Determine `filename' more precisely.
4643 * init.c (setval): Don't set `opt.quiet' if output-document is
4646 * log.c (log_init): Print to STDERR instead of STDOUT.
4647 (vlogmsg): Use STDERR by default.
4650 1998-02-11 Simon Josefsson <jas@pdc.kth.se>
4652 * host.c: Use addr_in again.
4654 1998-02-08 Karl Eichwalder <karl@suse.de>
4656 * http.c (gethttp): Fixed typo.
4658 1998-02-08 Hrvoje Niksic <hniksic@srce.hr>
4660 * version.c: Wget 1.5-b5 is released.
4662 1998-02-08 Hrvoje Niksic <hniksic@srce.hr>
4664 * retr.c (show_progress): Use it.
4666 * log.c (logflush): New function.
4668 * wget.h: Utilize __attribute__ if on gcc.
4670 1998-02-07 Hrvoje Niksic <hniksic@srce.hr>
4672 * http.c (base64_encode_line): New argument LENGTH.
4673 (BASIC_AUTHENTICATION_ENCODE): Use it.
4674 (BASIC_AUTHENTICATION_ENCODE): Take length of HEADER into account.
4676 * main.c (main): Fixed fprintf() format mismatch.
4678 1998-02-06 Hrvoje Niksic <hniksic@srce.hr>
4680 * version.c: Wget 1.5-b4 is released.
4682 1998-02-03 Simon Josefsson <jas@pdc.kth.se>
4684 * host.c: use sockaddr_in instead of addr_in.
4686 1998-02-04 Hrvoje Niksic <hniksic@srce.hr>
4688 * init.c (cleanup): Use it.
4690 * recur.c (recursive_cleanup): New function.
4692 * retr.c (retrieve_from_file): Ditto.
4694 * main.c (main): Use it.
4696 * recur.c (recursive_reset): New function.
4698 * retr.c (retrieve_from_file): Ditto.
4700 * main.c (main): Simplify call to recursive_retrieve().
4702 * recur.c (recursive_retrieve): Removed FLAGS argument.
4704 * http.c (gethttp): Changed call to iwrite().
4706 1998-02-03 Hrvoje Niksic <hniksic@srce.hr>
4708 * url.c (get_urls_html): Ditto.
4709 (free_urlpos): Ditto.
4713 * retr.c (retrieve_url): Move declaration of local variables to
4716 * url.c (urlproto): Use it.
4719 (get_urls_html): Ditto.
4721 * utils.h (ARRAY_SIZE): New macro.
4723 * url.c (proto): Moved from url.h.
4725 * url.h (URL_CLEANSE): Reformatted.
4726 (USE_PROXY_P): Renamed from USE_PROXY.
4728 * ftp-basic.c: Adjust to the new interface of iwrite().
4730 * ftp-basic.c (ftp_port): Use alloca().
4732 1998-02-03 Hrvoje Niksic <hniksic@srce.hr>
4734 * version.c: Wget 1.5-b3 is released.
4736 * host.c (ftp_getaddress): Don't print to stderr directly.
4738 * init.c (setbytes): Support `g' for gigabytes.
4739 (cmdtype): New specification CTIME.
4740 (setval): Use it with settime().
4741 (commands): Use it for WAIT and TIMEOUT.
4743 1998-02-02 Hrvoje Niksic <hniksic@srce.hr>
4745 * http.c (BASIC_AUTHENTICATION_ENCODE): New macro.
4748 * utils.c (unique_name_1): Moved from url.c.
4749 (unique_name): Ditto.
4751 * url.c (url_filename): Ditto.
4753 * log.c (redirect_output): Changed call to unique_name().
4755 * url.c (unique_name_1): Renamed from unique_name().
4756 (unique_name): Changed interface.
4758 * init.c (enum cmdid): Moved from init.h.
4760 (struct cmd): Ditto.
4762 * main.c (main): Use it.
4763 (main): Moved `--backups' to not have a short option.
4765 * options.h (struct options): New member BACKGROUND.
4767 * main.c (print_help): Rearranged.
4768 (main): New long options for -n* short options: --no-directories,
4769 --no-host-directories, --non-verbose, --no-host-lookup and
4770 --dont-remove-listing.
4772 1998-02-01 Hrvoje Niksic <hniksic@srce.hr>
4774 * main.c (main): Use log_close().
4776 * log.c: New variable LOGFP.
4778 (redirect_output): Don't open /dev/null; set LOGFP to stdin
4780 (log_close): New function.
4782 * options.h (struct options): Removed LFILE.
4784 * log.c (log_enable): Removed.
4786 * main.c (main): Use it.
4788 * log.c (log_init): New function.
4790 * url.c (get_urls_html): Removed needless assignment to BASE.
4792 * host.c (add_hlist): Don't set CMP needlessly.
4794 * utils.c (match_backwards): Ditto.
4795 (in_acclist): Ditto.
4797 * url.c (findurl): Ditto.
4799 * netrc.c (parse_netrc): Ditto.
4801 * log.c (log_dump): Ditto.
4803 * html.c (html_quote_string): Ditto.
4805 * ftp-basic.c (ftp_request): Made static.
4807 * connect.c: Made global variables static.
4809 * url.c (construct): Ditto.
4811 * init.c (init_path): Avoid assignment inside `if'-condition.
4813 * ftp.c: Don't include in.h or winsock.h.
4815 * ftp.c (ftp_loop): Use SZ.
4817 * connect.c (bindport): Cast &addrlen to int *.
4820 * init.c (initialize): Don't use SYSTEM_WGETRC unconditionally.
4822 1998-01-31 Hrvoje Niksic <hniksic@srce.hr>
4824 * ftp.c (getftp): Initialize opt.ftp_pass here.
4825 (ftp_retrieve_dirs): Use alloca().
4827 * init.c (defaults): Don't initialize opt.ftp_pass.
4829 * sysdep.h (S_ISLNK): Declare for OS/2; ditto for lstat.
4830 From Ivan F. Martinez <ivanfm@ecodigit.com.br>.
4832 1998-01-31 Hrvoje Niksic <hniksic@srce.hr>
4834 * recur.c (parse_robots): Check for comments more correctly.
4836 * host.c (ftp_getaddress): Use STRDUP_ALLOCA.
4837 (ftp_getaddress): Add diagnostics when reverse-lookup yields only
4840 1998-01-31 Hrvoje Niksic <hniksic@srce.hr>
4842 * version.c: Wget 1.5-b2 is released.
4844 * netrc.c (NETRC_FILE_NAME): Moved from netrc.h.
4846 * utils.c (proclist): Pass FNM_PATHNAME to fnmatch().
4848 * ftp-basic.c (ftp_pasv): Avoid unnecessary casting to unsigned
4851 * log.c: Don't attempt to hide arguments from ansi2knr.
4853 * cmpt.c: Synched strptime() and mktime() with glibc-2.0.6.
4855 * ansi2knr.c: Use a later version, from fileutils-3.16l alpha.
4857 * ftp.c (getftp): Ditto.
4859 * http.c (gethttp): Use it.
4861 * retr.c (get_contents): New argument EXPECTED; pass it to
4863 (show_progress): New argument EXPECTED; use it to display
4866 * init.c (setval): Ditto.
4868 * http.c (gethttp): Ditto.
4871 * ftp.c (getftp): Ditto.
4872 (ftp_loop_internal): Ditto.
4874 * ftp-ls.c (ftp_parse_unix_ls): Use abort() instead of assert(0).
4876 * sysdep.h (CLOSE): Simplify; use DEBUGP.
4878 * netrc.c (search_netrc): Use alloca().
4880 * init.c (defaults): Initialize no_flush.
4882 * log.c (vlogmsg): Don't flush if no_flush.
4884 * options.h (struct options): New variable no_flush.
4886 * main.c (main): Don't play games with buffering.
4888 * log.c (vlogmsg): Flush the output after every message.
4890 1998-01-31 Hrvoje Niksic <hniksic@srce.hr>
4892 * init.c (parse_line): Ditto.
4894 * url.c (get_urls_html): Ditto.
4896 * main.c (main): Don't cast to unsigned char.
4898 * init.c (run_wgetrc): Don't cast to unsigned char.
4899 (parse_line): Accept char instead of unsigned char.
4901 * html.c (htmlfindurl): Use char instead of unsigned char.
4905 * sysdep.h: Add wrappers to ctype macros to make them
4908 1998-01-30 Hrvoje Niksic <hniksic@srce.hr>
4910 * html.c (htmlfindurl): Download <img lowsrc=...>
4912 * main.c (main): Ignore SIGPIPE.
4914 * connect.c (select_fd): New argument WRITEP.
4915 (iwrite): Call select_fd().
4917 1997-02-27 Fila Kolodny <fila@ibi.com>
4919 * ftp.c (ftp_retrieve_list): If retrieving symlink and the proper
4920 one already exists, just skip it.
4922 1998-01-30 Hrvoje Niksic <hniksic@srce.hr>
4924 * http.c (gethttp): Cosmetic changes.
4926 * http.c (check_end): Allow `+D...' instead of `GMT'.
4927 From Fabrizio Pollastri <pollastri@cstv.to.cnr.it>.
4929 * url.c (process_ftp_type): New function.
4932 * connect.c (iwrite): Allow writing in a few chunks.
4933 (bindport): Made SRV static, so addr can point to it.
4934 (select_fd): Removed HPUX kludge.
4936 * host.c (free_hlist): Incorporated into clean_hosts().
4938 1998-01-29 Hrvoje Niksic <hniksic@srce.hr>
4940 * host.c (hlist): Made static.
4941 (search_address): Cosmetic change.
4943 1998-01-29 Hrvoje Niksic <hniksic@srce.hr>
4945 * version.c: Wget v1.5-b1 is released.
4947 * http.c (hgetlen): Use sizeof() to get the header length.
4950 (hgetlocation): Ditto.
4951 (hgetmodified): Ditto.
4952 (haccepts_none): Ditto.
4954 * main.c (main): Updated `--version' and `--help' output, as per
4955 Francois Pinard's suggestions.
4957 * main.c: Include locale.h; call setlocale(), bindtextdomain() and
4960 * config.h.in: Define stubs for I18N3.
4962 * wget.h: Include libintl.h.
4964 1998-01-28 Hrvoje Niksic <hniksic@srce.hr>
4966 * url.c (mkstruct): Check for opt.cut_dirs.
4967 (mkstruct): alloca()-te more, xmalloc() less.
4969 * utils.c (load_file): Check for ferror().
4971 * url.c (get_urls_file): Close only the files we opened.
4972 (get_urls_html): Ditto.
4973 (count_slashes): New function.
4977 * http.c (gethttp): Respect username and password provided by
4979 (base64_encode_line): Write into an existing buffer instead of
4980 malloc-ing a new one.
4981 (struct http_stat): Moved from http.h
4983 * retr.c (retrieve_url): Free SUF.
4985 * all: Removed lots of unnecessary .h dependencies.
4987 * html.c (global_state): Made static.
4989 * utils.h (ALLOCA_ARRAY): New macro.
4991 * main.c (main): New option `--cut-dirs'.
4993 * url.c (construct): Use alloca() for T.
4995 * utils.c (mkdirhier): Use STRDUP_ALLOCA.
4997 * host.c (_host_t): Moved from host.h.
4998 (struct host): Renamed from _host_t.
4999 (store_hostaddress): Use STRDUP_ALLOCA for INET_S.
5002 * host.h: Don't include url.h.
5004 * ftp.c (LIST_FILENAME): Moved from ftp.h.
5006 * init.c (DEFAULT_FTP_ACCT): Moved from ftp.h.
5008 * main.c (main): Enable log if the output goes to a TTY.
5010 * connect.h: Removed unused constant `BACKLOG'.
5012 * config.h.in: Check for isatty().
5014 * Makefile.in (LINK): Use CFLAGS when linking.
5016 1998-01-27 Hrvoje Niksic <hniksic@srce.hr>
5018 * mswindows.c (ws_hangup): Use redirect_output().
5020 * main.c (redirect_output_signal): New function; use
5023 * log.c (redirect_output): New function, based on hangup(), which
5026 * log.c (vlogmsg): New function.
5028 * wget.h (DEBUGP): Use debug_logmsg().
5030 * main.c (hangup): Use it.
5032 * log.c (log_dump): New function.
5034 * utils.h (DO_REALLOC): Use `long' for various sizes.
5036 * http.c (hskip_lws): Use `while', for clarity.
5037 (HTTP_DYNAMIC_LINE_BUFFER): New constant.
5038 (fetch_next_header): Use it instead of DYNAMIC_LINE_BUFFER.
5040 * ftp-basic.c (FTP_DYNAMIC_LINE_BUFFER): New constant.
5041 (ftp_response): Use it instead of DYNAMIC_LINE_BUFFER.
5043 * utils.c (DYNAMIC_LINE_BUFFER): Moved from utils.c.
5044 (LEGIBLE_SEPARATOR): Ditto.
5045 (FILE_BUFFER_SIZE): Ditto.
5047 * retr.c (BUFFER_SIZE): Moved from retr.h.
5050 (logmsg): Moved from utils.c.
5051 (debug_logmsg): New function.
5053 * mswindows.h: Include it here.
5057 * utils.c: Don't include <windows.h>.
5059 1998-01-25 Hrvoje Niksic <hniksic@srce.hr>
5061 * host.c (ftp_getaddress): Ditto.
5063 * main.c (main): Use it.
5065 * utils.h (STRDUP_ALLOCA): New macro.
5067 * init.c: Prepend `wget: ' to error messages printed on stderr.
5069 * utils.c (mkdirhier): Renamed from mymkdir.
5070 (touch): Renamed from my_touch.
5071 (pwd_cuserid): Renamed from my_cuserid().
5073 1998-01-24 Andy Eskilsson <andy.eskilsson@telelogic.se>
5075 * utils.c (accdir): Process wildcards.
5076 (proclist): New function.
5077 (accdir): Use it to avoid code repetition.
5079 1998-01-24 Hrvoje Niksic <hniksic@srce.hr>
5081 * recur.c (parse_robots): Respect opt.useragent; use alloca().
5083 * http.c (gethttp): Construct useragent accordingly.
5085 * version.c: Changed version string to numbers-only.
5087 * main.c (print_help): List all the options.
5089 * mswindows.c (windows_main_junk): Initialize argv0 here.
5091 1998-01-24 Karl Heuer <kwzh@gnu.org>
5093 * netrc.c (search_netrc): Initialize `l' only after processing
5096 * main.c (main): Don't trap SIGHUP if it's being ignored.
5098 1998-01-24 Hrvoje Niksic <hniksic@srce.hr>
5100 * all: Use logmsg().
5102 * utils.c (time_str): Moved from retr.c.
5103 (logmsg): New function.
5104 (logmsg_noflush): Ditto.
5106 * rbuf.c: New file, moved buf_* functions here.
5108 * ftp.c (ftp_expected_bytes): Moved from ftp-basic.c.
5110 * ftp-basic.c (ftp_rest): Use prnum().
5112 * ftp-basic.c: Ditto.
5114 * ftp.c: Use the new reading functions and macros.
5116 * retr.c (buf_initialize): New function.
5117 (buf_initialized_p): Ditto.
5118 (buf_uninitialize): Ditto.
5121 * http.c (fetch_next_header): Use the BUF_READCHAR macro for
5123 (gethttp): Use alloca() where appropriate.
5125 * retr.c (buf_readchar): Use it.
5126 (buf_peek): Use rstreams.
5128 * retr.h (BUF_READCHAR): New macro.
5130 * init.c (home_dir): Rewritten for clarity.
5133 * mswindows.c (ws_backgnd): Made static.
5134 (read_registry): Ditto.
5135 (ws_cleanup): Ditto.
5136 (ws_handler): Ditto.
5138 1998-01-23 Hrvoje Niksic <hniksic@srce.hr>
5140 * alloca.c: New file.
5142 * Makefile.in (ALLOCA): Define.
5144 * mswindows.c (ws_help): Constify.
5145 (ws_help): Use alloca.
5147 * mswindows.c: Reformat.
5149 * all: Added _(...) annotations for I18N snarfing and translation.
5151 * host.c (ftp_getaddress): Nuke SYSINFO.
5152 (ftp_getaddress): Don't use getdomainname().
5153 (ftp_getaddress): Use uname(), where available.
5155 * http.c (gethttp): Protect a stray fprintf().
5157 * init.c (settime): New function.
5158 (setval): Treat WAIT specially, allowing suffixes like `m' for
5161 1998-01-21 Hrvoje Niksic <hniksic@srce.hr>
5163 * url.c (get_urls_html): Use alloca() for TEMP.
5165 1998-01-21 Jordan Mendelson <jordy@wserv.com>
5167 * url.c (rotate_backups): New function.
5169 * http.c (gethttp): Ditto.
5171 * ftp.c (getftp): Rotate backups.
5173 1997-12-18 Hrvoje Niksic <hniksic@srce.hr>
5175 * all: Renamed nmalloc(), nrealloc() and nstrdup() to xmalloc(),
5176 xrealloc() and xstrdup(). Use the new functions.
5178 * url.c (decode_string): Made static.
5181 (parse_uname): Ditto.
5184 (construct_relative): Ditto.
5186 * retr.c (show_progress): Made static.
5188 * recur.c (robots_url): Made static.
5189 (retrieve_robots): Ditto.
5190 (parse_robots): Ditto.
5191 (robots_match): Ditto.
5195 * main.c (printhelp): Made static.
5198 * init.c (comind): Made static.
5201 (run_wgetrc): Ditto.
5209 * http.c (fetch_next_header): Made static.
5210 (hparsestatline): Ditto.
5215 (hgetlocation): Ditto.
5216 (hgetmodified): Ditto.
5217 (haccepts_none): Ditto.
5219 (base64_encode_line): Ditto.
5220 (mktime_from_utc): Ditto.
5221 (http_atotm): Ditto.
5223 * html.c (idmatch): Made static.
5225 * host.c (search_host): Made static.
5226 (search_address): Ditto.
5227 (free_hlist): Ditto.
5229 * ftp.c (getftp): Made static.
5230 (ftp_loop_internal): Ditto.
5231 (ftp_get_listing): Ditto.
5232 (ftp_retrieve_list): Ditto.
5233 (ftp_retrieve_dirs): Ditto.
5234 (ftp_retrieve_glob): Ditto.
5235 (freefileinfo): Ditto.
5236 (delelement): Ditto.
5238 * ftp-ls.c (symperms): Made static.
5239 (ftp_parse_unix_ls): Ditto.
5241 * connect.c (select_fd): Made static.
5243 * utils.c (xmalloc): Renamed from nmalloc.
5244 (xrealloc): Renamed from nrealloc.
5245 (xstrdup): Renamed from nstrdup.
5247 * getopt.c (exchange): Use alloca.
5249 * mswindows.c (mycuserid): Use strncpy.
5251 * New files mswindows.c, mswindows.h, sysdep.h. winjunk.c,
5252 systhings.h, windecl.h and winjunk.h removed.
5254 * mswindows.c (sleep): New function.
5256 * utils.c: Include <windows.h> under Windows.
5258 1997-06-12 Darko Budor <dbudor@zesoi.fer.hr>
5260 * url.h (URL_UNSAFE): Change default under Windows.
5262 * retr.c (retrieve_from_file): Respect opt.delete_after.
5264 * main.c (main): Call ws_help on Windows.
5266 * winjunk.c (windows_main_junk): New function.
5268 * main.c (main): Junk-process argv[0].
5270 * http.c (mktime_from_utc): Return -1 if mktime failed.
5272 * http.c (http_loop): Ditto.
5274 * ftp.c (ftp_loop_internal): Change title on Windows when using a
5277 * winjunk.c (getdomainname): Lots of functions.
5279 1997-06-12 Hrvoje Niksic <hniksic@srce.hr>
5281 * cmpt.c (strptime_internal): Handle years more correctly for
5284 1997-06-09 Mike Thomas <mthomas@reality.ctron.com>
5286 * http.c (gethttp): Allocate enough space for
5287 `Proxy-Authorization' header.
5289 1997-05-10 Hrvoje Niksic <hniksic@srce.hr>
5291 * version.c: Wget/1.4.5 is released.
5293 1997-05-10 Hrvoje Niksic <hniksic@srce.hr>
5295 * retr.c (get_contents): Check return value of fwrite more
5298 1997-03-30 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
5300 * cmpt.c (strptime_internal) [case 'Y']: Always subtract 1900 from
5301 year, regardless of century.
5303 1997-03-30 Hrvoje Niksic <hniksic@srce.hr>
5305 * utils.c (isfile): Use `lstat' instead of `stat'.
5307 1997-03-29 Hrvoje Niksic <hniksic@srce.hr>
5309 * utils.c (numdigit): Use explicit test.
5311 1997-03-21 Hrvoje Niksic <hniksic@srce.hr>
5313 * http.c (http_loop): Always use `url_filename' to get u->local.
5315 1997-03-20 Hrvoje Niksic <hniksic@srce.hr>
5317 * url.c: Recognize https.
5319 1997-03-13 Hrvoje Niksic <hniksic@srce.hr>
5321 * recur.c (recursive_retrieve): Lowercase just the host name.
5323 1997-03-09 Hrvoje Niksic <hniksic@srce.hr>
5325 * url.c (get_urls_file): Use the correct test.
5326 (get_urls_html): Ditto.
5328 1997-03-07 Hrvoje Niksic <hniksic@srce.hr>
5330 * connect.c: Reverted addrlen to int.
5332 * init.c (parse_line): Check for -1 instead of NONE.
5334 * version.c: Changed version to 1.4.5.
5336 1997-02-17 Hrvoje Niksic <hniksic@srce.hr>
5338 * init.c: New option netrc.
5339 (initialize): Don't parse .netrc.
5341 * cmpt.c (recursive): Return rp.
5342 (strptime_internal): Match the long strings first, the abbreviated
5345 1997-02-16 Hrvoje Niksic <hniksic@srce.hr>
5347 * http.c (check_end): New function.
5348 (http_atotm): Use it.
5350 1997-02-13 gilles Cedoc <gilles@cedocar.fr>
5352 * http.c (gethttp): Use them.
5354 * init.c: New options proxy_user and proxy_passwd.
5356 1997-02-14 Hrvoje Niksic <hniksic@srce.hr>
5358 * ftp.c (ftp_retrieve_list): Create links even if not relative.
5360 1997-02-10 Hrvoje Niksic <hniksic@srce.hr>
5362 * recur.c (recursive_retrieve): Lowercase the host name, if the
5363 URL is not "optimized".
5365 * host.c (realhost): Return l->hostname, even if it matches with
5368 1997-02-10 Marin Purgar <pmc@asgard.hr>
5370 * connect.c: Make addrlen size_t instead of int.
5373 1997-02-09 Gregor Hoffleit <flight@mathi.uni-heidelberg.DE>
5375 * systhings.h: Define S_ISLNK on NeXT too.
5377 1997-02-09 Hrvoje Niksic <hniksic@srce.hr>
5379 * version.c: Released 1.4.3.
5381 * url.c: Futher update to list of protostrings.
5382 (skip_proto): Skip `//' correctly for FTP and HTTP.
5384 * url.c (get_urls_html): Handle bogus `http:' things a little
5387 * main.c (main): Removed `follow-ftp' from `f'.
5388 (main): Dumped the `prefix-files' and `file-prefix' options and
5389 features; old and bogus.
5390 (main): Exit on failed setval() in `-e'.
5392 * http.c (fetch_next_header): Use it to detect header continuation
5395 * retr.c (buf_peek): New function.
5397 1997-02-08 Hrvoje Niksic <hniksic@srce.hr>
5399 * wget.h: Include time.h and stuff.
5401 1997-02-08 Roger Beeman <beeman@cisco.com>
5403 * ftp.c: Include <time.h>
5405 1997-02-07 Hrvoje Niksic <hniksic@srce.hr>
5407 * url.c (findurl): Would read over buffer limits.
5409 1997-02-06 Hrvoje Niksic <hniksic@srce.hr>
5411 * ftp-ls.c (ftp_parse_unix_ls): Allow spaces in file names.
5413 1997-02-05 Hrvoje Niksic <hniksic@srce.hr>
5415 * http.c (http_atotm): Initialize tm.is_dst.
5417 1997-02-02 Hrvoje Niksic <hniksic@srce.hr>
5419 * http.c (gethttp): Don't print the number of retrieved headers.
5421 * main.c (main): New option `--no-clobber', alias for `-nc'.
5423 * url.c: Recognize `https://'.
5425 1997-02-01 Hrvoje Niksic <hniksic@srce.hr>
5427 * host.c (herrmsg): Don't use h_errno.
5429 1997-01-30 Hrvoje Niksic <hniksic@srce.hr>
5431 * host.c (accept_domain): Use it.
5433 * main.c (main): New option `--exclude-domains'.
5435 * retr.c (retrieve_url): Use it.
5436 (retrieve_url): Bail out when an URL is redirecting to itself.
5438 * url.c (url_equal): New function.
5440 1997-01-29 Hrvoje Niksic <hniksic@srce.hr>
5442 * connect.c: Include arpa/inet.h instead of arpa/nameser.h.
5444 * http.c (mk_utc_time): New function.
5445 (http_atotm): Use it; handle time zones correctly.
5447 1997-01-28 Hrvoje Niksic <hniksic@srce.hr>
5451 * ftp-basic.c: Use it instead of WRITE.
5453 * connect.c (iwrite): New function.
5455 1997-01-27 Hrvoje Niksic <hniksic@srce.hr>
5457 * cmpt.c (mktime): New function.
5459 * netrc.c: Include <sys/types.h>.
5461 * main.c (main): Wouldn't recognize --spider.
5463 * retr.c (rate): Use `B', `KB' and `MB'.
5464 (reset_timer,elapsed_time): Moved from utils.c.
5466 * ftp.c (ftp_retrieve_list): Ditto.
5468 * http.c (http_loop): Don't touch the file if opt.dfp.
5470 1997-01-24 Hrvoje Niksic <hniksic@srce.hr>
5474 * ftp.c (ftp_retrieve_glob): New argument semantics.
5475 (ftp_retrieve_dirs): Use it.
5478 * html.c (htmlfindurl): Recognize `'' as the quote char.
5480 1997-01-23 Hrvoje Niksic <hniksic@srce.hr>
5482 * ftp.c (ftp_loop_internal): Use it.
5484 * utils.c (remove_link): New function.
5486 1997-01-22 Hrvoje Niksic <hniksic@srce.hr>
5488 * retr.c (retrieve_url): Require STRICT redirection URL.
5490 * url.c (parseurl): New argument STRICT.
5492 * http.c (hparsestatline): Be a little-bit less strict about
5495 1997-01-21 Hrvoje Niksic <hniksic@srce.hr>
5497 * http.c (gethttp): Use it.
5499 * main.c (main): Don't use '<digit>' as options.
5501 * init.c: New option ignore_length.
5503 * http.c (gethttp): Ditto.
5504 (http_loop): Check for redirection without Location:.
5505 (gethttp): Don't print Length unless RETROKF.
5507 * ftp.c (getftp): Use it.
5509 * url.c (mkalldirs): New function.
5511 * utils.c (mymkdir): Don't check for existing non-directory.
5513 * url.c (mkstruct): Don't create the directory.
5515 1997-01-20 Hrvoje Niksic <hniksic@srce.hr>
5517 * init.c (setval): Removed NO_RECURSION checks.
5519 1997-01-19 Hrvoje Niksic <hniksic@srce.hr>
5521 * version.c: "Released" 1.4.3-pre2.
5523 * recur.c (recursive_retrieve): Bypass host checking only if URL
5524 is ftp AND parent URL is not ftp.
5526 * ftp-basic.c (ftp_request): Print out Turtle Power.
5528 * ftp.c (ftp_loop): Call ftp_retrieve_glob with 0 if there's no
5530 (ftp_retrieve_glob): Call ftp_loop_internal even on empty list, if
5533 * http.c (gethttp): Be a little bit smarter about status codes.
5535 * recur.c (recursive_retrieve): Always reset opt.recursive when
5538 1997-01-18 Hrvoje Niksic <hniksic@srce.hr>
5540 * retr.c (retrieve_url): New variable location_changed; use it for
5541 tests instead of mynewloc.
5542 (retrieve_url): Allow heuristic adding of html.
5544 * url.c (url_filename): Don't use the `%' in Windows file names.
5546 * http.c (http_loop): Always time-stamp the local file.
5548 * http.c (http_loop): Ditto.
5550 * ftp.c (ftp_retrieve_list): Use it.
5552 * utils.c (my_touch): New function.
5554 * ftp.c (ftp_retrieve_list): Use #ifdef HAVE_STRUCT_UTIMBUF
5555 instead of #ifndef NeXT.
5557 * utils.c (strptime): New version, by Ulrich Drepper.
5559 1997-01-17 Hrvoje Niksic <hniksic@srce.hr>
5561 * http.c (haccepts_none): Renamed from `haccepts_bytes'.
5562 (gethttp): If haccepts_none(), disable ACCEPTRANGES.
5563 (http_loop): Would remove ACCEPTRANGES.
5565 * ftp.c (getftp): Call ftp_list with NULL.
5567 1997-01-15 Hrvoje Niksic <hniksic@srce.hr>
5569 * html.c (ftp_index): Don't print minutes and seconds if we don't
5570 know them; beautify the output.
5572 * ftp.c (getftp): Don't close the socket on FTPNSFOD.
5574 1997-01-14 Hrvoje Niksic <hniksic@srce.hr>
5576 * utils.c (strptime): New function.
5577 (strptime): Don't use get_alt_number.
5578 (strptime): Don't use locale.
5579 (match_string): Made it a function.
5581 1997-01-12 Hrvoje Niksic <hniksic@srce.hr>
5583 * http.c (http_atotm): New function.
5584 (http_loop): Use it.
5586 * atotm.c: Removed from the distribution.
5588 * http.c (base64_encode_line): Rewrite.
5590 1997-01-09 Hrvoje Niksic <hniksic@srce.hr>
5592 * ftp.c (getftp): Use ftp_expected_bytes; print size.
5594 * ftp-basic.c (ftp_response): Use ftp_last_respline.
5595 (ftp_expected_bytes): New function.
5597 * ftp.c (getftp): Print the unauthoritative file length.
5599 * ftp-ls.c: Renamed from ftp-unix.c.
5600 (ftp_parse_ls): Moved from ftp.c.
5601 (ftp_parse_unix_ls): Recognize seconds in time spec.
5602 (ftp_parse_unix_ls): Recognize year-less dates of the previous
5605 1997-01-08 Hrvoje Niksic <hniksic@srce.hr>
5607 * ftp-basic.c: Don't declare errno if #defined.
5609 * host.c (ftp_getaddress): Check for sysinfo legally.
5611 1997-01-08 Darko Budor <dbudor@diana.zems.fer.hr>
5613 * connect.c (iread): Use READ.
5615 1996-12-23 Hrvoje Niksic <hniksic@srce.hr>
5617 * url.c: Recognize finger, rlogin, tn3270, mid and cid as valid
5620 1996-12-22 Hrvoje Niksic <hniksic@srce.hr>
5622 * host.c (ftp_getaddress): Allow `.' in hostname.
5624 1996-12-26 Darko Budor <dbudor@zems.fer.hr>
5626 * wget.h: READ and WRITE macros for use instead of read and write
5627 on sockets, grep READ *.c, grep WRITE *.c
5629 * wsstartup.c: new file - startup for winsock
5631 * wsstartup.h: new file
5633 * win32decl.h: new file - fixup for <errno.h> and winsock trouble
5635 * configure.bat: Configure utility for MSVC
5637 * src/Makefile.ms,config.h.ms: new files for use with MSVC 4.x
5639 1996-12-22 Hrvoje Niksic <hniksic@srce.hr>
5641 * version.c: Released 1.4.3-pre.
5643 * utils.c (prnum): Accept long.
5644 (legible): Use prnum().
5646 * connect.c (make_connection): Accept port as short.
5649 * http.c (gethttp): Use search_netrc.
5651 1996-12-21 Hrvoje Niksic <hniksic@srce.hr>
5653 * ftp.c (getftp): Use search_netrc.
5655 * netrc.c (free_netrc): New function.
5657 * init.c (home_dir): New function.
5659 * url.c (convert_links): Allow REL2ABS changes.
5661 1996-12-21 Gordon Matzigkeit <gord@gnu.ai.mit.edu>
5663 * netrc.c: New file.
5664 (parse_netrc, maybe_add_to_list): New functions.
5666 1996-12-17 Hrvoje Niksic <hniksic@srce.hr>
5668 * retr.c (retrieve_url): Reset opt.recursion before calling
5669 ftp_loop if it is reached through newloc.
5671 * init.c (run_wgetrc): Print the wgetrc path too, when reporting
5672 error; don't use "Syntax error", since we don't know if it is
5673 really a syntax error.
5675 1996-12-16 Hrvoje Niksic <hniksic@srce.hr>
5677 * utils.c (acceptable): Extract the filename part of the path.
5679 * recur.c (recursive_retrieve): Call acceptable() with the right
5680 argument; would bug out on wildcards.
5682 * init.c (parse_line): Likewise.
5684 * html.c (htmlfindurl): Cast to char * when calling stuff.
5686 1996-12-15 Hrvoje Niksic <hniksic@srce.hr>
5688 * ftp.c (getftp): Use ftp_pasv.
5690 * ftp-basic.c (ftp_request): Accept NULL value.
5691 (ftp_pasv): New function.
5693 * options.h (struct options): Add passive FTP option.
5695 1996-12-15 Hrvoje Niksic <hniksic@srce.hr>
5697 * url.c (parseurl): Debug output.
5699 * utils.c (path_simplify): New one, adapted from bash's
5700 canonicalize_pathname().
5702 1996-12-14 Hrvoje Niksic <hniksic@srce.hr>
5704 * ftp.c (getftp): Don't discard the buffer.
5706 * retr.c (get_contents): New parameter nobuf.
5708 1996-12-13 Shawn McHorse <riffraff@txdirect.net>
5710 * html.c (htmlfindurl): Recognize <meta contents="d; URL=...".
5712 * init.c (setval): Strip the trailing slashes on CVECDIR.
5714 1996-12-13 Hrvoje Niksic <hniksic@srce.hr>
5716 * init.c: Make excludes and includes under CVECDIR instead of
5719 1996-12-13 Shawn McHorse <riffraff@txdirect.net>
5721 * url.c (get_urls_html): Skip "http:".
5723 1996-12-13 Hrvoje Niksic <hniksic@srce.hr>
5725 * utils.c (strcasecmp): From glibc.
5726 (strncasecmp): Also.
5729 * url.c: Added javascript: to the list of URLs prefixes.
5731 1996-12-12 Shawn McHorse <riffraff@txdirect.net>
5733 * recur.c (retrieve_robots): Print the warning message only if
5736 1996-12-12 Gregor Hoffleit <flight@mathi.uni-heidelberg.DE>
5738 * ftp.c (ftp_retrieve_list): Use NeXT old utime interface.
5740 1996-12-12 Hrvoje Niksic <hniksic@srce.hr>
5742 * systhings.h: New file.
5744 * ../configure.in: Check for utime.h
5746 * ftp.c: Check whether we have unistd.h.
5748 1996-11-27 Hrvoje Niksic <hniksic@srce.hr>
5750 * recur.c (recursive_retrieve): Send the canonical URL as referer.
5751 (recursive_retrieve): Call get_urls_html with the canonical URL.
5753 1996-12-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5755 * (configure.in, config.h.in, src/Makefile.in, src/*.[ch]): Add
5756 ansi2knr support for compilers which don't support ANSI style
5757 function prototypes and signatures.
5759 * (aclocal.m4, src/ansi2knr.c, src/ansi2knr.1): New files.
5761 1996-11-26 Hrvoje Niksic <hniksic@srce.hr>
5763 * url.c: Use it; Recognize paths ending with "." and ".." as
5765 (url_filename): Append .n whenever file exists and could be a
5768 * url.h (ISDDOT): New macro.
5770 * init.c (parse_line): Use unsigned char.
5772 * url.c (get_urls_html): Cast to unsigned char * when calling
5775 * html.c (htmlfindurl): Use unsigned char.
5777 * version.c: Changed version to 1.4.3.
5779 1996-11-25 Hrvoje Niksic <hniksic@srce.hr>
5781 * version.c: Released 1.4.2.
5783 * ftp.c (getftp): Simplified assertion.
5784 (ftp_loop_internal): Remove symlink before downloading.
5785 (ftp_retrieve_list): Unlink the symlink name before attempting to
5788 * options.h (struct options): Renamed print_server_response to
5791 * ftp.c (rel_constr): Removed.
5792 (ftp_retrieve_list): Don't use it.
5793 (ftp_retrieve_list): Use opt.retr_symlinks.
5795 1996-11-24 Hrvoje Niksic <hniksic@srce.hr>
5797 * main.c (main): New option retr_symlinks.
5799 * url.c (convert_links): Print verbose message.
5801 1996-11-24 Hrvoje Niksic <hniksic@srce.hr>
5803 * http.c (http_loop): Reset newloc in the beginning of function;
5804 would cause FMR in retrieve_url.
5806 1996-11-23 Hrvoje Niksic <hniksic@srce.hr>
5808 * recur.c (convert_all_links): Find the URL of each HTML document,
5809 and feed it to get_urls_html; would bug out.
5810 (convert_all_links): Check for l2 instead of dl; removed dl.
5812 * url.c (convert_links): Don't refer to freed newname.
5814 * recur.c (recursive_retrieve): Add this_url to urls_downloaded.
5816 * main.c (main): Print the OS_TYPE in the debug output, too.
5818 * recur.c (recursive_retrieve): Check for opt.delete_after.
5820 * main.c (main): New option delete-after.
5822 * init.c (setval): Cleaned up.
5824 1996-11-21 Hrvoje Niksic <hniksic@srce.hr>
5826 * Makefile.in (wget): Make `wget' the default target.
5828 * ftp.c (ftp_loop_internal): Move noclobber checking out of the
5830 (ftp_retrieve_list): Warn about non-matching sizes.
5832 * http.c (http_loop): Made -nc non-dependent on opt.recursive.
5834 * init.c (setnum): Renamed from setnuminf; New argument flags.
5837 * main.c (main): Sorted the options.
5838 (main): New option --wait.
5840 1996-11-21 Shawn McHorse <riffraff@txdirect.net>
5842 * html.c (htmlfindurl): Reset s->in_quote after getting out of
5845 1996-11-20 Hrvoje Niksic <hniksic@srce.hr>
5847 * version.c: Changed version to 1.4.2.
5849 1996-11-20 Hrvoje Niksic <hniksic@srce.hr>
5851 * version.c: Released 1.4.1.
5853 * html.c (html_quote_string): New function.
5854 (ftp_index): Use it.
5855 (htmlfindurl): A more gentle ending debug message.
5857 * ftp.c (ftp_loop): Check for opt.htmlify.
5859 * init.c: New command htmlify.
5861 * ftp.c (getftp): Nicer error messages, with `'-encapsulated
5863 (ftp_loop): Print size of index.html.
5865 * init.c (setval): Implement "styles".
5867 * main.c (main): New option dotstyle.
5869 1996-11-19 Hrvoje Niksic <hniksic@srce.hr>
5871 * ftp.c (getftp): Close the master socket in case of errors, after
5874 * connect.c (bindport): Initialize msock to -1.
5876 * ftp.c (getftp): Initialize dtsock to -1.
5878 * connect.c (closeport): Don't close sock if sock == -1.
5880 1996-11-18 Hrvoje Niksic <hniksic@srce.hr>
5882 * init.c (setnuminf): Nuked default value -- just leave unchanged.
5883 (setval): Don't send default values.
5884 (defaults): Use DEFAULT_TIMEOUT -- aaargh.
5886 * options.h (struct options): Use long for dot_bytes.
5888 * init.c (setquota): Renamed to setbytes.
5889 (setval): Use setbytes on DOTBYTES.
5891 1996-11-17 Hrvoje Niksic <hniksic@srce.hr>
5893 * ftp.c (getftp): Initialize con->dltime.
5895 * recur.c (recursive_retrieve): Use same_host instead of
5896 try_robots; simply load robots_txt whenever the host is changed.
5897 (recursive_retrieve): Free forbidden before calling parse_robots.
5899 1996-11-16 Hrvoje Niksic <hniksic@srce.hr>
5901 * retr.c (show_progress): Use them.
5903 * options.h (struct options): New options dot_bytes, dots_on_line
5906 1996-11-16 Mark Boyns <boyns@sdsu.edu>
5908 * recur.c (recursive_retrieve): Retrieve directories regardless of
5909 acc/rej rules; check for empty u->file.
5911 1996-11-14 Hrvoje Niksic <hniksic@srce.hr>
5913 * init.c (setval): Use it.
5915 * utils.c (merge_vecs): New function.
5917 * init.c (setval): Reset the list-type functions when encountering
5920 1996-11-14 Shawn McHorse <riffraff@txdirect.net>
5922 * recur.c (recursive_retrieve): Use base_url instead of this_url
5925 1996-11-14 Shawn McHorse <riffraff@txdirect.net>
5927 * html.c (htmlfindurl): Reset s->in_quote after exiting the quote.
5929 1996-11-13 Hrvoje Niksic <hniksic@srce.hr>
5931 * utils.c (sepstring): Rewrote; don't use strtok.
5933 * recur.c (recursive_retrieve): Enter assorted this_url to slist
5934 when running the first time.
5935 (retrieve_robots): Warn to ignore errors when robots are loaded.
5937 * utils.c (load_file): Moved from url.c.
5939 * http.c: Made static variables const too in h* functions.
5941 * main.c (main): Renamed --continue-ftp to --continue.
5943 * recur.c (recursive_retrieve): Use it.
5945 * utils.c (frontcmp): New function.
5947 * url.c (accdir): New function.
5949 * html.c (htmlfindurl): Recognize <area href=...>.
5951 * ftp.c (ftp_retrieve_dirs): Implemented opt.includes.
5953 * init.c (setval): Free the existing opt.excludes and
5954 opt.includes, if available.
5956 * main.c (main): New option -I.
5958 1996-11-12 Hrvoje Niksic <hniksic@srce.hr>
5960 * ftp.c (ftp_retrieve_glob): Do not weed out directories.
5962 * version.c: Changed version to 1.4.1.
5964 1996-11-11 Hrvoje Niksic <hniksic@srce.hr>
5966 * version.c: Released 1.4.0.
5968 1996-11-10 Hrvoje Niksic <hniksic@srce.hr>
5970 * main.c (main): Free com and val after parse_line.
5971 (printhelp): Reorder the listing.
5973 * http.c: More robust header parsing.
5975 * http.c: Allow any number of spaces, or no spaces, precede ':'.
5976 (hskip_lws): New function.
5977 (haccepts_bytes): New function.
5980 * init.c (setval): Check header sanity.
5981 (setval): Allow resetting of headers.
5983 1996-11-10 Hrvoje Niksic <hniksic@srce.hr>
5985 * http.c (http_loop): Don't use has_wildcards.
5987 * http.c (gethttp): Free all_headers -- would leak.
5989 * recur.c (recursive_retrieve): Initialize depth to 1 instead of
5990 0 -- this fixes a long-standing bug in -rl.
5992 1996-11-09 Hrvoje Niksic <hniksic@srce.hr>
5994 * ftp.c: Use -1 as "impossible" value for con->fd.
5996 * url.h (URL_SEPARATOR): Don't treat `*' and `+' as separators.
5998 * init.c (parse_line): Use isalpha.
6000 * ftp-unix.c: Use HAVE_UNISTD_H.
6002 * mtch.c (has_wildcards): Don't match \.
6004 * http.c (http_loop): Warn on HTTP wildcard usage.
6006 1996-11-08 Hrvoje Niksic <hniksic@srce.hr>
6008 * url.c (url_filename): Do not create numbered suffixes if
6009 opt.noclobber -- would bug out on -nc.
6011 1996-11-07 Hrvoje Niksic <hniksic@srce.hr>
6013 * recur.c (parse_robots): Don't chuck out the commands without
6014 arguments (`Disallow:<empty>' didn't work).
6015 (parse_robots): Compare versions lowercase.
6016 (parse_robots): Match on base_version, not version_string!
6017 (parse_robots): Handle comments properly.
6018 (parse_robots): Match versions in a sane way.
6020 * init.c: Print nicer error messages.
6022 * version.c: Changed version to 1.4.0.
6024 1996-11-06 Hrvoje Niksic <hniksic@srce.hr>
6026 * version.c: Released 1.4.0-test2.
6028 * init.c (run_wgetrc): Close fp.
6030 * ftp.c (ftp_retrieve_dirs): Allocate the correct length for
6033 1996-11-06 Hrvoje Niksic <hniksic@srce.hr>
6035 * init.c (setquota): Allow inf as quota specification.
6037 1996-11-05 Hrvoje Niksic <hniksic@srce.hr>
6039 * ftp.c (ftp_retrieve_dirs): Return QUOTEXC if quota exceeded.
6040 (ftp_retrieve_glob): Return QUOTEXC on quota exceeded.
6042 * main.c (main): Check for quota by comparison with downloaded
6043 stuff, not from status.
6045 * connect.c (select_fd): Should compile on HPUX without warnings now.
6047 * ftp.c (ftp_get_listing): Check whether ftp_loop_internal
6050 1996-11-04 Hrvoje Niksic <hniksic@srce.hr>
6052 * ftp.c (ftp_retrieve_glob): Print the pattern nicely.
6053 (getftp): Return FTPRETRINT on control connection error.
6055 * html.c (htmlfindurl): Recognize <embed src=...> and
6057 (ftp_index): Handle username and password correctly.
6059 * main.c (main): Made `-np' a synonim for --no-parent.
6061 1996-11-02 Hrvoje Niksic <hniksic@srce.hr>
6063 * ftp.c (ftp_loop): Check for opt.ftp_glob too before calling
6066 * version.c: Changed version to 1.4.0-test2.
6068 1996-11-02 Hrvoje Niksic <hniksic@srce.hr>
6070 * version.c: Released 1.4.0-test1.
6072 * url.c (str_url): Don't use sprintf when creating %2F-prefixed
6074 (convert_links): Removed definition of make_backup.
6076 * http.h: Removed definition of MAX_ERROR_LENGTH.
6078 * host.c (ftp_getaddress): Check for "(none)" domains.
6080 * ftp.c (ftp_retrieve_dirs): Docfix.
6082 * http.c (gethttp): Use ou->referer instead of u->referer.
6084 * retr.c (retrieve_url): Reset u to avoid freeing pointers twice;
6085 this was known to cause coredumps on Linux.
6087 * html.c (ftp_index): Cast the argument to local_time to time_t *.
6089 1996-11-01 Hrvoje Niksic <hniksic@srce.hr>
6091 * connect.c (select_fd): Use exceptfds -- once and for all.
6093 * retr.c (retrieve_from_file): Free filename after
6095 (retrieve_from_file): Send RFIRST_TIME to recursive_retrieve on
6096 first-time retrieval.
6097 (retrieve_from_file): Return uerr_t; new argument, count.
6098 (retrieve_from_file): Break on QUOTEXC.
6100 * init.c (setquota): Fixed a bug that caused rejection of
6101 non-postfixed values..
6103 1996-10-30 Hrvoje Niksic <hniksic@srce.hr>
6105 * version.c: Changed name to wget.
6107 * connect.c (iread): Smarter use of select.
6108 (select_fd): Set errno on timeout. If not timeout, return 1
6111 1996-10-29 Hrvoje Niksic <hniksic@srce.hr>
6113 * ftp.c (ftp_loop_internal): Don't use con->cmd before
6116 1996-10-26 Hrvoje Niksic <hniksic@srce.hr>
6118 * http.c (gethttp): Send correct referer when using proxy.
6119 (gethttp): Use struct urlinfo ou to access the relevant data; send
6120 correct authorization in all cases.
6122 * host.c (same_host): Use skip_uname to skip username and
6125 * url.c (skip_uname): New function.
6128 * host.c (same_host): Do not assume HTTP -- same_host should now
6129 be totally foolproof.
6131 * url.c (skip_proto): New function.
6132 (parse_uname): Use it.
6134 * http.c (gethttp): Create local user and passwd from what is
6137 * url.c (parseurl): Check for HTTP username and password too.
6139 1996-10-25 Hrvoje Niksic <hniksic@srce.hr>
6141 * config.h.in: Removed #define gethostbyname R...
6143 1996-10-22 Hrvoje Niksic <hniksic@srce.hr>
6145 * version.c: Changed version to 1.4.0-test1.
6147 1996-10-21 Hrvoje Niksic <hniksic@srce.hr>
6149 * version.c: "Released" 1.4b29.
6151 * recur.c (recursive_retrieve): Check for no_parent.
6153 * init.c (setval): Option update.
6155 * main.c (main): New option no-parent.
6157 * options.h (struct options): New variable no_parent.
6159 * recur.c (recursive_retrieve): Only files are checked for
6160 opt.accepts and opt.rejects.
6161 (recursive_retrieve): Check directories for opt.excludes.
6162 (recursive_retrieve): Make the dir absolute when checking
6165 * html.c (htmlfindurl): Recognize <applet code=...> and <script
6168 1996-10-18 Hrvoje Niksic <hniksic@srce.hr>
6170 * ftp.c (getftp): Do not line-break assert entries at all.
6171 (ftp_retrieve_dirs): docfix.
6173 * connect.c (select_fd): Use fd + 1 as nfds.
6175 * version.c: Changed version to 1.4b29.
6177 1996-10-18 Hrvoje Niksic <hniksic@srce.hr>
6179 * version.c: "Released" 1.4b28.
6181 * ftp.c (ftp_loop_internal): Check whether f->size == len and
6182 don't continue the loop if it is.
6183 (ftp_get_listing): Remove list_filename on unsuccesful loop.
6185 1996-10-17 Hrvoje Niksic <hniksic@srce.hr>
6187 * ftp.c (ftp_loop_internal): Use strcpy to initialize tmp.
6188 (getftp): Do not use multiline assert.
6190 * http.c (hparsestatline): Use mjr and mnr instead of major and
6191 minor, which don't compile on Ultrix.
6192 (http_loop): Use strcpy() to initialize tmp.
6194 * all: Geturl -> Fetch
6196 1996-10-17 Hrvoje Niksic <hniksic@srce.hr>
6198 * recur.c (parse_robots): Fixed an off-by-one bug when looking for
6201 * html.c (htmlfindurl): Fixed several possible off-by-one bugs by
6202 moving `bufsize &&' to the beginning of each check in for-loops.
6204 * recur.c (parse_robots): Close fp on exit.
6206 * url.c (mymkdir): Check for each directory before creating.
6208 1996-10-16 Hrvoje Niksic <hniksic@srce.hr>
6210 * version.c: Changed version to 1.4b28.
6212 1996-10-16 Hrvoje Niksic <hniksic@srce.hr>
6214 * version.c: "Released" 1.4b27.
6216 * init.c (parse_line): Use isspace.
6217 (parse_line): Free *com on all errors.
6219 * ftp.c (ftp_loop): Change FTPOK to RETROK before exiting.
6220 (delelement): Use next instead of f->next and prev instead of
6222 (delelement): Free the members of the deleted element.
6224 * http.c (http_loop): Do not return RETROK on code != 20x.
6226 * init.c (cleanup): Free opt.user_header.
6227 (cleanup): Free opt.domains.
6229 * url.c (freelists): Moved to cleanup().
6231 * http.c (hparsestatline): Docfix.
6233 * main.c (main): Return with error status on unsuccesful
6236 * init.c (setval): Do not remove listing when mirroring.
6238 * url.c (url_filename): Use opt.fileprefix.
6240 * ftp.c (ftp_get_listing): Use url_filename to get filename for
6243 * main.c (main): New option: -rn.
6245 1996-10-15 Hrvoje Niksic <hniksic@srce.hr>
6247 * Makefile.in (RM): Added RM = rm -f.
6249 * host.c (clean_hosts): New function.
6250 (free_hlist): Just free the list, no reset.
6252 * version.c: Changed version to 1.4b27.
6254 1996-10-13 Hrvoje Niksic <hniksic@srce.hr>
6256 * version.c: "Released" 1.4b26.
6258 * retr.c (retrieve_from_file): If call get_urls_html with
6259 opt.spider to make it silent in spider mode.
6261 * url.c (str_url): Use CLEANDUP instead of URL_CLEANSE.
6263 * url.h (CLEANDUP): New macro.
6265 * http.c (gethttp): Fixed a bug that freed location only when it
6268 * retr.c (retrieve_url): Free url if it will not be stored,
6269 i.e. newloc is NULL.
6271 * html.c (htmlfindurl): Handle exiting from quotes correctly; the
6272 old version would bug out on <a href="x#a"href="y">.
6274 * html.h (state_t): New member in_quote.
6276 * html.c (htmlfindurl): Free s->attr at the beginning of
6279 * recur.c (recursive_retrieve): Recognize RCLEANUP.
6280 (tried_robots): Make hosts a global variable.
6281 (recursive_retrieve): Free constr after URL host optimization.
6282 (tried_robots): Free urlinfo before exiting.
6284 * utils.c (free_slist): New function.
6286 * recur.c (recursive_retrieve): Use flags to add cleanup
6289 * main.c (main): Free filename after recursive_retrieve.
6291 * http.c (gethttp): Store successful responses too.
6293 1996-10-12 Hrvoje Niksic <hniksic@srce.hr>
6295 * all: Constified the whole source. This required some minor
6296 changes in many functions in url.c, possibly introducing bugs -- I
6299 * ftp-basic.c: Removed last_respline.
6301 * http.c (gethttp): Free type.
6303 * host.c (same_host): Free real1 and real2.
6305 * main.c (main): New option --spider.
6307 * retr.c (get_contents): Don't reset errno.
6309 * main.c (main): Sorted the options.
6311 * connect.c (iread): Set errno to ETIMEDOUT only if it was left
6312 uninitialized by select().
6314 * http.c (http_loop): Print the time when the connection is
6316 (gethttp): Debug-print the HTTP request.
6318 1996-10-11 Hrvoje Niksic <hniksic@srce.hr>
6320 * connect.c (iread): Do not try reading after timeout.
6322 * main.c (main): Would bug out on -T.
6324 * connect.c (select_fd): Do not use exceptfds.
6325 (iread): Set ETIMEDOUT on select_fd <= 0.
6327 * version.c: Changed version to 1.4b26.
6329 1996-10-10 Hrvoje Niksic <hniksic@srce.hr>
6331 * version.c: "Released" 1.4b25.
6333 * ftp-unix.c (ftp_parse_unix_ls): Ignore lines without file name
6336 * http.c (gethttp): Add errcode to struct hstat.
6337 (http_loop): Use it.
6339 * url.c (no_proxy_match): Simplify using char** for no_proxy.
6341 * options.h (struct options): Make opt.no_proxy a vector.
6343 * utils.c (sepstring): Use !*s instead of !strlen(s).
6345 * init.c (setval): Set opt.maxreclevel to 0 on --mirror.
6346 (getperms): Use ISODIGIT instead of isdigit.
6348 * ftp.c (getftp): Print time.
6350 * main.c (main): Use legible output of downloaded quantity.
6352 * ftp.c (getftp): Use elapsed_time().
6353 (ftp_loop_internal): Use rate().
6355 * http.c (http_loop): Add download ratio output; Use rate().
6357 * utils.c (rate): New function.
6359 1996-10-09 Hrvoje Niksic <hniksic@srce.hr>
6361 * http.c (http_loop): Use timer.
6363 * ftp.c: Split to ftp-basic.c and ftp.c
6365 * utils.c (reset_timer): New function.
6366 (elapsed_time): New function.
6368 * retr.c (show_progress): Make bytes_in_line and offs long; should
6369 work on 16-bit machines.
6371 1996-10-08 Hrvoje Niksic <hniksic@srce.hr>
6373 * url.c (in_acclist): New argument backward.
6375 * ftp.c (ftp_retrieve_glob): Use acceptable() to determine whether
6376 a file should be retrieved according to suffix.
6377 (ftp_get_listing): Check the return value of unlink; Do not call
6378 ftp_retrieve_dirs if depth reached maxreclevel.
6379 (ftp_retrieve_dirs): Check whether the directory is in
6382 * main.c (main): Print the version number at the beginning of
6384 (main): Use strrchr when creating exec_name.
6386 * ftp.c (ftp_retrieve_glob): Do not close control connection.
6388 * version.c: Changed version to 1.4b25.
6390 1996-10-07 Hrvoje Niksic <hniksic@srce.hr>
6392 * version.c: "Released" 1.4b24.
6394 * Makefile.in: Rewrite.
6396 * ftp.c (ftp_loop_internal): Likewise.
6398 * retr.c (time_str): Check for failed time().
6400 * html.c (htmlfindurl): Recognize <fig src> and <overlay src> from
6403 * retr.c (time_str): Return time_t *.
6405 * connect.c (bindport): Close msock on unsuccesful bind.
6406 (bindport): The same for getsockname and listen.
6408 * retr.c (retrieve_url): Allow any number of retries on
6411 * http.c (gethttp): Do not treat errno == 0 as timeout.
6412 (http_loop): Likewise.
6413 (http_loop): Cosmetic changes.
6415 * connect.c (iread): Set errno to ETIMEDOUT in case of timeout.
6417 * retr.c (get_contents): Reset errno.
6419 * ftp.c (getftp): Minor fixes.
6421 1996-10-06 Hrvoje Niksic <hniksic@srce.hr>
6423 * http.c: Do not use backups.
6425 * geturl.1 (WARNING): Warn that man-page could be obsolete.
6427 * getopt.c (getopt_long): Moved to getopt.c
6429 * geturl.texi: Enhanced.
6431 * main.c (main): Use it.
6433 * recur.c (convert_all_links): New function.
6435 * utils.c (add_slist): New argument flags.
6437 * recur.c (recursive_retrieve): Update a list of downloaded URLs.
6438 (parse_robots): Do not chuck out empty value fields.
6439 (parse_robots): Make yourself welcome on empty Disallow.
6441 * version.c: Changed version to 1.4b24.
6443 1996-10-06 Hrvoje Niksic <hniksic@srce.hr>
6445 * version.c: "Released" 1.4b23.
6447 * ftp.c (ftp_loop_internal): Get the time after getftp.
6449 * Makefile.in (install.info): New target.
6452 * http.c (http_loop): Fix output when doing -O.
6454 1996-10-05 Hrvoje Niksic <hniksic@srce.hr>
6456 * geturl.texi: New file.
6458 * main.c (main): Do not print the warnings and download summary if
6461 * version.c: Changed version to 1.4b23.
6463 1996-10-05 Hrvoje Niksic <hniksic@srce.hr>
6465 * "Released" 1.4b22.
6467 * atotm.c (atotm): Use True and False instead of TRUE and FALSE,
6468 to avoid redefinition warnings.
6470 * host.c (store_hostaddress): Use memcpy() to copy the address
6471 returned by inet_addr.
6473 * version.c: Changed version to 1.4b22.
6475 1996-10-04 Hrvoje Niksic <hniksic@srce.hr>
6477 * version.c: "Released" 1.4b21.
6479 * ftp-unix.c (ftp_parse_ls): Renamed to ftp_parse_unix_ls.
6481 * ftp.c (ftp_port): Use conaddr.
6482 (getftp): Print the file length.
6483 (ftp_retrieve_list): Check the stamps of plain files only.
6485 * connect.c (closeport): Do not call shutdown().
6486 (conaddr): New function.
6488 * html.c (ftp_index): Made it dfp-aware.
6490 * init.c (cleanup): New name of freemem. Close opt.dfp.
6492 * ftp.c (getftp): Use opt.dfp if it is set.
6494 * ftp-unix.c (ftp_parse_ls): Recognize time in h:mm format.
6496 * ftp.c (ftp_retrieve_dirs): Fixed a bug that caused incorrect
6497 CWDs to be sent with recursive FTP retrievals.
6499 1996-10-03 Hrvoje Niksic <hniksic@srce.hr>
6501 * recur.c (parse_robots): Made it more compliant with "official"
6504 * http.c: New function.
6506 * ftp-unix.c (ftp_parse_ls): Added better debug output.
6508 * ftp.c (getftp): Print out the LIST in case of
6509 opt.print_server_response.
6511 * version.c: Changed version to 1.4b21.
6513 1996-10-01 Hrvoje Niksic <hniksic@srce.hr>
6515 * version.c: "Released" 1.4b20.
6519 * http.c (gethttp): Preset lengths of various headers instead of
6520 calculating them dynamically.
6521 (gethttp): Check for 206 partial contents.
6523 1996-09-30 Hrvoje Niksic <hniksic@srce.hr>
6525 * configure.in: Set SYSTEM_GETURLRC to $libdir/geturlrc
6527 * http.c (gethttp): Send the port number in the Host: header.
6529 1996-09-29 Hrvoje Niksic <hniksic@srce.hr>
6531 * http.c (gethttp): Send host: header.
6532 (gethttp): Add the possibility of user-defined headers.
6533 (gethttp): Move decision about pragma: no-cache to http_loop,
6535 (gethttp): Pass a struct instead of enormous argument list.
6536 (http_loop): Use a new, fancier display format.
6537 (ftp_loop): Likewise.
6539 * main.c: (hangup): Turn off buffering of the new log file.
6541 * install-sh: Likewise.
6543 * config.sub: Replace with the one in autoconf-2.10
6547 * init.c: New options httpuser and httppasswd.
6549 * http.c: (base64_encode_line): New function.
6550 (gethttp): Send authentication.
6552 * connect.c (make_connection): Use store_hostaddress.
6554 1996-09-28 Hrvoje Niksic <hniksic@srce.hr>
6556 * host.c (store_hostaddress): New function.
6560 * http.c (hgetrange): New function.
6561 (gethttp): Use ranges.
6563 * utils.c (numdigit): Accept long instead of int.
6565 * http.c (http_loop): Add restart capabilities.
6567 * ftp.c (ftp_retrieve_glob): Fixed a bug that could cause matchres
6568 being used uninitialized.
6569 (ftp_retrieve_list): Similar fix.
6571 * host.c (add_hlist): Fixed a bug that could cause cmp being used
6574 * url.c (construct_relative): New function.
6576 * recur.c (recursive_retrieve): Use it.
6578 * retr.c (convert_links): New function.
6580 1996-09-27 Hrvoje Niksic <hniksic@srce.hr>
6582 * url.c (free_urlpos): New function.
6584 * recur.c (recursive_retrieve): Adapt.
6586 * url.c (get_urls_html): Return a linked list instead of a vector.
6588 * url.c (get_urls_file): Return a linked list instead of a vector.
6592 * http.c (gethttp): Implement it.
6594 * init.c (setval): New option: SAVEHEADERS
6596 * ftp.c (ftp_loop_internal): Do not set restval if listing is to
6597 be retrieved. Lack of this test caused bugs when the connection
6598 was lost during listing.
6600 * retr.c (retrieve_url): Fixed a bug that caused
6601 coredumps. *newloc is now reset by default.
6602 (retrieve_url): Lift the twenty-tries limit on proxies.
6604 * version.c: Changed version to 1.4b20.
6606 1996-09-20 Hrvoje Niksic <hniksic@srce.hr>
6608 * version.c: "Released" 1.4b19.
6610 1996-09-19 Hrvoje Niksic <hniksic@srce.hr>
6612 * ftp.c (ftp_loop_internal): Renamed from ftp_1fl_loop.
6613 (getftp): Changed prototype to accept ccon *.
6615 1996-09-17 Hrvoje Niksic <hniksic@srce.hr>
6617 * ftp.c (ftp_retrieve_list): Fixed a bug that caused setting
6618 incorrect values to files pointed to by symbolic links.
6619 (ftp_1fl_loop): Do not count listings among the downloaded URL-s.
6621 1996-09-16 Hrvoje Niksic <hniksic@srce.hr>
6623 * url.c (mkstruct): Do not prepend "./" in front of a pathname.
6625 * main.c (main): New option: --user-agent.
6631 * init.c (setval): Ditto.
6633 * main.c (main): Rename "server-headers" to "server-response".
6635 * ftp-unix.c (ftp_parse_ls): Check for asterisks at the end of
6636 executables in 'ls -F' listings.
6638 1996-09-15 Hrvoje Niksic <hniksic@srce.hr>
6640 * url.c (parseurl): Remove realloc() and sprintf().
6641 (str_url): Get rid of sprintf().
6643 * recur.c (recursive_retrieve): Enable FTP recursion through proxy
6646 * url.h (URL_CLEANSE): Made it else-resistant.
6647 (USE_PROXY): New macro.
6649 1996-09-14 Hrvoje Niksic <hniksic@srce.hr>
6653 * version.c: Changed version to 1.4b19.
6655 1996-09-14 Hrvoje Niksic <hniksic@srce.hr>
6657 * version.c: "Released" 1.4b18.
6659 * url.c: Made it reallocate space exponentially.
6661 1996-09-14 Drazen Kacar <dave@fly.cc.fer.hr>
6663 * html.c (htmlfindurl): Added <frame src> and <iframe src> among
6664 the list of stuff to fetch.
6666 1996-09-13 Hrvoje Niksic <hniksic@srce.hr>
6668 * url.c (get_urls_html): Fixed a bug that caused SIGSEGV's with
6671 * html.c (htmlfindurl): Rewrite.
6673 * http.c (gethttp): Use opt.proxy_cache.
6675 * main.c (main): Added --cache option.
6677 * ftp.c (ftp_response): Print server response if opt.print_server
6679 (getftp): Print newlines after each request if the server response
6681 (ftp_response): Copy the last response line to last_respline.
6683 * http.c (gethttp): Add Pragma: nocache for retried
6686 * ftp.c (getftp): Use it.
6688 * retr.c (buf_discard): New function.
6690 * ftp.c (ftp_response): Use buf_readchar().
6691 (getftp): Flush the control connection buffer before calling
6694 * retr.c (buf_readchar): New function.
6695 (buf_flush): New function.
6696 (get_contents): Use buf_readchar() instead of read(x, x, 1).
6697 (get_contents): Use buf_flush.
6699 1996-09-12 Hrvoje Niksic <hniksic@srce.hr>
6701 * ftp.c: Incorporate changes to ftp_response.
6703 * ftp.c (ftp_response): Allocate the server response dynamically,
6704 as in read_whole_line and fetch_next_header.
6706 * utils.c (read_whole_line): Fixed a bug that prevented reading
6707 the last line if it is not \n-terminated. Also fixed a possible
6710 * http.c (fetch_next_header): Return malloc-ed string as large as
6712 (gethttp): Use new fetch_next_header.
6714 1996-09-12 Hrvoje Niksic <hniksic@srce.hr>
6716 * http.c (hgetlen): Compute the header length the first time only.
6718 (hgetlocation): Ditto.
6719 (hgetmodified): Ditto.
6721 1996-09-11 Hrvoje Niksic <hniksic@srce.hr>
6723 * sample.geturlrc: Update.
6725 1996-09-10 Hrvoje Niksic <hniksic@srce.hr>
6727 * http.c (http_loop): Ditto.
6729 * ftp.c (getftp): Open the output file as binary.
6731 * version.c: Changed version to 1.4b18.
6733 1996-09-10 Hrvoje Niksic <hniksic@srce.hr>
6735 * version.c: "Released" 1.4b17.
6737 * ftp-unix.c (ftp_parse_ls): If unable to open file, return NULL
6738 instead of failed assertion.
6740 1996-09-09 Hrvoje Niksic <hniksic@srce.hr>
6742 * ftp.c (ftp_get_listing): Add a numbered suffix to LIST_FILENAME
6743 if a file of that name already exists.
6745 1996-09-05 Hrvoje Niksic <hniksic@srce.hr>
6747 * ftp.c (ftp_1fl_loop): Handler FTPPORTERR and FOPENERR correctly.
6749 * config.h.in: Define gethostbyname as Rgethostbyname when using
6752 * configure.in: Check for -lresolv if using Socks.
6754 * version.c: Changed version to 1.4b17.
6756 1996-07-15 Hrvoje Niksic <hniksic@srce.hr>
6758 * version.c: "Released" 1.4b16.
6760 * http.c (gethttp): More intelligent check for first line of HTTP
6762 (gethttp): Would bug out on time-stamping.
6764 * version.c: Changed version to 1.4b16.
6766 1996-07-11 Hrvoje Niksic <hniksic@srce.hr>
6768 * version.c: Released 1.4b15.
6770 * http.c (http_loop): Print \n after the loop entry, not before.
6772 * url.c (url_filename): Use ISDOT.
6774 * url.h (ISDOT): New macro.
6776 * recur.c (recursive_retrieve): Change only opt.recursive for
6779 1996-07-11 Antonio Rosella <antonio.rosella@agip.it>
6781 * socks/geturl.cgi: Fixed version No.
6783 * socks/download-netscape.html: Ditto.
6785 * socks/download.html: Changed socks.html to download.html.
6787 1996-07-11 Hrvoje Niksic <hniksic@srce.hr>
6789 * url.c (url_filename): Check for opt.dirstruct instead for
6790 opt.recursive && opt.dirstruct.
6792 * init.c (defaults): Ditto.
6793 (defaults): Reset dirstruct by default.
6794 (setval): Set opt.dirstruct whenever setting recursive.
6796 * init.h: Removed FORCEDIRHIER.
6798 * INSTALL: Added -L to socks-description.
6800 * version.c: Changed version to 1.4b15.
6802 1996-07-10 Hrvoje Niksic <hniksic@srce.hr>
6804 * version.c: "Released" 1.4b14.
6806 * geturl.1: Update AUTHOR to include Rosella as contributor.
6810 * socks/geturl.cgi: Simplified command creation, nuked <blink>.
6812 * socks/geturl.cgi: Wrap nutscape extensions within if $netscape.
6813 (cal_time): Fix == to eq.
6815 * socks/geturl.cgi: GPL-ized with permission of A. Rosella.
6817 * geturl.1 (hostname): Moved URL CONVENTIONS to the beginning.
6819 * Makefile.in: Use @VERSION@.
6821 * configure.in: Check version from version.c.
6823 * socks/geturl.cgi: Changed /pub/bin/perl to /usr/bin/perl.
6825 * socks/download.html: Created from download-netscape.html, made
6828 * recur.c (recursive_retrieve): Set opt.force_dir_hier when
6829 following FTP links from recursions.
6831 1996-07-09 Hrvoje Niksic <hniksic@srce.hr>
6833 * url.c (mymkdir): Fixed a bug that prevented mymkdir() to create
6834 absolute directories correctly.
6836 * version.c: Changed version to 1.4b14.
6838 1996-07-09 Hrvoje Niksic <hniksic@srce.hr>
6840 * version.c: "Released" 1.4b13.
6842 * url.c (make_backup): New function.
6844 * http.c (http_loop): Make a backup copy of the local file (using
6845 rename(2)) before opening it.
6847 * main.c (main): Added --backups.
6849 * host.c (ftp_getaddress): Bail out on failed mycuserid().
6850 (ftp_getaddress): Check for leading dot on MY_DOMAIN.
6851 (ftp_getaddress): Check for empty, null or (null) domain.
6853 * url.c (get_urls_html): If this_url is NULL, the base must have a
6855 (parseurl): Use has_proto.
6857 * retr.c (retrieve_url): Warn when proxy is used with more than 20
6860 * url.c (mkstruct): Create the directory (calling mymkdir()) only
6861 if it is not already there.
6862 (has_proto): New function.
6863 (get_urls_html): Eliminate the remaining call to findurl -- use
6868 * main.c: Change -X to -x.
6870 * url.c (url_filename): Simplify creation of filename if
6871 prefix_files is set.
6872 (url_filename): Simplify everything. And I do mean *everything*.
6873 (mkstruct): Add dir_prefix before hostname.
6874 (path_simplify): Fixed a bug that caused writing outside the path
6875 string in case of "." and ".." path strings.
6877 1996-07-06 Hrvoje Niksic <hniksic@srce.hr>
6879 * init.c: Added --mirror.
6881 * main.c (main): Added -X to force saving of directory hierarchy.
6883 * ftp.c (ftp_retrieve_list): Added recursion depth counter.
6884 (ftp_retrieve_list): Check whether quota is exceeded.
6886 * url.c (get_urls_html): Skip leading blanks for absolute URIs.
6888 * http.c (gethttp): Use referer if present.
6890 * recur.c (recursive_retrieve): Set u->referer before calling
6893 * url.c (newurl): Use memset to nullify the struct members.
6894 (freeurl): Free the referer field too.
6896 * url.h: Added referer to urlinfo.
6898 * geturl.1: Updated the manual to document some of the new features.
6900 * utils.c (numdigit): Moved from url.c.
6902 * README: Rewritten.
6904 * config.h.in: Add the support for socks.
6906 * configure.in: Add the support for socks.
6908 * url.c (url_filename): If the dir_prefix is ".", work with just
6910 (url_filename): Do not look for .n extensions if timestamping if
6913 * retr.c (show_progress): Skip the over-abundant restval data, and
6914 print the rest of it with ',' instead of '.'.
6916 1996-07-05 Hrvoje Niksic <hniksic@srce.hr>
6918 * retr.c (show_progress): Changed second arg. to long (as it
6920 (show_progress): Moved to retr.c.
6921 (get_contents): Moved to retr.c.
6923 * version.c: Change version to 1.4b13.
6925 1996-07-05 Hrvoje Lacko <hlacko@fly.cc.fer.hr>
6927 * url.c (in_acclist): Would return after the first suffix.
6929 1996-07-04 Hrvoje Niksic <hniksic@srce.hr>
6931 * version.c: "Released" 1.4b12.
6933 * url.c (path_simplify): More kludgifications.
6934 (get_urls_html): Use new parameters for htmlfindurl.
6936 * html.c: Removed memorizing "parser states", since the new
6937 organization does not require them.
6939 * init.c (run_geturlrc): Use read_whole_line.
6941 * ftp-unix.c (ftp_parse_ls): Use read_whole_line.
6943 * recur.c (parse_robots): Use read_whole_line.
6945 * utils.c (read_whole_line): New function.
6947 * recur.c (tried_robots): Use add_slist/in_slist, *much* cleaner.
6949 * host.c (ngethostbyname): Call inet_addr just once. Yet to be
6950 tested on OSF and Ultrix.
6951 (add_hlist): New function.
6952 (free_hlist): New function.
6953 (search_host): New function.
6954 (search_address): New function.
6955 (realhost): Use search_host, search_address and add_hlist.
6956 (same_host): Replaced realloc() with strdupdelim(), made
6957 case-insensitive, fixed a memory leak.
6959 * html.c (ftp_index): Fixed tm_min and tm_sec to be tm_hour and
6960 tm_min, like intended.
6962 * version.c: Change user agent information to
6965 1996-07-03 Hrvoje Niksic <hniksic@srce.hr>
6967 * utils.c: Renamed nmalloc.c to utils.c, .h likewise.
6969 * url.c (acceptable): Always accept directories.
6971 * ftp-unix.c (ftp_parse_ls): Support brain-damaged "ls -F"-loving
6972 servers by stripping trailing @ from symlinks and trailing / from
6975 * ftp.c (ftp_loop): Debugged the "enhanced" heuristics. :-)
6977 * url.c (skip_url): Use toupper instead of UCASE.
6979 * host.c (sufmatch): Made it case-insensitive.
6981 * url.c (match_backwards_or_pattern): Fixed i == -1 to j == -1.
6982 (match_backwards): New function, instead of
6983 match_backwards_or_pattern.
6985 * recur.c (recursive_retrieve): Increased performance by
6986 introducing inl, which reduces number of calls to in_slist to only
6989 * ftp.c (ftp_loop): Enhanced the heuristics that decides which
6992 * main.c (printhelp): Removed the warranty stuff.
6994 1996-07-02 Hrvoje Niksic <hniksic@srce.hr>
6996 * url.c (add_slist): Simplify.
6997 (match_backwards_or_pattern): New function.
6998 (in_acclist): Use match_backwards_or_pattern.
7001 1996-06-30 Hrvoje Niksic <hniksic@srce.hr>
7003 * ftp.c (ftp_loop): Call ftp_index on empty file names, if not
7006 * html.c (ftp_index): Fixed to work. Beautified the output.
7008 * ftp.c (ftp_retrieve_glob): Another argument to control whether
7009 globbing is to be used.
7010 (ftp_retrieve_list): Compare the time-stamps of local and remote
7011 files to determine whether to download.
7013 1996-06-29 Hrvoje Niksic <hniksic@srce.hr>
7015 * ftp.c (rel_constr): New function.
7017 * retr.c (retrieve_from_file): Check for text/html before
7018 retrieving recursively.
7020 * main.c (main): Check whether the file is HTML before going into
7021 recursive HTML retrieving.
7023 * ftp.c (ftp_retrieve_list): Manage directories.
7024 (ftp_retrieve_glob): Pass all the file-types to ftp_retrieve_list.
7025 (ftp_1fl_loop): Fixed a bug that caused con->com to be incorrectly
7026 initialized, causing bugchecks in getftp to fail.
7028 * configure.in: Check for symlink.
7030 * ftp.c (ftp_retrieve_list): Added support for symlinks.
7032 * version.c: "Released" 1.4b10.
7034 * atotm.c (atotm): Redeclared as time_t.
7036 * init.c: New variable "timestamping".
7038 * main.c (main): New option 'N'.
7040 * http.c (hgetlocation): Case-insensitive match.
7041 (hgetmodified): New function.
7042 (http_loop): Implement time-stamping.
7044 1996-06-28 Hrvoje Niksic <hniksic@srce.hr>
7046 * version.c: Changed version to 1.4b10
7048 * atotm.c: New file, from phttpd.
7050 * options.h (struct options): New parameter timestamping.
7052 * version.c: 1.4b9 "released".
7054 * recur.c (recursive_retrieve): Used linked list (ulist) for
7055 faster storing of URLs.
7057 * url.c (get_urls_html): Removed the old kludge with comparing the
7058 outputs of htmlfindurl and findurl.
7059 (get_urls_html): Added better protocol support here.
7060 (create_hash): Removed, as well as add_hash and in_hash.
7061 (addslist): New function.
7064 * version.c: Released 1.4b8, changed version to b9.
7066 1996-06-27 Hrvoje Niksic <hniksic@srce.hr>
7068 * ftp.c (freefileinfo): New function.
7069 (delelement): New function.
7073 * ftp.c (ftp_loop): Use ccon.
7074 (ftp_retrieve_glob): Likewise.
7076 * ftp.h: Define ccon, to define status of control connection.
7078 * ftp.c (ftp_get_listing): New function.
7079 (ftp_retrieve_more): New function.
7080 (ftp_retrieve_glob): New function.
7082 1996-06-25 Hrvoje Niksic <hniksic@srce.hr>
7084 * configure.in: Removed the search for cuserid().
7086 * init.c (getmode): Renamed to getperms.
7088 1996-06-24 Hrvoje Niksic <hniksic@srce.hr>
7090 * version.c: New version.
7092 * main.c (hangup): New function, that handles hangup. Hangup
7093 signal now causes geturl to stop writing on stdout, and to write
7096 * ftp.c (getftp): "Released" 1.4b7.
7098 * html.c (htmlfindurl): Ignore everything inside <head>...</head>.
7099 (ftp_index): Use fileinfo/urlinfo.
7101 * ftp-unix.c (ftp_parse_ls): New function.
7102 (symperms): New function.
7104 * ftp.c (ftp_1fl_loop): New function, to handle 1-file loops.
7106 * retr.c (retrieve_url): Added FTP support.
7108 1996-06-23 Hrvoje Niksic <hniksic@srce.hr>
7110 * geturl.h: Removed NOTFTP2HTML enum.
7111 Added DO_LOGIN, DO_CWD and DO_LIST. LIST_ONLY is obsolete.
7113 * ftp.c (getftp): Resynched with urlinfo.
7114 (getftp): Removed HMTL-ization of index.html from getftp.
7116 * version.c: 1.4b6 "released".
7118 * options.h (options): New struct, to keep options in.
7120 * http.c (http_loop,gethttp): Synched with proxy.
7122 * retr.c (retrieve_url): Implemented proxy retrieval.
7124 * main.c (main): Use retrieve_from_file.
7126 1996-06-22 Hrvoje Niksic <hniksic@srce.hr>
7128 * retr.c (retrieve_from_file): New function.
7130 * url.c (parseurl): Modified to return URLOK if all OK. Protocol
7131 can be found in u->proto.
7133 * ftp.c (ftp_response): Fixed to accept multi-line responses as
7136 * recr.c (recursive_retrieve): Take newloc from retrieve_url.
7138 * url.c (mymkdir): Removed the file of the same name, if one
7140 (isfile): New function.
7141 (mkstruct): Fixed the '/' glitches.
7142 (path_simplify): Hacked to treat something/.. correctly.
7144 1996-06-21 Hrvoje Niksic <hniksic@srce.hr>
7146 * http.c (gethttp): Close the socket after error in headers.
7147 (http_loop): HEOF no longer a fatal header.
7149 * loop.c (retrieve_url): When dt is NULL, do not modify it. This
7150 simplifies the syntax of calling retrieve_url.
7152 * recr.c (recursive_retrieve): Modified to use get_urls_html.
7154 * url.c (get_urls_file): New function.
7155 (get_urls_html): New function.
7157 * recr.c (recursive_retrieve): Patched up to conform to the
7160 * http.c (gethttp): Synched with the rest...
7161 (gethttp): Treat only CONREFUSED specially, with connection
7164 * init.c,geturl.1,http.c (http_loop): Removed kill_error.
7166 1996-06-20 Hrvoje Niksic <hniksic@srce.hr>
7168 * http.c (http_loop): New function.
7170 * loop.c: Removed *lots* of stuff from retrieve_url.
7172 * url.c (parseurl): Changed to work with urlinfo. Integrated
7173 username finding and path parsing.
7174 (newurl): New function.
7175 (freeurl): New function.
7176 (mkstruct): Removed the old bogosities, made it urlinfo-compliant.
7177 (url_filename): Likewise.
7178 (path_simplify): Accept relative paths too.
7179 (opt_url): Made urlinfo-compliant, removed bogosities.
7180 (path_simplify): Expanded to accept relative paths.
7181 (str_url): A replacement for hide_url
7182 (decode_string): Fixed a bug that caused malfunctioning when
7183 encountering an illegal %.. combination.
7184 (opt_url): Removed the argument. Dot-optimizations are now default.
7186 * nmalloc.c (strdupdelim): New function.
7188 * url.h: Added the urlinfo structure
7190 1996-06-19 Hrvoje Niksic <hniksic@srce.hr>
7192 * url.c (hide_url): Thrown out the protocol assertion. Do not
7193 change the URL if the protocol if not recognized.
7194 (findurl): Put continue instead of break.
7196 1996-06-18 Hrvoje Niksic <hniksic@srce.hr>
7198 * sample.geturlrc: Changed the defaults to be commented out and
7199 harmless (previous defaults caused pains if copied to
7202 * http.c (gethttp): Print the HTTP request in debug mode.
7204 * connect.c (iread): Added EINTR check loop to select-ing
7205 too. EINTR is now correctly handled with select().
7209 1996-05-07 Hrvoje Niksic <hniksic@srce.hr>
7211 * host.c (same_host): Made the function a little bit more
7212 intelligent regarding diversified URL syntaxes.
7214 * url.c (skip_url): Spaces are now skipped after URL:
7216 * Released 1.3.1 with the patch to prevent crashing when sending
7217 NULL to robot* functions and the patch to compile "out of the box"
7220 * recr.c (recursive_retrieve): Added checking whether this_url is
7221 NULL when calling the robot functions.
7223 * ChangeLog: New file.