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