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