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