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