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