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