1 2001-04-11 Hrvoje Niksic <hniksic@arsdigita.com>
3 * url.c (parseurl): Don't strip trailing slash when u->dir is "/"
4 because that strips the *leading* slash, thus forcing relative
7 2001-04-10 Jan Prikryl <prikryl@cg.tuwien.ac.at>
9 * ftp.c (getftp): Convert initial FTP directory from VMS to UNIX
10 notation for VMS servers.
11 (ftp_retrieve_dirs): Do not prepend '/' to f->name when
12 odir is an empty string.
14 2001-04-10 Jan Prikryl <prikryl@cg.tuwien.ac.at>
16 * ftp-ls.c (ftp_parse_winnt_ls): Made the fix for AM/PM more
17 effective. Suggested by Edward J. Sabol.
19 2001-04-10 Hrvoje Niksic <hniksic@arsdigita.com>
21 * cookies.c (build_cookies_request): Use and sort cookies from all
23 (build_cookies_request): Check for duplicates before generating
26 * main.c (main): Don't load cookies here.
27 (main): Make loadcookies and savecookies call the correct command.
29 * http.c (http_loop): Load cookies on-demand.
31 2001-04-09 Hrvoje Niksic <hniksic@arsdigita.com>
33 * http.c (gethttp): Fix indentation of SSL ifdef.
35 2001-04-09 Hrvoje Niksic <hniksic@arsdigita.com>
37 * ftp.c (ftp_retrieve_dirs): Don't forcibly prepend "/" to u->dir;
38 that hack is no longer necessary.
39 (getftp): Prepend initial directory to *non*-absolute u->dir's.
41 2001-04-09 Hrvoje Niksic <hniksic@arsdigita.com>
43 * init.c (cmd_file): New function.
44 (enable_tilde_expansion): New variable.
48 2001-04-08 Hrvoje Niksic <hniksic@arsdigita.com>
50 * init.c: Include cookie-related options.
52 * main.c (main): Include cookie-specific options.
53 (main): Load cookies before download is finished.
54 (main): Save cookies when done.
56 * http.c (gethttp): Process the `Set-Cookie' header.
57 (gethttp): Include cookies in the response.
59 * cookies.c: New file.
61 2001-04-08 Hrvoje Niksic <hniksic@arsdigita.com>
63 * utils.c (datetime_str): New function.
65 2001-04-08 Jan Prikryl <prikryl@cg.tuwien.ac.at>
67 * ftp-ls.c (ftp_parse_winnt_ls): The AM/PM change did assume
68 12:01PM == 00:01, which was obviously wrong. Taken care of this
71 * ChangeLog: Removed an excess conflict marker. Reformatted the
72 entry by Philipp Thomas from 2001-03-09.
74 * ftp-ls.c (ftp_parse_winnt_ls): Ensure that adjusted PM hours lay
75 between 0 and 23. Elminate unused variable `sec'.
77 2001-04-08 Hrvoje Niksic <hniksic@arsdigita.com>
79 * hash.c (hash_table_count): New function.
81 2001-04-06 Hrvoje Niksic <hniksic@arsdigita.com>
83 * utils.c (read_file): Cast MAP_FAILED to char *. Enforced by
86 2001-04-06 Hrvoje Niksic <hniksic@arsdigita.com>
88 * config.h.in: Oops, do the namespace tweaks only on systems we
91 2001-04-06 Hrvoje Niksic <hniksic@arsdigita.com>
93 * hash.c: Include <string.h>.
95 2001-04-06 Hrvoje Niksic <hniksic@arsdigita.com>
97 * config.h.in: Define "compilation environment" options that work
98 under Linux and Solaris. To be reviewed on other OS'es.
100 2001-04-06 Hrvoje Niksic <hniksic@arsdigita.com>
102 * http.c (gethttp): Prepend literal newline with `\n\'.
104 2001-04-06 Hrvoje Niksic <hniksic@arsdigita.com>
106 * sysdep.h: Don't define VERY_LONG_FORMAT.
108 * utils.c (very_long_to_string): New function.
109 (legible_very_long): Use it; don't use VERY_LONG_FORMAT.
111 2001-04-04 Christian Fraenkel <christian.fraenkel@gmx.net>
113 * url.c (parse_uname): Would run past the end of the string if the
114 username was present, but the URL did not contain a slash, e.g.
115 http://foo:bar@myhost.
117 2001-04-03 KOJIMA Hajime <kjm@rins.ryukoku.ac.jp>
119 * http.c (http_atotm): Use %A instead of %a to match full
120 weekday. (On most systems there is no difference.)
122 2001-04-03 Paul Bludov <paul@ozero.net>
124 * mswindows.c (sleep): Use SleepEx() instead of Sleep().
125 (ws_changetitle): Use alloca() instead of malloc() to avoid memory
127 (ws_mypath): Use GetModuleFileName instead of argv[0].
128 (ws_startup): Use data.wVersion for comparison.
130 2001-04-02 Hrvoje Niksic <hniksic@arsdigita.com>
132 * http.c (http_loop): Ditto.
134 * ftp.c (ftp_loop_internal): Made the check whether to continue
135 retrieval `-O'-friendly.
137 2001-04-02 Hrvoje Niksic <hniksic@arsdigita.com>
139 * netrc.c (parse_netrc): Don't trim the line endings explicitly;
140 they will be handled as whitespace.
141 (parse_netrc): Correctly handle lines that end with whitespace.
143 2001-04-02 Hrvoje Niksic <hniksic@arsdigita.com>
145 * retr.c (retrieve_url): New variable global_download_count used
146 to identify first retrieval.
148 * ftp.c (getftp): Ditto.
150 * http.c (gethttp): Rewind opt.dfp only on first retrieval.
152 2001-04-02 Hrvoje Niksic <hniksic@arsdigita.com>
154 * init.c (cmd_address): Heap-allocate the address that gets stored
155 to CLOSURE. Old code would simply assign an address on the stack.
157 2001-04-01 Nicolas Lichtmaier <nick@debian.org>
159 * ftp.c (ftp_get_listing): Propagate error status.
160 (ftp_retrieve_glob): Use it.
163 2001-04-01 Nicolas Lichtmaier <nick@debian.org>
165 * main.c (main): Add -C to the string that is the third arg to
168 2001-04-01 Hrvoje Niksic <hniksic@arsdigita.com>
170 * ftp.c (getftp): Don't start the download from scratch if `-c'
171 was specified, but the file is already fully downloaded.
173 * http.c (gethttp): Don't truncate a pre-existing file if `-c' was
174 specified and the server doesn't support continued download.
175 (gethttp): Don't start the download from scratch if `-c' was
176 specified, but the file is already fully downloaded.
178 2001-03-31 Hrvoje Niksic <hniksic@arsdigita.com>
180 (recursive_retrieve): Don't clear the hash tables at this point at
181 all; it interferes with the normal operation of register_download.
183 2001-03-31 Hrvoje Niksic <hniksic@arsdigita.com>
185 * recur.c (recursive_retrieve): Clear the hash tables only when
188 2001-03-31 Hrvoje Niksic <hniksic@arsdigita.com>
190 * http.c (gethttp): Make sure the socket is closed with
191 CLOSE_INVALIDATE before we have drained the body.
193 2001-03-31 Hrvoje Niksic <hniksic@arsdigita.com>
195 * retr.c (retrieve_url): Call register_download() for downloaded
196 files and register_html() for downloaded HTML files.
198 * recur.c (register_download): New function; register here that a
199 file has been downloaded, rather than in recursive_retrieve().
200 (register_html): New function; enqueue the location of HTML files
201 here rather than in recursive_retrieve().
203 2001-03-31 Hrvoje Niksic <hniksic@arsdigita.com>
205 * main.c (print_help): Use multiple fputs instead of a single ugly
207 (main): Consistently assign numbers >128 to options without a
208 corresponding character.
210 2001-03-09 Philipp Thomas <pthomas@suse.de>
212 * safe-ctype.h: New file. Locale independent ctype.h replacement
213 taken from libiberty.
215 * safe-ctype.c: New file. Tables for above.
217 * Makefile.in: Add safe-ctype$o to OBJS. Add dependencies for
220 * cmpt.c: Remove include of ctype.h. Use ISSPACE instead of
223 * ftp-basic.c: Don't include ctype.h.
225 * ftp-ls.c: Likewise.
229 * headers.c: Likewise.
233 * html-parse.c: Likewise.
235 * html-url.c: Likewise.
241 * main.c: Likewise. Set LC_CTYPE along with LC_MESSAGES.
249 * snprintf.c: Replace ctype.h with safe-ctype.h. Use ISDIGIT
252 * sysdep.h: Remove defines of ctype macros as they aren't needed
255 * url.c: Don't include ctype.h.
259 * wget.h: Include safe-ctype.h.
261 2001-03-27 Dan Harkless <wget@harkless.org>
263 * Makefile.in: Moved top_builddir out of "User configuration
264 section" of top Makefile and analogous spot in this one.
266 2001-03-17 Dan Harkless <wget@harkless.org>
268 * Makefile.in: Include @SSL_INCLUDES@ substition in INCLUDES.
269 Define top_builddir. Link wget with libtool so the user doesn't
270 have to supply a bunch of custom environment variables to
271 correctly link with the OpenSSL shared libraries.
273 2001-03-06 Hack Kampbjorn <hack@hackdata.com>
275 * http.c (gethttp): skip :port in host header if it is the
276 DEFAULT_HTTPS_PORT when using SSL.
278 * url.c: move the #define of DEFAULT_HTTP_PORT, DEFAULT_FTP_PORT
279 and DEFAULT_HTTPS_PORT to the header file so it can be use in the
283 2001-03-01 Jonas Jensen <bones@huleboer.dk>
285 * retr.c (show_progress): Correctly calculate the number of bytes
286 in the first line of the download that have been actually
287 downloaded in this run.
289 2001-02-23 Dan Harkless <wget@harkless.org>
291 * main.c (print_help): --help documentation for -N said it would
292 re-download files if they had the _same_ timestamp on server.
293 (print_help): -nr belongs in "FTP options" section of --help
294 output, not "Recursive retrieval" section. Alphabetized FTP
295 options by long option name.
297 2001-02-16 Dan Harkless <wget@harkless.org>
299 * init.c (commands): Hack Kampbjørn <hack@hackdata.com> discovered
300 that "httpsproxy" had been inserted into commands[] out of
301 alphabetical order, causing "BUG: unknown command `httpuser'".
303 2001-02-13 Jan Prikryl <prikryl@cg.tuwien.ac.at>
305 * ftp-ls.c (ftp_parse_ls): Added support of ST_MACOS (Unix-like
306 listing without correct permissons).
308 * ftp.h (stype): Added ST_MACOS to identify the NetPresenz MacOS
311 * ftp.c (ftp_retrieve_list): New mirroring logic: A remote file
312 shall be donwloaded only when it's newer than the local copy or
313 when it has the same timeestamp but its size is different. ST_VMS
314 and ST_MACOS as special cases that lie about file size.
316 * ftp-ls.c (ftp_parse_ls): Support for ST_MACOS.
318 * Makefile.in: Removed dependency on ftpparse library due to unclear
319 copyright issues and absence of any feedback to our queries.
321 * ftp-ls.c: Removed dependency on ftpparse library due to unclear
322 copyright issues and absence of any feedback to our queries.
323 (ftp_parse_ls): Added a warning message when remote server system
324 does not seem to be suported by wget.
325 (ftp_parse_vms_ls): New function for parsing VMS ftp
326 server listing output.
327 (clean_line): New function responsible for removing
328 end-of-line characters from FTP listing texts.
330 * ftp.c (getftp): Global variables pwd and host_type are now
331 member of the ccon structure under names ccon.id and ccon.rs.
333 * ftp.h (struct ccon): Added formed global variables from ftp.c,
334 enum stype rs (remote system identification) and char *id (initial
335 working directory), as suggested by Hrvoje.
337 * url.c (parse_uname): Added support for passwords containing '@'
341 2001-02-11 Hrvoje Niksic <hniksic@arsdigita.com>
343 * ftp.c (ftp_loop): Reset con.
345 2001-01-06 Jan Prikryl <prikryl@cg.tuwien.ac.at>
347 * url.c (parse_uname): Added support for passwords containing '@'
351 2001-02-11 Hack Kampbjørn <hack@hackdata.com>
353 * url.c (parseurl): Debug-print u->ftp_type.
355 2001-02-11 Hrvoje Niksic <hniksic@arsdigita.com>
357 * ftp.c (ftp_loop_internal): Disable padding.
360 * http.c (http_loop): Disable padding.
362 * retr.c (show_progress): Use it to enable padding.
364 * retr.c (rate): Optional parameter PAD for padding the rate.
366 2001-02-10 Hrvoje Niksic <hniksic@arsdigita.com>
368 * retr.c (show_progress): Make sure that the last output line
371 2001-02-10 Jonas Jensen <bones@huleboer.dk>
373 * retr.c (show_progress): Print the download rate along with the
375 Along with Anders Thorsby <anders@thorsby.dk>.
377 2001-02-10 Tim Mooney <mooney@dogbert.cc.ndsu.NoDak.edu>
379 * ftp.h: Rename enums `command' to `wget_ftp_command' and
380 `fstatus' to `wget_ftp_status' because old names clash with Tru64
383 2001-02-08 Christian Fraenkel <christian.fraenkel@gmx.net>
385 * gen_sslfunc.c: verify_callback is now static
387 * gen_sslfunc.c (init_ssl): load certificate if specified
389 * gen_sslfunc.c (ssl_printerr): new function
391 * init.c: added new --sslcertfile and --sslcertkey switches
397 * http.c (gethttp): abort when init_ssl fails
399 2001-01-23 Herold Heiko <Heiko.Herold@previnet.it>
401 * mswindows.h: Include <malloc.h>; it's needed for alloca().
403 2001-01-10 Dan Harkless <wget@harkless.org>
405 * url.c (str_url): Clarified this function's comment header after
406 Hrvoje answered my question on the list as to when hide != 1.
407 Also Hrvoje pointed out I need to use xstrdup() on the string literal.
409 2001-01-06 Hrvoje Niksic <hniksic@arsdigita.com>
411 * connect.c (bindport): Declare addrlen as int. Diagnosed by
412 Drazen Kacar <dave@arsdigita.com>.
415 2001-01-09 Dan Harkless <wget@harkless.org>
417 * html-url.c: A bunch of fixup of `--page-requisites'-related
418 comments to reflect Hrvoje's changes to my code when transplanting
419 it into this new file, to fix spelling mistakes, to clarify, etc.
421 * url.c (write_backup_file): Clarified a comment.
422 (str_url): Henrik van Ginhoven pointed out on the list that we
423 shouldn't give away the number of characters in the password by
424 replacing each character with a 'x'. Use "<password>" instead.
426 * ftp.c (ftp_retrieve_dirs): The bug where recursion into FTP
427 directories didn't work if logging in put you in a directory other
428 than "/" is fixed now. Removed the comment here warning of the bug.
430 * main.c (print_help): --continue's description was misleading.
431 We don't "restart", we "resume". Also, better to say
432 "partially-downloaded file" rather than just "existing file".
434 2001-01-06 Dan Harkless <wget@harkless.org>
436 * ChangeLog: The '[Not in 1.6 branch.]'s were decided not to be
437 the best way to go about my aim. Removed them in favor of:
439 * ChangeLog-branches/1.6_branch.ChangeLog: New file.
441 2001-01-04 Hrvoje Niksic <hniksic@arsdigita.com>
443 * url.c (replace_attr): New function, to be used by both
444 TO_COMPLETE and TO_RELATIVE case in convert_links.
445 (find_fragment): New function for finding URL fragments.
446 (replace_attr): Better handle the case where the original string
447 is not quoted. Use find_fragment.
448 (convert_links): Use replace_attr().
450 2000-12-31 Dan Harkless <wget@harkless.org>
452 * ChangeLog: Since this flat file doesn't have multiple branches,
453 looking at the dates would make you think that things went into
454 1.6 that actually just went into the 1.7-dev branch. Added "[Not
455 in 1.6 branch.]" where appropriate to clarify.
457 2000-12-30 Dan Harkless <wget@harkless.org>
459 * ftp.c, http.c: Applied Hack Kampbjørn <hack@hackdata.com>'s
460 patch to deal with h_errno not being defined in netdb.h under Cygwin.
462 2000-12-18 Csaba Raduly <csaba.raduly@sophos.com>
464 * sysdep.h: Include <malloc.h> and <io.h> under Watcom.
466 2000-12-17 Igor Khristophorov <igor@atdot.org>
468 * http.c (check_end): Fix test for '+' or '-'.
470 2000-12-17 Hrvoje Niksic <hniksic@arsdigita.com>
472 * url.c (parseurl): Rename inner loop var from i to ind to avoid
473 clash with the function top-level-declared variable i.
474 (str_url): Likewise, rename inner-loop i to j.
476 * recur.c (parse_robots): Don't declare LEN at top of function.
477 (robots_match): Renamed parameter FORBIDDEN to avoid hiding of
480 * main.c (main): Change erroneous use of bitwise and to logical.
482 * init.c (cmd_address): Don't heap-allocate `sin'; it can be on
483 the stack because it will be copied to closure.
485 Thanks to Csaba Raduly's run of PC-LINT over the sources.
487 2000-12-17 Hrvoje Niksic <hniksic@arsdigita.com>
489 * http.c (basic_authentication_encode): Use xmalloc(), not
490 malloc(). Thanks to Csaba Raduly's run of PC-LINT over the
493 2000-12-17 Csaba Raduly <csaba.raduly@sophos.com>
495 * sysdep.h: Test for __EMX__ rather than for EMXOS2 for OS/2
498 2000-12-17 Hrvoje Niksic <hniksic@arsdigita.com>
500 * mswindows.c: Include <errno.h>.
502 * gen_sslfunc.c: Include <errno.h>.
504 * ftp-basic.c: Don't attempt to declare errno or h_errno because
507 * main.c: Include <errno.h> because errno is used.
511 * http.c: Include <netdb.h> for h_errno.
513 2000-12-13 Hrvoje Niksic <hniksic@arsdigita.com>
515 * html-parse.c (advance_declaration): MSVC assert() chokes on
516 '\"'. Use '"' instead.
518 2000-12-11 Hrvoje Niksic <hniksic@arsdigita.com>
520 * utils.c (xfree_real): Removed.
521 (xfree_debug): Just call free().
523 * wget.h (xfree): Make it an alias for free.
525 2000-12-11 Hrvoje Niksic <hniksic@arsdigita.com>
527 * http.c (http_loop): Furthermore, touch output_document only if
528 it is known to be an existing regular file.
530 2000-12-11 Hrvoje Niksic <hniksic@arsdigita.com>
532 * ftp.c (ftp_retrieve_list): Ditto.
534 * http.c (http_loop): Touch output_document if that is used for
537 2000-12-06 Hrvoje Niksic <hniksic@arsdigita.com>
539 * http.c: Include gen_sslfunc.h after including Wget's headers.
540 (persistent_available_p): Needed coma before `int ssl'.
542 2000-12-06 Hrvoje Niksic <hniksic@arsdigita.com>
544 * ftp.c (ftp_loop_internal): Ditto.
546 * http.c (http_loop): Use it.
548 * retr.c (sleep_between_retrievals): New function that handles the
549 logic of opt.wait and opt.waitretry.
551 2000-12-06 Hrvoje Niksic <hniksic@arsdigita.com>
553 * rbuf.h: Implement only a single version of RBUF_READCHAR, using
554 rbuf_read_bufferful when the buffer is depleted.
556 * rbuf.c (rbuf_read_bufferful): New function.
558 2000-12-06 Hrvoje Niksic <hniksic@arsdigita.com>
560 * gen_sslfunc.h: Use ansi2knr style function declarations.
562 * gen_sslfunc.c: Reformat according to the GNU coding standards.
565 * http.c (persistent_available_p): Place the cheap SSL test nearer
566 the top of the function.
567 (CLOSE_FINISH, CLOSE_INVALIDATE): Define only one version of each.
569 2000-12-05 Hrvoje Niksic <hniksic@arsdigita.com>
571 * url.c (init_unsafe_char_table): Reinstate space as an unsafe
574 2000-12-03 Christian Fraenkel <christian.fraenkel@gmx.net>
576 * Makefile.in: added gen_sslfunc object
577 * config.h.in: added HAVE_SSL define
578 * connect.c: changed select_fd from static int to int
580 * gen_sslfunc.h: New file
581 * gen_sslfunc.c: ditto
582 * http.c: added HTTPS fuctionality
585 * init.c: added opt.httpsproxy
587 * rbuf.h: added alternate rbuf struct
588 * wget.h: added CONSSLERR
591 * http.c: Added HTTPS fuctionality.
597 * init.c: Added opt.httpsproxy.
601 * rbuf.h: Added alternate rbuf struct.
603 * wget.h: Added CONSSLERR.
607 2000-11-30 Jan Prikryl <prikryl@cg.tuwien.ac.at>
609 * ftp-ls.c (ftp_parse_unix_ls): Added second parameter
610 "ignore_perms" to ignore file and directory permissions for
611 Windows NT FTP server listings.
612 (ftp_parse_winnt_ls): New function.
613 (ftp_parse_ls): Parses UNIX and Windows NT listings
614 separately. Simple heuristics for distinguishing between UNIX and
615 MS-DOS-like FTP listing provided by Windows NT FTP service.
617 2000-11-18 Jan Prikryl <prikryl@cg.tuwien.ac.at>
619 * ftpparse.c, ftpparse.h: New files.
621 * ftp-ls.c (ftp_parse_ls): Use ftp_parse_unix_ls for UNIX servers
622 only. Use ftp_parse_nonunix_ls otherwise.
623 (ftp_parse_nonunix_ls): Stub to the ftpparse library handling all
626 * ftp.h (stype): New enum, distinguishes UNIX, VMS, and "other"
629 * ftp.c: New static wariables host_type, pwd, and pwd_len.
630 (getftp): Support for VMS. Support for FTP servers that do not
631 place you in the root directory after login.
632 (ftp_retrieve_list): VMS is silent about the real file size, issue
633 a more appropriate message.
634 (ftp_get_listing): Pass host_type to ftp_parse_ls.
636 * ftp-basic.c (ftp_pwd, ftp_syst): New functions.
638 2000-11-30 Jan Prikryl <prikryl@cg.tuwien.ac.at>
640 * ftp-ls.c (ftp_parse_unix_ls): Added second parameter
641 "ignore_perms" to ignore file and directory permissions for
642 Windows NT FTP server listings.
643 (ftp_parse_winnt_ls): New function.
644 (ftp_parse_ls): Parses UNIX and Windows NT listings
645 separately. Simple heuristics for distinguishing between UNIX
646 and MS-DOS-like FTP listing provided by Windows NT FTP service.
648 2000-11-29 John Summerfield <summer@OS2.ami.com.au>
650 * netrc.c (parse_netrc): Get rid of line ending.
652 2000-11-25 Hrvoje Niksic <hniksic@arsdigita.com>
654 * ftp.c (ftp_retrieve_list): Undo typo "fix" until resolution by
657 2000-11-24 Karl Eichwalder <ke@suse.de>
659 * main.c (print_help): Untabify.
661 2000-11-23 Hrvoje Niksic <hniksic@arsdigita.com>
663 * utils.c (xrealloc_debug): Do the unregister/register thing only
664 if the pointer has actually changed.
665 (xmalloc_real): Declare `static' in DEBUG_MALLOC builds.
667 (xrealloc_real): Ditto.
668 (xstrdup_real): Ditto.
670 2000-11-22 Hrvoje Niksic <hniksic@arsdigita.com>
672 * ftp.c (getftp): ftp_getaddress() returns a malloc'ed copy of the
673 string; no need to strdup() it.
674 (getftp): Make pwd_len a local variable.
675 (ftp_loop): Free PWD before returning.
677 * init.c (cleanup): Free opt.ftp_pass only if it's non-NULL.
679 2000-11-22 Hrvoje Niksic <hniksic@arsdigita.com>
681 * all: Use xfree() instead of free.
683 * utils.c (xfree): New function.
685 2000-11-21 Hrvoje Niksic <hniksic@arsdigita.com>
687 * url.c (convert_links): HTML-quote the converted string.
689 * utils.c (html_quote_string): Move here from ftp-ls.c
690 (html_quote_string): Make non-static; declare in utils.h.
691 (html_quote_string): Convert SP to  .
693 2000-11-21 Hrvoje Niksic <hniksic@arsdigita.com>
695 * ftp.c (getftp): Reformat Jan's code according to GNU coding
696 standards; remove (debugging?) printf's; use '\0' for the ASCII
697 zero character. Use alloca() instead of malloc() for
698 inter-function temporary allocations.
700 2000-11-18 Jan Prikryl <prikryl@cg.tuwien.ac.at>
702 * ftpparse.c, ftpparse.h: New files.
704 * ftp-ls.c (ftp_parse_ls): Use ftp_parse_unix_ls for UNIX servers
705 only. Use ftp_parse_nonunix_ls otherwise.
706 (ftp_parse_nonunix_ls): Stub to the ftpparse library handling all
709 * ftp.h (stype): New enum, distinguishes UNIX, VMS, and "other"
712 * ftp.c: New static wariables host_type, pwd, and pwd_len.
713 (getftp): Support for VMS. Support for FTP servers that do not
714 place you in the root directory after login.
715 (ftp_retrieve_list): VMS is silent about the real file size, issue
716 a more appropriate message.
717 (ftp_get_listing): Pass host_type to ftp_parse_ls.
719 * ftp-basic.c (ftp_pwd, ftp_syst): New functions.
721 2000-11-21 Hrvoje Niksic <hniksic@arsdigita.com>
723 * hash.c (hash_table_put): Don't overwrite deleted mappings.
725 2000-11-21 Hrvoje Niksic <hniksic@arsdigita.com>
727 * hash.c (find_mapping): New function.
728 (hash_table_get): Use it.
729 (hash_table_get_pair): Ditto.
730 (hash_table_exists): Ditto.
731 (hash_table_remove): Ditto.
732 (hash_table_remove): Really delete the entry if the mapping
733 following LOCATION is empty.
735 * utils.c (string_set_add): Check whether the element has existed
738 * hash.c (hash_table_get_pair): New function.
740 2000-11-20 Hrvoje Niksic <hniksic@arsdigita.com>
742 * http.c (http_process_type): Ignore trailing whitespace; use
745 * recur.c (recursive_retrieve): Use the new `convert' field.
746 (convert_all_links): Ditto.
747 (convert_all_links): Don't respect meta_disallow_follow.
749 * html-url.c (handle_link): Fill out link_relative_p and
752 * url.h (struct _urlpos): Make elements more readable.
754 * recur.c (recursive_retrieve): Call slist_prepend instead of
756 (convert_all_links): Call slist_nreverse before iterating through
759 * utils.c (slist_prepend): New function.
760 (slist_nreverse): Ditto.
762 2000-11-20 Hrvoje Niksic <hniksic@arsdigita.com>
764 * http.c (check_end): Constify.
766 2000-11-20 Hrvoje Niksic <hniksic@arsdigita.com>
768 * http.c (http_loop): If username and password are known, try the
769 `Basic' authentication scheme by default.
771 * connect.h: Declare test_socket_open.
773 2000-11-20 Hrvoje Niksic <hniksic@arsdigita.com>
775 * version.c: Bump version from 1.5.3+dev to 1.7-dev.
777 2000-11-20 Hrvoje Niksic <hniksic@arsdigita.com>
779 * http.c (gethttp): Don't use the return value of sprintf().
780 (gethttp): Inhibit keep-alive if opt.http_keep_alive is 0.
782 2000-11-20 Hrvoje Niksic <hniksic@arsdigita.com>
784 * recur.c (recursive_retrieve): Print the "so we don't load"
785 debugging message only if we really don't load.
787 * http.c (gethttp): Inhibit keep-alive if proxy is being used.
788 (gethttp): Don't request keep-alive if keep-alive is inhibited.
790 2000-11-19 Hrvoje Niksic <hniksic@arsdigita.com>
792 * http.c (gethttp): Make the HTTP persistent connections more
795 2000-11-19 Hrvoje Niksic <hniksic@arsdigita.com>
797 * retr.c (get_contents): If use_expected, make sure that the
798 appropriate amount of data is being read.
800 * http.c (gethttp): Check for both `Keep-Alive: ...' and
801 `Connection: Keep-Alive'.
803 * wget.h (DEBUGP): Call debug_logprintf only if opt.debug is
806 2000-11-19 Hrvoje Niksic <hniksic@arsdigita.com>
808 * http.c (connection_available_p): Use it.
810 * connect.c (test_socket_open): New function.
812 * http.c (gethttp): Support persistent connections. Based on the
813 ideas, and partly on code, by Sam Horrocks <sam@daemoninc.com>.
814 (register_persistent): New function.
815 (connection_available_p): Ditto.
816 (invalidate_connection): Ditto.
818 2000-11-19 Hrvoje Niksic <hniksic@arsdigita.com>
820 * url.c (convert_links): Handle UREL2ABS case.
822 * recur.c (recursive_retrieve): Instead of the list
823 urls_downloaded, use hash tables dl_file_url_map and
825 (convert_all_links): Use them to retrieve data.
827 * host.c (clean_hosts): Free the hash tables.
829 * main.c (private_initialize): Call host_init().
831 * host.c (store_hostaddress): Use a saner, hash table-based data
834 (host_init): Initialize the hash tables.
836 2000-11-18 Hrvoje Niksic <hniksic@arsdigita.com>
838 * utils.c (slist_append): Eviscerate NOSORT. Hash tables are now
839 used for what the sorted slists used to be used for.
840 (slist_contains): Don't rely on the list being sorted.
841 (slist_append): Simplify the code.
843 * recur.c (recursive_cleanup): Use free_string_set.
845 * utils.c (string_set_add, string_set_exists, string_set_free):
846 New functions for easier freeing of hash tables whose keys are
849 * recur.c (recursive_retrieve): Use the hash table functions for
850 storing undesirable URLs.
854 2000-11-17 Hrvoje Niksic <hniksic@arsdigita.com>
856 * main.c (private_initialize): Call url_init.
857 (main): Call private_initialize.
859 * url.c (unsafe_char_table): New table.
860 (UNSAFE_CHAR): Use it.
861 (init_unsafe_char_table): New function.
862 (url_init): New function; call init_unsafe_char_table.
864 2000-11-16 Hrvoje Niksic <hniksic@arsdigita.com>
866 * mswindows.h: Define snprintf and vsnprintf to _snprintf and
867 _vsnprintf respectively.
869 2000-11-15 Hrvoje Niksic <hniksic@arsdigita.com>
871 * config.h.in: Do the _XOPEN_SOURCE and _SVID_SOURCE things only
874 2000-11-15 Hrvoje Niksic <hniksic@arsdigita.com>
876 * html-url.c (handle_link): Handle HTML fragment identifiers.
878 * recur.c (recursive_retrieve): If norobot info is respected and
879 the file is specified not to be followed by robots, respect that.
881 * html-url.c (collect_tags_mapper): Handle <meta name=robots
882 content=X>. For us the important cases are where X is NONE or
883 where X contains NOFOLLOW.
884 (get_urls_html): Propagate that information to the caller.
886 2000-11-13 Hrvoje Niksic <hniksic@arsdigita.com>
888 * url.c (convert_links): Unlink the file we might be reading from
889 before writing to it.
890 (convert_links): Use alloca instead of malloc for
891 filename_plus_orig_suffix.
893 2000-11-12 Hrvoje Niksic <hniksic@arsdigita.com>
895 * host.c (realhost): Add HOST to the list with quality==0 only if
896 it wasn't already there.
897 Based on analysis by Lu Guohan <feng@public.bjnet.edu.cn>.
899 2000-11-10 Hrvoje Niksic <hniksic@arsdigita.com>
901 * url.c (get_urls_file): Ditto.
902 (convert_links): Ditto.
904 * html-url.c (get_urls_html): Use read_file() instead of
907 * utils.c (read_file): New function, instead of the old
909 (read_file_free): Ditto.
911 * url.c (findurl): Search only for the supported protocols.
912 (convert_links): Use fwrite() when writing out a region of
915 2000-11-10 Hrvoje Niksic <hniksic@arsdigita.com>
917 * ftp-ls.c: Move html_quote_string and ftp_index here.
919 * url.c: Remove get_urls_html, since that's now in html-url.c.
921 * html-url.c: New file.
923 * html-parse.c: New file.
925 2000-11-10 Hrvoje Niksic <hniksic@arsdigita.com>
927 * init.c (run_wgetrc): Don't bother killing off '\r' since
928 pars_line() skips whitespace at end of line anyway.
929 (parse_line): Oops, it didn't. Now it does.
931 * recur.c (parse_robots): Ditto here.
933 * ftp-ls.c (ftp_parse_unix_ls): Kill off the newline character
934 manually because read_whole_line no longer does.
936 * utils.c (read_whole_line): Rewrite to: a) use less memory
937 (reallocates to needed size after work), b) work faster -->
938 fgets() instead of getc, c) be more correct --> doesn't kill the
939 newline character at the end of line.
941 2000-11-10 Hrvoje Niksic <hniksic@arsdigita.com>
943 * init.c (comind): Initialize MAX to array size - 1.
945 2000-11-08 Hrvoje Niksic <hniksic@arsdigita.com>
947 * url.c (construct): Changed last_slash[-1] to *(last_slash - 1).
948 Suggested by Edward J. Sabol.
950 2000-11-08 Hrvoje Niksic <hniksic@arsdigita.com>
952 * url.c (construct): Handle the case where host name is not
955 2000-11-06 Hrvoje Niksic <hniksic@arsdigita.com>
957 * init.c: commands[] need to be sorted! ("base" wasn't.)
959 2000-11-05 Hrvoje Niksic <hniksic@arsdigita.com>
961 * wget.h (DO_REALLOC_FROM_ALLOCA): Use braces to disambiguate
964 2000-11-05 Hrvoje Niksic <hniksic@arsdigita.com>
966 * url.c (construct): Insert unneeded initialization for the
969 * config.h.in: Define _XOPEN_SOURCE to 500 to get the prototype
970 for strptime() (*duh*). Define _SVID_SOURCE to get S_IFLNK which
971 otherwise gets lost when you define _XOPEN_SOURCE.
973 * utils.c (touch): Include the file name in the error message.
976 2000-11-05 Hrvoje Niksic <hniksic@arsdigita.com>
978 * log.c (logvprintf): Use vsnprintf() in all cases. If necessary,
979 resize the buffer to fit the formated message. That way, messages
980 of arbitrary size may be printed.
981 (logvprintf): Use saved_append() to optionally log the last
982 several lines of output.
984 (log_close): Adapt to new data structures.
986 (redirect_output): Print messages to stderr, not to stdout.
988 * log.c (saved_append_1): New function. Replaces the old logging
989 system ("log all output until 10M characters") with a new, much
990 more reasonable one ("log last screenful of text").
991 (saved_append): New function; call saved_append_1.
992 (free_log_line): New function.
994 2000-11-05 Hrvoje Niksic <hniksic@arsdigita.com>
996 * url.c (construct): Fix comment.
997 (find_last_char): Document.
999 2000-11-04 Hrvoje Niksic <hniksic@arsdigita.com>
1001 * snprintf.c: New file.
1003 2000-11-03 Hrvoje Niksic <hniksic@arsdigita.com>
1005 * wget.h: If HAVE_STDARG_H is not defined, don't declare argument
1006 types to logprintf() and debug_logprintf().
1008 2000-11-02 Hrvoje Niksic <hniksic@arsdigita.com>
1010 * ftp.c (ftp_loop_internal): Hide the password from the URL when
1011 printing non-verbose. Problem spotted by Dariusz Mlynarczyk
1012 <darekm@bydg.lomac.com.pl>.
1014 2000-11-02 Junio Hamano <junio@twinsun.com>
1016 * ftp-basic.c (ftp_login): Make comparison case-insensitive.
1018 2000-11-02 Tyler Riddle <triddle@liquidmarket.com>
1020 * http.c (known_authentication_scheme_p): Recognize NTML
1022 (create_authorization_line): Treat NTML the same as `Basic'.
1024 2000-11-02 Hrvoje Niksic <hniksic@arsdigita.com>
1026 * retr.c (retrieve_url): Free url before returning.
1027 (retrieve_url): Free mynewloc before returning.
1028 Spotted by Mark A. Mankins <Mankins_Mark@prc.com>.
1030 2000-11-02 Hrvoje Niksic <hniksic@arsdigita.com>
1032 * url.c (parseurl): Remove possible reading past the end of
1033 sup_protos[]. Spotted by Mark A. Mankins <Mankins_Mark@prc.com>.
1035 2000-11-01 Hrvoje Niksic <hniksic@arsdigita.com>
1037 * main.c (main): In case of opt.downloaded overflowing, print
1038 <overflow> instead of a totally bogus random value.
1040 * retr.c (retrieve_from_file): Ditto.
1042 * recur.c (recursive_retrieve): Ditto.
1044 * main.c (main): Ditto.
1046 * http.c (http_loop): Ditto.
1048 * ftp.c (ftp_loop_internal): Use downloaded_increase() instead of
1049 `+=', and downloaded_exceeds_quota() instead of the simple-minded
1051 (ftp_retrieve_list): Ditto.
1052 (ftp_retrieve_dirs): Ditto.
1053 (ftp_retrieve_glob): Ditto.
1055 * retr.c (downloaded_increase): New function. Notice overflows of
1057 (downloaded_exceeds_quota): Make sure that opt.downloaded is not
1058 used if it overflowed.
1060 * options.h (struct options): New member downloaded_overflow.
1062 2000-11-01 Hrvoje Niksic <hniksic@arsdigita.com>
1064 * wget.h (enum): Remove extra space after last enumeration.
1066 2000-11-01 Hrvoje Niksic <hniksic@arsdigita.com>
1068 * main.c (main): Use legible_very_long() for printing
1071 * utils.c (legible_1): New function that operates on strings and
1072 does the brunt of legible()'s work.
1073 (legible): Use legible_1().
1074 (legible_very_long): New function; dump the argument with
1075 sprintf(), and call legible_1().
1077 * options.h (struct options): Use VERY_LONG_TYPE for
1080 * sysdep.h (VERY_LONG_TYPE): Define it to have a 64-bit or greater
1083 * config.h.in: Make sure that SIZEOF_LONG and SIZEOF_LONG_LONG get
1084 defined. Define HAVE_LONG_LONG if long long is available.
1086 2000-11-01 Hrvoje Niksic <hniksic@arsdigita.com>
1088 * utils.c (long_to_string): Update with a later, better version.
1090 2000-11-01 Hrvoje Niksic <hniksic@arsdigita.com>
1092 * url.c (path_simplify_with_kludge): New function.
1093 (path_simplify_with_kludge): Disable it. Instead...
1094 (parse_dir): ...make sure that at this point the right thing is
1095 done, i.e. that "query" part of the URL (?...) is always assigned
1096 to the file, never to the directory portion of the path.
1098 2000-11-01 Hrvoje Niksic <hniksic@arsdigita.com>
1100 * retr.c (retrieve_url): Detect redirection cycles.
1102 2000-11-01 Hrvoje Niksic <hniksic@arsdigita.com>
1104 * url.c (get_urls_html): Decode HTML entities using
1105 html_decode_entities.
1107 * html.c (htmlfindurl): Don't count the `#' in numeric entities
1108 (&#NNN;) as an HTML fragemnt.
1109 (html_decode_entities): New function.
1111 2000-11-01 Hrvoje Niksic <hniksic@arsdigita.com>
1113 * html.c (htmlfindurl): Fix recognition of # HTML fragments.
1115 2000-11-01 Hrvoje Niksic <hniksic@arsdigita.com>
1117 * url.c (construct): Rewritten for clarity. Avoids the
1118 unnecessary copying and stack-allocation the old version
1121 2000-10-31 Hrvoje Niksic <hniksic@arsdigita.com>
1123 * ftp.c (getftp): Ditto.
1125 * http.c (gethttp): Rewind the stream when retrying from scratch.
1127 2000-10-31 Hrvoje Niksic <hniksic@arsdigita.com>
1129 * retr.c (retrieve_url): Use url_concat() to handle relative
1130 redirections instead of /ad hoc/ code.
1132 * url.c (url_concat): New function encapsulating weird
1134 (urllen_http_hack): New function.
1135 (construct): When constructing new URLs, recognize that `?' does
1136 not form part of the file name in HTTP.
1138 2000-10-13 Adrian Aichner <adrian@xemacs.org>
1140 * retr.c: Add msec timing support for WINDOWS.
1141 * retr.c (reset_timer): GetSystemTime() on WINDOWS.
1142 * retr.c (elapsed_time): Calculate delta time to msec on WINDOWS.
1144 2000-10-27 Dan Harkless <wget@harkless.org>
1146 * retr.c (retrieve_url): Manually applied T. Bharath
1147 <TBharath@responsenetworks.com>'s patch to get wget to grok
1148 illegal relative URL redirects. Reformatted and re-commented it.
1150 2000-10-23 Dan Harkless <wget@harkless.org>
1152 * connect.c (make_connection and bindport): Manually applied Rob
1153 Mayoff <mayoff@dqd.com>'s 1.5.3 patch to add --bind-address,
1154 changing coding style to GNU's.
1156 * ftp.c (ftp_loop_internal): --delete-after wasn't implemented for
1157 files downloaded via FTP. Per a comment, .listing files were not
1158 counted towards number of bytes and files downloaded because they're
1159 deleted anyway. Well, they aren't under -nr, so count them then.
1161 * init.c: Manually applied Rob Mayoff's 1.5.3 patch to add
1162 --bind-address, alphabetizing, changing coding style to GNU's,
1163 commenting, and renaming cmd_ip_address() to cmd_address() to
1164 imply hostnames also okay.
1166 * main.c (main): --delete-after didn't delete the root of the
1167 tree. Ignore --convert-links if --delete-after was specified.
1168 Manually applied Rob Mayoff's 1.5.3 patch to add --bind-address,
1169 fixing duplicate use of added-since-1.5.3 case value.
1170 (print_help): Clarified that --delete-after deletes local files.
1171 Rob forgot to add a line for his new --bind-address option.
1173 * options.h (struct options): Manually applied Rob Mayoff's patch
1174 to add --bind-address (bind_address structure member).
1176 * recur.c (recursive_retrieve): Improved comment; added DEBUGP().
1177 Ignore --convert-links if --delete-after was specified.
1179 * retr.c (retrieve_from_file): Just added a DEBUGP().
1181 2000-10-19 Dan Harkless <wget@harkless.org>
1183 * ftp.c (ftp_loop_internal): downloaded_file() enumerators changed.
1184 (getftp): Applied Piotr Sulecki <Piotr.Sulecki@ios.krakow.pl>'s
1185 patch to work around FTP servers that incorrectly respond to the
1186 "REST" command with the remaining size rather than the total file size.
1188 * http.c (gethttp): Improved a comment and added code to tack on
1189 ".html" to text/html files without that extension when -E specified.
1190 (http_loop): Use new downloaded_file() enumerators and deal with
1191 the case of gethttp() called xrealloc() on u->local.
1193 * init.c (commands): Added new "htmlextension" command.
1194 Also renamed John Daily's cmd_quad() to the more descriptive
1195 cmd_lockable_boolean(), alpha-sorted the CMD_DECLARE()s and
1196 removed duplicate cmd_boolean() declaration.
1198 * main.c (print_help): Added my new -E / --html-extension option.
1199 (main): Undocumented --email-address option previously used -E synonym.
1200 Stole it away for the much more deserving --html-extension's use.
1202 * options.h (struct options): Added html_extension field.
1204 * url.c (convert_links): URL X that we saved as X.html locally due
1205 to -E needs to be backed up as X.orig, not X.html.orig. Added comments.
1206 (downloaded_file): Now remembers if we added .html extension to a file.
1208 * url.h (downloaded_file_t): Added extra enumerators to support above.
1209 (downloaded_file): Now takes and returns a downloaded_file_t.
1211 * wget.h (unnamed "dt" enum): Added ADDED_HTML_EXTENSION enumerator.
1213 2000-10-09 Dan Harkless <wget@harkless.org>
1215 * html.c (htmlfindurl): Added unneeded initialization to quiet warning.
1217 * main.c (print_help): Clarified what --retr-symlinks does.
1219 2000-09-15 John Daily <jdaily@cyberdude.com>
1221 * init.c: Add support for "always" and "never" values to allow
1222 .wgetrc to override commandline (useful e.g. with .pm files
1223 calling `wget --passive-ftp' when your firewall doesn't allow that).
1225 * ftp.c (getftp): passive_ftp is first option to support always/never.
1227 2000-08-30 Dan Harkless <wget@harkless.org>
1229 * ftp.c (ftp_retrieve_list): Use new INFINITE_RECURSION #define.
1231 * html.c: htmlfindurl() now takes final `dash_p_leaf_HTML' parameter.
1232 Wrapped some > 80-column lines. When -p is specified and we're at a
1233 leaf node, do not traverse <A>, <AREA>, or <LINK> tags other than
1234 <LINK REL="stylesheet">.
1236 * html.h (htmlfindurl): Now takes final `dash_p_leaf_HTML' parameter.
1238 * init.c: Added new -p / --page-requisites / page_requisites option.
1240 * main.c (print_help): Clarified that -l inf and -l 0 both allow
1241 infinite recursion. Changed the unhelpful --mirrior description
1242 to simply give the options it's equivalent to. Added new -p option.
1243 (main): Added some comments; handle new -p / --page-requisites.
1245 * options.h (struct options): Added new page_requisites field.
1247 * recur.c: Changed "URL-s" to "URLs" and "HTML-s" to "HTMLs".
1248 Calculate and pass down new `dash_p_leaf_HTML' parameter to
1249 get_urls_html(). Use new INFINITE_RECURSION #define.
1251 * retr.c: Changed "URL-s" to "URLs". get_urls_html() now takes
1252 final `dash_p_leaf_HTML' parameter.
1254 * url.c: get_urls_html() and htmlfindurl() now take final
1255 `dash_p_leaf_HTML' parameter.
1257 * url.h (get_urls_html): Now takes final `dash_p_leaf_HTML' parameter.
1259 * wget.h: Added some comments and new INFINITE_RECURSION #define.
1261 2000-08-23 Dan Harkless <wget@harkless.org>
1263 * main.c (print_help): -B / --base was not mentioned.
1265 2000-08-22 Dan Harkless <wget@harkless.org>
1267 * main.c (print_help): Modified -nc description to mention that it
1268 also prevents the creation of multiple versions of the same file
1269 with ".<number>" suffixes.
1271 2000-07-14 Jan Prikryl <prikryl@cg.tuwien.ac.at>
1273 * retr.c (retrieve_url): Consistently strdup opt.referer when
1276 2000-06-09 Dan Harkless <wget@harkless.org>
1278 * main.c (print_help): --help output for --waitretry was over 80 cols.
1280 2000-06-09 Hrvoje Niksic <hniksic@iskon.hr>
1282 * url.c (encode_string): Fix comment.
1283 Suggested by Herold Heiko <Heiko.Herold@previnet.it>.
1285 2000-06-01 Const Kaplinsky <const@ce.cctpu.edu.ru>
1287 * ftp.c (ftp_retrieve_list): Change permissions only on plain
1290 2000-06-01 Hrvoje Niksic <hniksic@iskon.hr>
1292 * url.c (str_url): Print the port number only if it's different
1293 from the default port number for that protocol.
1295 2000-05-22 Dan Harkless <wget@harkless.org>
1297 * main.c (print_help): Added --help line for Damir Dzeko
1298 <ddzeko@zesoi.fer.hr>'s until-now-undocumented --referer option.
1299 Removed comments that --referer and --waitretry were undocumented.
1300 Changed "`.wgetrc' command" to "`.wgetrc'-style command" on --help
1303 2000-05-18 Hrvoje Niksic <hniksic@iskon.hr>
1305 * ftp.c (getftp): Ditto.
1307 * http.c (gethttp): Check for return value of fclose/fflush.
1309 2000-04-12 Hrvoje Niksic <hniksic@iskon.hr>
1311 * host.c (store_hostaddress): Instead of shifting ADDR, start
1312 copying from the correct address.
1314 2000-04-12 Hrvoje Niksic <hniksic@iskon.hr>
1316 * http.c (gethttp): Don't free REQUEST -- it was allocated with
1318 Pointed out by Gisle Vanem <gvanem@eunet.no>.
1320 2000-04-04 Dan Harkless <wget@harkless.org>
1322 * host.c (store_hostaddress): R. K. Owen's patch introduces a
1323 "left shift count >= width of type" warning on 32-bit
1324 architectures. Got rid of it by tricking the compiler w/ a variable.
1326 * url.c (UNSAFE_CHAR): The macro didn't include all the illegal
1327 characters per RFC1738, namely everything above '~'. It also
1328 generated a warning on OSes where char =~ unsigned char. Fixed.
1330 1998-10-17 Hrvoje Niksic <hniksic@srce.hr>
1332 * http.c (http_process_type): Removed needless strdup(), a memory
1335 1998-09-25 Hrvoje Niksic <hniksic@srce.hr>
1337 * html.c (htmlfindurl): Set PH to the first occurrence of `#'.
1339 1998-09-25 Simon Munton <simonm@m4data.co.uk>
1341 * init.c (wgetrc_file_name): Don't free HOME under Windows.
1343 1998-12-01 "R. K. Owen" <rkowen@Nersc.GOV>
1345 * host.c (store_hostaddress): Fix for big endian 64-bit machines.
1347 1998-12-01 Hrvoje Niksic <hniksic@srce.hr>
1349 * url.c (UNSAFE_CHAR): New macro.
1350 (contains_unsafe): Use it.
1351 (encode_string): Ditto.
1353 1998-12-01 Hrvoje Niksic <hniksic@srce.hr>
1355 * main.c (i18n_initialize): Use LC_MESSAGES only if available.
1357 2000-03-31 Hrvoje Niksic <hniksic@srce.hr>
1359 * Use TOUPPER/TOLOWER.
1361 1998-12-22 Alexander V. Lukyanov <lav@yars.free.net>
1363 * ftp-opie.c (btoe): Zero-terminate OSTORE.
1365 2000-03-21 Hrvoje Niksic <hniksic@iskon.hr>
1367 * wget.h (DO_REALLOC_FROM_ALLOCA): Ditto.
1369 * sysdep.h (ISALNUM): New macro.
1373 2000-03-10 Dan Harkless <wget@harkless.org>
1375 * html.c (idmatch): Implemented checking of my new --follow-tags
1376 and --ignore-tags options.
1378 * init.c (commands): Added comment reminding people adding new
1379 entries doing allocation to add corresponding freeing in cleanup().
1380 (commands): Added new followtags and ignoretags commands.
1381 (cleanup): Free storage for new followtags and ignoretags.
1383 * main.c: Use of "comma-separated list" was random -- normalized
1384 it. Did some alphabetization. Added comments pointing out
1385 "Options without arguments" and "Options accepting an argument"
1386 sections of long_options[]. Added new options --follow-tags and
1387 -G / --ignore-tags. Added comment that Damir's --referer is
1388 currently undocumented. Added comment that Heiko's --waitretry is
1389 partially undocumented (mentioned in --help but not in
1390 wget.texi). Moved improperly sorted 24, 129, and 'G' cases.
1392 * options.h (struct options): Added new fields follow_tags and
1395 * wget.h: Added "#define EQ 0" so we can say "strcmp(a, b) == EQ".
1397 2000-03-02 Dan Harkless <wget@harkless.org>
1399 * ftp.c (ftp_loop_internal): Heiko introduced "suggest explicit
1400 braces to avoid ambiguous `else'" warnings. Eliminated them.
1402 * http.c (gethttp): Dan Berger's query string patch is totally
1403 bogus. If you have two different URLs, gen_page.cgi?page1 and
1404 get_page.cgi?page2, they'll both be saved as get_page.cgi and the
1405 second will overwrite the first. Also, parameters to implicit
1406 CGIs, like "http://www.host.com/db/?2000-03-02" cause the URLs to
1407 be printed with trailing garbage characters, and could seg fault.
1408 Backing out the patch, which Dan B. informed me by email was just
1409 a kludge to download StarOffice from Sun made necessary due to
1410 wget's unconditional escaping of certain characters (room for an
1412 (http_loop): Heiko introduced "suggest explicit braces to avoid
1413 ambiguous `else'" warnings. Eliminated them.
1415 * main.c: Heiko's --wait / --waitretry backwards compatibility
1416 code looks to have been totally untested -- automatic variable
1417 'wr' was used without being initialized, and a long int was passed
1418 into setval()'s char* val parameter.
1420 * recur.c (parse_robots): Applied Edward J. Sabol
1421 <sabol@alderaan.gsfc.nasa.gov>'s patch for Guan Yang's reported
1422 problem with "User-agent:<space>*<space>" lines in robots.txt.
1424 * url.c (parseurl, str_url): Removing Dan Berger's code (see
1425 http.c above for explanation).
1427 1999-08-25 Heiko Herold <Heiko.Herold@previnet.it>
1429 * ftp.c: Respect new option waitretry.
1431 2000-01-30 Damir Dzeko <ddzeko@zesoi.fer.hr>
1433 * http.c (gethttp): Send custom Referer, if required.
1435 1999-09-24 Charles G Waldman <cgw@fnal.gov>
1437 * netrc.c (parse_netrc): Allow passwords to contain spaces.
1439 * netrc.c (parse_netrc): New function.
1441 1999-09-17 Dan Berger <dberger@ix.netcom.com>
1443 * http.c (gethttp): Send it.
1445 * url.c (parseurl): Detect query string in HTTP URL-s.
1446 (str_url): Print it.
1448 2000-03-02 HIROSE Masaaki <hirose31@t3.rim.or.jp>
1450 * html.c (html_allow): Add <link href=...> and <script src=...>.
1452 1999-05-02 andrew deryabin <djsf@softhome.net>
1454 * http.c (gethttp): Specify port in `Host' header only if it's
1457 1998-11-03 Edward J. Sabol <sabol@alderaan.gsfc.nasa.gov>
1459 * recur.c (recursive_retrieve): If a finite maximum depth is
1460 specified, and we're are already at that depth, don't download the
1461 HTML file for parsing.
1463 2000-03-01 Dan Harkless <wget@harkless.org>
1465 * ftp.c (ftp_loop_internal): Call new downloaded_file() function,
1466 even though we don't do conversion on HTML files retrieved via
1467 FTP, so _current_ usage of downloaded_file() makes this call unneeded.
1468 (ftp_retrieve_list): Added a comment saying where we need to
1469 stat() a .orig file if FTP'd HTML file conversion is ever implemented.
1470 (ftp_retrieve_list): "Local file '%s' is more recent," is sometimes
1471 a lie -- reworded as "Server file no newer than local file '%s' --".
1473 * http.c (http_loop): Fixed a typo and clarified a comment.
1474 (http_loop): When -K and -N are specified together, compare size
1475 and timestamp of server file X against local file X.orig (if
1476 extant) rather than converted local file X.
1477 (http_loop): "Local file '%s' is more recent," is sometimes a lie
1478 -- reworded as "Server file no newer than local file '%s' --".
1479 (http_loop): Call new downloaded_file() function to prevent
1480 wrongful overwriting of .orig file when -N is specified.
1482 * url.c (convert_links): When -K specified, only rename X to
1483 X.orig if downloaded_file() returns TRUE. Otherwise when we skip
1484 file X due to -N, we clobber an X.orig from a previous invocation.
1485 (convert_links): Call the failsafe xstrdup(), not the real strdup().
1486 (convert_links): Added a note asking anyone who understands how
1487 multiple URLs can correspond to a single file to comment it.
1488 (downloaded_file): Added this new function.
1490 * url.h (downloaded_file): Added prototype for this new function
1491 as well as its downloaded_file_t enum type.
1493 * wget.h (boolean): Added this new typedef and TRUE and FALSE #defines.
1495 2000-02-29 Dan Harkless <wget@harkless.org>
1497 * version.c: Upped version to developer-only "1.5.3+dev".
1499 2000-02-18 Dan Harkless <wget@harkless.org>
1501 * init.c (backup_converted): Added this new option.
1503 * main.c (-K / --backup-converted): Added this new option.
1505 * options.h (backup_converted): Added this new option.
1507 * url.c (convert_links): When backup_converted is specified, save
1508 file X as X.orig before converting.
1510 * url.h (urlpos): Fixed typo -- said "Rekative" instead of "Relative".
1512 1998-09-21 Hrvoje Niksic <hniksic@srce.hr>
1514 * version.c: Wget 1.5.3 is released.
1516 1998-09-21 Hrvoje Niksic <hniksic@srce.hr>
1518 * host.c (ftp_getaddress): Don't warn when reverse-lookup of local
1519 address doesn't yield FQDN.
1521 1998-09-21 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
1523 * cmpt.c (strerror): Fix declaration of sys_errlist.
1525 1998-09-11 Hrvoje Niksic <hniksic@srce.hr>
1527 * main.c (main): Don't use an array subscript as the first
1528 argument to STRDUP_ALLOCA.
1529 From Kaveh R. Ghazi.
1531 1998-09-11 Szakacsits Szabolcs <szaka@sienet.hu>
1533 * html.c (htmlfindurl): Download table background.
1535 1998-09-11 Hans Grobler <grobh@conde.ee.sun.ac.za>
1537 * init.c (parse_line): Would free *com before allocating it.
1538 (parse_line): Would free com instead of *com.
1540 1998-09-10 Howard Gayle <howard@fjst.com>
1542 * url.c (get_urls_html): Would drop the last character of the
1545 1998-09-10 Hrvoje Niksic <hniksic@srce.hr>
1547 * http.c (http_loop): Don't print status code if quiet.
1549 1998-09-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1551 * log.c: Use <stdarg.h> only when __STDC__.
1553 1998-09-10 Adam D. Moss <adam@foxbox.org>
1555 * html.c (htmlfindurl): Download <layer src=...>.
1557 1998-09-10 Howard Gayle <howard@fjst.com>
1559 * ftp.c (ftp_retrieve_list): Don't update the time stamp of a file
1562 1998-06-27 Hrvoje Niksic <hniksic@srce.hr>
1564 * utils.c: Include <libc.h> on NeXT.
1566 1998-06-26 Heinz Salzmann <heinz.salzmann@intermetall.de>
1568 * url.c (get_urls_html): Fix calculation of URL position.
1570 1998-06-23 Hrvoje Niksic <hniksic@srce.hr>
1572 * version.c: Wget 1.5.2 is released.
1574 1998-06-23 Dave Love <d.love@dl.ac.uk>
1576 * ftp.c, init.c, netrc.c: Include errno.h.
1578 * http.c: Include errno.h and time header.
1580 * Makefile.in (exext): Define.
1581 (install.bin, uninstall.bin): Use it.
1583 1998-06-21 Hrvoje Niksic <hniksic@srce.hr>
1585 * http.c (http_loop): Don't attempt to compare local and remote
1586 sizes if the remote size is unknown.
1588 1998-06-16 Hrvoje Niksic <hniksic@srce.hr>
1590 * url.c (get_urls_html): Use malloc() instead of alloca in the
1593 1998-06-13 Hrvoje Niksic <hniksic@srce.hr>
1595 * version.c: Wget 1.5.2-b4 is released.
1597 1998-06-13 Hrvoje Niksic <hniksic@srce.hr>
1599 * url.c (get_urls_html): Ignore spaces before and after the URI.
1601 1998-06-08 Wanderlei Antonio Cavassin <cavassin@conectiva.com.br>
1603 * ftp.c (getftp): Translate `done'.
1605 1998-06-06 Hrvoje Niksic <hniksic@srce.hr>
1607 * version.c: Wget 1.5.2-b3 is released.
1609 1998-06-06 Alexander Kourakos <awk@bnt.com>
1611 * init.c (cleanup): Close dfp, don't free it.
1613 1998-06-06 Hrvoje Niksic <hniksic@srce.hr>
1615 * utils.c (make_directory): Twiddle.
1617 * config.h.in: Added template for access().
1619 1998-06-05 Mathieu Guillaume <mat@cythere.com>
1621 * html.c (htmlfindurl): Download <input src=...>
1623 1998-06-03 Hrvoje Niksic <hniksic@srce.hr>
1625 * utils.c (file_exists_p): Use access() with two arguments.
1627 1998-05-27 Martin Kraemer <Martin.Kraemer@mch.sni.de>
1629 * netrc.c (parse_netrc): Correct logic.
1631 1998-05-27 Hrvoje Niksic <hniksic@srce.hr>
1633 * ftp.c (getftp): Added `break'; suggested by Lin Zhe Min
1634 <ljm@ljm.wownet.net>.
1636 1998-05-24 Hrvoje Niksic <hniksic@srce.hr>
1638 * version.c: Wget 1.5.2-b2 is released.
1640 1998-05-18 Juan Jose Rodriguez <jcnsoft@jal1.telmex.net.mx>
1642 * mswindows.h: Don't translate mkdir to _mkdir under Borland.
1644 1998-05-17 Hrvoje Niksic <hniksic@srce.hr>
1646 * retr.c (elapsed_time): Return correct value when
1647 HAVE_GETTIMEOFDAY is undefined.
1649 1998-05-13 Hrvoje Niksic <hniksic@srce.hr>
1651 * version.c: Wget 1.5.2-b1 is released.
1653 1998-05-08 Hrvoje Niksic <hniksic@srce.hr>
1655 * getopt.c (_getopt_internal): Use exec_name instead of argv[0].
1656 (_getopt_internal): Don't translate `#if 0'-ed strings.
1658 1998-05-06 Douglas E. Wegscheid <wegscd@whirlpool.com>
1660 * mswindows.c (ws_handler): Use fork_to_background().
1662 1998-05-05 Hrvoje Niksic <hniksic@srce.hr>
1664 * version.c: Wget 1.5.1 is released.
1666 1998-05-05 Hrvoje Niksic <hniksic@srce.hr>
1668 * http.c (parse_http_status_line): Avoid `minor' and `major'
1671 1998-05-02 Hrvoje Niksic <hniksic@srce.hr>
1673 * utils.c (mkdirhier): Renamed to make_directory.
1675 1998-05-01 Hrvoje Niksic <hniksic@srce.hr>
1677 * mswindows.c (fork_to_background): Define under Windows.
1679 * utils.c (fork_to_background): New function.
1681 * html.c (htmlfindurl): Removed rerdundant casts.
1683 1998-05-01 Douglas E. Wegscheid <wegscd@whirlpool.com>
1685 * mswindows.c (ws_mypath): Cache the path.
1687 1998-04-30 Douglas E. Wegscheid <wegscd@whirlpool.com>
1689 * ftp.h: Prefix enum ftype members with FT_.
1691 * ftp-ls.c, ftp.c, html.h: Adjust accordingly.
1693 * mswindows.h: Use stat under Borland, _stat under MSVC.
1695 1998-04-28 Hrvoje Niksic <hniksic@srce.hr>
1697 * http.c (known_authentication_scheme_p): New function.
1698 (gethttp): Handle authorization more correctly.
1700 * ftp-basic.h: Removed.
1704 * utils.c: Include <unistd.h> before <pwd.h>; needed under SunOS
1706 (numdigit): Use `while' loop.
1708 * http.c (create_authorization_line): Detect authentication
1709 schemes case-insensitively.
1711 * http.c (extract_header_attr): Use strdupdelim().
1712 (digest_authentication_encode): Move declaration of local
1713 variables to smaller scope.
1714 (digest_authentication_encode): Reset REALM, OPAQUE and NONCE.
1715 (create_authorization_line): Detect authentication schemes
1718 * utils.c (touch): Constify.
1720 * http.c (gethttp): Report a nicer error when no data is received.
1722 * rbuf.h (RBUF_READCHAR): Ditto.
1724 * ftp-basic.c (ftp_response): Use sizeof.
1726 1998-04-27 Hrvoje Niksic <hniksic@srce.hr>
1728 * retr.c (print_percentage): EXPECTED is long, not int.
1729 (print_percentage): Use floating-point arithmetic to avoid
1730 overflow with large files' sizes multiplied with 100.
1732 1998-04-27 Gregor Hoffleit <flight@mathi.uni-heidelberg.de>
1734 * config.h.in: Added pid_t stub.
1736 * sysdep.h (S_ISREG): Moved here from mswindows.h (NeXT doesn't
1739 1998-04-20 Hrvoje Niksic <hniksic@srce.hr>
1741 * version.c: Wget 1.5.0 is released.
1743 1998-04-18 Hrvoje Niksic <hniksic@srce.hr>
1745 * url.c (str_url): Ditto.
1747 * ftp-basic.c (ftp_rest): Use new name.
1749 * utils.c (long_to_string): Renamed from prnum().
1751 1998-04-16 Hrvoje Niksic <hniksic@srce.hr>
1753 * version.c: Wget 1.5-b17 is released.
1755 1998-04-08 Hrvoje Niksic <hniksic@srce.hr>
1757 * headers.c (header_get): New argument FLAGS.
1759 * http.c (gethttp): If request is malformed, bail out of the
1761 (gethttp): Check for empty header *after* the status line checks.
1762 (gethttp): Disallow continuations for status line.
1764 1998-04-08 Hrvoje Niksic <hniksic@srce.hr>
1766 * version.c: Wget 1.5-b16 is released.
1768 1998-04-08 Hrvoje Niksic <hniksic@srce.hr>
1770 * init.c (commands): Renamed `always_rest' to `continue'.
1772 1998-04-05 Hrvoje Niksic <hniksic@srce.hr>
1776 * log.c (logputs): New argument.
1777 (logvprintf): Ditto.
1780 1998-04-04 Hrvoje Niksic <hniksic@srce.hr>
1782 * http.c (http_atotm): Update comment.
1784 * main.c (i18n_initialize): Set LC_MESSAGES, not LC_ALL.
1786 * wget.h: Renamed ENABLED_NLS to HAVE_NLS.
1788 * main.c (i18n_initialize): New function.
1791 * log.c: Include <unistd.h>.
1793 * retr.c (show_progress): Cast alloca to char *.
1795 1998-04-04 Hrvoje Niksic <hniksic@srce.hr>
1797 * version.c: Wget 1.5-b15 is released.
1799 1998-04-04 Hrvoje Niksic <hniksic@srce.hr>
1801 * utils.h: Declare file_non_directory_p().
1803 1998-04-03 Hrvoje Niksic <hniksic@srce.hr>
1805 * main.c (main): It's `tries', not `numtries' now.
1807 1998-04-01 Hrvoje Niksic <hniksic@srce.hr>
1809 * init.c (getperms): Removed.
1811 1998-04-01 Tim Charron <tcharron@interlog.com>
1813 * log.c (logvprintf): Don't use ARGS twice.
1815 1998-04-01 John <john@futuresguide.com>
1817 * mswindows.c: Cleaned up.
1819 1998-04-01 Hrvoje Niksic <hniksic@srce.hr>
1821 * version.c: Wget 1.5-b14 is released.
1823 1998-04-01 Hrvoje Niksic <hniksic@srce.hr>
1825 * ftp-opie.c (STRLEN4): New macro.
1828 1998-04-01 Junio Hamano <junio@twinsun.com>
1830 * http.c: Document all the Digest functions.
1832 1998-04-01 Hrvoje Niksic <hniksic@srce.hr>
1834 * utils.c (file_non_directory_p): Renamed from isfile().
1836 * mswindows.h (S_ISREG): New macro, suggested by Tim Adam.
1838 1998-03-31 Hrvoje Niksic <hniksic@srce.hr>
1840 * utils.c (mkdirhier): Use 0777 instead of opt.dirmode.
1842 * init.c (cmd_spec_dotstyle): Use 48 dots per line for binary
1844 (cmd_permissions): Removed.
1846 * config.h.in: Add template for WORDS_BIGENDIAN.
1848 1998-03-31 Junio Hamano <junio@twinsun.com>
1850 * http.c (HEXD2asc): New macro.
1851 (dump_hash): Use it.
1853 1998-03-31 Hrvoje Niksic <hniksic@srce.hr>
1855 * version.c: Wget 1.5-b13 is released.
1857 1998-03-31 Hrvoje Niksic <hniksic@srce.hr>
1859 * main.c (main): Don't try to use `com'.
1861 1998-03-30 Hrvoje Niksic <hniksic@srce.hr>
1863 * init.c (cmd_permissions): New function.
1865 1998-03-30 Hrvoje Niksic <hniksic@srce.hr>
1867 * version.c: Wget 1.5-b12 is released.
1869 1998-03-30 Hrvoje Niksic <hniksic@srce.hr>
1871 * init.c (commands): Renamed `numtries' to `tries'.
1872 (cmd_spec_debug): Removed.
1873 (home_dir): Under Windows, return `C:\' if HOME is undefined.
1875 1998-03-29 Hrvoje Niksic <hniksic@srce.hr>
1877 * config.h.in: Define _XOPEN_SOURCE.
1879 * init.c (check_user_specified_header): New function.
1880 (cmd_spec_header): Use it.
1881 (cmd_spec_useragent): New function.
1883 1998-03-29 Hrvoje Niksic <hniksic@srce.hr>
1885 * version.c: Wget 1.5-b11 is released.
1887 1998-03-28 Hrvoje Niksic <hniksic@srce.hr>
1889 * wget.h: Include <libintl.h> only if NLS is enabled.
1891 1998-03-26 Hrvoje Niksic <hniksic@srce.hr>
1893 * options.h (struct options): Made `wait' a long.
1894 (struct options): Ditto for `timeout'.
1896 1998-03-19 Hrvoje Niksic <hniksic@srce.hr>
1898 * utils.c (exists): Renamed to file_exists_p.
1899 (file_exists_p): Use access() if available.
1901 1998-03-17 Hrvoje Niksic <hniksic@srce.hr>
1903 * utils.c (memfatal): Set save_log_p to 0 to avoid potential
1906 * log.c: do_logging -> save_log_p.
1908 * config.h.in: Added template for HAVE_VSNPRINTF.
1910 1998-03-16 Hrvoje Niksic <hniksic@srce.hr>
1914 * http.c: Protect declaration against non-ANSI compiler.
1916 * log.c (logvprintf): Use vsnprintf() if available.
1918 * getopt.c (main): Don't translate test stuff.
1920 1998-03-16 Hrvoje Niksic <hniksic@srce.hr>
1922 * version.c: Wget 1.5-b10 is released.
1924 1998-03-11 Hrvoje Niksic <hniksic@srce.hr>
1926 * ftp.c (getftp): Don't translate "CWD %s".
1928 * wget.h (GCC_FORMAT_ATTR): Renamed from FORMAT_ATTR.
1930 1998-03-07 Hrvoje Niksic <hniksic@srce.hr>
1932 * ftp-opie.c (btoe): Use memcpy() instead of strncat().
1934 * log.c (logputs): New function.
1935 (logvprintf): Renamed from vlogmsg; use logputs().
1937 * retr.c (show_progress): Print `[100%]' when the retrieval is
1940 * init.c (run_wgetrc): Use FILE, not PATH.
1941 (wgetrc_file_name): Ditto.
1943 1998-03-07 Tim Adam <tma@osa.com.au>
1945 * recur.c (parse_robots): Correctly reset `entries' on empty
1948 1998-03-07 Hrvoje Niksic <hniksic@srce.hr>
1950 * init.c (cmd_spec_debug): Use cmd_boolean().
1952 1998-02-23 Hrvoje Niksic <hniksic@srce.hr>
1954 * http.c (gethttp): Create proxy-authorization correctly.
1956 1998-02-22 Hrvoje Niksic <hniksic@srce.hr>
1960 * getopt.c: Use ANSI function definitions.
1962 * ftp-opie.c: New file.
1964 * options.h: Don't redefine EXTERN.
1966 * init.c: Sort it correctly.
1968 1998-02-22 Hrvoje Niksic <hniksic@srce.hr>
1970 * version.c: Wget 1.5-b9 is released.
1972 1998-02-22 Hrvoje Niksic <hniksic@srce.hr>
1974 * recur.c (recursive_retrieve): Reset `first_time'.
1976 * ftp.c (getftp): Added `default' clause to switches of uerr_t.
1978 * rbuf.c (rbuf_peek): Simplified.
1979 (rbuf_flush): Use MINVAL.
1981 * wget.h (MINVAL): Moved from url.h.
1983 * rbuf.h (RBUF_FD): New macro.
1985 * url.c (add_url): Add to the head of the list.
1987 * ftp.c (ftp_retrieve_list): Set the permissions to downloaded
1989 (getftp): Set the default permissions to 0600.
1991 1998-02-21 Hrvoje Niksic <hniksic@srce.hr>
1993 * url.c (get_urls_html): Ditto.
1994 (convert_links): Ditto.
1996 * recur.c (parse_robots): Ditto.
1998 * html.c (ftp_index): Ditto.
2000 * ftp-ls.c (ftp_parse_unix_ls): Open file as binary.
2002 * init.c (defaults): Initialize `opt' to zero via memset.
2004 * http.c (digest_authentication_encode): goto considered harmful.
2006 1998-02-19 Hrvoje Niksic <hniksic@srce.hr>
2008 * ftp.c (delelement): Simplify and fix leak.
2010 1998-02-18 Hrvoje Niksic <hniksic@srce.hr>
2012 * http.c (dump_hash): Use HEXD2ASC instead of home-grown stuff.
2014 * url.h (HEXD2ASC): Removed warning.
2016 * init.c (comind): Use binary search.
2017 (commands): Reorganized.
2019 (cmd_boolean): New function.
2020 (cmd_number): Ditto.
2021 (cmd_number_inf): Ditto.
2022 (cmd_string): Ditto.
2023 (cmd_vector): Ditto.
2024 (cmd_directory_vector): Ditto.
2027 (cmd_spec_debug): Ditto.
2028 (cmd_spec_dirmode): Ditto.
2029 (cmd_spec_dirstruct): Ditto.
2030 (cmd_spec_dotstyle): Ditto.
2031 (cmd_spec_header): Ditto.
2032 (cmd_spec_htmlify): Ditto.
2033 (cmd_spec_mirror): Ditto.
2034 (cmd_spec_outputdocument): Ditto.
2035 (cmd_spec_recursive): Ditto.
2036 (settime): Merged with cmd_time().
2037 (setbytes): Merged with cmd_bytes().
2038 (setonoff): Merged with cmd_boolean().
2041 1998-02-17 Hrvoje Niksic <hniksic@srce.hr>
2043 * Makefile.in (distclean): Remove `config.h'.
2045 1998-02-17 Hrvoje Niksic <hniksic@srce.hr>
2047 * version.c: Wget 1.5-b8 is released.
2049 1998-02-17 Hrvoje Niksic <hniksic@srce.hr>
2051 * http.c (digest_authentication_encode): New function.
2052 (create_authorization_line): Use it.
2053 (dump_hash): New function.
2054 (digest_authentication_encode): Use it.
2056 * fnmatch.c: Renamed from `mtch.c'.
2058 1998-02-15 Karl Eichwalder <ke@suse.de>
2060 * main.c (main): Tag "Written by..." string as translatable.
2062 1998-02-15 Hrvoje Niksic <hniksic@srce.hr>
2064 * wget.h (FREE_MAYBE): New macro.
2066 * http.c (create_authorization_line): Don't use ANSI C string
2067 concatenation feature.
2068 (basic_authentication_encode): Use alloca() for temporary
2077 * ftp-basic.c: Protect declaration against non-ANSI compiler.
2079 * http.c (create_authorization_line): Cast `unsigned char *' to
2080 `char *' for sprintf, to shut up the noisy Digital Unix cc.
2082 1998-02-15 Hrvoje Niksic <hniksic@srce.hr>
2084 * version.c: Wget 1.5-b7 is released.
2086 1998-02-15 Hrvoje Niksic <hniksic@srce.hr>
2088 * cmpt.c (strstr): Synched with glibc-2.0.6.
2090 * ftp-basic.c (calculate_skey_response): Ditto.
2091 (calculate_skey_response): Use alloca().
2093 * http.c (create_authorization_line): Work with FSF's version of
2096 * md5.c: New file, from GNU libc.
2098 1998-02-14 Hrvoje Niksic <hniksic@srce.hr>
2100 * url.h (URL_CLEANSE): Name the temporary variable more carefully.
2102 1998-02-13 Hrvoje Niksic <hniksic@srce.hr>
2104 * http.c (basic_authentication_encode): New function, instead of
2107 1998-02-13 Junio Hamano <junio@twinsun.com>
2109 * http.c: Add HTTP-DA support.
2110 * ftp-basic.c: Add Opie/S-key support.
2111 * config.h.in, Makefile.in: Add HTTP-DA and Opie/S-key support.
2112 * md5.c, md5.h: New files.
2114 1998-02-13 Hrvoje Niksic <hniksic@srce.hr>
2116 * http.c (http_process_range): Renamed from hprocrange().
2117 (http_process_range): Parse the whole header.
2119 * headers.c: New file.
2120 (header_process): New function.
2121 (header_get): Renamed from fetch_next_header.
2123 * all: Include utils.h only where necessary.
2125 * wget.h: Declare xmalloc(), xrealloc() and xstrdup() here.
2127 * wget.h: Add provisions for dmalloc.
2129 1998-02-12 Hrvoje Niksic <hniksic@srce.hr>
2131 * version.c: Wget 1.5-b6 is released.
2133 1998-02-12 Hrvoje Niksic <hniksic@srce.hr>
2135 * ftp.c (ftp_loop): Determine `filename' more precisely.
2137 * init.c (setval): Don't set `opt.quiet' if output-document is
2140 * log.c (log_init): Print to STDERR instead of STDOUT.
2141 (vlogmsg): Use STDERR by default.
2144 1998-02-11 Simon Josefsson <jas@pdc.kth.se>
2146 * host.c: Use addr_in again.
2148 1998-02-08 Karl Eichwalder <karl@suse.de>
2150 * http.c (gethttp): Fixed typo.
2152 1998-02-08 Hrvoje Niksic <hniksic@srce.hr>
2154 * version.c: Wget 1.5-b5 is released.
2156 1998-02-08 Hrvoje Niksic <hniksic@srce.hr>
2158 * retr.c (show_progress): Use it.
2160 * log.c (logflush): New function.
2162 * wget.h: Utilize __attribute__ if on gcc.
2164 1998-02-07 Hrvoje Niksic <hniksic@srce.hr>
2166 * http.c (base64_encode_line): New argument LENGTH.
2167 (BASIC_AUTHENTICATION_ENCODE): Use it.
2168 (BASIC_AUTHENTICATION_ENCODE): Take length of HEADER into account.
2170 * main.c (main): Fixed fprintf() format mismatch.
2172 1998-02-06 Hrvoje Niksic <hniksic@srce.hr>
2174 * version.c: Wget 1.5-b4 is released.
2176 1998-02-03 Simon Josefsson <jas@pdc.kth.se>
2178 * host.c: use sockaddr_in instead of addr_in.
2180 1998-02-04 Hrvoje Niksic <hniksic@srce.hr>
2182 * init.c (cleanup): Use it.
2184 * recur.c (recursive_cleanup): New function.
2186 * retr.c (retrieve_from_file): Ditto.
2188 * main.c (main): Use it.
2190 * recur.c (recursive_reset): New function.
2192 * retr.c (retrieve_from_file): Ditto.
2194 * main.c (main): Simplify call to recursive_retrieve().
2196 * recur.c (recursive_retrieve): Removed FLAGS argument.
2198 * http.c (gethttp): Changed call to iwrite().
2200 1998-02-03 Hrvoje Niksic <hniksic@srce.hr>
2202 * url.c (get_urls_html): Ditto.
2203 (free_urlpos): Ditto.
2207 * retr.c (retrieve_url): Move declaration of local variables to
2210 * url.c (urlproto): Use it.
2213 (get_urls_html): Ditto.
2215 * utils.h (ARRAY_SIZE): New macro.
2217 * url.c (proto): Moved from url.h.
2219 * url.h (URL_CLEANSE): Reformatted.
2220 (USE_PROXY_P): Renamed from USE_PROXY.
2222 * ftp-basic.c: Adjust to the new interface of iwrite().
2224 * ftp-basic.c (ftp_port): Use alloca().
2226 1998-02-03 Hrvoje Niksic <hniksic@srce.hr>
2228 * version.c: Wget 1.5-b3 is released.
2230 * host.c (ftp_getaddress): Don't print to stderr directly.
2232 * init.c (setbytes): Support `g' for gigabytes.
2233 (cmdtype): New specification CTIME.
2234 (setval): Use it with settime().
2235 (commands): Use it for WAIT and TIMEOUT.
2237 1998-02-02 Hrvoje Niksic <hniksic@srce.hr>
2239 * http.c (BASIC_AUTHENTICATION_ENCODE): New macro.
2242 * utils.c (unique_name_1): Moved from url.c.
2243 (unique_name): Ditto.
2245 * url.c (url_filename): Ditto.
2247 * log.c (redirect_output): Changed call to unique_name().
2249 * url.c (unique_name_1): Renamed from unique_name().
2250 (unique_name): Changed interface.
2252 * init.c (enum cmdid): Moved from init.h.
2254 (struct cmd): Ditto.
2256 * main.c (main): Use it.
2257 (main): Moved `--backups' to not have a short option.
2259 * options.h (struct options): New member BACKGROUND.
2261 * main.c (print_help): Rearranged.
2262 (main): New long options for -n* short options: --no-directories,
2263 --no-host-directories, --non-verbose, --no-host-lookup and
2264 --dont-remove-listing.
2266 1998-02-01 Hrvoje Niksic <hniksic@srce.hr>
2268 * main.c (main): Use log_close().
2270 * log.c: New variable LOGFP.
2272 (redirect_output): Don't open /dev/null; set LOGFP to stdin
2274 (log_close): New function.
2276 * options.h (struct options): Removed LFILE.
2278 * log.c (log_enable): Removed.
2280 * main.c (main): Use it.
2282 * log.c (log_init): New function.
2284 * url.c (get_urls_html): Removed needless assignment to BASE.
2286 * host.c (add_hlist): Don't set CMP needlessly.
2288 * utils.c (match_backwards): Ditto.
2289 (in_acclist): Ditto.
2291 * url.c (findurl): Ditto.
2293 * netrc.c (parse_netrc): Ditto.
2295 * log.c (log_dump): Ditto.
2297 * html.c (html_quote_string): Ditto.
2299 * ftp-basic.c (ftp_request): Made static.
2301 * connect.c: Made global variables static.
2303 * url.c (construct): Ditto.
2305 * init.c (init_path): Avoid assignment inside `if'-condition.
2307 * ftp.c: Don't include in.h or winsock.h.
2309 * ftp.c (ftp_loop): Use SZ.
2311 * connect.c (bindport): Cast &addrlen to int *.
2314 * init.c (initialize): Don't use SYSTEM_WGETRC unconditionally.
2316 1998-01-31 Hrvoje Niksic <hniksic@srce.hr>
2318 * ftp.c (getftp): Initialize opt.ftp_pass here.
2319 (ftp_retrieve_dirs): Use alloca().
2321 * init.c (defaults): Don't initialize opt.ftp_pass.
2323 * sysdep.h (S_ISLNK): Declare for OS/2; ditto for lstat.
2324 From Ivan F. Martinez <ivanfm@ecodigit.com.br>.
2326 1998-01-31 Hrvoje Niksic <hniksic@srce.hr>
2328 * recur.c (parse_robots): Check for comments more correctly.
2330 * host.c (ftp_getaddress): Use STRDUP_ALLOCA.
2331 (ftp_getaddress): Add diagnostics when reverse-lookup yields only
2334 1998-01-31 Hrvoje Niksic <hniksic@srce.hr>
2336 * version.c: Wget 1.5-b2 is released.
2338 * netrc.c (NETRC_FILE_NAME): Moved from netrc.h.
2340 * utils.c (proclist): Pass FNM_PATHNAME to fnmatch().
2342 * ftp-basic.c (ftp_pasv): Avoid unnecessary casting to unsigned
2345 * log.c: Don't attempt to hide arguments from ansi2knr.
2347 * cmpt.c: Synched strptime() and mktime() with glibc-2.0.6.
2349 * ansi2knr.c: Use a later version, from fileutils-3.16l alpha.
2351 * ftp.c (getftp): Ditto.
2353 * http.c (gethttp): Use it.
2355 * retr.c (get_contents): New argument EXPECTED; pass it to
2357 (show_progress): New argument EXPECTED; use it to display
2360 * init.c (setval): Ditto.
2362 * http.c (gethttp): Ditto.
2365 * ftp.c (getftp): Ditto.
2366 (ftp_loop_internal): Ditto.
2368 * ftp-ls.c (ftp_parse_unix_ls): Use abort() instead of assert(0).
2370 * sysdep.h (CLOSE): Simplify; use DEBUGP.
2372 * netrc.c (search_netrc): Use alloca().
2374 * init.c (defaults): Initialize no_flush.
2376 * log.c (vlogmsg): Don't flush if no_flush.
2378 * options.h (struct options): New variable no_flush.
2380 * main.c (main): Don't play games with buffering.
2382 * log.c (vlogmsg): Flush the output after every message.
2384 1998-01-31 Hrvoje Niksic <hniksic@srce.hr>
2386 * init.c (parse_line): Ditto.
2388 * url.c (get_urls_html): Ditto.
2390 * main.c (main): Don't cast to unsigned char.
2392 * init.c (run_wgetrc): Don't cast to unsigned char.
2393 (parse_line): Accept char instead of unsigned char.
2395 * html.c (htmlfindurl): Use char instead of unsigned char.
2399 * sysdep.h: Add wrappers to ctype macros to make them
2402 1998-01-30 Hrvoje Niksic <hniksic@srce.hr>
2404 * html.c (htmlfindurl): Download <img lowsrc=...>
2406 * main.c (main): Ignore SIGPIPE.
2408 * connect.c (select_fd): New argument WRITEP.
2409 (iwrite): Call select_fd().
2411 1997-02-27 Fila Kolodny <fila@ibi.com>
2413 * ftp.c (ftp_retrieve_list): If retrieving symlink and the proper
2414 one already exists, just skip it.
2416 1998-01-30 Hrvoje Niksic <hniksic@srce.hr>
2418 * http.c (gethttp): Cosmetic changes.
2420 * http.c (check_end): Allow `+D...' instead of `GMT'.
2421 From Fabrizio Pollastri <pollastri@cstv.to.cnr.it>.
2423 * url.c (process_ftp_type): New function.
2426 * connect.c (iwrite): Allow writing in a few chunks.
2427 (bindport): Made SRV static, so addr can point to it.
2428 (select_fd): Removed HPUX kludge.
2430 * host.c (free_hlist): Incorporated into clean_hosts().
2432 1998-01-29 Hrvoje Niksic <hniksic@srce.hr>
2434 * host.c (hlist): Made static.
2435 (search_address): Cosmetic change.
2437 1998-01-29 Hrvoje Niksic <hniksic@srce.hr>
2439 * version.c: Wget v1.5-b1 is released.
2441 * http.c (hgetlen): Use sizeof() to get the header length.
2444 (hgetlocation): Ditto.
2445 (hgetmodified): Ditto.
2446 (haccepts_none): Ditto.
2448 * main.c (main): Updated `--version' and `--help' output, as per
2449 Francois Pinard's suggestions.
2451 * main.c: Include locale.h; call setlocale(), bindtextdomain() and
2454 * config.h.in: Define stubs for I18N3.
2456 * wget.h: Include libintl.h.
2458 1998-01-28 Hrvoje Niksic <hniksic@srce.hr>
2460 * url.c (mkstruct): Check for opt.cut_dirs.
2461 (mkstruct): alloca()-te more, xmalloc() less.
2463 * utils.c (load_file): Check for ferror().
2465 * url.c (get_urls_file): Close only the files we opened.
2466 (get_urls_html): Ditto.
2467 (count_slashes): New function.
2471 * http.c (gethttp): Respect username and password provided by
2473 (base64_encode_line): Write into an existing buffer instead of
2474 malloc-ing a new one.
2475 (struct http_stat): Moved from http.h
2477 * retr.c (retrieve_url): Free SUF.
2479 * all: Removed lots of unnecessary .h dependencies.
2481 * html.c (global_state): Made static.
2483 * utils.h (ALLOCA_ARRAY): New macro.
2485 * main.c (main): New option `--cut-dirs'.
2487 * url.c (construct): Use alloca() for T.
2489 * utils.c (mkdirhier): Use STRDUP_ALLOCA.
2491 * host.c (_host_t): Moved from host.h.
2492 (struct host): Renamed from _host_t.
2493 (store_hostaddress): Use STRDUP_ALLOCA for INET_S.
2496 * host.h: Don't include url.h.
2498 * ftp.c (LIST_FILENAME): Moved from ftp.h.
2500 * init.c (DEFAULT_FTP_ACCT): Moved from ftp.h.
2502 * main.c (main): Enable log if the output goes to a TTY.
2504 * connect.h: Removed unused constant `BACKLOG'.
2506 * config.h.in: Check for isatty().
2508 * Makefile.in (LINK): Use CFLAGS when linking.
2510 1998-01-27 Hrvoje Niksic <hniksic@srce.hr>
2512 * mswindows.c (ws_hangup): Use redirect_output().
2514 * main.c (redirect_output_signal): New function; use
2517 * log.c (redirect_output): New function, based on hangup(), which
2520 * log.c (vlogmsg): New function.
2522 * wget.h (DEBUGP): Use debug_logmsg().
2524 * main.c (hangup): Use it.
2526 * log.c (log_dump): New function.
2528 * utils.h (DO_REALLOC): Use `long' for various sizes.
2530 * http.c (hskip_lws): Use `while', for clarity.
2531 (HTTP_DYNAMIC_LINE_BUFFER): New constant.
2532 (fetch_next_header): Use it instead of DYNAMIC_LINE_BUFFER.
2534 * ftp-basic.c (FTP_DYNAMIC_LINE_BUFFER): New constant.
2535 (ftp_response): Use it instead of DYNAMIC_LINE_BUFFER.
2537 * utils.c (DYNAMIC_LINE_BUFFER): Moved from utils.c.
2538 (LEGIBLE_SEPARATOR): Ditto.
2539 (FILE_BUFFER_SIZE): Ditto.
2541 * retr.c (BUFFER_SIZE): Moved from retr.h.
2544 (logmsg): Moved from utils.c.
2545 (debug_logmsg): New function.
2547 * mswindows.h: Include it here.
2551 * utils.c: Don't include <windows.h>.
2553 1998-01-25 Hrvoje Niksic <hniksic@srce.hr>
2555 * host.c (ftp_getaddress): Ditto.
2557 * main.c (main): Use it.
2559 * utils.h (STRDUP_ALLOCA): New macro.
2561 * init.c: Prepend `wget: ' to error messages printed on stderr.
2563 * utils.c (mkdirhier): Renamed from mymkdir.
2564 (touch): Renamed from my_touch.
2565 (pwd_cuserid): Renamed from my_cuserid().
2567 1998-01-24 Andy Eskilsson <andy.eskilsson@telelogic.se>
2569 * utils.c (accdir): Process wildcards.
2570 (proclist): New function.
2571 (accdir): Use it to avoid code repetition.
2573 1998-01-24 Hrvoje Niksic <hniksic@srce.hr>
2575 * recur.c (parse_robots): Respect opt.useragent; use alloca().
2577 * http.c (gethttp): Construct useragent accordingly.
2579 * version.c: Changed version string to numbers-only.
2581 * main.c (print_help): List all the options.
2583 * mswindows.c (windows_main_junk): Initialize argv0 here.
2585 1998-01-24 Karl Heuer <kwzh@gnu.org>
2587 * netrc.c (search_netrc): Initialize `l' only after processing
2590 * main.c (main): Don't trap SIGHUP if it's being ignored.
2592 1998-01-24 Hrvoje Niksic <hniksic@srce.hr>
2594 * all: Use logmsg().
2596 * utils.c (time_str): Moved from retr.c.
2597 (logmsg): New function.
2598 (logmsg_noflush): Ditto.
2600 * rbuf.c: New file, moved buf_* functions here.
2602 * ftp.c (ftp_expected_bytes): Moved from ftp-basic.c.
2604 * ftp-basic.c (ftp_rest): Use prnum().
2606 * ftp-basic.c: Ditto.
2608 * ftp.c: Use the new reading functions and macros.
2610 * retr.c (buf_initialize): New function.
2611 (buf_initialized_p): Ditto.
2612 (buf_uninitialize): Ditto.
2615 * http.c (fetch_next_header): Use the BUF_READCHAR macro for
2617 (gethttp): Use alloca() where appropriate.
2619 * retr.c (buf_readchar): Use it.
2620 (buf_peek): Use rstreams.
2622 * retr.h (BUF_READCHAR): New macro.
2624 * init.c (home_dir): Rewritten for clarity.
2627 * mswindows.c (ws_backgnd): Made static.
2628 (read_registry): Ditto.
2629 (ws_cleanup): Ditto.
2630 (ws_handler): Ditto.
2632 1998-01-23 Hrvoje Niksic <hniksic@srce.hr>
2634 * alloca.c: New file.
2636 * Makefile.in (ALLOCA): Define.
2638 * mswindows.c (ws_help): Constify.
2639 (ws_help): Use alloca.
2641 * mswindows.c: Reformat.
2643 * all: Added _(...) annotations for I18N snarfing and translation.
2645 * host.c (ftp_getaddress): Nuke SYSINFO.
2646 (ftp_getaddress): Don't use getdomainname().
2647 (ftp_getaddress): Use uname(), where available.
2649 * http.c (gethttp): Protect a stray fprintf().
2651 * init.c (settime): New function.
2652 (setval): Treat WAIT specially, allowing suffixes like `m' for
2655 1998-01-21 Hrvoje Niksic <hniksic@srce.hr>
2657 * url.c (get_urls_html): Use alloca() for TEMP.
2659 1998-01-21 Jordan Mendelson <jordy@wserv.com>
2661 * url.c (rotate_backups): New function.
2663 * http.c (gethttp): Ditto.
2665 * ftp.c (getftp): Rotate backups.
2667 1997-12-18 Hrvoje Niksic <hniksic@srce.hr>
2669 * all: Renamed nmalloc(), nrealloc() and nstrdup() to xmalloc(),
2670 xrealloc() and xstrdup(). Use the new functions.
2672 * url.c (decode_string): Made static.
2675 (parse_uname): Ditto.
2678 (construct_relative): Ditto.
2680 * retr.c (show_progress): Made static.
2682 * recur.c (robots_url): Made static.
2683 (retrieve_robots): Ditto.
2684 (parse_robots): Ditto.
2685 (robots_match): Ditto.
2689 * main.c (printhelp): Made static.
2692 * init.c (comind): Made static.
2695 (run_wgetrc): Ditto.
2703 * http.c (fetch_next_header): Made static.
2704 (hparsestatline): Ditto.
2709 (hgetlocation): Ditto.
2710 (hgetmodified): Ditto.
2711 (haccepts_none): Ditto.
2713 (base64_encode_line): Ditto.
2714 (mktime_from_utc): Ditto.
2715 (http_atotm): Ditto.
2717 * html.c (idmatch): Made static.
2719 * host.c (search_host): Made static.
2720 (search_address): Ditto.
2721 (free_hlist): Ditto.
2723 * ftp.c (getftp): Made static.
2724 (ftp_loop_internal): Ditto.
2725 (ftp_get_listing): Ditto.
2726 (ftp_retrieve_list): Ditto.
2727 (ftp_retrieve_dirs): Ditto.
2728 (ftp_retrieve_glob): Ditto.
2729 (freefileinfo): Ditto.
2730 (delelement): Ditto.
2732 * ftp-ls.c (symperms): Made static.
2733 (ftp_parse_unix_ls): Ditto.
2735 * connect.c (select_fd): Made static.
2737 * utils.c (xmalloc): Renamed from nmalloc.
2738 (xrealloc): Renamed from nrealloc.
2739 (xstrdup): Renamed from nstrdup.
2741 * getopt.c (exchange): Use alloca.
2743 * mswindows.c (mycuserid): Use strncpy.
2745 * New files mswindows.c, mswindows.h, sysdep.h. winjunk.c,
2746 systhings.h, windecl.h and winjunk.h removed.
2748 * mswindows.c (sleep): New function.
2750 * utils.c: Include <windows.h> under Windows.
2752 1997-06-12 Darko Budor <dbudor@zesoi.fer.hr>
2754 * url.h (URL_UNSAFE): Change default under Windows.
2756 * retr.c (retrieve_from_file): Respect opt.delete_after.
2758 * main.c (main): Call ws_help on Windows.
2760 * winjunk.c (windows_main_junk): New function.
2762 * main.c (main): Junk-process argv[0].
2764 * http.c (mktime_from_utc): Return -1 if mktime failed.
2766 * http.c (http_loop): Ditto.
2768 * ftp.c (ftp_loop_internal): Change title on Windows when using a
2771 * winjunk.c (getdomainname): Lots of functions.
2773 1997-06-12 Hrvoje Niksic <hniksic@srce.hr>
2775 * cmpt.c (strptime_internal): Handle years more correctly for
2778 1997-06-09 Mike Thomas <mthomas@reality.ctron.com>
2780 * http.c (gethttp): Allocate enough space for
2781 `Proxy-Authorization' header.
2783 1997-05-10 Hrvoje Niksic <hniksic@srce.hr>
2785 * version.c: Wget/1.4.5 is released.
2787 1997-05-10 Hrvoje Niksic <hniksic@srce.hr>
2789 * retr.c (get_contents): Check return value of fwrite more
2792 1997-03-30 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
2794 * cmpt.c (strptime_internal) [case 'Y']: Always subtract 1900 from
2795 year, regardless of century.
2797 1997-03-30 Hrvoje Niksic <hniksic@srce.hr>
2799 * utils.c (isfile): Use `lstat' instead of `stat'.
2801 1997-03-29 Hrvoje Niksic <hniksic@srce.hr>
2803 * utils.c (numdigit): Use explicit test.
2805 1997-03-21 Hrvoje Niksic <hniksic@srce.hr>
2807 * http.c (http_loop): Always use `url_filename' to get u->local.
2809 1997-03-20 Hrvoje Niksic <hniksic@srce.hr>
2811 * url.c: Recognize https.
2813 1997-03-13 Hrvoje Niksic <hniksic@srce.hr>
2815 * recur.c (recursive_retrieve): Lowercase just the host name.
2817 1997-03-09 Hrvoje Niksic <hniksic@srce.hr>
2819 * url.c (get_urls_file): Use the correct test.
2820 (get_urls_html): Ditto.
2822 1997-03-07 Hrvoje Niksic <hniksic@srce.hr>
2824 * connect.c: Reverted addrlen to int.
2826 * init.c (parse_line): Check for -1 instead of NONE.
2828 * version.c: Changed version to 1.4.5.
2830 1997-02-17 Hrvoje Niksic <hniksic@srce.hr>
2832 * init.c: New option netrc.
2833 (initialize): Don't parse .netrc.
2835 * cmpt.c (recursive): Return rp.
2836 (strptime_internal): Match the long strings first, the abbreviated
2839 1997-02-16 Hrvoje Niksic <hniksic@srce.hr>
2841 * http.c (check_end): New function.
2842 (http_atotm): Use it.
2844 1997-02-13 gilles Cedoc <gilles@cedocar.fr>
2846 * http.c (gethttp): Use them.
2848 * init.c: New options proxy_user and proxy_passwd.
2850 1997-02-14 Hrvoje Niksic <hniksic@srce.hr>
2852 * ftp.c (ftp_retrieve_list): Create links even if not relative.
2854 1997-02-10 Hrvoje Niksic <hniksic@srce.hr>
2856 * recur.c (recursive_retrieve): Lowercase the host name, if the
2857 URL is not "optimized".
2859 * host.c (realhost): Return l->hostname, even if it matches with
2862 1997-02-10 Marin Purgar <pmc@asgard.hr>
2864 * connect.c: Make addrlen size_t instead of int.
2867 1997-02-09 Gregor Hoffleit <flight@mathi.uni-heidelberg.DE>
2869 * systhings.h: Define S_ISLNK on NeXT too.
2871 1997-02-09 Hrvoje Niksic <hniksic@srce.hr>
2873 * version.c: Released 1.4.3.
2875 * url.c: Futher update to list of protostrings.
2876 (skip_proto): Skip `//' correctly for FTP and HTTP.
2878 * url.c (get_urls_html): Handle bogus `http:' things a little
2881 * main.c (main): Removed `follow-ftp' from `f'.
2882 (main): Dumped the `prefix-files' and `file-prefix' options and
2883 features; old and bogus.
2884 (main): Exit on failed setval() in `-e'.
2886 * http.c (fetch_next_header): Use it to detect header continuation
2889 * retr.c (buf_peek): New function.
2891 1997-02-08 Hrvoje Niksic <hniksic@srce.hr>
2893 * wget.h: Include time.h and stuff.
2895 1997-02-08 Roger Beeman <beeman@cisco.com>
2897 * ftp.c: Include <time.h>
2899 1997-02-07 Hrvoje Niksic <hniksic@srce.hr>
2901 * url.c (findurl): Would read over buffer limits.
2903 1997-02-06 Hrvoje Niksic <hniksic@srce.hr>
2905 * ftp-ls.c (ftp_parse_unix_ls): Allow spaces in file names.
2907 1997-02-05 Hrvoje Niksic <hniksic@srce.hr>
2909 * http.c (http_atotm): Initialize tm.is_dst.
2911 1997-02-02 Hrvoje Niksic <hniksic@srce.hr>
2913 * http.c (gethttp): Don't print the number of retrieved headers.
2915 * main.c (main): New option `--no-clobber', alias for `-nc'.
2917 * url.c: Recognize `https://'.
2919 1997-02-01 Hrvoje Niksic <hniksic@srce.hr>
2921 * host.c (herrmsg): Don't use h_errno.
2923 1997-01-30 Hrvoje Niksic <hniksic@srce.hr>
2925 * host.c (accept_domain): Use it.
2927 * main.c (main): New option `--exclude-domains'.
2929 * retr.c (retrieve_url): Use it.
2930 (retrieve_url): Bail out when an URL is redirecting to itself.
2932 * url.c (url_equal): New function.
2934 1997-01-29 Hrvoje Niksic <hniksic@srce.hr>
2936 * connect.c: Include arpa/inet.h instead of arpa/nameser.h.
2938 * http.c (mk_utc_time): New function.
2939 (http_atotm): Use it; handle time zones correctly.
2941 1997-01-28 Hrvoje Niksic <hniksic@srce.hr>
2945 * ftp-basic.c: Use it instead of WRITE.
2947 * connect.c (iwrite): New function.
2949 1997-01-27 Hrvoje Niksic <hniksic@srce.hr>
2951 * cmpt.c (mktime): New function.
2953 * netrc.c: Include <sys/types.h>.
2955 * main.c (main): Wouldn't recognize --spider.
2957 * retr.c (rate): Use `B', `KB' and `MB'.
2958 (reset_timer,elapsed_time): Moved from utils.c.
2960 * ftp.c (ftp_retrieve_list): Ditto.
2962 * http.c (http_loop): Don't touch the file if opt.dfp.
2964 1997-01-24 Hrvoje Niksic <hniksic@srce.hr>
2968 * ftp.c (ftp_retrieve_glob): New argument semantics.
2969 (ftp_retrieve_dirs): Use it.
2972 * html.c (htmlfindurl): Recognize `'' as the quote char.
2974 1997-01-23 Hrvoje Niksic <hniksic@srce.hr>
2976 * ftp.c (ftp_loop_internal): Use it.
2978 * utils.c (remove_link): New function.
2980 1997-01-22 Hrvoje Niksic <hniksic@srce.hr>
2982 * retr.c (retrieve_url): Require STRICT redirection URL.
2984 * url.c (parseurl): New argument STRICT.
2986 * http.c (hparsestatline): Be a little-bit less strict about
2989 1997-01-21 Hrvoje Niksic <hniksic@srce.hr>
2991 * http.c (gethttp): Use it.
2993 * main.c (main): Don't use '<digit>' as options.
2995 * init.c: New option ignore_length.
2997 * http.c (gethttp): Ditto.
2998 (http_loop): Check for redirection without Location:.
2999 (gethttp): Don't print Length unless RETROKF.
3001 * ftp.c (getftp): Use it.
3003 * url.c (mkalldirs): New function.
3005 * utils.c (mymkdir): Don't check for existing non-directory.
3007 * url.c (mkstruct): Don't create the directory.
3009 1997-01-20 Hrvoje Niksic <hniksic@srce.hr>
3011 * init.c (setval): Removed NO_RECURSION checks.
3013 1997-01-19 Hrvoje Niksic <hniksic@srce.hr>
3015 * version.c: "Released" 1.4.3-pre2.
3017 * recur.c (recursive_retrieve): Bypass host checking only if URL
3018 is ftp AND parent URL is not ftp.
3020 * ftp-basic.c (ftp_request): Print out Turtle Power.
3022 * ftp.c (ftp_loop): Call ftp_retrieve_glob with 0 if there's no
3024 (ftp_retrieve_glob): Call ftp_loop_internal even on empty list, if
3027 * http.c (gethttp): Be a little bit smarter about status codes.
3029 * recur.c (recursive_retrieve): Always reset opt.recursive when
3032 1997-01-18 Hrvoje Niksic <hniksic@srce.hr>
3034 * retr.c (retrieve_url): New variable location_changed; use it for
3035 tests instead of mynewloc.
3036 (retrieve_url): Allow heuristic adding of html.
3038 * url.c (url_filename): Don't use the `%' in Windows file names.
3040 * http.c (http_loop): Always time-stamp the local file.
3042 * http.c (http_loop): Ditto.
3044 * ftp.c (ftp_retrieve_list): Use it.
3046 * utils.c (my_touch): New function.
3048 * ftp.c (ftp_retrieve_list): Use #ifdef HAVE_STRUCT_UTIMBUF
3049 instead of #ifndef NeXT.
3051 * utils.c (strptime): New version, by Ulrich Drepper.
3053 1997-01-17 Hrvoje Niksic <hniksic@srce.hr>
3055 * http.c (haccepts_none): Renamed from `haccepts_bytes'.
3056 (gethttp): If haccepts_none(), disable ACCEPTRANGES.
3057 (http_loop): Would remove ACCEPTRANGES.
3059 * ftp.c (getftp): Call ftp_list with NULL.
3061 1997-01-15 Hrvoje Niksic <hniksic@srce.hr>
3063 * html.c (ftp_index): Don't print minutes and seconds if we don't
3064 know them; beautify the output.
3066 * ftp.c (getftp): Don't close the socket on FTPNSFOD.
3068 1997-01-14 Hrvoje Niksic <hniksic@srce.hr>
3070 * utils.c (strptime): New function.
3071 (strptime): Don't use get_alt_number.
3072 (strptime): Don't use locale.
3073 (match_string): Made it a function.
3075 1997-01-12 Hrvoje Niksic <hniksic@srce.hr>
3077 * http.c (http_atotm): New function.
3078 (http_loop): Use it.
3080 * atotm.c: Removed from the distribution.
3082 * http.c (base64_encode_line): Rewrite.
3084 1997-01-09 Hrvoje Niksic <hniksic@srce.hr>
3086 * ftp.c (getftp): Use ftp_expected_bytes; print size.
3088 * ftp-basic.c (ftp_response): Use ftp_last_respline.
3089 (ftp_expected_bytes): New function.
3091 * ftp.c (getftp): Print the unauthoritative file length.
3093 * ftp-ls.c: Renamed from ftp-unix.c.
3094 (ftp_parse_ls): Moved from ftp.c.
3095 (ftp_parse_unix_ls): Recognize seconds in time spec.
3096 (ftp_parse_unix_ls): Recognize year-less dates of the previous
3099 1997-01-08 Hrvoje Niksic <hniksic@srce.hr>
3101 * ftp-basic.c: Don't declare errno if #defined.
3103 * host.c (ftp_getaddress): Check for sysinfo legally.
3105 1997-01-08 Darko Budor <dbudor@diana.zems.fer.hr>
3107 * connect.c (iread): Use READ.
3109 1996-12-23 Hrvoje Niksic <hniksic@srce.hr>
3111 * url.c: Recognize finger, rlogin, tn3270, mid and cid as valid
3114 1996-12-22 Hrvoje Niksic <hniksic@srce.hr>
3116 * host.c (ftp_getaddress): Allow `.' in hostname.
3118 1996-12-26 Darko Budor <dbudor@zems.fer.hr>
3120 * wget.h: READ and WRITE macros for use instead of read and write
3121 on sockets, grep READ *.c, grep WRITE *.c
3123 * wsstartup.c: new file - startup for winsock
3125 * wsstartup.h: new file
3127 * win32decl.h: new file - fixup for <errno.h> and winsock trouble
3129 * configure.bat: Configure utility for MSVC
3131 * src/Makefile.ms,config.h.ms: new files for use with MSVC 4.x
3133 1996-12-22 Hrvoje Niksic <hniksic@srce.hr>
3135 * version.c: Released 1.4.3-pre.
3137 * utils.c (prnum): Accept long.
3138 (legible): Use prnum().
3140 * connect.c (make_connection): Accept port as short.
3143 * http.c (gethttp): Use search_netrc.
3145 1996-12-21 Hrvoje Niksic <hniksic@srce.hr>
3147 * ftp.c (getftp): Use search_netrc.
3149 * netrc.c (free_netrc): New function.
3151 * init.c (home_dir): New function.
3153 * url.c (convert_links): Allow REL2ABS changes.
3155 1996-12-21 Gordon Matzigkeit <gord@gnu.ai.mit.edu>
3157 * netrc.c: New file.
3158 (parse_netrc, maybe_add_to_list): New functions.
3160 1996-12-17 Hrvoje Niksic <hniksic@srce.hr>
3162 * retr.c (retrieve_url): Reset opt.recursion before calling
3163 ftp_loop if it is reached through newloc.
3165 * init.c (run_wgetrc): Print the wgetrc path too, when reporting
3166 error; don't use "Syntax error", since we don't know if it is
3167 really a syntax error.
3169 1996-12-16 Hrvoje Niksic <hniksic@srce.hr>
3171 * utils.c (acceptable): Extract the filename part of the path.
3173 * recur.c (recursive_retrieve): Call acceptable() with the right
3174 argument; would bug out on wildcards.
3176 * init.c (parse_line): Likewise.
3178 * html.c (htmlfindurl): Cast to char * when calling stuff.
3180 1996-12-15 Hrvoje Niksic <hniksic@srce.hr>
3182 * ftp.c (getftp): Use ftp_pasv.
3184 * ftp-basic.c (ftp_request): Accept NULL value.
3185 (ftp_pasv): New function.
3187 * options.h (struct options): Add passive FTP option.
3189 1996-12-15 Hrvoje Niksic <hniksic@srce.hr>
3191 * url.c (parseurl): Debug output.
3193 * utils.c (path_simplify): New one, adapted from bash's
3194 canonicalize_pathname().
3196 1996-12-14 Hrvoje Niksic <hniksic@srce.hr>
3198 * ftp.c (getftp): Don't discard the buffer.
3200 * retr.c (get_contents): New parameter nobuf.
3202 1996-12-13 Shawn McHorse <riffraff@txdirect.net>
3204 * html.c (htmlfindurl): Recognize <meta contents="d; URL=...".
3206 * init.c (setval): Strip the trailing slashes on CVECDIR.
3208 1996-12-13 Hrvoje Niksic <hniksic@srce.hr>
3210 * init.c: Make excludes and includes under CVECDIR instead of
3213 1996-12-13 Shawn McHorse <riffraff@txdirect.net>
3215 * url.c (get_urls_html): Skip "http:".
3217 1996-12-13 Hrvoje Niksic <hniksic@srce.hr>
3219 * utils.c (strcasecmp): From glibc.
3220 (strncasecmp): Also.
3223 * url.c: Added javascript: to the list of URLs prefixes.
3225 1996-12-12 Shawn McHorse <riffraff@txdirect.net>
3227 * recur.c (retrieve_robots): Print the warning message only if
3230 1996-12-12 Gregor Hoffleit <flight@mathi.uni-heidelberg.DE>
3232 * ftp.c (ftp_retrieve_list): Use NeXT old utime interface.
3234 1996-12-12 Hrvoje Niksic <hniksic@srce.hr>
3236 * systhings.h: New file.
3238 * ../configure.in: Check for utime.h
3240 * ftp.c: Check whether we have unistd.h.
3242 1996-11-27 Hrvoje Niksic <hniksic@srce.hr>
3244 * recur.c (recursive_retrieve): Send the canonical URL as referer.
3245 (recursive_retrieve): Call get_urls_html with the canonical URL.
3247 1996-12-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3249 * (configure.in, config.h.in, src/Makefile.in, src/*.[ch]): Add
3250 ansi2knr support for compilers which don't support ANSI style
3251 function prototypes and signatures.
3253 * (aclocal.m4, src/ansi2knr.c, src/ansi2knr.1): New files.
3255 1996-11-26 Hrvoje Niksic <hniksic@srce.hr>
3257 * url.c: Use it; Recognize paths ending with "." and ".." as
3259 (url_filename): Append .n whenever file exists and could be a
3262 * url.h (ISDDOT): New macro.
3264 * init.c (parse_line): Use unsigned char.
3266 * url.c (get_urls_html): Cast to unsigned char * when calling
3269 * html.c (htmlfindurl): Use unsigned char.
3271 * version.c: Changed version to 1.4.3.
3273 1996-11-25 Hrvoje Niksic <hniksic@srce.hr>
3275 * version.c: Released 1.4.2.
3277 * ftp.c (getftp): Simplified assertion.
3278 (ftp_loop_internal): Remove symlink before downloading.
3279 (ftp_retrieve_list): Unlink the symlink name before attempting to
3282 * options.h (struct options): Renamed print_server_response to
3285 * ftp.c (rel_constr): Removed.
3286 (ftp_retrieve_list): Don't use it.
3287 (ftp_retrieve_list): Use opt.retr_symlinks.
3289 1996-11-24 Hrvoje Niksic <hniksic@srce.hr>
3291 * main.c (main): New option retr_symlinks.
3293 * url.c (convert_links): Print verbose message.
3295 1996-11-24 Hrvoje Niksic <hniksic@srce.hr>
3297 * http.c (http_loop): Reset newloc in the beginning of function;
3298 would cause FMR in retrieve_url.
3300 1996-11-23 Hrvoje Niksic <hniksic@srce.hr>
3302 * recur.c (convert_all_links): Find the URL of each HTML document,
3303 and feed it to get_urls_html; would bug out.
3304 (convert_all_links): Check for l2 instead of dl; removed dl.
3306 * url.c (convert_links): Don't refer to freed newname.
3308 * recur.c (recursive_retrieve): Add this_url to urls_downloaded.
3310 * main.c (main): Print the OS_TYPE in the debug output, too.
3312 * recur.c (recursive_retrieve): Check for opt.delete_after.
3314 * main.c (main): New option delete-after.
3316 * init.c (setval): Cleaned up.
3318 1996-11-21 Hrvoje Niksic <hniksic@srce.hr>
3320 * Makefile.in (wget): Make `wget' the default target.
3322 * ftp.c (ftp_loop_internal): Move noclobber checking out of the
3324 (ftp_retrieve_list): Warn about non-matching sizes.
3326 * http.c (http_loop): Made -nc non-dependent on opt.recursive.
3328 * init.c (setnum): Renamed from setnuminf; New argument flags.
3331 * main.c (main): Sorted the options.
3332 (main): New option --wait.
3334 1996-11-21 Shawn McHorse <riffraff@txdirect.net>
3336 * html.c (htmlfindurl): Reset s->in_quote after getting out of
3339 1996-11-20 Hrvoje Niksic <hniksic@srce.hr>
3341 * version.c: Changed version to 1.4.2.
3343 1996-11-20 Hrvoje Niksic <hniksic@srce.hr>
3345 * version.c: Released 1.4.1.
3347 * html.c (html_quote_string): New function.
3348 (ftp_index): Use it.
3349 (htmlfindurl): A more gentle ending debug message.
3351 * ftp.c (ftp_loop): Check for opt.htmlify.
3353 * init.c: New command htmlify.
3355 * ftp.c (getftp): Nicer error messages, with `'-encapsulated
3357 (ftp_loop): Print size of index.html.
3359 * init.c (setval): Implement "styles".
3361 * main.c (main): New option dotstyle.
3363 1996-11-19 Hrvoje Niksic <hniksic@srce.hr>
3365 * ftp.c (getftp): Close the master socket in case of errors, after
3368 * connect.c (bindport): Initialize msock to -1.
3370 * ftp.c (getftp): Initialize dtsock to -1.
3372 * connect.c (closeport): Don't close sock if sock == -1.
3374 1996-11-18 Hrvoje Niksic <hniksic@srce.hr>
3376 * init.c (setnuminf): Nuked default value -- just leave unchanged.
3377 (setval): Don't send default values.
3378 (defaults): Use DEFAULT_TIMEOUT -- aaargh.
3380 * options.h (struct options): Use long for dot_bytes.
3382 * init.c (setquota): Renamed to setbytes.
3383 (setval): Use setbytes on DOTBYTES.
3385 1996-11-17 Hrvoje Niksic <hniksic@srce.hr>
3387 * ftp.c (getftp): Initialize con->dltime.
3389 * recur.c (recursive_retrieve): Use same_host instead of
3390 try_robots; simply load robots_txt whenever the host is changed.
3391 (recursive_retrieve): Free forbidden before calling parse_robots.
3393 1996-11-16 Hrvoje Niksic <hniksic@srce.hr>
3395 * retr.c (show_progress): Use them.
3397 * options.h (struct options): New options dot_bytes, dots_on_line
3400 1996-11-16 Mark Boyns <boyns@sdsu.edu>
3402 * recur.c (recursive_retrieve): Retrieve directories regardless of
3403 acc/rej rules; check for empty u->file.
3405 1996-11-14 Hrvoje Niksic <hniksic@srce.hr>
3407 * init.c (setval): Use it.
3409 * utils.c (merge_vecs): New function.
3411 * init.c (setval): Reset the list-type functions when encountering
3414 1996-11-14 Shawn McHorse <riffraff@txdirect.net>
3416 * recur.c (recursive_retrieve): Use base_url instead of this_url
3419 1996-11-14 Shawn McHorse <riffraff@txdirect.net>
3421 * html.c (htmlfindurl): Reset s->in_quote after exiting the quote.
3423 1996-11-13 Hrvoje Niksic <hniksic@srce.hr>
3425 * utils.c (sepstring): Rewrote; don't use strtok.
3427 * recur.c (recursive_retrieve): Enter assorted this_url to slist
3428 when running the first time.
3429 (retrieve_robots): Warn to ignore errors when robots are loaded.
3431 * utils.c (load_file): Moved from url.c.
3433 * http.c: Made static variables const too in h* functions.
3435 * main.c (main): Renamed --continue-ftp to --continue.
3437 * recur.c (recursive_retrieve): Use it.
3439 * utils.c (frontcmp): New function.
3441 * url.c (accdir): New function.
3443 * html.c (htmlfindurl): Recognize <area href=...>.
3445 * ftp.c (ftp_retrieve_dirs): Implemented opt.includes.
3447 * init.c (setval): Free the existing opt.excludes and
3448 opt.includes, if available.
3450 * main.c (main): New option -I.
3452 1996-11-12 Hrvoje Niksic <hniksic@srce.hr>
3454 * ftp.c (ftp_retrieve_glob): Do not weed out directories.
3456 * version.c: Changed version to 1.4.1.
3458 1996-11-11 Hrvoje Niksic <hniksic@srce.hr>
3460 * version.c: Released 1.4.0.
3462 1996-11-10 Hrvoje Niksic <hniksic@srce.hr>
3464 * main.c (main): Free com and val after parse_line.
3465 (printhelp): Reorder the listing.
3467 * http.c: More robust header parsing.
3469 * http.c: Allow any number of spaces, or no spaces, precede ':'.
3470 (hskip_lws): New function.
3471 (haccepts_bytes): New function.
3474 * init.c (setval): Check header sanity.
3475 (setval): Allow resetting of headers.
3477 1996-11-10 Hrvoje Niksic <hniksic@srce.hr>
3479 * http.c (http_loop): Don't use has_wildcards.
3481 * http.c (gethttp): Free all_headers -- would leak.
3483 * recur.c (recursive_retrieve): Initialize depth to 1 instead of
3484 0 -- this fixes a long-standing bug in -rl.
3486 1996-11-09 Hrvoje Niksic <hniksic@srce.hr>
3488 * ftp.c: Use -1 as "impossible" value for con->fd.
3490 * url.h (URL_SEPARATOR): Don't treat `*' and `+' as separators.
3492 * init.c (parse_line): Use isalpha.
3494 * ftp-unix.c: Use HAVE_UNISTD_H.
3496 * mtch.c (has_wildcards): Don't match \.
3498 * http.c (http_loop): Warn on HTTP wildcard usage.
3500 1996-11-08 Hrvoje Niksic <hniksic@srce.hr>
3502 * url.c (url_filename): Do not create numbered suffixes if
3503 opt.noclobber -- would bug out on -nc.
3505 1996-11-07 Hrvoje Niksic <hniksic@srce.hr>
3507 * recur.c (parse_robots): Don't chuck out the commands without
3508 arguments (`Disallow:<empty>' didn't work).
3509 (parse_robots): Compare versions lowercase.
3510 (parse_robots): Match on base_version, not version_string!
3511 (parse_robots): Handle comments properly.
3512 (parse_robots): Match versions in a sane way.
3514 * init.c: Print nicer error messages.
3516 * version.c: Changed version to 1.4.0.
3518 1996-11-06 Hrvoje Niksic <hniksic@srce.hr>
3520 * version.c: Released 1.4.0-test2.
3522 * init.c (run_wgetrc): Close fp.
3524 * ftp.c (ftp_retrieve_dirs): Allocate the correct length for
3527 1996-11-06 Hrvoje Niksic <hniksic@srce.hr>
3529 * init.c (setquota): Allow inf as quota specification.
3531 1996-11-05 Hrvoje Niksic <hniksic@srce.hr>
3533 * ftp.c (ftp_retrieve_dirs): Return QUOTEXC if quota exceeded.
3534 (ftp_retrieve_glob): Return QUOTEXC on quota exceeded.
3536 * main.c (main): Check for quota by comparison with downloaded
3537 stuff, not from status.
3539 * connect.c (select_fd): Should compile on HPUX without warnings now.
3541 * ftp.c (ftp_get_listing): Check whether ftp_loop_internal
3544 1996-11-04 Hrvoje Niksic <hniksic@srce.hr>
3546 * ftp.c (ftp_retrieve_glob): Print the pattern nicely.
3547 (getftp): Return FTPRETRINT on control connection error.
3549 * html.c (htmlfindurl): Recognize <embed src=...> and
3551 (ftp_index): Handle username and password correctly.
3553 * main.c (main): Made `-np' a synonim for --no-parent.
3555 1996-11-02 Hrvoje Niksic <hniksic@srce.hr>
3557 * ftp.c (ftp_loop): Check for opt.ftp_glob too before calling
3560 * version.c: Changed version to 1.4.0-test2.
3562 1996-11-02 Hrvoje Niksic <hniksic@srce.hr>
3564 * version.c: Released 1.4.0-test1.
3566 * url.c (str_url): Don't use sprintf when creating %2F-prefixed
3568 (convert_links): Removed definition of make_backup.
3570 * http.h: Removed definition of MAX_ERROR_LENGTH.
3572 * host.c (ftp_getaddress): Check for "(none)" domains.
3574 * ftp.c (ftp_retrieve_dirs): Docfix.
3576 * http.c (gethttp): Use ou->referer instead of u->referer.
3578 * retr.c (retrieve_url): Reset u to avoid freeing pointers twice;
3579 this was known to cause coredumps on Linux.
3581 * html.c (ftp_index): Cast the argument to local_time to time_t *.
3583 1996-11-01 Hrvoje Niksic <hniksic@srce.hr>
3585 * connect.c (select_fd): Use exceptfds -- once and for all.
3587 * retr.c (retrieve_from_file): Free filename after
3589 (retrieve_from_file): Send RFIRST_TIME to recursive_retrieve on
3590 first-time retrieval.
3591 (retrieve_from_file): Return uerr_t; new argument, count.
3592 (retrieve_from_file): Break on QUOTEXC.
3594 * init.c (setquota): Fixed a bug that caused rejection of
3595 non-postfixed values..
3597 1996-10-30 Hrvoje Niksic <hniksic@srce.hr>
3599 * version.c: Changed name to wget.
3601 * connect.c (iread): Smarter use of select.
3602 (select_fd): Set errno on timeout. If not timeout, return 1
3605 1996-10-29 Hrvoje Niksic <hniksic@srce.hr>
3607 * ftp.c (ftp_loop_internal): Don't use con->cmd before
3610 1996-10-26 Hrvoje Niksic <hniksic@srce.hr>
3612 * http.c (gethttp): Send correct referer when using proxy.
3613 (gethttp): Use struct urlinfo ou to access the relevant data; send
3614 correct authorization in all cases.
3616 * host.c (same_host): Use skip_uname to skip username and
3619 * url.c (skip_uname): New function.
3622 * host.c (same_host): Do not assume HTTP -- same_host should now
3623 be totally foolproof.
3625 * url.c (skip_proto): New function.
3626 (parse_uname): Use it.
3628 * http.c (gethttp): Create local user and passwd from what is
3631 * url.c (parseurl): Check for HTTP username and password too.
3633 1996-10-25 Hrvoje Niksic <hniksic@srce.hr>
3635 * config.h.in: Removed #define gethostbyname R...
3637 1996-10-22 Hrvoje Niksic <hniksic@srce.hr>
3639 * version.c: Changed version to 1.4.0-test1.
3641 1996-10-21 Hrvoje Niksic <hniksic@srce.hr>
3643 * version.c: "Released" 1.4b29.
3645 * recur.c (recursive_retrieve): Check for no_parent.
3647 * init.c (setval): Option update.
3649 * main.c (main): New option no-parent.
3651 * options.h (struct options): New variable no_parent.
3653 * recur.c (recursive_retrieve): Only files are checked for
3654 opt.accepts and opt.rejects.
3655 (recursive_retrieve): Check directories for opt.excludes.
3656 (recursive_retrieve): Make the dir absolute when checking
3659 * html.c (htmlfindurl): Recognize <applet code=...> and <script
3662 1996-10-18 Hrvoje Niksic <hniksic@srce.hr>
3664 * ftp.c (getftp): Do not line-break assert entries at all.
3665 (ftp_retrieve_dirs): docfix.
3667 * connect.c (select_fd): Use fd + 1 as nfds.
3669 * version.c: Changed version to 1.4b29.
3671 1996-10-18 Hrvoje Niksic <hniksic@srce.hr>
3673 * version.c: "Released" 1.4b28.
3675 * ftp.c (ftp_loop_internal): Check whether f->size == len and
3676 don't continue the loop if it is.
3677 (ftp_get_listing): Remove list_filename on unsuccesful loop.
3679 1996-10-17 Hrvoje Niksic <hniksic@srce.hr>
3681 * ftp.c (ftp_loop_internal): Use strcpy to initialize tmp.
3682 (getftp): Do not use multiline assert.
3684 * http.c (hparsestatline): Use mjr and mnr instead of major and
3685 minor, which don't compile on Ultrix.
3686 (http_loop): Use strcpy() to initialize tmp.
3688 * all: Geturl -> Fetch
3690 1996-10-17 Hrvoje Niksic <hniksic@srce.hr>
3692 * recur.c (parse_robots): Fixed an off-by-one bug when looking for
3695 * html.c (htmlfindurl): Fixed several possible off-by-one bugs by
3696 moving `bufsize &&' to the beginning of each check in for-loops.
3698 * recur.c (parse_robots): Close fp on exit.
3700 * url.c (mymkdir): Check for each directory before creating.
3702 1996-10-16 Hrvoje Niksic <hniksic@srce.hr>
3704 * version.c: Changed version to 1.4b28.
3706 1996-10-16 Hrvoje Niksic <hniksic@srce.hr>
3708 * version.c: "Released" 1.4b27.
3710 * init.c (parse_line): Use isspace.
3711 (parse_line): Free *com on all errors.
3713 * ftp.c (ftp_loop): Change FTPOK to RETROK before exiting.
3714 (delelement): Use next instead of f->next and prev instead of
3716 (delelement): Free the members of the deleted element.
3718 * http.c (http_loop): Do not return RETROK on code != 20x.
3720 * init.c (cleanup): Free opt.user_header.
3721 (cleanup): Free opt.domains.
3723 * url.c (freelists): Moved to cleanup().
3725 * http.c (hparsestatline): Docfix.
3727 * main.c (main): Return with error status on unsuccesful
3730 * init.c (setval): Do not remove listing when mirroring.
3732 * url.c (url_filename): Use opt.fileprefix.
3734 * ftp.c (ftp_get_listing): Use url_filename to get filename for
3737 * main.c (main): New option: -rn.
3739 1996-10-15 Hrvoje Niksic <hniksic@srce.hr>
3741 * Makefile.in (RM): Added RM = rm -f.
3743 * host.c (clean_hosts): New function.
3744 (free_hlist): Just free the list, no reset.
3746 * version.c: Changed version to 1.4b27.
3748 1996-10-13 Hrvoje Niksic <hniksic@srce.hr>
3750 * version.c: "Released" 1.4b26.
3752 * retr.c (retrieve_from_file): If call get_urls_html with
3753 opt.spider to make it silent in spider mode.
3755 * url.c (str_url): Use CLEANDUP instead of URL_CLEANSE.
3757 * url.h (CLEANDUP): New macro.
3759 * http.c (gethttp): Fixed a bug that freed location only when it
3762 * retr.c (retrieve_url): Free url if it will not be stored,
3763 i.e. newloc is NULL.
3765 * html.c (htmlfindurl): Handle exiting from quotes correctly; the
3766 old version would bug out on <a href="x#a"href="y">.
3768 * html.h (state_t): New member in_quote.
3770 * html.c (htmlfindurl): Free s->attr at the beginning of
3773 * recur.c (recursive_retrieve): Recognize RCLEANUP.
3774 (tried_robots): Make hosts a global variable.
3775 (recursive_retrieve): Free constr after URL host optimization.
3776 (tried_robots): Free urlinfo before exiting.
3778 * utils.c (free_slist): New function.
3780 * recur.c (recursive_retrieve): Use flags to add cleanup
3783 * main.c (main): Free filename after recursive_retrieve.
3785 * http.c (gethttp): Store successful responses too.
3787 1996-10-12 Hrvoje Niksic <hniksic@srce.hr>
3789 * all: Constified the whole source. This required some minor
3790 changes in many functions in url.c, possibly introducing bugs -- I
3793 * ftp-basic.c: Removed last_respline.
3795 * http.c (gethttp): Free type.
3797 * host.c (same_host): Free real1 and real2.
3799 * main.c (main): New option --spider.
3801 * retr.c (get_contents): Don't reset errno.
3803 * main.c (main): Sorted the options.
3805 * connect.c (iread): Set errno to ETIMEDOUT only if it was left
3806 uninitialized by select().
3808 * http.c (http_loop): Print the time when the connection is
3810 (gethttp): Debug-print the HTTP request.
3812 1996-10-11 Hrvoje Niksic <hniksic@srce.hr>
3814 * connect.c (iread): Do not try reading after timeout.
3816 * main.c (main): Would bug out on -T.
3818 * connect.c (select_fd): Do not use exceptfds.
3819 (iread): Set ETIMEDOUT on select_fd <= 0.
3821 * version.c: Changed version to 1.4b26.
3823 1996-10-10 Hrvoje Niksic <hniksic@srce.hr>
3825 * version.c: "Released" 1.4b25.
3827 * ftp-unix.c (ftp_parse_unix_ls): Ignore lines without file name
3830 * http.c (gethttp): Add errcode to struct hstat.
3831 (http_loop): Use it.
3833 * url.c (no_proxy_match): Simplify using char** for no_proxy.
3835 * options.h (struct options): Make opt.no_proxy a vector.
3837 * utils.c (sepstring): Use !*s instead of !strlen(s).
3839 * init.c (setval): Set opt.maxreclevel to 0 on --mirror.
3840 (getperms): Use ISODIGIT instead of isdigit.
3842 * ftp.c (getftp): Print time.
3844 * main.c (main): Use legible output of downloaded quantity.
3846 * ftp.c (getftp): Use elapsed_time().
3847 (ftp_loop_internal): Use rate().
3849 * http.c (http_loop): Add download ratio output; Use rate().
3851 * utils.c (rate): New function.
3853 1996-10-09 Hrvoje Niksic <hniksic@srce.hr>
3855 * http.c (http_loop): Use timer.
3857 * ftp.c: Split to ftp-basic.c and ftp.c
3859 * utils.c (reset_timer): New function.
3860 (elapsed_time): New function.
3862 * retr.c (show_progress): Make bytes_in_line and offs long; should
3863 work on 16-bit machines.
3865 1996-10-08 Hrvoje Niksic <hniksic@srce.hr>
3867 * url.c (in_acclist): New argument backward.
3869 * ftp.c (ftp_retrieve_glob): Use acceptable() to determine whether
3870 a file should be retrieved according to suffix.
3871 (ftp_get_listing): Check the return value of unlink; Do not call
3872 ftp_retrieve_dirs if depth reached maxreclevel.
3873 (ftp_retrieve_dirs): Check whether the directory is in
3876 * main.c (main): Print the version number at the beginning of
3878 (main): Use strrchr when creating exec_name.
3880 * ftp.c (ftp_retrieve_glob): Do not close control connection.
3882 * version.c: Changed version to 1.4b25.
3884 1996-10-07 Hrvoje Niksic <hniksic@srce.hr>
3886 * version.c: "Released" 1.4b24.
3888 * Makefile.in: Rewrite.
3890 * ftp.c (ftp_loop_internal): Likewise.
3892 * retr.c (time_str): Check for failed time().
3894 * html.c (htmlfindurl): Recognize <fig src> and <overlay src> from
3897 * retr.c (time_str): Return time_t *.
3899 * connect.c (bindport): Close msock on unsuccesful bind.
3900 (bindport): The same for getsockname and listen.
3902 * retr.c (retrieve_url): Allow any number of retries on
3905 * http.c (gethttp): Do not treat errno == 0 as timeout.
3906 (http_loop): Likewise.
3907 (http_loop): Cosmetic changes.
3909 * connect.c (iread): Set errno to ETIMEDOUT in case of timeout.
3911 * retr.c (get_contents): Reset errno.
3913 * ftp.c (getftp): Minor fixes.
3915 1996-10-06 Hrvoje Niksic <hniksic@srce.hr>
3917 * http.c: Do not use backups.
3919 * geturl.1 (WARNING): Warn that man-page could be obsolete.
3921 * getopt.c (getopt_long): Moved to getopt.c
3923 * geturl.texi: Enhanced.
3925 * main.c (main): Use it.
3927 * recur.c (convert_all_links): New function.
3929 * utils.c (add_slist): New argument flags.
3931 * recur.c (recursive_retrieve): Update a list of downloaded URLs.
3932 (parse_robots): Do not chuck out empty value fields.
3933 (parse_robots): Make yourself welcome on empty Disallow.
3935 * version.c: Changed version to 1.4b24.
3937 1996-10-06 Hrvoje Niksic <hniksic@srce.hr>
3939 * version.c: "Released" 1.4b23.
3941 * ftp.c (ftp_loop_internal): Get the time after getftp.
3943 * Makefile.in (install.info): New target.
3946 * http.c (http_loop): Fix output when doing -O.
3948 1996-10-05 Hrvoje Niksic <hniksic@srce.hr>
3950 * geturl.texi: New file.
3952 * main.c (main): Do not print the warnings and download summary if
3955 * version.c: Changed version to 1.4b23.
3957 1996-10-05 Hrvoje Niksic <hniksic@srce.hr>
3959 * "Released" 1.4b22.
3961 * atotm.c (atotm): Use True and False instead of TRUE and FALSE,
3962 to avoid redefinition warnings.
3964 * host.c (store_hostaddress): Use memcpy() to copy the address
3965 returned by inet_addr.
3967 * version.c: Changed version to 1.4b22.
3969 1996-10-04 Hrvoje Niksic <hniksic@srce.hr>
3971 * version.c: "Released" 1.4b21.
3973 * ftp-unix.c (ftp_parse_ls): Renamed to ftp_parse_unix_ls.
3975 * ftp.c (ftp_port): Use conaddr.
3976 (getftp): Print the file length.
3977 (ftp_retrieve_list): Check the stamps of plain files only.
3979 * connect.c (closeport): Do not call shutdown().
3980 (conaddr): New function.
3982 * html.c (ftp_index): Made it dfp-aware.
3984 * init.c (cleanup): New name of freemem. Close opt.dfp.
3986 * ftp.c (getftp): Use opt.dfp if it is set.
3988 * ftp-unix.c (ftp_parse_ls): Recognize time in h:mm format.
3990 * ftp.c (ftp_retrieve_dirs): Fixed a bug that caused incorrect
3991 CWDs to be sent with recursive FTP retrievals.
3993 1996-10-03 Hrvoje Niksic <hniksic@srce.hr>
3995 * recur.c (parse_robots): Made it more compliant with "official"
3998 * http.c: New function.
4000 * ftp-unix.c (ftp_parse_ls): Added better debug output.
4002 * ftp.c (getftp): Print out the LIST in case of
4003 opt.print_server_response.
4005 * version.c: Changed version to 1.4b21.
4007 1996-10-01 Hrvoje Niksic <hniksic@srce.hr>
4009 * version.c: "Released" 1.4b20.
4013 * http.c (gethttp): Preset lengths of various headers instead of
4014 calculating them dynamically.
4015 (gethttp): Check for 206 partial contents.
4017 1996-09-30 Hrvoje Niksic <hniksic@srce.hr>
4019 * configure.in: Set SYSTEM_GETURLRC to $libdir/geturlrc
4021 * http.c (gethttp): Send the port number in the Host: header.
4023 1996-09-29 Hrvoje Niksic <hniksic@srce.hr>
4025 * http.c (gethttp): Send host: header.
4026 (gethttp): Add the possibility of user-defined headers.
4027 (gethttp): Move decision about pragma: no-cache to http_loop,
4029 (gethttp): Pass a struct instead of enormous argument list.
4030 (http_loop): Use a new, fancier display format.
4031 (ftp_loop): Likewise.
4033 * main.c: (hangup): Turn off buffering of the new log file.
4035 * install-sh: Likewise.
4037 * config.sub: Replace with the one in autoconf-2.10
4041 * init.c: New options httpuser and httppasswd.
4043 * http.c: (base64_encode_line): New function.
4044 (gethttp): Send authentication.
4046 * connect.c (make_connection): Use store_hostaddress.
4048 1996-09-28 Hrvoje Niksic <hniksic@srce.hr>
4050 * host.c (store_hostaddress): New function.
4054 * http.c (hgetrange): New function.
4055 (gethttp): Use ranges.
4057 * utils.c (numdigit): Accept long instead of int.
4059 * http.c (http_loop): Add restart capabilities.
4061 * ftp.c (ftp_retrieve_glob): Fixed a bug that could cause matchres
4062 being used uninitialized.
4063 (ftp_retrieve_list): Similar fix.
4065 * host.c (add_hlist): Fixed a bug that could cause cmp being used
4068 * url.c (construct_relative): New function.
4070 * recur.c (recursive_retrieve): Use it.
4072 * retr.c (convert_links): New function.
4074 1996-09-27 Hrvoje Niksic <hniksic@srce.hr>
4076 * url.c (free_urlpos): New function.
4078 * recur.c (recursive_retrieve): Adapt.
4080 * url.c (get_urls_html): Return a linked list instead of a vector.
4082 * url.c (get_urls_file): Return a linked list instead of a vector.
4086 * http.c (gethttp): Implement it.
4088 * init.c (setval): New option: SAVEHEADERS
4090 * ftp.c (ftp_loop_internal): Do not set restval if listing is to
4091 be retrieved. Lack of this test caused bugs when the connection
4092 was lost during listing.
4094 * retr.c (retrieve_url): Fixed a bug that caused
4095 coredumps. *newloc is now reset by default.
4096 (retrieve_url): Lift the twenty-tries limit on proxies.
4098 * version.c: Changed version to 1.4b20.
4100 1996-09-20 Hrvoje Niksic <hniksic@srce.hr>
4102 * version.c: "Released" 1.4b19.
4104 1996-09-19 Hrvoje Niksic <hniksic@srce.hr>
4106 * ftp.c (ftp_loop_internal): Renamed from ftp_1fl_loop.
4107 (getftp): Changed prototype to accept ccon *.
4109 1996-09-17 Hrvoje Niksic <hniksic@srce.hr>
4111 * ftp.c (ftp_retrieve_list): Fixed a bug that caused setting
4112 incorrect values to files pointed to by symbolic links.
4113 (ftp_1fl_loop): Do not count listings among the downloaded URL-s.
4115 1996-09-16 Hrvoje Niksic <hniksic@srce.hr>
4117 * url.c (mkstruct): Do not prepend "./" in front of a pathname.
4119 * main.c (main): New option: --user-agent.
4125 * init.c (setval): Ditto.
4127 * main.c (main): Rename "server-headers" to "server-response".
4129 * ftp-unix.c (ftp_parse_ls): Check for asterisks at the end of
4130 executables in 'ls -F' listings.
4132 1996-09-15 Hrvoje Niksic <hniksic@srce.hr>
4134 * url.c (parseurl): Remove realloc() and sprintf().
4135 (str_url): Get rid of sprintf().
4137 * recur.c (recursive_retrieve): Enable FTP recursion through proxy
4140 * url.h (URL_CLEANSE): Made it else-resistant.
4141 (USE_PROXY): New macro.
4143 1996-09-14 Hrvoje Niksic <hniksic@srce.hr>
4147 * version.c: Changed version to 1.4b19.
4149 1996-09-14 Hrvoje Niksic <hniksic@srce.hr>
4151 * version.c: "Released" 1.4b18.
4153 * url.c: Made it reallocate space exponentially.
4155 1996-09-14 Drazen Kacar <dave@fly.cc.fer.hr>
4157 * html.c (htmlfindurl): Added <frame src> and <iframe src> among
4158 the list of stuff to fetch.
4160 1996-09-13 Hrvoje Niksic <hniksic@srce.hr>
4162 * url.c (get_urls_html): Fixed a bug that caused SIGSEGV's with
4165 * html.c (htmlfindurl): Rewrite.
4167 * http.c (gethttp): Use opt.proxy_cache.
4169 * main.c (main): Added --cache option.
4171 * ftp.c (ftp_response): Print server response if opt.print_server
4173 (getftp): Print newlines after each request if the server response
4175 (ftp_response): Copy the last response line to last_respline.
4177 * http.c (gethttp): Add Pragma: nocache for retried
4180 * ftp.c (getftp): Use it.
4182 * retr.c (buf_discard): New function.
4184 * ftp.c (ftp_response): Use buf_readchar().
4185 (getftp): Flush the control connection buffer before calling
4188 * retr.c (buf_readchar): New function.
4189 (buf_flush): New function.
4190 (get_contents): Use buf_readchar() instead of read(x, x, 1).
4191 (get_contents): Use buf_flush.
4193 1996-09-12 Hrvoje Niksic <hniksic@srce.hr>
4195 * ftp.c: Incorporate changes to ftp_response.
4197 * ftp.c (ftp_response): Allocate the server response dynamically,
4198 as in read_whole_line and fetch_next_header.
4200 * utils.c (read_whole_line): Fixed a bug that prevented reading
4201 the last line if it is not \n-terminated. Also fixed a possible
4204 * http.c (fetch_next_header): Return malloc-ed string as large as
4206 (gethttp): Use new fetch_next_header.
4208 1996-09-12 Hrvoje Niksic <hniksic@srce.hr>
4210 * http.c (hgetlen): Compute the header length the first time only.
4212 (hgetlocation): Ditto.
4213 (hgetmodified): Ditto.
4215 1996-09-11 Hrvoje Niksic <hniksic@srce.hr>
4217 * sample.geturlrc: Update.
4219 1996-09-10 Hrvoje Niksic <hniksic@srce.hr>
4221 * http.c (http_loop): Ditto.
4223 * ftp.c (getftp): Open the output file as binary.
4225 * version.c: Changed version to 1.4b18.
4227 1996-09-10 Hrvoje Niksic <hniksic@srce.hr>
4229 * version.c: "Released" 1.4b17.
4231 * ftp-unix.c (ftp_parse_ls): If unable to open file, return NULL
4232 instead of failed assertion.
4234 1996-09-09 Hrvoje Niksic <hniksic@srce.hr>
4236 * ftp.c (ftp_get_listing): Add a numbered suffix to LIST_FILENAME
4237 if a file of that name already exists.
4239 1996-09-05 Hrvoje Niksic <hniksic@srce.hr>
4241 * ftp.c (ftp_1fl_loop): Handler FTPPORTERR and FOPENERR correctly.
4243 * config.h.in: Define gethostbyname as Rgethostbyname when using
4246 * configure.in: Check for -lresolv if using Socks.
4248 * version.c: Changed version to 1.4b17.
4250 1996-07-15 Hrvoje Niksic <hniksic@srce.hr>
4252 * version.c: "Released" 1.4b16.
4254 * http.c (gethttp): More intelligent check for first line of HTTP
4256 (gethttp): Would bug out on time-stamping.
4258 * version.c: Changed version to 1.4b16.
4260 1996-07-11 Hrvoje Niksic <hniksic@srce.hr>
4262 * version.c: Released 1.4b15.
4264 * http.c (http_loop): Print \n after the loop entry, not before.
4266 * url.c (url_filename): Use ISDOT.
4268 * url.h (ISDOT): New macro.
4270 * recur.c (recursive_retrieve): Change only opt.recursive for
4273 1996-07-11 Antonio Rosella <antonio.rosella@agip.it>
4275 * socks/geturl.cgi: Fixed version No.
4277 * socks/download-netscape.html: Ditto.
4279 * socks/download.html: Changed socks.html to download.html.
4281 1996-07-11 Hrvoje Niksic <hniksic@srce.hr>
4283 * url.c (url_filename): Check for opt.dirstruct instead for
4284 opt.recursive && opt.dirstruct.
4286 * init.c (defaults): Ditto.
4287 (defaults): Reset dirstruct by default.
4288 (setval): Set opt.dirstruct whenever setting recursive.
4290 * init.h: Removed FORCEDIRHIER.
4292 * INSTALL: Added -L to socks-description.
4294 * version.c: Changed version to 1.4b15.
4296 1996-07-10 Hrvoje Niksic <hniksic@srce.hr>
4298 * version.c: "Released" 1.4b14.
4300 * geturl.1: Update AUTHOR to include Rosella as contributor.
4304 * socks/geturl.cgi: Simplified command creation, nuked <blink>.
4306 * socks/geturl.cgi: Wrap nutscape extensions within if $netscape.
4307 (cal_time): Fix == to eq.
4309 * socks/geturl.cgi: GPL-ized with permission of A. Rosella.
4311 * geturl.1 (hostname): Moved URL CONVENTIONS to the beginning.
4313 * Makefile.in: Use @VERSION@.
4315 * configure.in: Check version from version.c.
4317 * socks/geturl.cgi: Changed /pub/bin/perl to /usr/bin/perl.
4319 * socks/download.html: Created from download-netscape.html, made
4322 * recur.c (recursive_retrieve): Set opt.force_dir_hier when
4323 following FTP links from recursions.
4325 1996-07-09 Hrvoje Niksic <hniksic@srce.hr>
4327 * url.c (mymkdir): Fixed a bug that prevented mymkdir() to create
4328 absolute directories correctly.
4330 * version.c: Changed version to 1.4b14.
4332 1996-07-09 Hrvoje Niksic <hniksic@srce.hr>
4334 * version.c: "Released" 1.4b13.
4336 * url.c (make_backup): New function.
4338 * http.c (http_loop): Make a backup copy of the local file (using
4339 rename(2)) before opening it.
4341 * main.c (main): Added --backups.
4343 * host.c (ftp_getaddress): Bail out on failed mycuserid().
4344 (ftp_getaddress): Check for leading dot on MY_DOMAIN.
4345 (ftp_getaddress): Check for empty, null or (null) domain.
4347 * url.c (get_urls_html): If this_url is NULL, the base must have a
4349 (parseurl): Use has_proto.
4351 * retr.c (retrieve_url): Warn when proxy is used with more than 20
4354 * url.c (mkstruct): Create the directory (calling mymkdir()) only
4355 if it is not already there.
4356 (has_proto): New function.
4357 (get_urls_html): Eliminate the remaining call to findurl -- use
4362 * main.c: Change -X to -x.
4364 * url.c (url_filename): Simplify creation of filename if
4365 prefix_files is set.
4366 (url_filename): Simplify everything. And I do mean *everything*.
4367 (mkstruct): Add dir_prefix before hostname.
4368 (path_simplify): Fixed a bug that caused writing outside the path
4369 string in case of "." and ".." path strings.
4371 1996-07-06 Hrvoje Niksic <hniksic@srce.hr>
4373 * init.c: Added --mirror.
4375 * main.c (main): Added -X to force saving of directory hierarchy.
4377 * ftp.c (ftp_retrieve_list): Added recursion depth counter.
4378 (ftp_retrieve_list): Check whether quota is exceeded.
4380 * url.c (get_urls_html): Skip leading blanks for absolute URIs.
4382 * http.c (gethttp): Use referer if present.
4384 * recur.c (recursive_retrieve): Set u->referer before calling
4387 * url.c (newurl): Use memset to nullify the struct members.
4388 (freeurl): Free the referer field too.
4390 * url.h: Added referer to urlinfo.
4392 * geturl.1: Updated the manual to document some of the new features.
4394 * utils.c (numdigit): Moved from url.c.
4396 * README: Rewritten.
4398 * config.h.in: Add the support for socks.
4400 * configure.in: Add the support for socks.
4402 * url.c (url_filename): If the dir_prefix is ".", work with just
4404 (url_filename): Do not look for .n extensions if timestamping if
4407 * retr.c (show_progress): Skip the over-abundant restval data, and
4408 print the rest of it with ',' instead of '.'.
4410 1996-07-05 Hrvoje Niksic <hniksic@srce.hr>
4412 * retr.c (show_progress): Changed second arg. to long (as it
4414 (show_progress): Moved to retr.c.
4415 (get_contents): Moved to retr.c.
4417 * version.c: Change version to 1.4b13.
4419 1996-07-05 Hrvoje Lacko <hlacko@fly.cc.fer.hr>
4421 * url.c (in_acclist): Would return after the first suffix.
4423 1996-07-04 Hrvoje Niksic <hniksic@srce.hr>
4425 * version.c: "Released" 1.4b12.
4427 * url.c (path_simplify): More kludgifications.
4428 (get_urls_html): Use new parameters for htmlfindurl.
4430 * html.c: Removed memorizing "parser states", since the new
4431 organization does not require them.
4433 * init.c (run_geturlrc): Use read_whole_line.
4435 * ftp-unix.c (ftp_parse_ls): Use read_whole_line.
4437 * recur.c (parse_robots): Use read_whole_line.
4439 * utils.c (read_whole_line): New function.
4441 * recur.c (tried_robots): Use add_slist/in_slist, *much* cleaner.
4443 * host.c (ngethostbyname): Call inet_addr just once. Yet to be
4444 tested on OSF and Ultrix.
4445 (add_hlist): New function.
4446 (free_hlist): New function.
4447 (search_host): New function.
4448 (search_address): New function.
4449 (realhost): Use search_host, search_address and add_hlist.
4450 (same_host): Replaced realloc() with strdupdelim(), made
4451 case-insensitive, fixed a memory leak.
4453 * html.c (ftp_index): Fixed tm_min and tm_sec to be tm_hour and
4454 tm_min, like intended.
4456 * version.c: Change user agent information to
4459 1996-07-03 Hrvoje Niksic <hniksic@srce.hr>
4461 * utils.c: Renamed nmalloc.c to utils.c, .h likewise.
4463 * url.c (acceptable): Always accept directories.
4465 * ftp-unix.c (ftp_parse_ls): Support brain-damaged "ls -F"-loving
4466 servers by stripping trailing @ from symlinks and trailing / from
4469 * ftp.c (ftp_loop): Debugged the "enhanced" heuristics. :-)
4471 * url.c (skip_url): Use toupper instead of UCASE.
4473 * host.c (sufmatch): Made it case-insensitive.
4475 * url.c (match_backwards_or_pattern): Fixed i == -1 to j == -1.
4476 (match_backwards): New function, instead of
4477 match_backwards_or_pattern.
4479 * recur.c (recursive_retrieve): Increased performance by
4480 introducing inl, which reduces number of calls to in_slist to only
4483 * ftp.c (ftp_loop): Enhanced the heuristics that decides which
4486 * main.c (printhelp): Removed the warranty stuff.
4488 1996-07-02 Hrvoje Niksic <hniksic@srce.hr>
4490 * url.c (add_slist): Simplify.
4491 (match_backwards_or_pattern): New function.
4492 (in_acclist): Use match_backwards_or_pattern.
4495 1996-06-30 Hrvoje Niksic <hniksic@srce.hr>
4497 * ftp.c (ftp_loop): Call ftp_index on empty file names, if not
4500 * html.c (ftp_index): Fixed to work. Beautified the output.
4502 * ftp.c (ftp_retrieve_glob): Another argument to control whether
4503 globbing is to be used.
4504 (ftp_retrieve_list): Compare the time-stamps of local and remote
4505 files to determine whether to download.
4507 1996-06-29 Hrvoje Niksic <hniksic@srce.hr>
4509 * ftp.c (rel_constr): New function.
4511 * retr.c (retrieve_from_file): Check for text/html before
4512 retrieving recursively.
4514 * main.c (main): Check whether the file is HTML before going into
4515 recursive HTML retrieving.
4517 * ftp.c (ftp_retrieve_list): Manage directories.
4518 (ftp_retrieve_glob): Pass all the file-types to ftp_retrieve_list.
4519 (ftp_1fl_loop): Fixed a bug that caused con->com to be incorrectly
4520 initialized, causing bugchecks in getftp to fail.
4522 * configure.in: Check for symlink.
4524 * ftp.c (ftp_retrieve_list): Added support for symlinks.
4526 * version.c: "Released" 1.4b10.
4528 * atotm.c (atotm): Redeclared as time_t.
4530 * init.c: New variable "timestamping".
4532 * main.c (main): New option 'N'.
4534 * http.c (hgetlocation): Case-insensitive match.
4535 (hgetmodified): New function.
4536 (http_loop): Implement time-stamping.
4538 1996-06-28 Hrvoje Niksic <hniksic@srce.hr>
4540 * version.c: Changed version to 1.4b10
4542 * atotm.c: New file, from phttpd.
4544 * options.h (struct options): New parameter timestamping.
4546 * version.c: 1.4b9 "released".
4548 * recur.c (recursive_retrieve): Used linked list (ulist) for
4549 faster storing of URLs.
4551 * url.c (get_urls_html): Removed the old kludge with comparing the
4552 outputs of htmlfindurl and findurl.
4553 (get_urls_html): Added better protocol support here.
4554 (create_hash): Removed, as well as add_hash and in_hash.
4555 (addslist): New function.
4558 * version.c: Released 1.4b8, changed version to b9.
4560 1996-06-27 Hrvoje Niksic <hniksic@srce.hr>
4562 * ftp.c (freefileinfo): New function.
4563 (delelement): New function.
4567 * ftp.c (ftp_loop): Use ccon.
4568 (ftp_retrieve_glob): Likewise.
4570 * ftp.h: Define ccon, to define status of control connection.
4572 * ftp.c (ftp_get_listing): New function.
4573 (ftp_retrieve_more): New function.
4574 (ftp_retrieve_glob): New function.
4576 1996-06-25 Hrvoje Niksic <hniksic@srce.hr>
4578 * configure.in: Removed the search for cuserid().
4580 * init.c (getmode): Renamed to getperms.
4582 1996-06-24 Hrvoje Niksic <hniksic@srce.hr>
4584 * version.c: New version.
4586 * main.c (hangup): New function, that handles hangup. Hangup
4587 signal now causes geturl to stop writing on stdout, and to write
4590 * ftp.c (getftp): "Released" 1.4b7.
4592 * html.c (htmlfindurl): Ignore everything inside <head>...</head>.
4593 (ftp_index): Use fileinfo/urlinfo.
4595 * ftp-unix.c (ftp_parse_ls): New function.
4596 (symperms): New function.
4598 * ftp.c (ftp_1fl_loop): New function, to handle 1-file loops.
4600 * retr.c (retrieve_url): Added FTP support.
4602 1996-06-23 Hrvoje Niksic <hniksic@srce.hr>
4604 * geturl.h: Removed NOTFTP2HTML enum.
4605 Added DO_LOGIN, DO_CWD and DO_LIST. LIST_ONLY is obsolete.
4607 * ftp.c (getftp): Resynched with urlinfo.
4608 (getftp): Removed HMTL-ization of index.html from getftp.
4610 * version.c: 1.4b6 "released".
4612 * options.h (options): New struct, to keep options in.
4614 * http.c (http_loop,gethttp): Synched with proxy.
4616 * retr.c (retrieve_url): Implemented proxy retrieval.
4618 * main.c (main): Use retrieve_from_file.
4620 1996-06-22 Hrvoje Niksic <hniksic@srce.hr>
4622 * retr.c (retrieve_from_file): New function.
4624 * url.c (parseurl): Modified to return URLOK if all OK. Protocol
4625 can be found in u->proto.
4627 * ftp.c (ftp_response): Fixed to accept multi-line responses as
4630 * recr.c (recursive_retrieve): Take newloc from retrieve_url.
4632 * url.c (mymkdir): Removed the file of the same name, if one
4634 (isfile): New function.
4635 (mkstruct): Fixed the '/' glitches.
4636 (path_simplify): Hacked to treat something/.. correctly.
4638 1996-06-21 Hrvoje Niksic <hniksic@srce.hr>
4640 * http.c (gethttp): Close the socket after error in headers.
4641 (http_loop): HEOF no longer a fatal header.
4643 * loop.c (retrieve_url): When dt is NULL, do not modify it. This
4644 simplifies the syntax of calling retrieve_url.
4646 * recr.c (recursive_retrieve): Modified to use get_urls_html.
4648 * url.c (get_urls_file): New function.
4649 (get_urls_html): New function.
4651 * recr.c (recursive_retrieve): Patched up to conform to the
4654 * http.c (gethttp): Synched with the rest...
4655 (gethttp): Treat only CONREFUSED specially, with connection
4658 * init.c,geturl.1,http.c (http_loop): Removed kill_error.
4660 1996-06-20 Hrvoje Niksic <hniksic@srce.hr>
4662 * http.c (http_loop): New function.
4664 * loop.c: Removed *lots* of stuff from retrieve_url.
4666 * url.c (parseurl): Changed to work with urlinfo. Integrated
4667 username finding and path parsing.
4668 (newurl): New function.
4669 (freeurl): New function.
4670 (mkstruct): Removed the old bogosities, made it urlinfo-compliant.
4671 (url_filename): Likewise.
4672 (path_simplify): Accept relative paths too.
4673 (opt_url): Made urlinfo-compliant, removed bogosities.
4674 (path_simplify): Expanded to accept relative paths.
4675 (str_url): A replacement for hide_url
4676 (decode_string): Fixed a bug that caused malfunctioning when
4677 encountering an illegal %.. combination.
4678 (opt_url): Removed the argument. Dot-optimizations are now default.
4680 * nmalloc.c (strdupdelim): New function.
4682 * url.h: Added the urlinfo structure
4684 1996-06-19 Hrvoje Niksic <hniksic@srce.hr>
4686 * url.c (hide_url): Thrown out the protocol assertion. Do not
4687 change the URL if the protocol if not recognized.
4688 (findurl): Put continue instead of break.
4690 1996-06-18 Hrvoje Niksic <hniksic@srce.hr>
4692 * sample.geturlrc: Changed the defaults to be commented out and
4693 harmless (previous defaults caused pains if copied to
4696 * http.c (gethttp): Print the HTTP request in debug mode.
4698 * connect.c (iread): Added EINTR check loop to select-ing
4699 too. EINTR is now correctly handled with select().
4703 1996-05-07 Hrvoje Niksic <hniksic@srce.hr>
4705 * host.c (same_host): Made the function a little bit more
4706 intelligent regarding diversified URL syntaxes.
4708 * url.c (skip_url): Spaces are now skipped after URL:
4710 * Released 1.3.1 with the patch to prevent crashing when sending
4711 NULL to robot* functions and the patch to compile "out of the box"
4714 * recr.c (recursive_retrieve): Added checking whether this_url is
4715 NULL when calling the robot functions.
4717 * ChangeLog: New file.