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