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