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