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