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