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