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