1 2000-12-18 Csaba Raduly <csaba.raduly@sophos.com>
3 * sysdep.h: Include <malloc.h> and <io.h> under Watcom.
5 2000-12-31 Dan Harkless <wget@harkless.org>
7 * ChangeLog: Since this flat file doesn't have multiple branches,
8 looking at the dates would make you think that things went into
9 1.6 that actually just went into the 1.7-dev branch. Added "[Not
10 in 1.6 branch.]" where appropriate to clarify.
12 2000-12-30 Dan Harkless <wget@harkless.org>
14 * ftp.c, http.c: Applied Hack Kampbjørn <hack@hackdata.com>'s
15 patch to deal with h_errno not being defined in netdb.h under Cygwin.
17 * version.c: Released Wget version 1.6.
19 2000-12-17 Igor Khristophorov <igor@atdot.org>
21 * http.c (check_end): Fix test for '+' or '-'.
23 2000-12-17 Hrvoje Niksic <hniksic@arsdigita.com>
25 * url.c (parseurl): Rename inner loop var from i to ind to avoid
26 clash with the function top-level-declared variable i.
27 (str_url): Likewise, rename inner-loop i to j.
29 * recur.c (parse_robots): Don't declare LEN at top of function.
30 (robots_match): Renamed parameter FORBIDDEN to avoid hiding of
33 * main.c (main): Change erroneous use of bitwise and to logical.
35 * init.c (cmd_address): Don't heap-allocate `sin'; it can be on
36 the stack because it will be copied to closure.
38 Thanks to Csaba Raduly's run of PC-LINT over the sources.
40 2000-12-17 Hrvoje Niksic <hniksic@arsdigita.com>
42 * http.c (basic_authentication_encode): Use xmalloc(), not
43 malloc(). Thanks to Csaba Raduly's run of PC-LINT over the
46 2000-12-17 Csaba Raduly <csaba.raduly@sophos.com>
48 * sysdep.h: Test for __EMX__ rather than for EMXOS2 for OS/2
51 2000-12-17 Hrvoje Niksic <hniksic@arsdigita.com>
53 * mswindows.c: Include <errno.h>.
55 * gen_sslfunc.c: Include <errno.h>. [Not in 1.6 branch.]
57 * ftp-basic.c: Don't attempt to declare errno or h_errno because
60 * main.c: Include <errno.h> because errno is used.
64 * http.c: Include <netdb.h> for h_errno.
66 2000-12-13 Hrvoje Niksic <hniksic@arsdigita.com>
68 * html-parse.c (advance_declaration): MSVC assert() chokes on
69 '\"'. Use '"' instead. [Not in 1.6 branch.]
71 2000-12-11 Hrvoje Niksic <hniksic@arsdigita.com>
73 * utils.c (xfree_real): Removed.
74 (xfree_debug): Just call free().
77 * wget.h (xfree): Make it an alias for free. [Not in 1.6 branch.]
79 2000-12-11 Hrvoje Niksic <hniksic@arsdigita.com>
81 * http.c (http_loop): Furthermore, touch output_document only if
82 it is known to be an existing regular file.
84 2000-12-11 Hrvoje Niksic <hniksic@arsdigita.com>
86 * ftp.c (ftp_retrieve_list): Ditto.
88 * http.c (http_loop): Touch output_document if that is used for
91 2000-12-06 Hrvoje Niksic <hniksic@arsdigita.com>
93 * http.c: Include gen_sslfunc.h after including Wget's headers.
94 (persistent_available_p): Needed coma before `int ssl'.
97 2000-12-06 Hrvoje Niksic <hniksic@arsdigita.com>
99 * ftp.c (ftp_loop_internal): Ditto.
101 * http.c (http_loop): Use it.
103 * retr.c (sleep_between_retrievals): New function that handles the
104 logic of opt.wait and opt.waitretry.
106 2000-12-06 Hrvoje Niksic <hniksic@arsdigita.com>
108 * rbuf.h: Implement only a single version of RBUF_READCHAR, using
109 rbuf_read_bufferful when the buffer is depleted. [Not in 1.6 branch.]
111 * rbuf.c (rbuf_read_bufferful): New function. [Not in 1.6 branch.]
113 2000-12-06 Hrvoje Niksic <hniksic@arsdigita.com>
115 * gen_sslfunc.h: Use ansi2knr style function declarations. [Not
118 * gen_sslfunc.c: Reformat according to the GNU coding standards.
119 More should be done. [Not in 1.6 branch.]
121 * http.c (persistent_available_p): Place the cheap SSL test nearer
122 the top of the function.
123 (CLOSE_FINISH, CLOSE_INVALIDATE): Define only one version of each.
126 2000-12-03 Christian Fraenkel <christian.fraenkel@gmx.net>
128 * Makefile.in: added gen_sslfunc object
129 * config.h.in: added HAVE_SSL define
130 * connect.c: changed select_fd from static int to int
132 * gen_sslfunc.h: New file
133 * gen_sslfunc.c: ditto
134 * http.c: added HTTPS fuctionality
137 * init.c: added opt.httpsproxy
139 * rbuf.h: added alternate rbuf struct
140 * wget.h: added CONSSLERR
143 * http.c: Added HTTPS fuctionality.
149 * init.c: Added opt.httpsproxy.
153 * rbuf.h: Added alternate rbuf struct.
155 * wget.h: Added CONSSLERR.
159 [All above not in 1.6 branch.]
161 2000-11-30 Jan Prikryl <prikryl@cg.tuwien.ac.at>
163 * ftp-ls.c (ftp_parse_unix_ls): Added second parameter
164 "ignore_perms" to ignore file and directory permissions for
165 Windows NT FTP server listings.
166 (ftp_parse_winnt_ls): New function.
167 (ftp_parse_ls): Parses UNIX and Windows NT listings
168 separately. Simple heuristics for distinguishing between UNIX
169 and MS-DOS-like FTP listing provided by Windows NT FTP service.
172 2000-12-05 Hrvoje Niksic <hniksic@arsdigita.com>
174 * url.c (init_unsafe_char_table): Reinstate space as an unsafe
175 char. [Not in 1.6 branch.]
177 2000-11-29 John Summerfield <summer@OS2.ami.com.au>
179 * netrc.c (parse_netrc): Get rid of line ending. [Not in 1.6 branch.]
181 2000-11-25 Hrvoje Niksic <hniksic@arsdigita.com>
183 * ftp.c (ftp_retrieve_list): Undo typo "fix" until resolution by
184 Dan. [Not in 1.6 branch.]
186 2000-11-24 Karl Eichwalder <ke@suse.de>
188 * main.c (print_help): Untabify.
190 2000-11-23 Hrvoje Niksic <hniksic@arsdigita.com>
192 * utils.c (xrealloc_debug): Do the unregister/register thing only
193 if the pointer has actually changed.
194 (xmalloc_real): Declare `static' in DEBUG_MALLOC builds.
196 (xrealloc_real): Ditto.
197 (xstrdup_real): Ditto.
200 2000-11-22 Hrvoje Niksic <hniksic@arsdigita.com>
202 * ftp.c (getftp): ftp_getaddress() returns a malloc'ed copy of the
203 string; no need to strdup() it.
204 (getftp): Make pwd_len a local variable. [Not in 1.6 branch.]
205 (ftp_loop): Free PWD before returning. [Not in 1.6 branch.]
207 * init.c (cleanup): Free opt.ftp_pass only if it's non-NULL.
209 2000-11-22 Hrvoje Niksic <hniksic@arsdigita.com>
211 * all: Use xfree() instead of free. [Not in 1.6 branch.]
213 * utils.c (xfree): New function. [Not in 1.6 branch.]
215 2000-11-21 Hrvoje Niksic <hniksic@arsdigita.com>
217 * url.c (convert_links): HTML-quote the converted string. [Not in
220 * utils.c (html_quote_string): Move here from ftp-ls.c
221 (html_quote_string): Make non-static; declare in utils.h.
222 (html_quote_string): Convert SP to  .
225 2000-11-21 Hrvoje Niksic <hniksic@arsdigita.com>
227 * ftp.c (getftp): Reformat Jan's code according to GNU coding
228 standards; remove (debugging?) printf's; use '\0' for the ASCII
229 zero character. Use alloca() instead of malloc() for
230 inter-function temporary allocations.
233 2000-11-18 Jan Prikryl <prikryl@cg.tuwien.ac.at>
235 * ftpparse.c, ftpparse.h: New files. [Not in 1.6 branch.]
237 * ftp-ls.c (ftp_parse_ls): Use ftp_parse_unix_ls for UNIX servers
238 only. Use ftp_parse_nonunix_ls otherwise.
239 (ftp_parse_nonunix_ls): Stub to the ftpparse library handling all
243 * ftp.h (stype): New enum, distinguishes UNIX, VMS, and "other"
244 FTP servers. [Not in 1.6 branch.]
246 * ftp.c: New static wariables host_type, pwd, and pwd_len.
247 (getftp): Support for VMS. Support for FTP servers that do not
248 place you in the root directory after login.
249 (ftp_retrieve_list): VMS is silent about the real file size, issue
250 a more appropriate message.
251 (ftp_get_listing): Pass host_type to ftp_parse_ls.
254 * ftp-basic.c (ftp_pwd, ftp_syst): New functions. [Not in 1.6 branch.]
256 2000-11-21 Hrvoje Niksic <hniksic@arsdigita.com>
258 * hash.c (hash_table_put): Don't overwrite deleted mappings. [Not
261 2000-11-21 Hrvoje Niksic <hniksic@arsdigita.com>
263 * hash.c (find_mapping): New function.
264 (hash_table_get): Use it.
265 (hash_table_get_pair): Ditto.
266 (hash_table_exists): Ditto.
267 (hash_table_remove): Ditto.
268 (hash_table_remove): Really delete the entry if the mapping
269 following LOCATION is empty.
272 * utils.c (string_set_add): Check whether the element has existed
273 before. [Not in 1.6 branch.]
275 * hash.c (hash_table_get_pair): New function. [Not in 1.6 branch.]
277 2000-11-20 Hrvoje Niksic <hniksic@arsdigita.com>
279 * http.c (http_process_type): Ignore trailing whitespace; use
280 strdupdelim(). [Not in 1.6 branch.]
282 * recur.c (recursive_retrieve): Use the new `convert' field.
283 (convert_all_links): Ditto.
284 (convert_all_links): Don't respect meta_disallow_follow.
287 * html-url.c (handle_link): Fill out link_relative_p and
288 link_complete_p. [Not in 1.6 branch.]
290 * url.h (struct _urlpos): Make elements more readable. [Not in
293 * recur.c (recursive_retrieve): Call slist_prepend instead of
295 (convert_all_links): Call slist_nreverse before iterating through
299 * utils.c (slist_prepend): New function.
300 (slist_nreverse): Ditto.
303 2000-11-20 Hrvoje Niksic <hniksic@arsdigita.com>
305 * http.c (check_end): Constify.
307 2000-11-20 Hrvoje Niksic <hniksic@arsdigita.com>
309 * http.c (http_loop): If username and password are known, try the
310 `Basic' authentication scheme by default. [Not in 1.6 branch.]
312 * connect.h: Declare test_socket_open. [Not in 1.6 branch.]
314 2000-11-20 Hrvoje Niksic <hniksic@arsdigita.com>
316 * version.c: Bump version to 1.7-dev. [Not in 1.6 branch.]
318 2000-11-20 Hrvoje Niksic <hniksic@arsdigita.com>
320 * http.c (gethttp): Don't use the return value of sprintf().
321 (gethttp): Inhibit keep-alive if opt.http_keep_alive is 0.
324 2000-11-20 Hrvoje Niksic <hniksic@arsdigita.com>
326 * recur.c (recursive_retrieve): Print the "so we don't load"
327 debugging message only if we really don't load. [Not in 1.6 branch.]
329 * http.c (gethttp): Inhibit keep-alive if proxy is being used.
330 (gethttp): Don't request keep-alive if keep-alive is inhibited.
333 2000-11-19 Hrvoje Niksic <hniksic@arsdigita.com>
335 * http.c (gethttp): Make the HTTP persistent connections more
336 robust. [Not in 1.6 branch.]
338 2000-11-19 Hrvoje Niksic <hniksic@arsdigita.com>
340 * retr.c (get_contents): If use_expected, make sure that the
341 appropriate amount of data is being read. [Not in 1.6 branch.]
343 * http.c (gethttp): Check for both `Keep-Alive: ...' and
344 `Connection: Keep-Alive'. [Not in 1.6 branch.]
346 * wget.h (DEBUGP): Call debug_logprintf only if opt.debug is
347 turned on. [Not in 1.6 branch.]
349 2000-11-19 Hrvoje Niksic <hniksic@arsdigita.com>
351 * http.c (connection_available_p): Use it. [Not in 1.6 branch.]
353 * connect.c (test_socket_open): New function. [Not in 1.6 branch.]
355 * http.c (gethttp): Support persistent connections. Based on the
356 ideas, and partly on code, by Sam Horrocks <sam@daemoninc.com>.
357 (register_persistent): New function.
358 (connection_available_p): Ditto.
359 (invalidate_connection): Ditto.
362 2000-11-19 Hrvoje Niksic <hniksic@arsdigita.com>
364 * url.c (convert_links): Handle UREL2ABS case. [Not in 1.6 branch.]
366 * recur.c (recursive_retrieve): Instead of the list
367 urls_downloaded, use hash tables dl_file_url_map and
369 (convert_all_links): Use them to retrieve data.
372 * host.c (clean_hosts): Free the hash tables. [Not in 1.6 branch.]
374 * main.c (private_initialize): Call host_init(). [Not in 1.6 branch.]
376 * host.c (store_hostaddress): Use a saner, hash table-based data
379 (host_init): Initialize the hash tables.
382 2000-11-18 Hrvoje Niksic <hniksic@arsdigita.com>
384 * utils.c (slist_append): Eviscerate NOSORT. Hash tables are now
385 used for what the sorted slists used to be used for.
386 (slist_contains): Don't rely on the list being sorted.
387 (slist_append): Simplify the code.
390 * recur.c (recursive_cleanup): Use free_string_set. [Not in 1.6
393 * utils.c (string_set_add, string_set_exists, string_set_free):
394 New functions for easier freeing of hash tables whose keys are
395 strdup'ed strings. [Not in 1.6 branch.]
397 * recur.c (recursive_retrieve): Use the hash table functions for
398 storing undesirable URLs. [Not in 1.6 branch.]
400 * hash.c: New file. [Not in 1.6 branch.]
402 2000-11-17 Hrvoje Niksic <hniksic@arsdigita.com>
404 * main.c (private_initialize): Call url_init.
405 (main): Call private_initialize.
408 * url.c (unsafe_char_table): New table.
409 (UNSAFE_CHAR): Use it.
410 (init_unsafe_char_table): New function.
411 (url_init): New function; call init_unsafe_char_table.
414 2000-11-15 Hrvoje Niksic <hniksic@arsdigita.com>
416 * html-url.c (handle_link): Handle HTML fragment identifiers.
419 * recur.c (recursive_retrieve): If norobot info is respected and
420 the file is specified not to be followed by robots, respect that.
423 * html-url.c (collect_tags_mapper): Handle <meta name=robots
424 content=X>. For us the important cases are where X is NONE or
425 where X contains NOFOLLOW.
426 (get_urls_html): Propagate that information to the caller.
429 2000-11-13 Hrvoje Niksic <hniksic@arsdigita.com>
431 * url.c (convert_links): Unlink the file we might be reading from
432 before writing to it.
433 (convert_links): Use alloca instead of malloc for
434 filename_plus_orig_suffix.
437 2000-11-10 Hrvoje Niksic <hniksic@arsdigita.com>
439 * url.c (get_urls_file): Ditto.
440 (convert_links): Ditto.
443 * html-url.c (get_urls_html): Use read_file() instead of
444 load_file(). [Not in 1.6 branch.]
446 * utils.c (read_file): New function, instead of the old
448 (read_file_free): Ditto.
451 * url.c (findurl): Search only for the supported protocols.
452 (convert_links): Use fwrite() when writing out a region of
456 2000-11-10 Hrvoje Niksic <hniksic@arsdigita.com>
458 * ftp-ls.c: Move html_quote_string and ftp_index here. [Not in
461 * url.c: Remove get_urls_html, since that's now in html-url.c.
464 * html-url.c: New file. [Not in 1.6 branch.]
466 * html-parse.c: New file. [Not in 1.6 branch.]
468 2000-11-16 Hrvoje Niksic <hniksic@arsdigita.com>
470 * mswindows.h: Define snprintf and vsnprintf to _snprintf and
471 _vsnprintf respectively.
473 2000-11-15 Hrvoje Niksic <hniksic@arsdigita.com>
475 * config.h.in: Do the _XOPEN_SOURCE and _SVID_SOURCE things only
478 2000-11-12 Hrvoje Niksic <hniksic@arsdigita.com>
480 * host.c (realhost): Add HOST to the list with quality==0 only if
481 it wasn't already there.
482 Based on analysis by Lu Guohan <feng@public.bjnet.edu.cn>.
484 2000-11-10 Hrvoje Niksic <hniksic@arsdigita.com>
486 * init.c (run_wgetrc): Don't bother killing off '\r' since
487 pars_line() skips whitespace at end of line anyway.
488 (parse_line): Oops, it didn't. Now it does.
490 * recur.c (parse_robots): Ditto here.
492 * ftp-ls.c (ftp_parse_unix_ls): Kill off the newline character
493 manually because read_whole_line no longer does.
495 * utils.c (read_whole_line): Rewrite to: a) use less memory
496 (reallocates to needed size after work), b) work faster -->
497 fgets() instead of getc, c) be more correct --> doesn't kill the
498 newline character at the end of line.
500 2000-11-10 Hrvoje Niksic <hniksic@arsdigita.com>
502 * init.c (comind): Initialize MAX to array size - 1.
504 2000-11-08 Hrvoje Niksic <hniksic@arsdigita.com>
506 * url.c (construct): Changed last_slash[-1] to *(last_slash - 1).
507 Suggested by Edward J. Sabol.
509 2000-11-08 Hrvoje Niksic <hniksic@arsdigita.com>
511 * url.c (construct): Handle the case where host name is not
514 2000-11-06 Hrvoje Niksic <hniksic@arsdigita.com>
516 * init.c: commands[] need to be sorted! ("base" wasn't.)
518 2000-11-05 Hrvoje Niksic <hniksic@arsdigita.com>
520 * wget.h (DO_REALLOC_FROM_ALLOCA): Use braces to disambiguate
523 2000-11-05 Hrvoje Niksic <hniksic@arsdigita.com>
525 * url.c (construct): Insert unneeded initialization for the
528 * config.h.in: Define _XOPEN_SOURCE to 500 to get the prototype
529 for strptime() (*duh*). Define _SVID_SOURCE to get S_IFLNK which
530 otherwise gets lost when you define _XOPEN_SOURCE.
532 * utils.c (touch): Include the file name in the error message.
535 2000-11-05 Hrvoje Niksic <hniksic@arsdigita.com>
537 * log.c (logvprintf): Use vsnprintf() in all cases. If necessary,
538 resize the buffer to fit the formated message. That way, messages
539 of arbitrary size may be printed.
540 (logvprintf): Use saved_append() to optionally log the last
541 several lines of output.
543 (log_close): Adapt to new data structures.
545 (redirect_output): Print messages to stderr, not to stdout.
547 * log.c (saved_append_1): New function. Replaces the old logging
548 system ("log all output until 10M characters") with a new, much
549 more reasonable one ("log last screenful of text").
550 (saved_append): New function; call saved_append_1.
551 (free_log_line): New function.
553 2000-11-05 Hrvoje Niksic <hniksic@arsdigita.com>
555 * url.c (construct): Fix comment.
556 (find_last_char): Document.
558 2000-11-04 Hrvoje Niksic <hniksic@arsdigita.com>
560 * snprintf.c: New file.
562 2000-11-03 Hrvoje Niksic <hniksic@arsdigita.com>
564 * wget.h: If HAVE_STDARG_H is not defined, don't declare argument
565 types to logprintf() and debug_logprintf().
567 2000-11-02 Hrvoje Niksic <hniksic@arsdigita.com>
569 * ftp.c (ftp_loop_internal): Hide the password from the URL when
570 printing non-verbose. Problem spotted by Dariusz Mlynarczyk
571 <darekm@bydg.lomac.com.pl>.
573 2000-11-02 Junio Hamano <junio@twinsun.com>
575 * ftp-basic.c (ftp_login): Make comparison case-insensitive.
577 2000-11-02 Tyler Riddle <triddle@liquidmarket.com>
579 * http.c (known_authentication_scheme_p): Recognize NTML
581 (create_authorization_line): Treat NTML the same as `Basic'.
583 2000-11-02 Hrvoje Niksic <hniksic@arsdigita.com>
585 * retr.c (retrieve_url): Free url before returning.
586 (retrieve_url): Free mynewloc before returning.
587 Spotted by Mark A. Mankins <Mankins_Mark@prc.com>.
589 2000-11-02 Hrvoje Niksic <hniksic@arsdigita.com>
591 * url.c (parseurl): Remove possible reading past the end of
592 sup_protos[]. Spotted by Mark A. Mankins <Mankins_Mark@prc.com>.
594 2000-11-01 Hrvoje Niksic <hniksic@arsdigita.com>
596 * main.c (main): In case of opt.downloaded overflowing, print
597 <overflow> instead of a totally bogus random value.
599 * retr.c (retrieve_from_file): Ditto.
601 * recur.c (recursive_retrieve): Ditto.
603 * main.c (main): Ditto.
605 * http.c (http_loop): Ditto.
607 * ftp.c (ftp_loop_internal): Use downloaded_increase() instead of
608 `+=', and downloaded_exceeds_quota() instead of the simple-minded
610 (ftp_retrieve_list): Ditto.
611 (ftp_retrieve_dirs): Ditto.
612 (ftp_retrieve_glob): Ditto.
614 * retr.c (downloaded_increase): New function. Notice overflows of
616 (downloaded_exceeds_quota): Make sure that opt.downloaded is not
617 used if it overflowed.
619 * options.h (struct options): New member downloaded_overflow.
621 2000-11-01 Hrvoje Niksic <hniksic@arsdigita.com>
623 * wget.h (enum): Remove extra space after last enumeration.
625 2000-11-01 Hrvoje Niksic <hniksic@arsdigita.com>
627 * main.c (main): Use legible_very_long() for printing
630 * utils.c (legible_1): New function that operates on strings and
631 does the brunt of legible()'s work.
632 (legible): Use legible_1().
633 (legible_very_long): New function; dump the argument with
634 sprintf(), and call legible_1().
636 * options.h (struct options): Use VERY_LONG_TYPE for
639 * sysdep.h (VERY_LONG_TYPE): Define it to have a 64-bit or greater
642 * config.h.in: Make sure that SIZEOF_LONG and SIZEOF_LONG_LONG get
643 defined. Define HAVE_LONG_LONG if long long is available.
645 2000-11-01 Hrvoje Niksic <hniksic@arsdigita.com>
647 * utils.c (long_to_string): Update with a later, better version.
649 2000-11-01 Hrvoje Niksic <hniksic@arsdigita.com>
651 * url.c (path_simplify_with_kludge): New function.
652 (path_simplify_with_kludge): Disable it. Instead...
653 (parse_dir): ...make sure that at this point the right thing is
654 done, i.e. that "query" part of the URL (?...) is always assigned
655 to the file, never to the directory portion of the path.
657 2000-11-01 Hrvoje Niksic <hniksic@arsdigita.com>
659 * retr.c (retrieve_url): Detect redirection cycles.
661 2000-11-01 Hrvoje Niksic <hniksic@arsdigita.com>
663 * url.c (get_urls_html): Decode HTML entities using
664 html_decode_entities.
666 * html.c (htmlfindurl): Don't count the `#' in numeric entities
667 (&#NNN;) as an HTML fragemnt.
668 (html_decode_entities): New function.
670 2000-11-01 Hrvoje Niksic <hniksic@arsdigita.com>
672 * html.c (htmlfindurl): Fix recognition of # HTML fragments.
674 2000-11-01 Hrvoje Niksic <hniksic@arsdigita.com>
676 * url.c (construct): Rewritten for clarity. Avoids the
677 unnecessary copying and stack-allocation the old version
680 2000-10-31 Hrvoje Niksic <hniksic@arsdigita.com>
682 * ftp.c (getftp): Ditto.
684 * http.c (gethttp): Rewind the stream when retrying from scratch.
686 2000-10-31 Hrvoje Niksic <hniksic@arsdigita.com>
688 * retr.c (retrieve_url): Use url_concat() to handle relative
689 redirections instead of /ad hoc/ code.
691 * url.c (url_concat): New function encapsulating weird
693 (urllen_http_hack): New function.
694 (construct): When constructing new URLs, recognize that `?' does
695 not form part of the file name in HTTP.
697 2000-10-13 Adrian Aichner <adrian@xemacs.org>
699 * retr.c: Add msec timing support for WINDOWS.
700 * retr.c (reset_timer): GetSystemTime() on WINDOWS.
701 * retr.c (elapsed_time): Calculate delta time to msec on WINDOWS.
703 2000-10-27 Dan Harkless <wget@harkless.org>
705 * retr.c (retrieve_url): Manually applied T. Bharath
706 <TBharath@responsenetworks.com>'s patch to get wget to grok
707 illegal relative URL redirects. Reformatted and re-commented it.
709 2000-10-23 Dan Harkless <wget@harkless.org>
711 * connect.c (make_connection and bindport): Manually applied Rob
712 Mayoff <mayoff@dqd.com>'s 1.5.3 patch to add --bind-address,
713 changing coding style to GNU's.
715 * ftp.c (ftp_loop_internal): --delete-after wasn't implemented for
716 files downloaded via FTP. Per a comment, .listing files were not
717 counted towards number of bytes and files downloaded because they're
718 deleted anyway. Well, they aren't under -nr, so count them then.
720 * init.c: Manually applied Rob Mayoff's 1.5.3 patch to add
721 --bind-address, alphabetizing, changing coding style to GNU's,
722 commenting, and renaming cmd_ip_address() to cmd_address() to
723 imply hostnames also okay.
725 * main.c (main): --delete-after didn't delete the root of the
726 tree. Ignore --convert-links if --delete-after was specified.
727 Manually applied Rob Mayoff's 1.5.3 patch to add --bind-address,
728 fixing duplicate use of added-since-1.5.3 case value.
729 (print_help): Clarified that --delete-after deletes local files.
730 Rob forgot to add a line for his new --bind-address option.
732 * options.h (struct options): Manually applied Rob Mayoff's patch
733 to add --bind-address (bind_address structure member).
735 * recur.c (recursive_retrieve): Improved comment; added DEBUGP().
736 Ignore --convert-links if --delete-after was specified.
738 * retr.c (retrieve_from_file): Just added a DEBUGP().
740 2000-10-19 Dan Harkless <wget@harkless.org>
742 * ftp.c (ftp_loop_internal): downloaded_file() enumerators changed.
743 (getftp): Applied Piotr Sulecki <Piotr.Sulecki@ios.krakow.pl>'s
744 patch to work around FTP servers that incorrectly respond to the
745 "REST" command with the remaining size rather than the total file size.
747 * http.c (gethttp): Improved a comment and added code to tack on
748 ".html" to text/html files without that extension when -E specified.
749 (http_loop): Use new downloaded_file() enumerators and deal with
750 the case of gethttp() called xrealloc() on u->local.
752 * init.c (commands): Added new "htmlextension" command.
753 Also renamed John Daily's cmd_quad() to the more descriptive
754 cmd_lockable_boolean(), alpha-sorted the CMD_DECLARE()s and
755 removed duplicate cmd_boolean() declaration.
757 * main.c (print_help): Added my new -E / --html-extension option.
758 (main): Undocumented --email-address option previously used -E synonym.
759 Stole it away for the much more deserving --html-extension's use.
761 * options.h (struct options): Added html_extension field.
763 * url.c (convert_links): URL X that we saved as X.html locally due
764 to -E needs to be backed up as X.orig, not X.html.orig. Added comments.
765 (downloaded_file): Now remembers if we added .html extension to a file.
767 * url.h (downloaded_file_t): Added extra enumerators to support above.
768 (downloaded_file): Now takes and returns a downloaded_file_t.
770 * wget.h (unnamed "dt" enum): Added ADDED_HTML_EXTENSION enumerator.
772 2000-10-09 Dan Harkless <wget@harkless.org>
774 * html.c (htmlfindurl): Added unneeded initialization to quiet warning.
776 * main.c (print_help): Clarified what --retr-symlinks does.
778 2000-09-15 John Daily <jdaily@cyberdude.com>
780 * init.c: Add support for "always" and "never" values to allow
781 .wgetrc to override commandline (useful e.g. with .pm files
782 calling `wget --passive-ftp' when your firewall doesn't allow that).
784 * ftp.c (getftp): passive_ftp is first option to support always/never.
786 2000-08-30 Dan Harkless <wget@harkless.org>
788 * ftp.c (ftp_retrieve_list): Use new INFINITE_RECURSION #define.
790 * html.c: htmlfindurl() now takes final `dash_p_leaf_HTML' parameter.
791 Wrapped some > 80-column lines. When -p is specified and we're at a
792 leaf node, do not traverse <A>, <AREA>, or <LINK> tags other than
793 <LINK REL="stylesheet">.
795 * html.h (htmlfindurl): Now takes final `dash_p_leaf_HTML' parameter.
797 * init.c: Added new -p / --page-requisites / page_requisites option.
799 * main.c (print_help): Clarified that -l inf and -l 0 both allow
800 infinite recursion. Changed the unhelpful --mirrior description
801 to simply give the options it's equivalent to. Added new -p option.
802 (main): Added some comments; handle new -p / --page-requisites.
804 * options.h (struct options): Added new page_requisites field.
806 * recur.c: Changed "URL-s" to "URLs" and "HTML-s" to "HTMLs".
807 Calculate and pass down new `dash_p_leaf_HTML' parameter to
808 get_urls_html(). Use new INFINITE_RECURSION #define.
810 * retr.c: Changed "URL-s" to "URLs". get_urls_html() now takes
811 final `dash_p_leaf_HTML' parameter.
813 * url.c: get_urls_html() and htmlfindurl() now take final
814 `dash_p_leaf_HTML' parameter.
816 * url.h (get_urls_html): Now takes final `dash_p_leaf_HTML' parameter.
818 * wget.h: Added some comments and new INFINITE_RECURSION #define.
820 2000-08-23 Dan Harkless <wget@harkless.org>
822 * main.c (print_help): -B / --base was not mentioned.
824 2000-08-22 Dan Harkless <wget@harkless.org>
826 * main.c (print_help): Modified -nc description to mention that it
827 also prevents the creation of multiple versions of the same file
828 with ".<number>" suffixes.
830 2000-07-14 Jan Prikryl <prikryl@cg.tuwien.ac.at>
832 * retr.c (retrieve_url): Consistently strdup opt.referer when
835 2000-06-09 Dan Harkless <wget@harkless.org>
837 * main.c (print_help): --help output for --waitretry was over 80 cols.
839 2000-06-09 Hrvoje Niksic <hniksic@iskon.hr>
841 * url.c (encode_string): Fix comment.
842 Suggested by Herold Heiko <Heiko.Herold@previnet.it>.
844 2000-06-01 Const Kaplinsky <const@ce.cctpu.edu.ru>
846 * ftp.c (ftp_retrieve_list): Change permissions only on plain
849 2000-06-01 Hrvoje Niksic <hniksic@iskon.hr>
851 * url.c (str_url): Print the port number only if it's different
852 from the default port number for that protocol.
854 2000-05-22 Dan Harkless <wget@harkless.org>
856 * main.c (print_help): Added --help line for Damir Dzeko
857 <ddzeko@zesoi.fer.hr>'s until-now-undocumented --referer option.
858 Removed comments that --referer and --waitretry were undocumented.
859 Changed "`.wgetrc' command" to "`.wgetrc'-style command" on --help
862 2000-05-18 Hrvoje Niksic <hniksic@iskon.hr>
864 * ftp.c (getftp): Ditto.
866 * http.c (gethttp): Check for return value of fclose/fflush.
868 2000-04-12 Hrvoje Niksic <hniksic@iskon.hr>
870 * host.c (store_hostaddress): Instead of shifting ADDR, start
871 copying from the correct address.
873 2000-04-12 Hrvoje Niksic <hniksic@iskon.hr>
875 * http.c (gethttp): Don't free REQUEST -- it was allocated with
877 Pointed out by Gisle Vanem <gvanem@eunet.no>.
879 2000-04-04 Dan Harkless <wget@harkless.org>
881 * host.c (store_hostaddress): R. K. Owen's patch introduces a
882 "left shift count >= width of type" warning on 32-bit
883 architectures. Got rid of it by tricking the compiler w/ a variable.
885 * url.c (UNSAFE_CHAR): The macro didn't include all the illegal
886 characters per RFC1738, namely everything above '~'. It also
887 generated a warning on OSes where char =~ unsigned char. Fixed.
889 1998-10-17 Hrvoje Niksic <hniksic@srce.hr>
891 * http.c (http_process_type): Removed needless strdup(), a memory
894 1998-09-25 Hrvoje Niksic <hniksic@srce.hr>
896 * html.c (htmlfindurl): Set PH to the first occurrence of `#'.
898 1998-09-25 Simon Munton <simonm@m4data.co.uk>
900 * init.c (wgetrc_file_name): Don't free HOME under Windows.
902 1998-12-01 "R. K. Owen" <rkowen@Nersc.GOV>
904 * host.c (store_hostaddress): Fix for big endian 64-bit machines.
906 1998-12-01 Hrvoje Niksic <hniksic@srce.hr>
908 * url.c (UNSAFE_CHAR): New macro.
909 (contains_unsafe): Use it.
910 (encode_string): Ditto.
912 1998-12-01 Hrvoje Niksic <hniksic@srce.hr>
914 * main.c (i18n_initialize): Use LC_MESSAGES only if available.
916 2000-03-31 Hrvoje Niksic <hniksic@srce.hr>
918 * Use TOUPPER/TOLOWER.
920 1998-12-22 Alexander V. Lukyanov <lav@yars.free.net>
922 * ftp-opie.c (btoe): Zero-terminate OSTORE.
924 2000-03-21 Hrvoje Niksic <hniksic@iskon.hr>
926 * wget.h (DO_REALLOC_FROM_ALLOCA): Ditto.
928 * sysdep.h (ISALNUM): New macro.
932 2000-03-10 Dan Harkless <wget@harkless.org>
934 * html.c (idmatch): Implemented checking of my new --follow-tags
935 and --ignore-tags options.
937 * init.c (commands): Added comment reminding people adding new
938 entries doing allocation to add corresponding freeing in cleanup().
939 (commands): Added new followtags and ignoretags commands.
940 (cleanup): Free storage for new followtags and ignoretags.
942 * main.c: Use of "comma-separated list" was random -- normalized
943 it. Did some alphabetization. Added comments pointing out
944 "Options without arguments" and "Options accepting an argument"
945 sections of long_options[]. Added new options --follow-tags and
946 -G / --ignore-tags. Added comment that Damir's --referer is
947 currently undocumented. Added comment that Heiko's --waitretry is
948 partially undocumented (mentioned in --help but not in
949 wget.texi). Moved improperly sorted 24, 129, and 'G' cases.
951 * options.h (struct options): Added new fields follow_tags and
954 * wget.h: Added "#define EQ 0" so we can say "strcmp(a, b) == EQ".
956 2000-03-02 Dan Harkless <wget@harkless.org>
958 * ftp.c (ftp_loop_internal): Heiko introduced "suggest explicit
959 braces to avoid ambiguous `else'" warnings. Eliminated them.
961 * http.c (gethttp): Dan Berger's query string patch is totally
962 bogus. If you have two different URLs, gen_page.cgi?page1 and
963 get_page.cgi?page2, they'll both be saved as get_page.cgi and the
964 second will overwrite the first. Also, parameters to implicit
965 CGIs, like "http://www.host.com/db/?2000-03-02" cause the URLs to
966 be printed with trailing garbage characters, and could seg fault.
967 Backing out the patch, which Dan B. informed me by email was just
968 a kludge to download StarOffice from Sun made necessary due to
969 wget's unconditional escaping of certain characters (room for an
971 (http_loop): Heiko introduced "suggest explicit braces to avoid
972 ambiguous `else'" warnings. Eliminated them.
974 * main.c: Heiko's --wait / --waitretry backwards compatibility
975 code looks to have been totally untested -- automatic variable
976 'wr' was used without being initialized, and a long int was passed
977 into setval()'s char* val parameter.
979 * recur.c (parse_robots): Applied Edward J. Sabol
980 <sabol@alderaan.gsfc.nasa.gov>'s patch for Guan Yang's reported
981 problem with "User-agent:<space>*<space>" lines in robots.txt.
983 * url.c (parseurl, str_url): Removing Dan Berger's code (see
984 http.c above for explanation).
986 1999-08-25 Heiko Herold <Heiko.Herold@previnet.it>
988 * ftp.c: Respect new option waitretry.
990 2000-01-30 Damir Dzeko <ddzeko@zesoi.fer.hr>
992 * http.c (gethttp): Send custom Referer, if required.
994 1999-09-24 Charles G Waldman <cgw@fnal.gov>
996 * netrc.c (parse_netrc): Allow passwords to contain spaces.
998 * netrc.c (parse_netrc): New function.
1000 1999-09-17 Dan Berger <dberger@ix.netcom.com>
1002 * http.c (gethttp): Send it.
1004 * url.c (parseurl): Detect query string in HTTP URL-s.
1005 (str_url): Print it.
1007 2000-03-02 HIROSE Masaaki <hirose31@t3.rim.or.jp>
1009 * html.c (html_allow): Add <link href=...> and <script src=...>.
1011 1999-05-02 andrew deryabin <djsf@softhome.net>
1013 * http.c (gethttp): Specify port in `Host' header only if it's
1016 1998-11-03 Edward J. Sabol <sabol@alderaan.gsfc.nasa.gov>
1018 * recur.c (recursive_retrieve): If a finite maximum depth is
1019 specified, and we're are already at that depth, don't download the
1020 HTML file for parsing.
1022 2000-03-01 Dan Harkless <wget@harkless.org>
1024 * ftp.c (ftp_loop_internal): Call new downloaded_file() function,
1025 even though we don't do conversion on HTML files retrieved via
1026 FTP, so _current_ usage of downloaded_file() makes this call unneeded.
1027 (ftp_retrieve_list): Added a comment saying where we need to
1028 stat() a .orig file if FTP'd HTML file conversion is ever implemented.
1029 (ftp_retrieve_list): "Local file '%s' is more recent," is sometimes
1030 a lie -- reworded as "Server file no newer than local file '%s' --".
1032 * http.c (http_loop): Fixed a typo and clarified a comment.
1033 (http_loop): When -K and -N are specified together, compare size
1034 and timestamp of server file X against local file X.orig (if
1035 extant) rather than converted local file X.
1036 (http_loop): "Local file '%s' is more recent," is sometimes a lie
1037 -- reworded as "Server file no newer than local file '%s' --".
1038 (http_loop): Call new downloaded_file() function to prevent
1039 wrongful overwriting of .orig file when -N is specified.
1041 * url.c (convert_links): When -K specified, only rename X to
1042 X.orig if downloaded_file() returns TRUE. Otherwise when we skip
1043 file X due to -N, we clobber an X.orig from a previous invocation.
1044 (convert_links): Call the failsafe xstrdup(), not the real strdup().
1045 (convert_links): Added a note asking anyone who understands how
1046 multiple URLs can correspond to a single file to comment it.
1047 (downloaded_file): Added this new function.
1049 * url.h (downloaded_file): Added prototype for this new function
1050 as well as its downloaded_file_t enum type.
1052 * wget.h (boolean): Added this new typedef and TRUE and FALSE #defines.
1054 2000-02-29 Dan Harkless <wget@harkless.org>
1056 * version.c: Upped version to developer-only "1.5.3+dev".
1058 2000-02-18 Dan Harkless <wget@harkless.org>
1060 * init.c (backup_converted): Added this new option.
1062 * main.c (-K / --backup-converted): Added this new option.
1064 * options.h (backup_converted): Added this new option.
1066 * url.c (convert_links): When backup_converted is specified, save
1067 file X as X.orig before converting.
1069 * url.h (urlpos): Fixed typo -- said "Rekative" instead of "Relative".
1071 1998-09-21 Hrvoje Niksic <hniksic@srce.hr>
1073 * version.c: Wget 1.5.3 is released.
1075 1998-09-21 Hrvoje Niksic <hniksic@srce.hr>
1077 * host.c (ftp_getaddress): Don't warn when reverse-lookup of local
1078 address doesn't yield FQDN.
1080 1998-09-21 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
1082 * cmpt.c (strerror): Fix declaration of sys_errlist.
1084 1998-09-11 Hrvoje Niksic <hniksic@srce.hr>
1086 * main.c (main): Don't use an array subscript as the first
1087 argument to STRDUP_ALLOCA.
1088 From Kaveh R. Ghazi.
1090 1998-09-11 Szakacsits Szabolcs <szaka@sienet.hu>
1092 * html.c (htmlfindurl): Download table background.
1094 1998-09-11 Hans Grobler <grobh@conde.ee.sun.ac.za>
1096 * init.c (parse_line): Would free *com before allocating it.
1097 (parse_line): Would free com instead of *com.
1099 1998-09-10 Howard Gayle <howard@fjst.com>
1101 * url.c (get_urls_html): Would drop the last character of the
1104 1998-09-10 Hrvoje Niksic <hniksic@srce.hr>
1106 * http.c (http_loop): Don't print status code if quiet.
1108 1998-09-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1110 * log.c: Use <stdarg.h> only when __STDC__.
1112 1998-09-10 Adam D. Moss <adam@foxbox.org>
1114 * html.c (htmlfindurl): Download <layer src=...>.
1116 1998-09-10 Howard Gayle <howard@fjst.com>
1118 * ftp.c (ftp_retrieve_list): Don't update the time stamp of a file
1121 1998-06-27 Hrvoje Niksic <hniksic@srce.hr>
1123 * utils.c: Include <libc.h> on NeXT.
1125 1998-06-26 Heinz Salzmann <heinz.salzmann@intermetall.de>
1127 * url.c (get_urls_html): Fix calculation of URL position.
1129 1998-06-23 Hrvoje Niksic <hniksic@srce.hr>
1131 * version.c: Wget 1.5.2 is released.
1133 1998-06-23 Dave Love <d.love@dl.ac.uk>
1135 * ftp.c, init.c, netrc.c: Include errno.h.
1137 * http.c: Include errno.h and time header.
1139 * Makefile.in (exext): Define.
1140 (install.bin, uninstall.bin): Use it.
1142 1998-06-21 Hrvoje Niksic <hniksic@srce.hr>
1144 * http.c (http_loop): Don't attempt to compare local and remote
1145 sizes if the remote size is unknown.
1147 1998-06-16 Hrvoje Niksic <hniksic@srce.hr>
1149 * url.c (get_urls_html): Use malloc() instead of alloca in the
1152 1998-06-13 Hrvoje Niksic <hniksic@srce.hr>
1154 * version.c: Wget 1.5.2-b4 is released.
1156 1998-06-13 Hrvoje Niksic <hniksic@srce.hr>
1158 * url.c (get_urls_html): Ignore spaces before and after the URI.
1160 1998-06-08 Wanderlei Antonio Cavassin <cavassin@conectiva.com.br>
1162 * ftp.c (getftp): Translate `done'.
1164 1998-06-06 Hrvoje Niksic <hniksic@srce.hr>
1166 * version.c: Wget 1.5.2-b3 is released.
1168 1998-06-06 Alexander Kourakos <awk@bnt.com>
1170 * init.c (cleanup): Close dfp, don't free it.
1172 1998-06-06 Hrvoje Niksic <hniksic@srce.hr>
1174 * utils.c (make_directory): Twiddle.
1176 * config.h.in: Added template for access().
1178 1998-06-05 Mathieu Guillaume <mat@cythere.com>
1180 * html.c (htmlfindurl): Download <input src=...>
1182 1998-06-03 Hrvoje Niksic <hniksic@srce.hr>
1184 * utils.c (file_exists_p): Use access() with two arguments.
1186 1998-05-27 Martin Kraemer <Martin.Kraemer@mch.sni.de>
1188 * netrc.c (parse_netrc): Correct logic.
1190 1998-05-27 Hrvoje Niksic <hniksic@srce.hr>
1192 * ftp.c (getftp): Added `break'; suggested by Lin Zhe Min
1193 <ljm@ljm.wownet.net>.
1195 1998-05-24 Hrvoje Niksic <hniksic@srce.hr>
1197 * version.c: Wget 1.5.2-b2 is released.
1199 1998-05-18 Juan Jose Rodriguez <jcnsoft@jal1.telmex.net.mx>
1201 * mswindows.h: Don't translate mkdir to _mkdir under Borland.
1203 1998-05-17 Hrvoje Niksic <hniksic@srce.hr>
1205 * retr.c (elapsed_time): Return correct value when
1206 HAVE_GETTIMEOFDAY is undefined.
1208 1998-05-13 Hrvoje Niksic <hniksic@srce.hr>
1210 * version.c: Wget 1.5.2-b1 is released.
1212 1998-05-08 Hrvoje Niksic <hniksic@srce.hr>
1214 * getopt.c (_getopt_internal): Use exec_name instead of argv[0].
1215 (_getopt_internal): Don't translate `#if 0'-ed strings.
1217 1998-05-06 Douglas E. Wegscheid <wegscd@whirlpool.com>
1219 * mswindows.c (ws_handler): Use fork_to_background().
1221 1998-05-05 Hrvoje Niksic <hniksic@srce.hr>
1223 * version.c: Wget 1.5.1 is released.
1225 1998-05-05 Hrvoje Niksic <hniksic@srce.hr>
1227 * http.c (parse_http_status_line): Avoid `minor' and `major'
1230 1998-05-02 Hrvoje Niksic <hniksic@srce.hr>
1232 * utils.c (mkdirhier): Renamed to make_directory.
1234 1998-05-01 Hrvoje Niksic <hniksic@srce.hr>
1236 * mswindows.c (fork_to_background): Define under Windows.
1238 * utils.c (fork_to_background): New function.
1240 * html.c (htmlfindurl): Removed rerdundant casts.
1242 1998-05-01 Douglas E. Wegscheid <wegscd@whirlpool.com>
1244 * mswindows.c (ws_mypath): Cache the path.
1246 1998-04-30 Douglas E. Wegscheid <wegscd@whirlpool.com>
1248 * ftp.h: Prefix enum ftype members with FT_.
1250 * ftp-ls.c, ftp.c, html.h: Adjust accordingly.
1252 * mswindows.h: Use stat under Borland, _stat under MSVC.
1254 1998-04-28 Hrvoje Niksic <hniksic@srce.hr>
1256 * http.c (known_authentication_scheme_p): New function.
1257 (gethttp): Handle authorization more correctly.
1259 * ftp-basic.h: Removed.
1263 * utils.c: Include <unistd.h> before <pwd.h>; needed under SunOS
1265 (numdigit): Use `while' loop.
1267 * http.c (create_authorization_line): Detect authentication
1268 schemes case-insensitively.
1270 * http.c (extract_header_attr): Use strdupdelim().
1271 (digest_authentication_encode): Move declaration of local
1272 variables to smaller scope.
1273 (digest_authentication_encode): Reset REALM, OPAQUE and NONCE.
1274 (create_authorization_line): Detect authentication schemes
1277 * utils.c (touch): Constify.
1279 * http.c (gethttp): Report a nicer error when no data is received.
1281 * rbuf.h (RBUF_READCHAR): Ditto.
1283 * ftp-basic.c (ftp_response): Use sizeof.
1285 1998-04-27 Hrvoje Niksic <hniksic@srce.hr>
1287 * retr.c (print_percentage): EXPECTED is long, not int.
1288 (print_percentage): Use floating-point arithmetic to avoid
1289 overflow with large files' sizes multiplied with 100.
1291 1998-04-27 Gregor Hoffleit <flight@mathi.uni-heidelberg.de>
1293 * config.h.in: Added pid_t stub.
1295 * sysdep.h (S_ISREG): Moved here from mswindows.h (NeXT doesn't
1298 1998-04-20 Hrvoje Niksic <hniksic@srce.hr>
1300 * version.c: Wget 1.5.0 is released.
1302 1998-04-18 Hrvoje Niksic <hniksic@srce.hr>
1304 * url.c (str_url): Ditto.
1306 * ftp-basic.c (ftp_rest): Use new name.
1308 * utils.c (long_to_string): Renamed from prnum().
1310 1998-04-16 Hrvoje Niksic <hniksic@srce.hr>
1312 * version.c: Wget 1.5-b17 is released.
1314 1998-04-08 Hrvoje Niksic <hniksic@srce.hr>
1316 * headers.c (header_get): New argument FLAGS.
1318 * http.c (gethttp): If request is malformed, bail out of the
1320 (gethttp): Check for empty header *after* the status line checks.
1321 (gethttp): Disallow continuations for status line.
1323 1998-04-08 Hrvoje Niksic <hniksic@srce.hr>
1325 * version.c: Wget 1.5-b16 is released.
1327 1998-04-08 Hrvoje Niksic <hniksic@srce.hr>
1329 * init.c (commands): Renamed `always_rest' to `continue'.
1331 1998-04-05 Hrvoje Niksic <hniksic@srce.hr>
1335 * log.c (logputs): New argument.
1336 (logvprintf): Ditto.
1339 1998-04-04 Hrvoje Niksic <hniksic@srce.hr>
1341 * http.c (http_atotm): Update comment.
1343 * main.c (i18n_initialize): Set LC_MESSAGES, not LC_ALL.
1345 * wget.h: Renamed ENABLED_NLS to HAVE_NLS.
1347 * main.c (i18n_initialize): New function.
1350 * log.c: Include <unistd.h>.
1352 * retr.c (show_progress): Cast alloca to char *.
1354 1998-04-04 Hrvoje Niksic <hniksic@srce.hr>
1356 * version.c: Wget 1.5-b15 is released.
1358 1998-04-04 Hrvoje Niksic <hniksic@srce.hr>
1360 * utils.h: Declare file_non_directory_p().
1362 1998-04-03 Hrvoje Niksic <hniksic@srce.hr>
1364 * main.c (main): It's `tries', not `numtries' now.
1366 1998-04-01 Hrvoje Niksic <hniksic@srce.hr>
1368 * init.c (getperms): Removed.
1370 1998-04-01 Tim Charron <tcharron@interlog.com>
1372 * log.c (logvprintf): Don't use ARGS twice.
1374 1998-04-01 John <john@futuresguide.com>
1376 * mswindows.c: Cleaned up.
1378 1998-04-01 Hrvoje Niksic <hniksic@srce.hr>
1380 * version.c: Wget 1.5-b14 is released.
1382 1998-04-01 Hrvoje Niksic <hniksic@srce.hr>
1384 * ftp-opie.c (STRLEN4): New macro.
1387 1998-04-01 Junio Hamano <junio@twinsun.com>
1389 * http.c: Document all the Digest functions.
1391 1998-04-01 Hrvoje Niksic <hniksic@srce.hr>
1393 * utils.c (file_non_directory_p): Renamed from isfile().
1395 * mswindows.h (S_ISREG): New macro, suggested by Tim Adam.
1397 1998-03-31 Hrvoje Niksic <hniksic@srce.hr>
1399 * utils.c (mkdirhier): Use 0777 instead of opt.dirmode.
1401 * init.c (cmd_spec_dotstyle): Use 48 dots per line for binary
1403 (cmd_permissions): Removed.
1405 * config.h.in: Add template for WORDS_BIGENDIAN.
1407 1998-03-31 Junio Hamano <junio@twinsun.com>
1409 * http.c (HEXD2asc): New macro.
1410 (dump_hash): Use it.
1412 1998-03-31 Hrvoje Niksic <hniksic@srce.hr>
1414 * version.c: Wget 1.5-b13 is released.
1416 1998-03-31 Hrvoje Niksic <hniksic@srce.hr>
1418 * main.c (main): Don't try to use `com'.
1420 1998-03-30 Hrvoje Niksic <hniksic@srce.hr>
1422 * init.c (cmd_permissions): New function.
1424 1998-03-30 Hrvoje Niksic <hniksic@srce.hr>
1426 * version.c: Wget 1.5-b12 is released.
1428 1998-03-30 Hrvoje Niksic <hniksic@srce.hr>
1430 * init.c (commands): Renamed `numtries' to `tries'.
1431 (cmd_spec_debug): Removed.
1432 (home_dir): Under Windows, return `C:\' if HOME is undefined.
1434 1998-03-29 Hrvoje Niksic <hniksic@srce.hr>
1436 * config.h.in: Define _XOPEN_SOURCE.
1438 * init.c (check_user_specified_header): New function.
1439 (cmd_spec_header): Use it.
1440 (cmd_spec_useragent): New function.
1442 1998-03-29 Hrvoje Niksic <hniksic@srce.hr>
1444 * version.c: Wget 1.5-b11 is released.
1446 1998-03-28 Hrvoje Niksic <hniksic@srce.hr>
1448 * wget.h: Include <libintl.h> only if NLS is enabled.
1450 1998-03-26 Hrvoje Niksic <hniksic@srce.hr>
1452 * options.h (struct options): Made `wait' a long.
1453 (struct options): Ditto for `timeout'.
1455 1998-03-19 Hrvoje Niksic <hniksic@srce.hr>
1457 * utils.c (exists): Renamed to file_exists_p.
1458 (file_exists_p): Use access() if available.
1460 1998-03-17 Hrvoje Niksic <hniksic@srce.hr>
1462 * utils.c (memfatal): Set save_log_p to 0 to avoid potential
1465 * log.c: do_logging -> save_log_p.
1467 * config.h.in: Added template for HAVE_VSNPRINTF.
1469 1998-03-16 Hrvoje Niksic <hniksic@srce.hr>
1473 * http.c: Protect declaration against non-ANSI compiler.
1475 * log.c (logvprintf): Use vsnprintf() if available.
1477 * getopt.c (main): Don't translate test stuff.
1479 1998-03-16 Hrvoje Niksic <hniksic@srce.hr>
1481 * version.c: Wget 1.5-b10 is released.
1483 1998-03-11 Hrvoje Niksic <hniksic@srce.hr>
1485 * ftp.c (getftp): Don't translate "CWD %s".
1487 * wget.h (GCC_FORMAT_ATTR): Renamed from FORMAT_ATTR.
1489 1998-03-07 Hrvoje Niksic <hniksic@srce.hr>
1491 * ftp-opie.c (btoe): Use memcpy() instead of strncat().
1493 * log.c (logputs): New function.
1494 (logvprintf): Renamed from vlogmsg; use logputs().
1496 * retr.c (show_progress): Print `[100%]' when the retrieval is
1499 * init.c (run_wgetrc): Use FILE, not PATH.
1500 (wgetrc_file_name): Ditto.
1502 1998-03-07 Tim Adam <tma@osa.com.au>
1504 * recur.c (parse_robots): Correctly reset `entries' on empty
1507 1998-03-07 Hrvoje Niksic <hniksic@srce.hr>
1509 * init.c (cmd_spec_debug): Use cmd_boolean().
1511 1998-02-23 Hrvoje Niksic <hniksic@srce.hr>
1513 * http.c (gethttp): Create proxy-authorization correctly.
1515 1998-02-22 Hrvoje Niksic <hniksic@srce.hr>
1519 * getopt.c: Use ANSI function definitions.
1521 * ftp-opie.c: New file.
1523 * options.h: Don't redefine EXTERN.
1525 * init.c: Sort it correctly.
1527 1998-02-22 Hrvoje Niksic <hniksic@srce.hr>
1529 * version.c: Wget 1.5-b9 is released.
1531 1998-02-22 Hrvoje Niksic <hniksic@srce.hr>
1533 * recur.c (recursive_retrieve): Reset `first_time'.
1535 * ftp.c (getftp): Added `default' clause to switches of uerr_t.
1537 * rbuf.c (rbuf_peek): Simplified.
1538 (rbuf_flush): Use MINVAL.
1540 * wget.h (MINVAL): Moved from url.h.
1542 * rbuf.h (RBUF_FD): New macro.
1544 * url.c (add_url): Add to the head of the list.
1546 * ftp.c (ftp_retrieve_list): Set the permissions to downloaded
1548 (getftp): Set the default permissions to 0600.
1550 1998-02-21 Hrvoje Niksic <hniksic@srce.hr>
1552 * url.c (get_urls_html): Ditto.
1553 (convert_links): Ditto.
1555 * recur.c (parse_robots): Ditto.
1557 * html.c (ftp_index): Ditto.
1559 * ftp-ls.c (ftp_parse_unix_ls): Open file as binary.
1561 * init.c (defaults): Initialize `opt' to zero via memset.
1563 * http.c (digest_authentication_encode): goto considered harmful.
1565 1998-02-19 Hrvoje Niksic <hniksic@srce.hr>
1567 * ftp.c (delelement): Simplify and fix leak.
1569 1998-02-18 Hrvoje Niksic <hniksic@srce.hr>
1571 * http.c (dump_hash): Use HEXD2ASC instead of home-grown stuff.
1573 * url.h (HEXD2ASC): Removed warning.
1575 * init.c (comind): Use binary search.
1576 (commands): Reorganized.
1578 (cmd_boolean): New function.
1579 (cmd_number): Ditto.
1580 (cmd_number_inf): Ditto.
1581 (cmd_string): Ditto.
1582 (cmd_vector): Ditto.
1583 (cmd_directory_vector): Ditto.
1586 (cmd_spec_debug): Ditto.
1587 (cmd_spec_dirmode): Ditto.
1588 (cmd_spec_dirstruct): Ditto.
1589 (cmd_spec_dotstyle): Ditto.
1590 (cmd_spec_header): Ditto.
1591 (cmd_spec_htmlify): Ditto.
1592 (cmd_spec_mirror): Ditto.
1593 (cmd_spec_outputdocument): Ditto.
1594 (cmd_spec_recursive): Ditto.
1595 (settime): Merged with cmd_time().
1596 (setbytes): Merged with cmd_bytes().
1597 (setonoff): Merged with cmd_boolean().
1600 1998-02-17 Hrvoje Niksic <hniksic@srce.hr>
1602 * Makefile.in (distclean): Remove `config.h'.
1604 1998-02-17 Hrvoje Niksic <hniksic@srce.hr>
1606 * version.c: Wget 1.5-b8 is released.
1608 1998-02-17 Hrvoje Niksic <hniksic@srce.hr>
1610 * http.c (digest_authentication_encode): New function.
1611 (create_authorization_line): Use it.
1612 (dump_hash): New function.
1613 (digest_authentication_encode): Use it.
1615 * fnmatch.c: Renamed from `mtch.c'.
1617 1998-02-15 Karl Eichwalder <ke@suse.de>
1619 * main.c (main): Tag "Written by..." string as translatable.
1621 1998-02-15 Hrvoje Niksic <hniksic@srce.hr>
1623 * wget.h (FREE_MAYBE): New macro.
1625 * http.c (create_authorization_line): Don't use ANSI C string
1626 concatenation feature.
1627 (basic_authentication_encode): Use alloca() for temporary
1636 * ftp-basic.c: Protect declaration against non-ANSI compiler.
1638 * http.c (create_authorization_line): Cast `unsigned char *' to
1639 `char *' for sprintf, to shut up the noisy Digital Unix cc.
1641 1998-02-15 Hrvoje Niksic <hniksic@srce.hr>
1643 * version.c: Wget 1.5-b7 is released.
1645 1998-02-15 Hrvoje Niksic <hniksic@srce.hr>
1647 * cmpt.c (strstr): Synched with glibc-2.0.6.
1649 * ftp-basic.c (calculate_skey_response): Ditto.
1650 (calculate_skey_response): Use alloca().
1652 * http.c (create_authorization_line): Work with FSF's version of
1655 * md5.c: New file, from GNU libc.
1657 1998-02-14 Hrvoje Niksic <hniksic@srce.hr>
1659 * url.h (URL_CLEANSE): Name the temporary variable more carefully.
1661 1998-02-13 Hrvoje Niksic <hniksic@srce.hr>
1663 * http.c (basic_authentication_encode): New function, instead of
1666 1998-02-13 Junio Hamano <junio@twinsun.com>
1668 * http.c: Add HTTP-DA support.
1669 * ftp-basic.c: Add Opie/S-key support.
1670 * config.h.in, Makefile.in: Add HTTP-DA and Opie/S-key support.
1671 * md5.c, md5.h: New files.
1673 1998-02-13 Hrvoje Niksic <hniksic@srce.hr>
1675 * http.c (http_process_range): Renamed from hprocrange().
1676 (http_process_range): Parse the whole header.
1678 * headers.c: New file.
1679 (header_process): New function.
1680 (header_get): Renamed from fetch_next_header.
1682 * all: Include utils.h only where necessary.
1684 * wget.h: Declare xmalloc(), xrealloc() and xstrdup() here.
1686 * wget.h: Add provisions for dmalloc.
1688 1998-02-12 Hrvoje Niksic <hniksic@srce.hr>
1690 * version.c: Wget 1.5-b6 is released.
1692 1998-02-12 Hrvoje Niksic <hniksic@srce.hr>
1694 * ftp.c (ftp_loop): Determine `filename' more precisely.
1696 * init.c (setval): Don't set `opt.quiet' if output-document is
1699 * log.c (log_init): Print to STDERR instead of STDOUT.
1700 (vlogmsg): Use STDERR by default.
1703 1998-02-11 Simon Josefsson <jas@pdc.kth.se>
1705 * host.c: Use addr_in again.
1707 1998-02-08 Karl Eichwalder <karl@suse.de>
1709 * http.c (gethttp): Fixed typo.
1711 1998-02-08 Hrvoje Niksic <hniksic@srce.hr>
1713 * version.c: Wget 1.5-b5 is released.
1715 1998-02-08 Hrvoje Niksic <hniksic@srce.hr>
1717 * retr.c (show_progress): Use it.
1719 * log.c (logflush): New function.
1721 * wget.h: Utilize __attribute__ if on gcc.
1723 1998-02-07 Hrvoje Niksic <hniksic@srce.hr>
1725 * http.c (base64_encode_line): New argument LENGTH.
1726 (BASIC_AUTHENTICATION_ENCODE): Use it.
1727 (BASIC_AUTHENTICATION_ENCODE): Take length of HEADER into account.
1729 * main.c (main): Fixed fprintf() format mismatch.
1731 1998-02-06 Hrvoje Niksic <hniksic@srce.hr>
1733 * version.c: Wget 1.5-b4 is released.
1735 1998-02-03 Simon Josefsson <jas@pdc.kth.se>
1737 * host.c: use sockaddr_in instead of addr_in.
1739 1998-02-04 Hrvoje Niksic <hniksic@srce.hr>
1741 * init.c (cleanup): Use it.
1743 * recur.c (recursive_cleanup): New function.
1745 * retr.c (retrieve_from_file): Ditto.
1747 * main.c (main): Use it.
1749 * recur.c (recursive_reset): New function.
1751 * retr.c (retrieve_from_file): Ditto.
1753 * main.c (main): Simplify call to recursive_retrieve().
1755 * recur.c (recursive_retrieve): Removed FLAGS argument.
1757 * http.c (gethttp): Changed call to iwrite().
1759 1998-02-03 Hrvoje Niksic <hniksic@srce.hr>
1761 * url.c (get_urls_html): Ditto.
1762 (free_urlpos): Ditto.
1766 * retr.c (retrieve_url): Move declaration of local variables to
1769 * url.c (urlproto): Use it.
1772 (get_urls_html): Ditto.
1774 * utils.h (ARRAY_SIZE): New macro.
1776 * url.c (proto): Moved from url.h.
1778 * url.h (URL_CLEANSE): Reformatted.
1779 (USE_PROXY_P): Renamed from USE_PROXY.
1781 * ftp-basic.c: Adjust to the new interface of iwrite().
1783 * ftp-basic.c (ftp_port): Use alloca().
1785 1998-02-03 Hrvoje Niksic <hniksic@srce.hr>
1787 * version.c: Wget 1.5-b3 is released.
1789 * host.c (ftp_getaddress): Don't print to stderr directly.
1791 * init.c (setbytes): Support `g' for gigabytes.
1792 (cmdtype): New specification CTIME.
1793 (setval): Use it with settime().
1794 (commands): Use it for WAIT and TIMEOUT.
1796 1998-02-02 Hrvoje Niksic <hniksic@srce.hr>
1798 * http.c (BASIC_AUTHENTICATION_ENCODE): New macro.
1801 * utils.c (unique_name_1): Moved from url.c.
1802 (unique_name): Ditto.
1804 * url.c (url_filename): Ditto.
1806 * log.c (redirect_output): Changed call to unique_name().
1808 * url.c (unique_name_1): Renamed from unique_name().
1809 (unique_name): Changed interface.
1811 * init.c (enum cmdid): Moved from init.h.
1813 (struct cmd): Ditto.
1815 * main.c (main): Use it.
1816 (main): Moved `--backups' to not have a short option.
1818 * options.h (struct options): New member BACKGROUND.
1820 * main.c (print_help): Rearranged.
1821 (main): New long options for -n* short options: --no-directories,
1822 --no-host-directories, --non-verbose, --no-host-lookup and
1823 --dont-remove-listing.
1825 1998-02-01 Hrvoje Niksic <hniksic@srce.hr>
1827 * main.c (main): Use log_close().
1829 * log.c: New variable LOGFP.
1831 (redirect_output): Don't open /dev/null; set LOGFP to stdin
1833 (log_close): New function.
1835 * options.h (struct options): Removed LFILE.
1837 * log.c (log_enable): Removed.
1839 * main.c (main): Use it.
1841 * log.c (log_init): New function.
1843 * url.c (get_urls_html): Removed needless assignment to BASE.
1845 * host.c (add_hlist): Don't set CMP needlessly.
1847 * utils.c (match_backwards): Ditto.
1848 (in_acclist): Ditto.
1850 * url.c (findurl): Ditto.
1852 * netrc.c (parse_netrc): Ditto.
1854 * log.c (log_dump): Ditto.
1856 * html.c (html_quote_string): Ditto.
1858 * ftp-basic.c (ftp_request): Made static.
1860 * connect.c: Made global variables static.
1862 * url.c (construct): Ditto.
1864 * init.c (init_path): Avoid assignment inside `if'-condition.
1866 * ftp.c: Don't include in.h or winsock.h.
1868 * ftp.c (ftp_loop): Use SZ.
1870 * connect.c (bindport): Cast &addrlen to int *.
1873 * init.c (initialize): Don't use SYSTEM_WGETRC unconditionally.
1875 1998-01-31 Hrvoje Niksic <hniksic@srce.hr>
1877 * ftp.c (getftp): Initialize opt.ftp_pass here.
1878 (ftp_retrieve_dirs): Use alloca().
1880 * init.c (defaults): Don't initialize opt.ftp_pass.
1882 * sysdep.h (S_ISLNK): Declare for OS/2; ditto for lstat.
1883 From Ivan F. Martinez <ivanfm@ecodigit.com.br>.
1885 1998-01-31 Hrvoje Niksic <hniksic@srce.hr>
1887 * recur.c (parse_robots): Check for comments more correctly.
1889 * host.c (ftp_getaddress): Use STRDUP_ALLOCA.
1890 (ftp_getaddress): Add diagnostics when reverse-lookup yields only
1893 1998-01-31 Hrvoje Niksic <hniksic@srce.hr>
1895 * version.c: Wget 1.5-b2 is released.
1897 * netrc.c (NETRC_FILE_NAME): Moved from netrc.h.
1899 * utils.c (proclist): Pass FNM_PATHNAME to fnmatch().
1901 * ftp-basic.c (ftp_pasv): Avoid unnecessary casting to unsigned
1904 * log.c: Don't attempt to hide arguments from ansi2knr.
1906 * cmpt.c: Synched strptime() and mktime() with glibc-2.0.6.
1908 * ansi2knr.c: Use a later version, from fileutils-3.16l alpha.
1910 * ftp.c (getftp): Ditto.
1912 * http.c (gethttp): Use it.
1914 * retr.c (get_contents): New argument EXPECTED; pass it to
1916 (show_progress): New argument EXPECTED; use it to display
1919 * init.c (setval): Ditto.
1921 * http.c (gethttp): Ditto.
1924 * ftp.c (getftp): Ditto.
1925 (ftp_loop_internal): Ditto.
1927 * ftp-ls.c (ftp_parse_unix_ls): Use abort() instead of assert(0).
1929 * sysdep.h (CLOSE): Simplify; use DEBUGP.
1931 * netrc.c (search_netrc): Use alloca().
1933 * init.c (defaults): Initialize no_flush.
1935 * log.c (vlogmsg): Don't flush if no_flush.
1937 * options.h (struct options): New variable no_flush.
1939 * main.c (main): Don't play games with buffering.
1941 * log.c (vlogmsg): Flush the output after every message.
1943 1998-01-31 Hrvoje Niksic <hniksic@srce.hr>
1945 * init.c (parse_line): Ditto.
1947 * url.c (get_urls_html): Ditto.
1949 * main.c (main): Don't cast to unsigned char.
1951 * init.c (run_wgetrc): Don't cast to unsigned char.
1952 (parse_line): Accept char instead of unsigned char.
1954 * html.c (htmlfindurl): Use char instead of unsigned char.
1958 * sysdep.h: Add wrappers to ctype macros to make them
1961 1998-01-30 Hrvoje Niksic <hniksic@srce.hr>
1963 * html.c (htmlfindurl): Download <img lowsrc=...>
1965 * main.c (main): Ignore SIGPIPE.
1967 * connect.c (select_fd): New argument WRITEP.
1968 (iwrite): Call select_fd().
1970 1997-02-27 Fila Kolodny <fila@ibi.com>
1972 * ftp.c (ftp_retrieve_list): If retrieving symlink and the proper
1973 one already exists, just skip it.
1975 1998-01-30 Hrvoje Niksic <hniksic@srce.hr>
1977 * http.c (gethttp): Cosmetic changes.
1979 * http.c (check_end): Allow `+D...' instead of `GMT'.
1980 From Fabrizio Pollastri <pollastri@cstv.to.cnr.it>.
1982 * url.c (process_ftp_type): New function.
1985 * connect.c (iwrite): Allow writing in a few chunks.
1986 (bindport): Made SRV static, so addr can point to it.
1987 (select_fd): Removed HPUX kludge.
1989 * host.c (free_hlist): Incorporated into clean_hosts().
1991 1998-01-29 Hrvoje Niksic <hniksic@srce.hr>
1993 * host.c (hlist): Made static.
1994 (search_address): Cosmetic change.
1996 1998-01-29 Hrvoje Niksic <hniksic@srce.hr>
1998 * version.c: Wget v1.5-b1 is released.
2000 * http.c (hgetlen): Use sizeof() to get the header length.
2003 (hgetlocation): Ditto.
2004 (hgetmodified): Ditto.
2005 (haccepts_none): Ditto.
2007 * main.c (main): Updated `--version' and `--help' output, as per
2008 Francois Pinard's suggestions.
2010 * main.c: Include locale.h; call setlocale(), bindtextdomain() and
2013 * config.h.in: Define stubs for I18N3.
2015 * wget.h: Include libintl.h.
2017 1998-01-28 Hrvoje Niksic <hniksic@srce.hr>
2019 * url.c (mkstruct): Check for opt.cut_dirs.
2020 (mkstruct): alloca()-te more, xmalloc() less.
2022 * utils.c (load_file): Check for ferror().
2024 * url.c (get_urls_file): Close only the files we opened.
2025 (get_urls_html): Ditto.
2026 (count_slashes): New function.
2030 * http.c (gethttp): Respect username and password provided by
2032 (base64_encode_line): Write into an existing buffer instead of
2033 malloc-ing a new one.
2034 (struct http_stat): Moved from http.h
2036 * retr.c (retrieve_url): Free SUF.
2038 * all: Removed lots of unnecessary .h dependencies.
2040 * html.c (global_state): Made static.
2042 * utils.h (ALLOCA_ARRAY): New macro.
2044 * main.c (main): New option `--cut-dirs'.
2046 * url.c (construct): Use alloca() for T.
2048 * utils.c (mkdirhier): Use STRDUP_ALLOCA.
2050 * host.c (_host_t): Moved from host.h.
2051 (struct host): Renamed from _host_t.
2052 (store_hostaddress): Use STRDUP_ALLOCA for INET_S.
2055 * host.h: Don't include url.h.
2057 * ftp.c (LIST_FILENAME): Moved from ftp.h.
2059 * init.c (DEFAULT_FTP_ACCT): Moved from ftp.h.
2061 * main.c (main): Enable log if the output goes to a TTY.
2063 * connect.h: Removed unused constant `BACKLOG'.
2065 * config.h.in: Check for isatty().
2067 * Makefile.in (LINK): Use CFLAGS when linking.
2069 1998-01-27 Hrvoje Niksic <hniksic@srce.hr>
2071 * mswindows.c (ws_hangup): Use redirect_output().
2073 * main.c (redirect_output_signal): New function; use
2076 * log.c (redirect_output): New function, based on hangup(), which
2079 * log.c (vlogmsg): New function.
2081 * wget.h (DEBUGP): Use debug_logmsg().
2083 * main.c (hangup): Use it.
2085 * log.c (log_dump): New function.
2087 * utils.h (DO_REALLOC): Use `long' for various sizes.
2089 * http.c (hskip_lws): Use `while', for clarity.
2090 (HTTP_DYNAMIC_LINE_BUFFER): New constant.
2091 (fetch_next_header): Use it instead of DYNAMIC_LINE_BUFFER.
2093 * ftp-basic.c (FTP_DYNAMIC_LINE_BUFFER): New constant.
2094 (ftp_response): Use it instead of DYNAMIC_LINE_BUFFER.
2096 * utils.c (DYNAMIC_LINE_BUFFER): Moved from utils.c.
2097 (LEGIBLE_SEPARATOR): Ditto.
2098 (FILE_BUFFER_SIZE): Ditto.
2100 * retr.c (BUFFER_SIZE): Moved from retr.h.
2103 (logmsg): Moved from utils.c.
2104 (debug_logmsg): New function.
2106 * mswindows.h: Include it here.
2110 * utils.c: Don't include <windows.h>.
2112 1998-01-25 Hrvoje Niksic <hniksic@srce.hr>
2114 * host.c (ftp_getaddress): Ditto.
2116 * main.c (main): Use it.
2118 * utils.h (STRDUP_ALLOCA): New macro.
2120 * init.c: Prepend `wget: ' to error messages printed on stderr.
2122 * utils.c (mkdirhier): Renamed from mymkdir.
2123 (touch): Renamed from my_touch.
2124 (pwd_cuserid): Renamed from my_cuserid().
2126 1998-01-24 Andy Eskilsson <andy.eskilsson@telelogic.se>
2128 * utils.c (accdir): Process wildcards.
2129 (proclist): New function.
2130 (accdir): Use it to avoid code repetition.
2132 1998-01-24 Hrvoje Niksic <hniksic@srce.hr>
2134 * recur.c (parse_robots): Respect opt.useragent; use alloca().
2136 * http.c (gethttp): Construct useragent accordingly.
2138 * version.c: Changed version string to numbers-only.
2140 * main.c (print_help): List all the options.
2142 * mswindows.c (windows_main_junk): Initialize argv0 here.
2144 1998-01-24 Karl Heuer <kwzh@gnu.org>
2146 * netrc.c (search_netrc): Initialize `l' only after processing
2149 * main.c (main): Don't trap SIGHUP if it's being ignored.
2151 1998-01-24 Hrvoje Niksic <hniksic@srce.hr>
2153 * all: Use logmsg().
2155 * utils.c (time_str): Moved from retr.c.
2156 (logmsg): New function.
2157 (logmsg_noflush): Ditto.
2159 * rbuf.c: New file, moved buf_* functions here.
2161 * ftp.c (ftp_expected_bytes): Moved from ftp-basic.c.
2163 * ftp-basic.c (ftp_rest): Use prnum().
2165 * ftp-basic.c: Ditto.
2167 * ftp.c: Use the new reading functions and macros.
2169 * retr.c (buf_initialize): New function.
2170 (buf_initialized_p): Ditto.
2171 (buf_uninitialize): Ditto.
2174 * http.c (fetch_next_header): Use the BUF_READCHAR macro for
2176 (gethttp): Use alloca() where appropriate.
2178 * retr.c (buf_readchar): Use it.
2179 (buf_peek): Use rstreams.
2181 * retr.h (BUF_READCHAR): New macro.
2183 * init.c (home_dir): Rewritten for clarity.
2186 * mswindows.c (ws_backgnd): Made static.
2187 (read_registry): Ditto.
2188 (ws_cleanup): Ditto.
2189 (ws_handler): Ditto.
2191 1998-01-23 Hrvoje Niksic <hniksic@srce.hr>
2193 * alloca.c: New file.
2195 * Makefile.in (ALLOCA): Define.
2197 * mswindows.c (ws_help): Constify.
2198 (ws_help): Use alloca.
2200 * mswindows.c: Reformat.
2202 * all: Added _(...) annotations for I18N snarfing and translation.
2204 * host.c (ftp_getaddress): Nuke SYSINFO.
2205 (ftp_getaddress): Don't use getdomainname().
2206 (ftp_getaddress): Use uname(), where available.
2208 * http.c (gethttp): Protect a stray fprintf().
2210 * init.c (settime): New function.
2211 (setval): Treat WAIT specially, allowing suffixes like `m' for
2214 1998-01-21 Hrvoje Niksic <hniksic@srce.hr>
2216 * url.c (get_urls_html): Use alloca() for TEMP.
2218 1998-01-21 Jordan Mendelson <jordy@wserv.com>
2220 * url.c (rotate_backups): New function.
2222 * http.c (gethttp): Ditto.
2224 * ftp.c (getftp): Rotate backups.
2226 1997-12-18 Hrvoje Niksic <hniksic@srce.hr>
2228 * all: Renamed nmalloc(), nrealloc() and nstrdup() to xmalloc(),
2229 xrealloc() and xstrdup(). Use the new functions.
2231 * url.c (decode_string): Made static.
2234 (parse_uname): Ditto.
2237 (construct_relative): Ditto.
2239 * retr.c (show_progress): Made static.
2241 * recur.c (robots_url): Made static.
2242 (retrieve_robots): Ditto.
2243 (parse_robots): Ditto.
2244 (robots_match): Ditto.
2248 * main.c (printhelp): Made static.
2251 * init.c (comind): Made static.
2254 (run_wgetrc): Ditto.
2262 * http.c (fetch_next_header): Made static.
2263 (hparsestatline): Ditto.
2268 (hgetlocation): Ditto.
2269 (hgetmodified): Ditto.
2270 (haccepts_none): Ditto.
2272 (base64_encode_line): Ditto.
2273 (mktime_from_utc): Ditto.
2274 (http_atotm): Ditto.
2276 * html.c (idmatch): Made static.
2278 * host.c (search_host): Made static.
2279 (search_address): Ditto.
2280 (free_hlist): Ditto.
2282 * ftp.c (getftp): Made static.
2283 (ftp_loop_internal): Ditto.
2284 (ftp_get_listing): Ditto.
2285 (ftp_retrieve_list): Ditto.
2286 (ftp_retrieve_dirs): Ditto.
2287 (ftp_retrieve_glob): Ditto.
2288 (freefileinfo): Ditto.
2289 (delelement): Ditto.
2291 * ftp-ls.c (symperms): Made static.
2292 (ftp_parse_unix_ls): Ditto.
2294 * connect.c (select_fd): Made static.
2296 * utils.c (xmalloc): Renamed from nmalloc.
2297 (xrealloc): Renamed from nrealloc.
2298 (xstrdup): Renamed from nstrdup.
2300 * getopt.c (exchange): Use alloca.
2302 * mswindows.c (mycuserid): Use strncpy.
2304 * New files mswindows.c, mswindows.h, sysdep.h. winjunk.c,
2305 systhings.h, windecl.h and winjunk.h removed.
2307 * mswindows.c (sleep): New function.
2309 * utils.c: Include <windows.h> under Windows.
2311 1997-06-12 Darko Budor <dbudor@zesoi.fer.hr>
2313 * url.h (URL_UNSAFE): Change default under Windows.
2315 * retr.c (retrieve_from_file): Respect opt.delete_after.
2317 * main.c (main): Call ws_help on Windows.
2319 * winjunk.c (windows_main_junk): New function.
2321 * main.c (main): Junk-process argv[0].
2323 * http.c (mktime_from_utc): Return -1 if mktime failed.
2325 * http.c (http_loop): Ditto.
2327 * ftp.c (ftp_loop_internal): Change title on Windows when using a
2330 * winjunk.c (getdomainname): Lots of functions.
2332 1997-06-12 Hrvoje Niksic <hniksic@srce.hr>
2334 * cmpt.c (strptime_internal): Handle years more correctly for
2337 1997-06-09 Mike Thomas <mthomas@reality.ctron.com>
2339 * http.c (gethttp): Allocate enough space for
2340 `Proxy-Authorization' header.
2342 1997-05-10 Hrvoje Niksic <hniksic@srce.hr>
2344 * version.c: Wget/1.4.5 is released.
2346 1997-05-10 Hrvoje Niksic <hniksic@srce.hr>
2348 * retr.c (get_contents): Check return value of fwrite more
2351 1997-03-30 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
2353 * cmpt.c (strptime_internal) [case 'Y']: Always subtract 1900 from
2354 year, regardless of century.
2356 1997-03-30 Hrvoje Niksic <hniksic@srce.hr>
2358 * utils.c (isfile): Use `lstat' instead of `stat'.
2360 1997-03-29 Hrvoje Niksic <hniksic@srce.hr>
2362 * utils.c (numdigit): Use explicit test.
2364 1997-03-21 Hrvoje Niksic <hniksic@srce.hr>
2366 * http.c (http_loop): Always use `url_filename' to get u->local.
2368 1997-03-20 Hrvoje Niksic <hniksic@srce.hr>
2370 * url.c: Recognize https.
2372 1997-03-13 Hrvoje Niksic <hniksic@srce.hr>
2374 * recur.c (recursive_retrieve): Lowercase just the host name.
2376 1997-03-09 Hrvoje Niksic <hniksic@srce.hr>
2378 * url.c (get_urls_file): Use the correct test.
2379 (get_urls_html): Ditto.
2381 1997-03-07 Hrvoje Niksic <hniksic@srce.hr>
2383 * connect.c: Reverted addrlen to int.
2385 * init.c (parse_line): Check for -1 instead of NONE.
2387 * version.c: Changed version to 1.4.5.
2389 1997-02-17 Hrvoje Niksic <hniksic@srce.hr>
2391 * init.c: New option netrc.
2392 (initialize): Don't parse .netrc.
2394 * cmpt.c (recursive): Return rp.
2395 (strptime_internal): Match the long strings first, the abbreviated
2398 1997-02-16 Hrvoje Niksic <hniksic@srce.hr>
2400 * http.c (check_end): New function.
2401 (http_atotm): Use it.
2403 1997-02-13 gilles Cedoc <gilles@cedocar.fr>
2405 * http.c (gethttp): Use them.
2407 * init.c: New options proxy_user and proxy_passwd.
2409 1997-02-14 Hrvoje Niksic <hniksic@srce.hr>
2411 * ftp.c (ftp_retrieve_list): Create links even if not relative.
2413 1997-02-10 Hrvoje Niksic <hniksic@srce.hr>
2415 * recur.c (recursive_retrieve): Lowercase the host name, if the
2416 URL is not "optimized".
2418 * host.c (realhost): Return l->hostname, even if it matches with
2421 1997-02-10 Marin Purgar <pmc@asgard.hr>
2423 * connect.c: Make addrlen size_t instead of int.
2426 1997-02-09 Gregor Hoffleit <flight@mathi.uni-heidelberg.DE>
2428 * systhings.h: Define S_ISLNK on NeXT too.
2430 1997-02-09 Hrvoje Niksic <hniksic@srce.hr>
2432 * version.c: Released 1.4.3.
2434 * url.c: Futher update to list of protostrings.
2435 (skip_proto): Skip `//' correctly for FTP and HTTP.
2437 * url.c (get_urls_html): Handle bogus `http:' things a little
2440 * main.c (main): Removed `follow-ftp' from `f'.
2441 (main): Dumped the `prefix-files' and `file-prefix' options and
2442 features; old and bogus.
2443 (main): Exit on failed setval() in `-e'.
2445 * http.c (fetch_next_header): Use it to detect header continuation
2448 * retr.c (buf_peek): New function.
2450 1997-02-08 Hrvoje Niksic <hniksic@srce.hr>
2452 * wget.h: Include time.h and stuff.
2454 1997-02-08 Roger Beeman <beeman@cisco.com>
2456 * ftp.c: Include <time.h>
2458 1997-02-07 Hrvoje Niksic <hniksic@srce.hr>
2460 * url.c (findurl): Would read over buffer limits.
2462 1997-02-06 Hrvoje Niksic <hniksic@srce.hr>
2464 * ftp-ls.c (ftp_parse_unix_ls): Allow spaces in file names.
2466 1997-02-05 Hrvoje Niksic <hniksic@srce.hr>
2468 * http.c (http_atotm): Initialize tm.is_dst.
2470 1997-02-02 Hrvoje Niksic <hniksic@srce.hr>
2472 * http.c (gethttp): Don't print the number of retrieved headers.
2474 * main.c (main): New option `--no-clobber', alias for `-nc'.
2476 * url.c: Recognize `https://'.
2478 1997-02-01 Hrvoje Niksic <hniksic@srce.hr>
2480 * host.c (herrmsg): Don't use h_errno.
2482 1997-01-30 Hrvoje Niksic <hniksic@srce.hr>
2484 * host.c (accept_domain): Use it.
2486 * main.c (main): New option `--exclude-domains'.
2488 * retr.c (retrieve_url): Use it.
2489 (retrieve_url): Bail out when an URL is redirecting to itself.
2491 * url.c (url_equal): New function.
2493 1997-01-29 Hrvoje Niksic <hniksic@srce.hr>
2495 * connect.c: Include arpa/inet.h instead of arpa/nameser.h.
2497 * http.c (mk_utc_time): New function.
2498 (http_atotm): Use it; handle time zones correctly.
2500 1997-01-28 Hrvoje Niksic <hniksic@srce.hr>
2504 * ftp-basic.c: Use it instead of WRITE.
2506 * connect.c (iwrite): New function.
2508 1997-01-27 Hrvoje Niksic <hniksic@srce.hr>
2510 * cmpt.c (mktime): New function.
2512 * netrc.c: Include <sys/types.h>.
2514 * main.c (main): Wouldn't recognize --spider.
2516 * retr.c (rate): Use `B', `KB' and `MB'.
2517 (reset_timer,elapsed_time): Moved from utils.c.
2519 * ftp.c (ftp_retrieve_list): Ditto.
2521 * http.c (http_loop): Don't touch the file if opt.dfp.
2523 1997-01-24 Hrvoje Niksic <hniksic@srce.hr>
2527 * ftp.c (ftp_retrieve_glob): New argument semantics.
2528 (ftp_retrieve_dirs): Use it.
2531 * html.c (htmlfindurl): Recognize `'' as the quote char.
2533 1997-01-23 Hrvoje Niksic <hniksic@srce.hr>
2535 * ftp.c (ftp_loop_internal): Use it.
2537 * utils.c (remove_link): New function.
2539 1997-01-22 Hrvoje Niksic <hniksic@srce.hr>
2541 * retr.c (retrieve_url): Require STRICT redirection URL.
2543 * url.c (parseurl): New argument STRICT.
2545 * http.c (hparsestatline): Be a little-bit less strict about
2548 1997-01-21 Hrvoje Niksic <hniksic@srce.hr>
2550 * http.c (gethttp): Use it.
2552 * main.c (main): Don't use '<digit>' as options.
2554 * init.c: New option ignore_length.
2556 * http.c (gethttp): Ditto.
2557 (http_loop): Check for redirection without Location:.
2558 (gethttp): Don't print Length unless RETROKF.
2560 * ftp.c (getftp): Use it.
2562 * url.c (mkalldirs): New function.
2564 * utils.c (mymkdir): Don't check for existing non-directory.
2566 * url.c (mkstruct): Don't create the directory.
2568 1997-01-20 Hrvoje Niksic <hniksic@srce.hr>
2570 * init.c (setval): Removed NO_RECURSION checks.
2572 1997-01-19 Hrvoje Niksic <hniksic@srce.hr>
2574 * version.c: "Released" 1.4.3-pre2.
2576 * recur.c (recursive_retrieve): Bypass host checking only if URL
2577 is ftp AND parent URL is not ftp.
2579 * ftp-basic.c (ftp_request): Print out Turtle Power.
2581 * ftp.c (ftp_loop): Call ftp_retrieve_glob with 0 if there's no
2583 (ftp_retrieve_glob): Call ftp_loop_internal even on empty list, if
2586 * http.c (gethttp): Be a little bit smarter about status codes.
2588 * recur.c (recursive_retrieve): Always reset opt.recursive when
2591 1997-01-18 Hrvoje Niksic <hniksic@srce.hr>
2593 * retr.c (retrieve_url): New variable location_changed; use it for
2594 tests instead of mynewloc.
2595 (retrieve_url): Allow heuristic adding of html.
2597 * url.c (url_filename): Don't use the `%' in Windows file names.
2599 * http.c (http_loop): Always time-stamp the local file.
2601 * http.c (http_loop): Ditto.
2603 * ftp.c (ftp_retrieve_list): Use it.
2605 * utils.c (my_touch): New function.
2607 * ftp.c (ftp_retrieve_list): Use #ifdef HAVE_STRUCT_UTIMBUF
2608 instead of #ifndef NeXT.
2610 * utils.c (strptime): New version, by Ulrich Drepper.
2612 1997-01-17 Hrvoje Niksic <hniksic@srce.hr>
2614 * http.c (haccepts_none): Renamed from `haccepts_bytes'.
2615 (gethttp): If haccepts_none(), disable ACCEPTRANGES.
2616 (http_loop): Would remove ACCEPTRANGES.
2618 * ftp.c (getftp): Call ftp_list with NULL.
2620 1997-01-15 Hrvoje Niksic <hniksic@srce.hr>
2622 * html.c (ftp_index): Don't print minutes and seconds if we don't
2623 know them; beautify the output.
2625 * ftp.c (getftp): Don't close the socket on FTPNSFOD.
2627 1997-01-14 Hrvoje Niksic <hniksic@srce.hr>
2629 * utils.c (strptime): New function.
2630 (strptime): Don't use get_alt_number.
2631 (strptime): Don't use locale.
2632 (match_string): Made it a function.
2634 1997-01-12 Hrvoje Niksic <hniksic@srce.hr>
2636 * http.c (http_atotm): New function.
2637 (http_loop): Use it.
2639 * atotm.c: Removed from the distribution.
2641 * http.c (base64_encode_line): Rewrite.
2643 1997-01-09 Hrvoje Niksic <hniksic@srce.hr>
2645 * ftp.c (getftp): Use ftp_expected_bytes; print size.
2647 * ftp-basic.c (ftp_response): Use ftp_last_respline.
2648 (ftp_expected_bytes): New function.
2650 * ftp.c (getftp): Print the unauthoritative file length.
2652 * ftp-ls.c: Renamed from ftp-unix.c.
2653 (ftp_parse_ls): Moved from ftp.c.
2654 (ftp_parse_unix_ls): Recognize seconds in time spec.
2655 (ftp_parse_unix_ls): Recognize year-less dates of the previous
2658 1997-01-08 Hrvoje Niksic <hniksic@srce.hr>
2660 * ftp-basic.c: Don't declare errno if #defined.
2662 * host.c (ftp_getaddress): Check for sysinfo legally.
2664 1997-01-08 Darko Budor <dbudor@diana.zems.fer.hr>
2666 * connect.c (iread): Use READ.
2668 1996-12-23 Hrvoje Niksic <hniksic@srce.hr>
2670 * url.c: Recognize finger, rlogin, tn3270, mid and cid as valid
2673 1996-12-22 Hrvoje Niksic <hniksic@srce.hr>
2675 * host.c (ftp_getaddress): Allow `.' in hostname.
2677 1996-12-26 Darko Budor <dbudor@zems.fer.hr>
2679 * wget.h: READ and WRITE macros for use instead of read and write
2680 on sockets, grep READ *.c, grep WRITE *.c
2682 * wsstartup.c: new file - startup for winsock
2684 * wsstartup.h: new file
2686 * win32decl.h: new file - fixup for <errno.h> and winsock trouble
2688 * configure.bat: Configure utility for MSVC
2690 * src/Makefile.ms,config.h.ms: new files for use with MSVC 4.x
2692 1996-12-22 Hrvoje Niksic <hniksic@srce.hr>
2694 * version.c: Released 1.4.3-pre.
2696 * utils.c (prnum): Accept long.
2697 (legible): Use prnum().
2699 * connect.c (make_connection): Accept port as short.
2702 * http.c (gethttp): Use search_netrc.
2704 1996-12-21 Hrvoje Niksic <hniksic@srce.hr>
2706 * ftp.c (getftp): Use search_netrc.
2708 * netrc.c (free_netrc): New function.
2710 * init.c (home_dir): New function.
2712 * url.c (convert_links): Allow REL2ABS changes.
2714 1996-12-21 Gordon Matzigkeit <gord@gnu.ai.mit.edu>
2716 * netrc.c: New file.
2717 (parse_netrc, maybe_add_to_list): New functions.
2719 1996-12-17 Hrvoje Niksic <hniksic@srce.hr>
2721 * retr.c (retrieve_url): Reset opt.recursion before calling
2722 ftp_loop if it is reached through newloc.
2724 * init.c (run_wgetrc): Print the wgetrc path too, when reporting
2725 error; don't use "Syntax error", since we don't know if it is
2726 really a syntax error.
2728 1996-12-16 Hrvoje Niksic <hniksic@srce.hr>
2730 * utils.c (acceptable): Extract the filename part of the path.
2732 * recur.c (recursive_retrieve): Call acceptable() with the right
2733 argument; would bug out on wildcards.
2735 * init.c (parse_line): Likewise.
2737 * html.c (htmlfindurl): Cast to char * when calling stuff.
2739 1996-12-15 Hrvoje Niksic <hniksic@srce.hr>
2741 * ftp.c (getftp): Use ftp_pasv.
2743 * ftp-basic.c (ftp_request): Accept NULL value.
2744 (ftp_pasv): New function.
2746 * options.h (struct options): Add passive FTP option.
2748 1996-12-15 Hrvoje Niksic <hniksic@srce.hr>
2750 * url.c (parseurl): Debug output.
2752 * utils.c (path_simplify): New one, adapted from bash's
2753 canonicalize_pathname().
2755 1996-12-14 Hrvoje Niksic <hniksic@srce.hr>
2757 * ftp.c (getftp): Don't discard the buffer.
2759 * retr.c (get_contents): New parameter nobuf.
2761 1996-12-13 Shawn McHorse <riffraff@txdirect.net>
2763 * html.c (htmlfindurl): Recognize <meta contents="d; URL=...".
2765 * init.c (setval): Strip the trailing slashes on CVECDIR.
2767 1996-12-13 Hrvoje Niksic <hniksic@srce.hr>
2769 * init.c: Make excludes and includes under CVECDIR instead of
2772 1996-12-13 Shawn McHorse <riffraff@txdirect.net>
2774 * url.c (get_urls_html): Skip "http:".
2776 1996-12-13 Hrvoje Niksic <hniksic@srce.hr>
2778 * utils.c (strcasecmp): From glibc.
2779 (strncasecmp): Also.
2782 * url.c: Added javascript: to the list of URLs prefixes.
2784 1996-12-12 Shawn McHorse <riffraff@txdirect.net>
2786 * recur.c (retrieve_robots): Print the warning message only if
2789 1996-12-12 Gregor Hoffleit <flight@mathi.uni-heidelberg.DE>
2791 * ftp.c (ftp_retrieve_list): Use NeXT old utime interface.
2793 1996-12-12 Hrvoje Niksic <hniksic@srce.hr>
2795 * systhings.h: New file.
2797 * ../configure.in: Check for utime.h
2799 * ftp.c: Check whether we have unistd.h.
2801 1996-11-27 Hrvoje Niksic <hniksic@srce.hr>
2803 * recur.c (recursive_retrieve): Send the canonical URL as referer.
2804 (recursive_retrieve): Call get_urls_html with the canonical URL.
2806 1996-12-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2808 * (configure.in, config.h.in, src/Makefile.in, src/*.[ch]): Add
2809 ansi2knr support for compilers which don't support ANSI style
2810 function prototypes and signatures.
2812 * (aclocal.m4, src/ansi2knr.c, src/ansi2knr.1): New files.
2814 1996-11-26 Hrvoje Niksic <hniksic@srce.hr>
2816 * url.c: Use it; Recognize paths ending with "." and ".." as
2818 (url_filename): Append .n whenever file exists and could be a
2821 * url.h (ISDDOT): New macro.
2823 * init.c (parse_line): Use unsigned char.
2825 * url.c (get_urls_html): Cast to unsigned char * when calling
2828 * html.c (htmlfindurl): Use unsigned char.
2830 * version.c: Changed version to 1.4.3.
2832 1996-11-25 Hrvoje Niksic <hniksic@srce.hr>
2834 * version.c: Released 1.4.2.
2836 * ftp.c (getftp): Simplified assertion.
2837 (ftp_loop_internal): Remove symlink before downloading.
2838 (ftp_retrieve_list): Unlink the symlink name before attempting to
2841 * options.h (struct options): Renamed print_server_response to
2844 * ftp.c (rel_constr): Removed.
2845 (ftp_retrieve_list): Don't use it.
2846 (ftp_retrieve_list): Use opt.retr_symlinks.
2848 1996-11-24 Hrvoje Niksic <hniksic@srce.hr>
2850 * main.c (main): New option retr_symlinks.
2852 * url.c (convert_links): Print verbose message.
2854 1996-11-24 Hrvoje Niksic <hniksic@srce.hr>
2856 * http.c (http_loop): Reset newloc in the beginning of function;
2857 would cause FMR in retrieve_url.
2859 1996-11-23 Hrvoje Niksic <hniksic@srce.hr>
2861 * recur.c (convert_all_links): Find the URL of each HTML document,
2862 and feed it to get_urls_html; would bug out.
2863 (convert_all_links): Check for l2 instead of dl; removed dl.
2865 * url.c (convert_links): Don't refer to freed newname.
2867 * recur.c (recursive_retrieve): Add this_url to urls_downloaded.
2869 * main.c (main): Print the OS_TYPE in the debug output, too.
2871 * recur.c (recursive_retrieve): Check for opt.delete_after.
2873 * main.c (main): New option delete-after.
2875 * init.c (setval): Cleaned up.
2877 1996-11-21 Hrvoje Niksic <hniksic@srce.hr>
2879 * Makefile.in (wget): Make `wget' the default target.
2881 * ftp.c (ftp_loop_internal): Move noclobber checking out of the
2883 (ftp_retrieve_list): Warn about non-matching sizes.
2885 * http.c (http_loop): Made -nc non-dependent on opt.recursive.
2887 * init.c (setnum): Renamed from setnuminf; New argument flags.
2890 * main.c (main): Sorted the options.
2891 (main): New option --wait.
2893 1996-11-21 Shawn McHorse <riffraff@txdirect.net>
2895 * html.c (htmlfindurl): Reset s->in_quote after getting out of
2898 1996-11-20 Hrvoje Niksic <hniksic@srce.hr>
2900 * version.c: Changed version to 1.4.2.
2902 1996-11-20 Hrvoje Niksic <hniksic@srce.hr>
2904 * version.c: Released 1.4.1.
2906 * html.c (html_quote_string): New function.
2907 (ftp_index): Use it.
2908 (htmlfindurl): A more gentle ending debug message.
2910 * ftp.c (ftp_loop): Check for opt.htmlify.
2912 * init.c: New command htmlify.
2914 * ftp.c (getftp): Nicer error messages, with `'-encapsulated
2916 (ftp_loop): Print size of index.html.
2918 * init.c (setval): Implement "styles".
2920 * main.c (main): New option dotstyle.
2922 1996-11-19 Hrvoje Niksic <hniksic@srce.hr>
2924 * ftp.c (getftp): Close the master socket in case of errors, after
2927 * connect.c (bindport): Initialize msock to -1.
2929 * ftp.c (getftp): Initialize dtsock to -1.
2931 * connect.c (closeport): Don't close sock if sock == -1.
2933 1996-11-18 Hrvoje Niksic <hniksic@srce.hr>
2935 * init.c (setnuminf): Nuked default value -- just leave unchanged.
2936 (setval): Don't send default values.
2937 (defaults): Use DEFAULT_TIMEOUT -- aaargh.
2939 * options.h (struct options): Use long for dot_bytes.
2941 * init.c (setquota): Renamed to setbytes.
2942 (setval): Use setbytes on DOTBYTES.
2944 1996-11-17 Hrvoje Niksic <hniksic@srce.hr>
2946 * ftp.c (getftp): Initialize con->dltime.
2948 * recur.c (recursive_retrieve): Use same_host instead of
2949 try_robots; simply load robots_txt whenever the host is changed.
2950 (recursive_retrieve): Free forbidden before calling parse_robots.
2952 1996-11-16 Hrvoje Niksic <hniksic@srce.hr>
2954 * retr.c (show_progress): Use them.
2956 * options.h (struct options): New options dot_bytes, dots_on_line
2959 1996-11-16 Mark Boyns <boyns@sdsu.edu>
2961 * recur.c (recursive_retrieve): Retrieve directories regardless of
2962 acc/rej rules; check for empty u->file.
2964 1996-11-14 Hrvoje Niksic <hniksic@srce.hr>
2966 * init.c (setval): Use it.
2968 * utils.c (merge_vecs): New function.
2970 * init.c (setval): Reset the list-type functions when encountering
2973 1996-11-14 Shawn McHorse <riffraff@txdirect.net>
2975 * recur.c (recursive_retrieve): Use base_url instead of this_url
2978 1996-11-14 Shawn McHorse <riffraff@txdirect.net>
2980 * html.c (htmlfindurl): Reset s->in_quote after exiting the quote.
2982 1996-11-13 Hrvoje Niksic <hniksic@srce.hr>
2984 * utils.c (sepstring): Rewrote; don't use strtok.
2986 * recur.c (recursive_retrieve): Enter assorted this_url to slist
2987 when running the first time.
2988 (retrieve_robots): Warn to ignore errors when robots are loaded.
2990 * utils.c (load_file): Moved from url.c.
2992 * http.c: Made static variables const too in h* functions.
2994 * main.c (main): Renamed --continue-ftp to --continue.
2996 * recur.c (recursive_retrieve): Use it.
2998 * utils.c (frontcmp): New function.
3000 * url.c (accdir): New function.
3002 * html.c (htmlfindurl): Recognize <area href=...>.
3004 * ftp.c (ftp_retrieve_dirs): Implemented opt.includes.
3006 * init.c (setval): Free the existing opt.excludes and
3007 opt.includes, if available.
3009 * main.c (main): New option -I.
3011 1996-11-12 Hrvoje Niksic <hniksic@srce.hr>
3013 * ftp.c (ftp_retrieve_glob): Do not weed out directories.
3015 * version.c: Changed version to 1.4.1.
3017 1996-11-11 Hrvoje Niksic <hniksic@srce.hr>
3019 * version.c: Released 1.4.0.
3021 1996-11-10 Hrvoje Niksic <hniksic@srce.hr>
3023 * main.c (main): Free com and val after parse_line.
3024 (printhelp): Reorder the listing.
3026 * http.c: More robust header parsing.
3028 * http.c: Allow any number of spaces, or no spaces, precede ':'.
3029 (hskip_lws): New function.
3030 (haccepts_bytes): New function.
3033 * init.c (setval): Check header sanity.
3034 (setval): Allow resetting of headers.
3036 1996-11-10 Hrvoje Niksic <hniksic@srce.hr>
3038 * http.c (http_loop): Don't use has_wildcards.
3040 * http.c (gethttp): Free all_headers -- would leak.
3042 * recur.c (recursive_retrieve): Initialize depth to 1 instead of
3043 0 -- this fixes a long-standing bug in -rl.
3045 1996-11-09 Hrvoje Niksic <hniksic@srce.hr>
3047 * ftp.c: Use -1 as "impossible" value for con->fd.
3049 * url.h (URL_SEPARATOR): Don't treat `*' and `+' as separators.
3051 * init.c (parse_line): Use isalpha.
3053 * ftp-unix.c: Use HAVE_UNISTD_H.
3055 * mtch.c (has_wildcards): Don't match \.
3057 * http.c (http_loop): Warn on HTTP wildcard usage.
3059 1996-11-08 Hrvoje Niksic <hniksic@srce.hr>
3061 * url.c (url_filename): Do not create numbered suffixes if
3062 opt.noclobber -- would bug out on -nc.
3064 1996-11-07 Hrvoje Niksic <hniksic@srce.hr>
3066 * recur.c (parse_robots): Don't chuck out the commands without
3067 arguments (`Disallow:<empty>' didn't work).
3068 (parse_robots): Compare versions lowercase.
3069 (parse_robots): Match on base_version, not version_string!
3070 (parse_robots): Handle comments properly.
3071 (parse_robots): Match versions in a sane way.
3073 * init.c: Print nicer error messages.
3075 * version.c: Changed version to 1.4.0.
3077 1996-11-06 Hrvoje Niksic <hniksic@srce.hr>
3079 * version.c: Released 1.4.0-test2.
3081 * init.c (run_wgetrc): Close fp.
3083 * ftp.c (ftp_retrieve_dirs): Allocate the correct length for
3086 1996-11-06 Hrvoje Niksic <hniksic@srce.hr>
3088 * init.c (setquota): Allow inf as quota specification.
3090 1996-11-05 Hrvoje Niksic <hniksic@srce.hr>
3092 * ftp.c (ftp_retrieve_dirs): Return QUOTEXC if quota exceeded.
3093 (ftp_retrieve_glob): Return QUOTEXC on quota exceeded.
3095 * main.c (main): Check for quota by comparison with downloaded
3096 stuff, not from status.
3098 * connect.c (select_fd): Should compile on HPUX without warnings now.
3100 * ftp.c (ftp_get_listing): Check whether ftp_loop_internal
3103 1996-11-04 Hrvoje Niksic <hniksic@srce.hr>
3105 * ftp.c (ftp_retrieve_glob): Print the pattern nicely.
3106 (getftp): Return FTPRETRINT on control connection error.
3108 * html.c (htmlfindurl): Recognize <embed src=...> and
3110 (ftp_index): Handle username and password correctly.
3112 * main.c (main): Made `-np' a synonim for --no-parent.
3114 1996-11-02 Hrvoje Niksic <hniksic@srce.hr>
3116 * ftp.c (ftp_loop): Check for opt.ftp_glob too before calling
3119 * version.c: Changed version to 1.4.0-test2.
3121 1996-11-02 Hrvoje Niksic <hniksic@srce.hr>
3123 * version.c: Released 1.4.0-test1.
3125 * url.c (str_url): Don't use sprintf when creating %2F-prefixed
3127 (convert_links): Removed definition of make_backup.
3129 * http.h: Removed definition of MAX_ERROR_LENGTH.
3131 * host.c (ftp_getaddress): Check for "(none)" domains.
3133 * ftp.c (ftp_retrieve_dirs): Docfix.
3135 * http.c (gethttp): Use ou->referer instead of u->referer.
3137 * retr.c (retrieve_url): Reset u to avoid freeing pointers twice;
3138 this was known to cause coredumps on Linux.
3140 * html.c (ftp_index): Cast the argument to local_time to time_t *.
3142 1996-11-01 Hrvoje Niksic <hniksic@srce.hr>
3144 * connect.c (select_fd): Use exceptfds -- once and for all.
3146 * retr.c (retrieve_from_file): Free filename after
3148 (retrieve_from_file): Send RFIRST_TIME to recursive_retrieve on
3149 first-time retrieval.
3150 (retrieve_from_file): Return uerr_t; new argument, count.
3151 (retrieve_from_file): Break on QUOTEXC.
3153 * init.c (setquota): Fixed a bug that caused rejection of
3154 non-postfixed values..
3156 1996-10-30 Hrvoje Niksic <hniksic@srce.hr>
3158 * version.c: Changed name to wget.
3160 * connect.c (iread): Smarter use of select.
3161 (select_fd): Set errno on timeout. If not timeout, return 1
3164 1996-10-29 Hrvoje Niksic <hniksic@srce.hr>
3166 * ftp.c (ftp_loop_internal): Don't use con->cmd before
3169 1996-10-26 Hrvoje Niksic <hniksic@srce.hr>
3171 * http.c (gethttp): Send correct referer when using proxy.
3172 (gethttp): Use struct urlinfo ou to access the relevant data; send
3173 correct authorization in all cases.
3175 * host.c (same_host): Use skip_uname to skip username and
3178 * url.c (skip_uname): New function.
3181 * host.c (same_host): Do not assume HTTP -- same_host should now
3182 be totally foolproof.
3184 * url.c (skip_proto): New function.
3185 (parse_uname): Use it.
3187 * http.c (gethttp): Create local user and passwd from what is
3190 * url.c (parseurl): Check for HTTP username and password too.
3192 1996-10-25 Hrvoje Niksic <hniksic@srce.hr>
3194 * config.h.in: Removed #define gethostbyname R...
3196 1996-10-22 Hrvoje Niksic <hniksic@srce.hr>
3198 * version.c: Changed version to 1.4.0-test1.
3200 1996-10-21 Hrvoje Niksic <hniksic@srce.hr>
3202 * version.c: "Released" 1.4b29.
3204 * recur.c (recursive_retrieve): Check for no_parent.
3206 * init.c (setval): Option update.
3208 * main.c (main): New option no-parent.
3210 * options.h (struct options): New variable no_parent.
3212 * recur.c (recursive_retrieve): Only files are checked for
3213 opt.accepts and opt.rejects.
3214 (recursive_retrieve): Check directories for opt.excludes.
3215 (recursive_retrieve): Make the dir absolute when checking
3218 * html.c (htmlfindurl): Recognize <applet code=...> and <script
3221 1996-10-18 Hrvoje Niksic <hniksic@srce.hr>
3223 * ftp.c (getftp): Do not line-break assert entries at all.
3224 (ftp_retrieve_dirs): docfix.
3226 * connect.c (select_fd): Use fd + 1 as nfds.
3228 * version.c: Changed version to 1.4b29.
3230 1996-10-18 Hrvoje Niksic <hniksic@srce.hr>
3232 * version.c: "Released" 1.4b28.
3234 * ftp.c (ftp_loop_internal): Check whether f->size == len and
3235 don't continue the loop if it is.
3236 (ftp_get_listing): Remove list_filename on unsuccesful loop.
3238 1996-10-17 Hrvoje Niksic <hniksic@srce.hr>
3240 * ftp.c (ftp_loop_internal): Use strcpy to initialize tmp.
3241 (getftp): Do not use multiline assert.
3243 * http.c (hparsestatline): Use mjr and mnr instead of major and
3244 minor, which don't compile on Ultrix.
3245 (http_loop): Use strcpy() to initialize tmp.
3247 * all: Geturl -> Fetch
3249 1996-10-17 Hrvoje Niksic <hniksic@srce.hr>
3251 * recur.c (parse_robots): Fixed an off-by-one bug when looking for
3254 * html.c (htmlfindurl): Fixed several possible off-by-one bugs by
3255 moving `bufsize &&' to the beginning of each check in for-loops.
3257 * recur.c (parse_robots): Close fp on exit.
3259 * url.c (mymkdir): Check for each directory before creating.
3261 1996-10-16 Hrvoje Niksic <hniksic@srce.hr>
3263 * version.c: Changed version to 1.4b28.
3265 1996-10-16 Hrvoje Niksic <hniksic@srce.hr>
3267 * version.c: "Released" 1.4b27.
3269 * init.c (parse_line): Use isspace.
3270 (parse_line): Free *com on all errors.
3272 * ftp.c (ftp_loop): Change FTPOK to RETROK before exiting.
3273 (delelement): Use next instead of f->next and prev instead of
3275 (delelement): Free the members of the deleted element.
3277 * http.c (http_loop): Do not return RETROK on code != 20x.
3279 * init.c (cleanup): Free opt.user_header.
3280 (cleanup): Free opt.domains.
3282 * url.c (freelists): Moved to cleanup().
3284 * http.c (hparsestatline): Docfix.
3286 * main.c (main): Return with error status on unsuccesful
3289 * init.c (setval): Do not remove listing when mirroring.
3291 * url.c (url_filename): Use opt.fileprefix.
3293 * ftp.c (ftp_get_listing): Use url_filename to get filename for
3296 * main.c (main): New option: -rn.
3298 1996-10-15 Hrvoje Niksic <hniksic@srce.hr>
3300 * Makefile.in (RM): Added RM = rm -f.
3302 * host.c (clean_hosts): New function.
3303 (free_hlist): Just free the list, no reset.
3305 * version.c: Changed version to 1.4b27.
3307 1996-10-13 Hrvoje Niksic <hniksic@srce.hr>
3309 * version.c: "Released" 1.4b26.
3311 * retr.c (retrieve_from_file): If call get_urls_html with
3312 opt.spider to make it silent in spider mode.
3314 * url.c (str_url): Use CLEANDUP instead of URL_CLEANSE.
3316 * url.h (CLEANDUP): New macro.
3318 * http.c (gethttp): Fixed a bug that freed location only when it
3321 * retr.c (retrieve_url): Free url if it will not be stored,
3322 i.e. newloc is NULL.
3324 * html.c (htmlfindurl): Handle exiting from quotes correctly; the
3325 old version would bug out on <a href="x#a"href="y">.
3327 * html.h (state_t): New member in_quote.
3329 * html.c (htmlfindurl): Free s->attr at the beginning of
3332 * recur.c (recursive_retrieve): Recognize RCLEANUP.
3333 (tried_robots): Make hosts a global variable.
3334 (recursive_retrieve): Free constr after URL host optimization.
3335 (tried_robots): Free urlinfo before exiting.
3337 * utils.c (free_slist): New function.
3339 * recur.c (recursive_retrieve): Use flags to add cleanup
3342 * main.c (main): Free filename after recursive_retrieve.
3344 * http.c (gethttp): Store successful responses too.
3346 1996-10-12 Hrvoje Niksic <hniksic@srce.hr>
3348 * all: Constified the whole source. This required some minor
3349 changes in many functions in url.c, possibly introducing bugs -- I
3352 * ftp-basic.c: Removed last_respline.
3354 * http.c (gethttp): Free type.
3356 * host.c (same_host): Free real1 and real2.
3358 * main.c (main): New option --spider.
3360 * retr.c (get_contents): Don't reset errno.
3362 * main.c (main): Sorted the options.
3364 * connect.c (iread): Set errno to ETIMEDOUT only if it was left
3365 uninitialized by select().
3367 * http.c (http_loop): Print the time when the connection is
3369 (gethttp): Debug-print the HTTP request.
3371 1996-10-11 Hrvoje Niksic <hniksic@srce.hr>
3373 * connect.c (iread): Do not try reading after timeout.
3375 * main.c (main): Would bug out on -T.
3377 * connect.c (select_fd): Do not use exceptfds.
3378 (iread): Set ETIMEDOUT on select_fd <= 0.
3380 * version.c: Changed version to 1.4b26.
3382 1996-10-10 Hrvoje Niksic <hniksic@srce.hr>
3384 * version.c: "Released" 1.4b25.
3386 * ftp-unix.c (ftp_parse_unix_ls): Ignore lines without file name
3389 * http.c (gethttp): Add errcode to struct hstat.
3390 (http_loop): Use it.
3392 * url.c (no_proxy_match): Simplify using char** for no_proxy.
3394 * options.h (struct options): Make opt.no_proxy a vector.
3396 * utils.c (sepstring): Use !*s instead of !strlen(s).
3398 * init.c (setval): Set opt.maxreclevel to 0 on --mirror.
3399 (getperms): Use ISODIGIT instead of isdigit.
3401 * ftp.c (getftp): Print time.
3403 * main.c (main): Use legible output of downloaded quantity.
3405 * ftp.c (getftp): Use elapsed_time().
3406 (ftp_loop_internal): Use rate().
3408 * http.c (http_loop): Add download ratio output; Use rate().
3410 * utils.c (rate): New function.
3412 1996-10-09 Hrvoje Niksic <hniksic@srce.hr>
3414 * http.c (http_loop): Use timer.
3416 * ftp.c: Split to ftp-basic.c and ftp.c
3418 * utils.c (reset_timer): New function.
3419 (elapsed_time): New function.
3421 * retr.c (show_progress): Make bytes_in_line and offs long; should
3422 work on 16-bit machines.
3424 1996-10-08 Hrvoje Niksic <hniksic@srce.hr>
3426 * url.c (in_acclist): New argument backward.
3428 * ftp.c (ftp_retrieve_glob): Use acceptable() to determine whether
3429 a file should be retrieved according to suffix.
3430 (ftp_get_listing): Check the return value of unlink; Do not call
3431 ftp_retrieve_dirs if depth reached maxreclevel.
3432 (ftp_retrieve_dirs): Check whether the directory is in
3435 * main.c (main): Print the version number at the beginning of
3437 (main): Use strrchr when creating exec_name.
3439 * ftp.c (ftp_retrieve_glob): Do not close control connection.
3441 * version.c: Changed version to 1.4b25.
3443 1996-10-07 Hrvoje Niksic <hniksic@srce.hr>
3445 * version.c: "Released" 1.4b24.
3447 * Makefile.in: Rewrite.
3449 * ftp.c (ftp_loop_internal): Likewise.
3451 * retr.c (time_str): Check for failed time().
3453 * html.c (htmlfindurl): Recognize <fig src> and <overlay src> from
3456 * retr.c (time_str): Return time_t *.
3458 * connect.c (bindport): Close msock on unsuccesful bind.
3459 (bindport): The same for getsockname and listen.
3461 * retr.c (retrieve_url): Allow any number of retries on
3464 * http.c (gethttp): Do not treat errno == 0 as timeout.
3465 (http_loop): Likewise.
3466 (http_loop): Cosmetic changes.
3468 * connect.c (iread): Set errno to ETIMEDOUT in case of timeout.
3470 * retr.c (get_contents): Reset errno.
3472 * ftp.c (getftp): Minor fixes.
3474 1996-10-06 Hrvoje Niksic <hniksic@srce.hr>
3476 * http.c: Do not use backups.
3478 * geturl.1 (WARNING): Warn that man-page could be obsolete.
3480 * getopt.c (getopt_long): Moved to getopt.c
3482 * geturl.texi: Enhanced.
3484 * main.c (main): Use it.
3486 * recur.c (convert_all_links): New function.
3488 * utils.c (add_slist): New argument flags.
3490 * recur.c (recursive_retrieve): Update a list of downloaded URLs.
3491 (parse_robots): Do not chuck out empty value fields.
3492 (parse_robots): Make yourself welcome on empty Disallow.
3494 * version.c: Changed version to 1.4b24.
3496 1996-10-06 Hrvoje Niksic <hniksic@srce.hr>
3498 * version.c: "Released" 1.4b23.
3500 * ftp.c (ftp_loop_internal): Get the time after getftp.
3502 * Makefile.in (install.info): New target.
3505 * http.c (http_loop): Fix output when doing -O.
3507 1996-10-05 Hrvoje Niksic <hniksic@srce.hr>
3509 * geturl.texi: New file.
3511 * main.c (main): Do not print the warnings and download summary if
3514 * version.c: Changed version to 1.4b23.
3516 1996-10-05 Hrvoje Niksic <hniksic@srce.hr>
3518 * "Released" 1.4b22.
3520 * atotm.c (atotm): Use True and False instead of TRUE and FALSE,
3521 to avoid redefinition warnings.
3523 * host.c (store_hostaddress): Use memcpy() to copy the address
3524 returned by inet_addr.
3526 * version.c: Changed version to 1.4b22.
3528 1996-10-04 Hrvoje Niksic <hniksic@srce.hr>
3530 * version.c: "Released" 1.4b21.
3532 * ftp-unix.c (ftp_parse_ls): Renamed to ftp_parse_unix_ls.
3534 * ftp.c (ftp_port): Use conaddr.
3535 (getftp): Print the file length.
3536 (ftp_retrieve_list): Check the stamps of plain files only.
3538 * connect.c (closeport): Do not call shutdown().
3539 (conaddr): New function.
3541 * html.c (ftp_index): Made it dfp-aware.
3543 * init.c (cleanup): New name of freemem. Close opt.dfp.
3545 * ftp.c (getftp): Use opt.dfp if it is set.
3547 * ftp-unix.c (ftp_parse_ls): Recognize time in h:mm format.
3549 * ftp.c (ftp_retrieve_dirs): Fixed a bug that caused incorrect
3550 CWDs to be sent with recursive FTP retrievals.
3552 1996-10-03 Hrvoje Niksic <hniksic@srce.hr>
3554 * recur.c (parse_robots): Made it more compliant with "official"
3557 * http.c: New function.
3559 * ftp-unix.c (ftp_parse_ls): Added better debug output.
3561 * ftp.c (getftp): Print out the LIST in case of
3562 opt.print_server_response.
3564 * version.c: Changed version to 1.4b21.
3566 1996-10-01 Hrvoje Niksic <hniksic@srce.hr>
3568 * version.c: "Released" 1.4b20.
3572 * http.c (gethttp): Preset lengths of various headers instead of
3573 calculating them dynamically.
3574 (gethttp): Check for 206 partial contents.
3576 1996-09-30 Hrvoje Niksic <hniksic@srce.hr>
3578 * configure.in: Set SYSTEM_GETURLRC to $libdir/geturlrc
3580 * http.c (gethttp): Send the port number in the Host: header.
3582 1996-09-29 Hrvoje Niksic <hniksic@srce.hr>
3584 * http.c (gethttp): Send host: header.
3585 (gethttp): Add the possibility of user-defined headers.
3586 (gethttp): Move decision about pragma: no-cache to http_loop,
3588 (gethttp): Pass a struct instead of enormous argument list.
3589 (http_loop): Use a new, fancier display format.
3590 (ftp_loop): Likewise.
3592 * main.c: (hangup): Turn off buffering of the new log file.
3594 * install-sh: Likewise.
3596 * config.sub: Replace with the one in autoconf-2.10
3600 * init.c: New options httpuser and httppasswd.
3602 * http.c: (base64_encode_line): New function.
3603 (gethttp): Send authentication.
3605 * connect.c (make_connection): Use store_hostaddress.
3607 1996-09-28 Hrvoje Niksic <hniksic@srce.hr>
3609 * host.c (store_hostaddress): New function.
3613 * http.c (hgetrange): New function.
3614 (gethttp): Use ranges.
3616 * utils.c (numdigit): Accept long instead of int.
3618 * http.c (http_loop): Add restart capabilities.
3620 * ftp.c (ftp_retrieve_glob): Fixed a bug that could cause matchres
3621 being used uninitialized.
3622 (ftp_retrieve_list): Similar fix.
3624 * host.c (add_hlist): Fixed a bug that could cause cmp being used
3627 * url.c (construct_relative): New function.
3629 * recur.c (recursive_retrieve): Use it.
3631 * retr.c (convert_links): New function.
3633 1996-09-27 Hrvoje Niksic <hniksic@srce.hr>
3635 * url.c (free_urlpos): New function.
3637 * recur.c (recursive_retrieve): Adapt.
3639 * url.c (get_urls_html): Return a linked list instead of a vector.
3641 * url.c (get_urls_file): Return a linked list instead of a vector.
3645 * http.c (gethttp): Implement it.
3647 * init.c (setval): New option: SAVEHEADERS
3649 * ftp.c (ftp_loop_internal): Do not set restval if listing is to
3650 be retrieved. Lack of this test caused bugs when the connection
3651 was lost during listing.
3653 * retr.c (retrieve_url): Fixed a bug that caused
3654 coredumps. *newloc is now reset by default.
3655 (retrieve_url): Lift the twenty-tries limit on proxies.
3657 * version.c: Changed version to 1.4b20.
3659 1996-09-20 Hrvoje Niksic <hniksic@srce.hr>
3661 * version.c: "Released" 1.4b19.
3663 1996-09-19 Hrvoje Niksic <hniksic@srce.hr>
3665 * ftp.c (ftp_loop_internal): Renamed from ftp_1fl_loop.
3666 (getftp): Changed prototype to accept ccon *.
3668 1996-09-17 Hrvoje Niksic <hniksic@srce.hr>
3670 * ftp.c (ftp_retrieve_list): Fixed a bug that caused setting
3671 incorrect values to files pointed to by symbolic links.
3672 (ftp_1fl_loop): Do not count listings among the downloaded URL-s.
3674 1996-09-16 Hrvoje Niksic <hniksic@srce.hr>
3676 * url.c (mkstruct): Do not prepend "./" in front of a pathname.
3678 * main.c (main): New option: --user-agent.
3684 * init.c (setval): Ditto.
3686 * main.c (main): Rename "server-headers" to "server-response".
3688 * ftp-unix.c (ftp_parse_ls): Check for asterisks at the end of
3689 executables in 'ls -F' listings.
3691 1996-09-15 Hrvoje Niksic <hniksic@srce.hr>
3693 * url.c (parseurl): Remove realloc() and sprintf().
3694 (str_url): Get rid of sprintf().
3696 * recur.c (recursive_retrieve): Enable FTP recursion through proxy
3699 * url.h (URL_CLEANSE): Made it else-resistant.
3700 (USE_PROXY): New macro.
3702 1996-09-14 Hrvoje Niksic <hniksic@srce.hr>
3706 * version.c: Changed version to 1.4b19.
3708 1996-09-14 Hrvoje Niksic <hniksic@srce.hr>
3710 * version.c: "Released" 1.4b18.
3712 * url.c: Made it reallocate space exponentially.
3714 1996-09-14 Drazen Kacar <dave@fly.cc.fer.hr>
3716 * html.c (htmlfindurl): Added <frame src> and <iframe src> among
3717 the list of stuff to fetch.
3719 1996-09-13 Hrvoje Niksic <hniksic@srce.hr>
3721 * url.c (get_urls_html): Fixed a bug that caused SIGSEGV's with
3724 * html.c (htmlfindurl): Rewrite.
3726 * http.c (gethttp): Use opt.proxy_cache.
3728 * main.c (main): Added --cache option.
3730 * ftp.c (ftp_response): Print server response if opt.print_server
3732 (getftp): Print newlines after each request if the server response
3734 (ftp_response): Copy the last response line to last_respline.
3736 * http.c (gethttp): Add Pragma: nocache for retried
3739 * ftp.c (getftp): Use it.
3741 * retr.c (buf_discard): New function.
3743 * ftp.c (ftp_response): Use buf_readchar().
3744 (getftp): Flush the control connection buffer before calling
3747 * retr.c (buf_readchar): New function.
3748 (buf_flush): New function.
3749 (get_contents): Use buf_readchar() instead of read(x, x, 1).
3750 (get_contents): Use buf_flush.
3752 1996-09-12 Hrvoje Niksic <hniksic@srce.hr>
3754 * ftp.c: Incorporate changes to ftp_response.
3756 * ftp.c (ftp_response): Allocate the server response dynamically,
3757 as in read_whole_line and fetch_next_header.
3759 * utils.c (read_whole_line): Fixed a bug that prevented reading
3760 the last line if it is not \n-terminated. Also fixed a possible
3763 * http.c (fetch_next_header): Return malloc-ed string as large as
3765 (gethttp): Use new fetch_next_header.
3767 1996-09-12 Hrvoje Niksic <hniksic@srce.hr>
3769 * http.c (hgetlen): Compute the header length the first time only.
3771 (hgetlocation): Ditto.
3772 (hgetmodified): Ditto.
3774 1996-09-11 Hrvoje Niksic <hniksic@srce.hr>
3776 * sample.geturlrc: Update.
3778 1996-09-10 Hrvoje Niksic <hniksic@srce.hr>
3780 * http.c (http_loop): Ditto.
3782 * ftp.c (getftp): Open the output file as binary.
3784 * version.c: Changed version to 1.4b18.
3786 1996-09-10 Hrvoje Niksic <hniksic@srce.hr>
3788 * version.c: "Released" 1.4b17.
3790 * ftp-unix.c (ftp_parse_ls): If unable to open file, return NULL
3791 instead of failed assertion.
3793 1996-09-09 Hrvoje Niksic <hniksic@srce.hr>
3795 * ftp.c (ftp_get_listing): Add a numbered suffix to LIST_FILENAME
3796 if a file of that name already exists.
3798 1996-09-05 Hrvoje Niksic <hniksic@srce.hr>
3800 * ftp.c (ftp_1fl_loop): Handler FTPPORTERR and FOPENERR correctly.
3802 * config.h.in: Define gethostbyname as Rgethostbyname when using
3805 * configure.in: Check for -lresolv if using Socks.
3807 * version.c: Changed version to 1.4b17.
3809 1996-07-15 Hrvoje Niksic <hniksic@srce.hr>
3811 * version.c: "Released" 1.4b16.
3813 * http.c (gethttp): More intelligent check for first line of HTTP
3815 (gethttp): Would bug out on time-stamping.
3817 * version.c: Changed version to 1.4b16.
3819 1996-07-11 Hrvoje Niksic <hniksic@srce.hr>
3821 * version.c: Released 1.4b15.
3823 * http.c (http_loop): Print \n after the loop entry, not before.
3825 * url.c (url_filename): Use ISDOT.
3827 * url.h (ISDOT): New macro.
3829 * recur.c (recursive_retrieve): Change only opt.recursive for
3832 1996-07-11 Antonio Rosella <antonio.rosella@agip.it>
3834 * socks/geturl.cgi: Fixed version No.
3836 * socks/download-netscape.html: Ditto.
3838 * socks/download.html: Changed socks.html to download.html.
3840 1996-07-11 Hrvoje Niksic <hniksic@srce.hr>
3842 * url.c (url_filename): Check for opt.dirstruct instead for
3843 opt.recursive && opt.dirstruct.
3845 * init.c (defaults): Ditto.
3846 (defaults): Reset dirstruct by default.
3847 (setval): Set opt.dirstruct whenever setting recursive.
3849 * init.h: Removed FORCEDIRHIER.
3851 * INSTALL: Added -L to socks-description.
3853 * version.c: Changed version to 1.4b15.
3855 1996-07-10 Hrvoje Niksic <hniksic@srce.hr>
3857 * version.c: "Released" 1.4b14.
3859 * geturl.1: Update AUTHOR to include Rosella as contributor.
3863 * socks/geturl.cgi: Simplified command creation, nuked <blink>.
3865 * socks/geturl.cgi: Wrap nutscape extensions within if $netscape.
3866 (cal_time): Fix == to eq.
3868 * socks/geturl.cgi: GPL-ized with permission of A. Rosella.
3870 * geturl.1 (hostname): Moved URL CONVENTIONS to the beginning.
3872 * Makefile.in: Use @VERSION@.
3874 * configure.in: Check version from version.c.
3876 * socks/geturl.cgi: Changed /pub/bin/perl to /usr/bin/perl.
3878 * socks/download.html: Created from download-netscape.html, made
3881 * recur.c (recursive_retrieve): Set opt.force_dir_hier when
3882 following FTP links from recursions.
3884 1996-07-09 Hrvoje Niksic <hniksic@srce.hr>
3886 * url.c (mymkdir): Fixed a bug that prevented mymkdir() to create
3887 absolute directories correctly.
3889 * version.c: Changed version to 1.4b14.
3891 1996-07-09 Hrvoje Niksic <hniksic@srce.hr>
3893 * version.c: "Released" 1.4b13.
3895 * url.c (make_backup): New function.
3897 * http.c (http_loop): Make a backup copy of the local file (using
3898 rename(2)) before opening it.
3900 * main.c (main): Added --backups.
3902 * host.c (ftp_getaddress): Bail out on failed mycuserid().
3903 (ftp_getaddress): Check for leading dot on MY_DOMAIN.
3904 (ftp_getaddress): Check for empty, null or (null) domain.
3906 * url.c (get_urls_html): If this_url is NULL, the base must have a
3908 (parseurl): Use has_proto.
3910 * retr.c (retrieve_url): Warn when proxy is used with more than 20
3913 * url.c (mkstruct): Create the directory (calling mymkdir()) only
3914 if it is not already there.
3915 (has_proto): New function.
3916 (get_urls_html): Eliminate the remaining call to findurl -- use
3921 * main.c: Change -X to -x.
3923 * url.c (url_filename): Simplify creation of filename if
3924 prefix_files is set.
3925 (url_filename): Simplify everything. And I do mean *everything*.
3926 (mkstruct): Add dir_prefix before hostname.
3927 (path_simplify): Fixed a bug that caused writing outside the path
3928 string in case of "." and ".." path strings.
3930 1996-07-06 Hrvoje Niksic <hniksic@srce.hr>
3932 * init.c: Added --mirror.
3934 * main.c (main): Added -X to force saving of directory hierarchy.
3936 * ftp.c (ftp_retrieve_list): Added recursion depth counter.
3937 (ftp_retrieve_list): Check whether quota is exceeded.
3939 * url.c (get_urls_html): Skip leading blanks for absolute URIs.
3941 * http.c (gethttp): Use referer if present.
3943 * recur.c (recursive_retrieve): Set u->referer before calling
3946 * url.c (newurl): Use memset to nullify the struct members.
3947 (freeurl): Free the referer field too.
3949 * url.h: Added referer to urlinfo.
3951 * geturl.1: Updated the manual to document some of the new features.
3953 * utils.c (numdigit): Moved from url.c.
3955 * README: Rewritten.
3957 * config.h.in: Add the support for socks.
3959 * configure.in: Add the support for socks.
3961 * url.c (url_filename): If the dir_prefix is ".", work with just
3963 (url_filename): Do not look for .n extensions if timestamping if
3966 * retr.c (show_progress): Skip the over-abundant restval data, and
3967 print the rest of it with ',' instead of '.'.
3969 1996-07-05 Hrvoje Niksic <hniksic@srce.hr>
3971 * retr.c (show_progress): Changed second arg. to long (as it
3973 (show_progress): Moved to retr.c.
3974 (get_contents): Moved to retr.c.
3976 * version.c: Change version to 1.4b13.
3978 1996-07-05 Hrvoje Lacko <hlacko@fly.cc.fer.hr>
3980 * url.c (in_acclist): Would return after the first suffix.
3982 1996-07-04 Hrvoje Niksic <hniksic@srce.hr>
3984 * version.c: "Released" 1.4b12.
3986 * url.c (path_simplify): More kludgifications.
3987 (get_urls_html): Use new parameters for htmlfindurl.
3989 * html.c: Removed memorizing "parser states", since the new
3990 organization does not require them.
3992 * init.c (run_geturlrc): Use read_whole_line.
3994 * ftp-unix.c (ftp_parse_ls): Use read_whole_line.
3996 * recur.c (parse_robots): Use read_whole_line.
3998 * utils.c (read_whole_line): New function.
4000 * recur.c (tried_robots): Use add_slist/in_slist, *much* cleaner.
4002 * host.c (ngethostbyname): Call inet_addr just once. Yet to be
4003 tested on OSF and Ultrix.
4004 (add_hlist): New function.
4005 (free_hlist): New function.
4006 (search_host): New function.
4007 (search_address): New function.
4008 (realhost): Use search_host, search_address and add_hlist.
4009 (same_host): Replaced realloc() with strdupdelim(), made
4010 case-insensitive, fixed a memory leak.
4012 * html.c (ftp_index): Fixed tm_min and tm_sec to be tm_hour and
4013 tm_min, like intended.
4015 * version.c: Change user agent information to
4018 1996-07-03 Hrvoje Niksic <hniksic@srce.hr>
4020 * utils.c: Renamed nmalloc.c to utils.c, .h likewise.
4022 * url.c (acceptable): Always accept directories.
4024 * ftp-unix.c (ftp_parse_ls): Support brain-damaged "ls -F"-loving
4025 servers by stripping trailing @ from symlinks and trailing / from
4028 * ftp.c (ftp_loop): Debugged the "enhanced" heuristics. :-)
4030 * url.c (skip_url): Use toupper instead of UCASE.
4032 * host.c (sufmatch): Made it case-insensitive.
4034 * url.c (match_backwards_or_pattern): Fixed i == -1 to j == -1.
4035 (match_backwards): New function, instead of
4036 match_backwards_or_pattern.
4038 * recur.c (recursive_retrieve): Increased performance by
4039 introducing inl, which reduces number of calls to in_slist to only
4042 * ftp.c (ftp_loop): Enhanced the heuristics that decides which
4045 * main.c (printhelp): Removed the warranty stuff.
4047 1996-07-02 Hrvoje Niksic <hniksic@srce.hr>
4049 * url.c (add_slist): Simplify.
4050 (match_backwards_or_pattern): New function.
4051 (in_acclist): Use match_backwards_or_pattern.
4054 1996-06-30 Hrvoje Niksic <hniksic@srce.hr>
4056 * ftp.c (ftp_loop): Call ftp_index on empty file names, if not
4059 * html.c (ftp_index): Fixed to work. Beautified the output.
4061 * ftp.c (ftp_retrieve_glob): Another argument to control whether
4062 globbing is to be used.
4063 (ftp_retrieve_list): Compare the time-stamps of local and remote
4064 files to determine whether to download.
4066 1996-06-29 Hrvoje Niksic <hniksic@srce.hr>
4068 * ftp.c (rel_constr): New function.
4070 * retr.c (retrieve_from_file): Check for text/html before
4071 retrieving recursively.
4073 * main.c (main): Check whether the file is HTML before going into
4074 recursive HTML retrieving.
4076 * ftp.c (ftp_retrieve_list): Manage directories.
4077 (ftp_retrieve_glob): Pass all the file-types to ftp_retrieve_list.
4078 (ftp_1fl_loop): Fixed a bug that caused con->com to be incorrectly
4079 initialized, causing bugchecks in getftp to fail.
4081 * configure.in: Check for symlink.
4083 * ftp.c (ftp_retrieve_list): Added support for symlinks.
4085 * version.c: "Released" 1.4b10.
4087 * atotm.c (atotm): Redeclared as time_t.
4089 * init.c: New variable "timestamping".
4091 * main.c (main): New option 'N'.
4093 * http.c (hgetlocation): Case-insensitive match.
4094 (hgetmodified): New function.
4095 (http_loop): Implement time-stamping.
4097 1996-06-28 Hrvoje Niksic <hniksic@srce.hr>
4099 * version.c: Changed version to 1.4b10
4101 * atotm.c: New file, from phttpd.
4103 * options.h (struct options): New parameter timestamping.
4105 * version.c: 1.4b9 "released".
4107 * recur.c (recursive_retrieve): Used linked list (ulist) for
4108 faster storing of URLs.
4110 * url.c (get_urls_html): Removed the old kludge with comparing the
4111 outputs of htmlfindurl and findurl.
4112 (get_urls_html): Added better protocol support here.
4113 (create_hash): Removed, as well as add_hash and in_hash.
4114 (addslist): New function.
4117 * version.c: Released 1.4b8, changed version to b9.
4119 1996-06-27 Hrvoje Niksic <hniksic@srce.hr>
4121 * ftp.c (freefileinfo): New function.
4122 (delelement): New function.
4126 * ftp.c (ftp_loop): Use ccon.
4127 (ftp_retrieve_glob): Likewise.
4129 * ftp.h: Define ccon, to define status of control connection.
4131 * ftp.c (ftp_get_listing): New function.
4132 (ftp_retrieve_more): New function.
4133 (ftp_retrieve_glob): New function.
4135 1996-06-25 Hrvoje Niksic <hniksic@srce.hr>
4137 * configure.in: Removed the search for cuserid().
4139 * init.c (getmode): Renamed to getperms.
4141 1996-06-24 Hrvoje Niksic <hniksic@srce.hr>
4143 * version.c: New version.
4145 * main.c (hangup): New function, that handles hangup. Hangup
4146 signal now causes geturl to stop writing on stdout, and to write
4149 * ftp.c (getftp): "Released" 1.4b7.
4151 * html.c (htmlfindurl): Ignore everything inside <head>...</head>.
4152 (ftp_index): Use fileinfo/urlinfo.
4154 * ftp-unix.c (ftp_parse_ls): New function.
4155 (symperms): New function.
4157 * ftp.c (ftp_1fl_loop): New function, to handle 1-file loops.
4159 * retr.c (retrieve_url): Added FTP support.
4161 1996-06-23 Hrvoje Niksic <hniksic@srce.hr>
4163 * geturl.h: Removed NOTFTP2HTML enum.
4164 Added DO_LOGIN, DO_CWD and DO_LIST. LIST_ONLY is obsolete.
4166 * ftp.c (getftp): Resynched with urlinfo.
4167 (getftp): Removed HMTL-ization of index.html from getftp.
4169 * version.c: 1.4b6 "released".
4171 * options.h (options): New struct, to keep options in.
4173 * http.c (http_loop,gethttp): Synched with proxy.
4175 * retr.c (retrieve_url): Implemented proxy retrieval.
4177 * main.c (main): Use retrieve_from_file.
4179 1996-06-22 Hrvoje Niksic <hniksic@srce.hr>
4181 * retr.c (retrieve_from_file): New function.
4183 * url.c (parseurl): Modified to return URLOK if all OK. Protocol
4184 can be found in u->proto.
4186 * ftp.c (ftp_response): Fixed to accept multi-line responses as
4189 * recr.c (recursive_retrieve): Take newloc from retrieve_url.
4191 * url.c (mymkdir): Removed the file of the same name, if one
4193 (isfile): New function.
4194 (mkstruct): Fixed the '/' glitches.
4195 (path_simplify): Hacked to treat something/.. correctly.
4197 1996-06-21 Hrvoje Niksic <hniksic@srce.hr>
4199 * http.c (gethttp): Close the socket after error in headers.
4200 (http_loop): HEOF no longer a fatal header.
4202 * loop.c (retrieve_url): When dt is NULL, do not modify it. This
4203 simplifies the syntax of calling retrieve_url.
4205 * recr.c (recursive_retrieve): Modified to use get_urls_html.
4207 * url.c (get_urls_file): New function.
4208 (get_urls_html): New function.
4210 * recr.c (recursive_retrieve): Patched up to conform to the
4213 * http.c (gethttp): Synched with the rest...
4214 (gethttp): Treat only CONREFUSED specially, with connection
4217 * init.c,geturl.1,http.c (http_loop): Removed kill_error.
4219 1996-06-20 Hrvoje Niksic <hniksic@srce.hr>
4221 * http.c (http_loop): New function.
4223 * loop.c: Removed *lots* of stuff from retrieve_url.
4225 * url.c (parseurl): Changed to work with urlinfo. Integrated
4226 username finding and path parsing.
4227 (newurl): New function.
4228 (freeurl): New function.
4229 (mkstruct): Removed the old bogosities, made it urlinfo-compliant.
4230 (url_filename): Likewise.
4231 (path_simplify): Accept relative paths too.
4232 (opt_url): Made urlinfo-compliant, removed bogosities.
4233 (path_simplify): Expanded to accept relative paths.
4234 (str_url): A replacement for hide_url
4235 (decode_string): Fixed a bug that caused malfunctioning when
4236 encountering an illegal %.. combination.
4237 (opt_url): Removed the argument. Dot-optimizations are now default.
4239 * nmalloc.c (strdupdelim): New function.
4241 * url.h: Added the urlinfo structure
4243 1996-06-19 Hrvoje Niksic <hniksic@srce.hr>
4245 * url.c (hide_url): Thrown out the protocol assertion. Do not
4246 change the URL if the protocol if not recognized.
4247 (findurl): Put continue instead of break.
4249 1996-06-18 Hrvoje Niksic <hniksic@srce.hr>
4251 * sample.geturlrc: Changed the defaults to be commented out and
4252 harmless (previous defaults caused pains if copied to
4255 * http.c (gethttp): Print the HTTP request in debug mode.
4257 * connect.c (iread): Added EINTR check loop to select-ing
4258 too. EINTR is now correctly handled with select().
4262 1996-05-07 Hrvoje Niksic <hniksic@srce.hr>
4264 * host.c (same_host): Made the function a little bit more
4265 intelligent regarding diversified URL syntaxes.
4267 * url.c (skip_url): Spaces are now skipped after URL:
4269 * Released 1.3.1 with the patch to prevent crashing when sending
4270 NULL to robot* functions and the patch to compile "out of the box"
4273 * recr.c (recursive_retrieve): Added checking whether this_url is
4274 NULL when calling the robot functions.
4276 * ChangeLog: New file.