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