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