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