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