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