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