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