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