]> sjero.net Git - wget/blob - src/ChangeLog
[svn] Here're the changes we agreed to on the wget mailing list regarding the
[wget] / src / ChangeLog
1 2001-01-06  Dan Harkless  <wget@harkless.org>
2
3         * ChangeLog: The '[Not in 1.6 branch.]'s were decided not to be
4         the best way to go about my aim.  Removed them in favor of:
5
6         * ChangeLog-branches/1.6_branch.ChangeLog: New file.
7
8 2001-01-04  Hrvoje Niksic  <hniksic@arsdigita.com>
9
10         * url.c (replace_attr): New function, to be used by both
11         TO_COMPLETE and TO_RELATIVE case in convert_links.
12         (find_fragment): New function for finding URL fragments.
13         (replace_attr): Better handle the case where the original string
14         is not quoted.  Use find_fragment.
15         (convert_links): Use replace_attr().
16
17 2000-12-18  Csaba Raduly  <csaba.raduly@sophos.com>
18
19         * sysdep.h: Include <malloc.h> and <io.h> under Watcom.
20
21 2000-12-31  Dan Harkless  <wget@harkless.org>
22
23         * ChangeLog: Since this flat file doesn't have multiple branches,
24         looking at the dates would make you think that things went into
25         1.6 that actually just went into the 1.7-dev branch.  Added "[Not
26         in 1.6 branch.]" where appropriate to clarify.
27         
28 2000-12-30  Dan Harkless  <wget@harkless.org>
29
30         * ftp.c, http.c:  Applied Hack Kampbjørn <hack@hackdata.com>'s
31         patch to deal with h_errno not being defined in netdb.h under Cygwin.
32
33 2000-12-17  Igor Khristophorov  <igor@atdot.org>
34
35         * http.c (check_end): Fix test for '+' or '-'.
36
37 2000-12-17  Hrvoje Niksic  <hniksic@arsdigita.com>
38
39         * url.c (parseurl): Rename inner loop var from i to ind to avoid
40         clash with the function top-level-declared variable i.
41         (str_url): Likewise, rename inner-loop i to j.
42
43         * recur.c (parse_robots): Don't declare LEN at top of function.
44         (robots_match): Renamed parameter FORBIDDEN to avoid hiding of
45         global variable.
46
47         * main.c (main): Change erroneous use of bitwise and to logical.
48
49         * init.c (cmd_address): Don't heap-allocate `sin'; it can be on
50         the stack because it will be copied to closure.
51
52         Thanks to Csaba Raduly's run of PC-LINT over the sources.
53
54 2000-12-17  Hrvoje Niksic  <hniksic@arsdigita.com>
55
56         * http.c (basic_authentication_encode): Use xmalloc(), not
57         malloc().  Thanks to Csaba Raduly's run of PC-LINT over the
58         sources.
59
60 2000-12-17  Csaba Raduly  <csaba.raduly@sophos.com>
61
62         * sysdep.h: Test for __EMX__ rather than for EMXOS2 for OS/2
63         compilation.
64
65 2000-12-17  Hrvoje Niksic  <hniksic@arsdigita.com>
66
67         * mswindows.c: Include <errno.h>.
68
69         * gen_sslfunc.c: Include <errno.h>.
70
71         * ftp-basic.c: Don't attempt to declare errno or h_errno because
72         they're not used.
73
74         * main.c: Include <errno.h> because errno is used.
75
76         * ftp.c: Ditto.
77
78         * http.c: Include <netdb.h> for h_errno.
79
80 2000-12-13  Hrvoje Niksic  <hniksic@arsdigita.com>
81
82         * html-parse.c (advance_declaration): MSVC assert() chokes on
83         '\"'.  Use '"' instead.
84
85 2000-12-11  Hrvoje Niksic  <hniksic@arsdigita.com>
86
87         * utils.c (xfree_real): Removed.
88         (xfree_debug): Just call free().
89
90         * wget.h (xfree): Make it an alias for free.
91
92 2000-12-11  Hrvoje Niksic  <hniksic@arsdigita.com>
93
94         * http.c (http_loop): Furthermore, touch output_document only if
95         it is known to be an existing regular file.
96
97 2000-12-11  Hrvoje Niksic  <hniksic@arsdigita.com>
98
99         * ftp.c (ftp_retrieve_list): Ditto.
100
101         * http.c (http_loop): Touch output_document if that is used for
102         output.
103
104 2000-12-06  Hrvoje Niksic  <hniksic@arsdigita.com>
105
106         * http.c: Include gen_sslfunc.h after including Wget's headers.
107         (persistent_available_p): Needed coma before `int ssl'.
108
109 2000-12-06  Hrvoje Niksic  <hniksic@arsdigita.com>
110
111         * ftp.c (ftp_loop_internal): Ditto.
112
113         * http.c (http_loop): Use it.
114
115         * retr.c (sleep_between_retrievals): New function that handles the
116         logic of opt.wait and opt.waitretry.
117
118 2000-12-06  Hrvoje Niksic  <hniksic@arsdigita.com>
119
120         * rbuf.h: Implement only a single version of RBUF_READCHAR, using
121         rbuf_read_bufferful when the buffer is depleted.
122
123         * rbuf.c (rbuf_read_bufferful): New function.
124
125 2000-12-06  Hrvoje Niksic  <hniksic@arsdigita.com>
126
127         * gen_sslfunc.h: Use ansi2knr style function declarations.
128
129         * gen_sslfunc.c: Reformat according to the GNU coding standards.
130         More should be done.
131
132         * http.c (persistent_available_p): Place the cheap SSL test nearer
133         the top of the function.
134         (CLOSE_FINISH, CLOSE_INVALIDATE): Define only one version of each.
135
136 2000-12-03  Christian Fraenkel <christian.fraenkel@gmx.net>
137
138         * Makefile.in: added gen_sslfunc object
139         * config.h.in: added HAVE_SSL define
140         * connect.c: changed select_fd from static int to int
141         * connect.h: ditto
142         * gen_sslfunc.h: New file
143         * gen_sslfunc.c: ditto
144         * http.c: added HTTPS fuctionality
145         * retrc.c: ditto
146         * url.c: ditto
147         * init.c: added opt.httpsproxy
148         * options.h: ditto
149         * rbuf.h: added alternate rbuf struct
150         * wget.h: added CONSSLERR
151         * rbuf.c: ditto
152
153         * http.c: Added HTTPS fuctionality.
154
155         * retrc.c: Ditto.
156
157         * url.c: Ditto.
158
159         * init.c: Added opt.httpsproxy.
160
161         * options.h: Ditto.
162
163         * rbuf.h: Added alternate rbuf struct.
164
165         * wget.h: Added CONSSLERR.
166
167         * rbuf.c: Ditto.
168
169 2000-11-30  Jan Prikryl  <prikryl@cg.tuwien.ac.at>
170
171         * ftp-ls.c (ftp_parse_unix_ls): Added second parameter
172         "ignore_perms" to ignore file and directory permissions for
173         Windows NT FTP server listings.
174         (ftp_parse_winnt_ls): New function.
175         (ftp_parse_ls): Parses UNIX and Windows NT listings
176         separately. Simple heuristics for distinguishing between UNIX
177         and MS-DOS-like FTP listing provided by Windows NT FTP service.
178
179 2000-12-05  Hrvoje Niksic  <hniksic@arsdigita.com>
180
181         * url.c (init_unsafe_char_table): Reinstate space as an unsafe
182         char.
183
184 2000-11-29  John Summerfield  <summer@OS2.ami.com.au>
185
186         * netrc.c (parse_netrc): Get rid of line ending.
187
188 2000-11-25  Hrvoje Niksic  <hniksic@arsdigita.com>
189
190         * ftp.c (ftp_retrieve_list): Undo typo "fix" until resolution by
191         Dan.
192
193 2000-11-24  Karl Eichwalder  <ke@suse.de>
194
195         * main.c (print_help): Untabify.
196
197 2000-11-23  Hrvoje Niksic  <hniksic@arsdigita.com>
198
199         * utils.c (xrealloc_debug): Do the unregister/register thing only
200         if the pointer has actually changed.
201         (xmalloc_real): Declare `static' in DEBUG_MALLOC builds.
202         (xfree_real): Ditto.
203         (xrealloc_real): Ditto.
204         (xstrdup_real): Ditto.
205
206 2000-11-22  Hrvoje Niksic  <hniksic@arsdigita.com>
207
208         * ftp.c (getftp): ftp_getaddress() returns a malloc'ed copy of the
209         string; no need to strdup() it.
210         (getftp): Make pwd_len a local variable.
211         (ftp_loop): Free PWD before returning.
212
213         * init.c (cleanup): Free opt.ftp_pass only if it's non-NULL.
214
215 2000-11-22  Hrvoje Niksic  <hniksic@arsdigita.com>
216
217         * all: Use xfree() instead of free.
218
219         * utils.c (xfree): New function.
220
221 2000-11-21  Hrvoje Niksic  <hniksic@arsdigita.com>
222
223         * url.c (convert_links): HTML-quote the converted string.
224
225         * utils.c (html_quote_string): Move here from ftp-ls.c
226         (html_quote_string): Make non-static; declare in utils.h.
227         (html_quote_string): Convert SP to &#32;.
228
229 2000-11-21  Hrvoje Niksic  <hniksic@arsdigita.com>
230
231         * ftp.c (getftp): Reformat Jan's code according to GNU coding
232         standards; remove (debugging?) printf's; use '\0' for the ASCII
233         zero character.  Use alloca() instead of malloc() for
234         inter-function temporary allocations.
235
236 2000-11-18  Jan Prikryl  <prikryl@cg.tuwien.ac.at>
237
238         * ftpparse.c, ftpparse.h: New files.
239
240         * ftp-ls.c (ftp_parse_ls): Use ftp_parse_unix_ls for UNIX servers
241         only. Use ftp_parse_nonunix_ls otherwise.
242         (ftp_parse_nonunix_ls): Stub to the ftpparse library handling all
243         exotic FTP servers.
244
245         * ftp.h (stype): New enum, distinguishes UNIX, VMS, and "other"
246         FTP servers.
247
248         * ftp.c: New static wariables host_type, pwd, and pwd_len. 
249         (getftp): Support for VMS. Support for FTP servers that do not
250         place you in the root directory after login.
251         (ftp_retrieve_list): VMS is silent about the real file size, issue
252         a more appropriate message.
253         (ftp_get_listing): Pass host_type to ftp_parse_ls.
254
255         * ftp-basic.c (ftp_pwd, ftp_syst): New functions.
256
257 2000-11-21  Hrvoje Niksic  <hniksic@arsdigita.com>
258
259         * hash.c (hash_table_put): Don't overwrite deleted mappings.
260
261 2000-11-21  Hrvoje Niksic  <hniksic@arsdigita.com>
262
263         * hash.c (find_mapping): New function.
264         (hash_table_get): Use it.
265         (hash_table_get_pair): Ditto.
266         (hash_table_exists): Ditto.
267         (hash_table_remove): Ditto.
268         (hash_table_remove): Really delete the entry if the mapping
269         following LOCATION is empty.
270
271         * utils.c (string_set_add): Check whether the element has existed
272         before.
273
274         * hash.c (hash_table_get_pair): New function.
275
276 2000-11-20  Hrvoje Niksic  <hniksic@arsdigita.com>
277
278         * http.c (http_process_type): Ignore trailing whitespace; use
279         strdupdelim().
280
281         * recur.c (recursive_retrieve): Use the new `convert' field.
282         (convert_all_links): Ditto.
283         (convert_all_links): Don't respect meta_disallow_follow.
284
285         * html-url.c (handle_link): Fill out link_relative_p and
286         link_complete_p.
287
288         * url.h (struct _urlpos): Make elements more readable.
289
290         * recur.c (recursive_retrieve): Call slist_prepend instead of
291         slist_append.
292         (convert_all_links): Call slist_nreverse before iterating through
293         urls_html.
294
295         * utils.c (slist_prepend): New function.
296         (slist_nreverse): Ditto.
297
298 2000-11-20  Hrvoje Niksic  <hniksic@arsdigita.com>
299
300         * http.c (check_end): Constify.
301
302 2000-11-20  Hrvoje Niksic  <hniksic@arsdigita.com>
303
304         * http.c (http_loop): If username and password are known, try the
305         `Basic' authentication scheme by default.
306
307         * connect.h: Declare test_socket_open.
308
309 2000-11-20  Hrvoje Niksic  <hniksic@arsdigita.com>
310
311         * version.c: Bump version from 1.5.3+dev to 1.7-dev.
312
313 2000-11-20  Hrvoje Niksic  <hniksic@arsdigita.com>
314
315         * http.c (gethttp): Don't use the return value of sprintf().
316         (gethttp): Inhibit keep-alive if opt.http_keep_alive is 0.
317
318 2000-11-20  Hrvoje Niksic  <hniksic@arsdigita.com>
319
320         * recur.c (recursive_retrieve): Print the "so we don't load"
321         debugging message only if we really don't load.
322
323         * http.c (gethttp): Inhibit keep-alive if proxy is being used.
324         (gethttp): Don't request keep-alive if keep-alive is inhibited.
325
326 2000-11-19  Hrvoje Niksic  <hniksic@arsdigita.com>
327
328         * http.c (gethttp): Make the HTTP persistent connections more
329         robust.
330
331 2000-11-19  Hrvoje Niksic  <hniksic@arsdigita.com>
332
333         * retr.c (get_contents): If use_expected, make sure that the
334         appropriate amount of data is being read.
335
336         * http.c (gethttp): Check for both `Keep-Alive: ...' and
337         `Connection: Keep-Alive'.
338
339         * wget.h (DEBUGP): Call debug_logprintf only if opt.debug is
340         turned on.
341
342 2000-11-19  Hrvoje Niksic  <hniksic@arsdigita.com>
343
344         * http.c (connection_available_p): Use it.
345
346         * connect.c (test_socket_open): New function.
347
348         * http.c (gethttp): Support persistent connections.  Based on the
349         ideas, and partly on code, by Sam Horrocks <sam@daemoninc.com>.
350         (register_persistent): New function.
351         (connection_available_p): Ditto.
352         (invalidate_connection): Ditto.
353
354 2000-11-19  Hrvoje Niksic  <hniksic@arsdigita.com>
355
356         * url.c (convert_links): Handle UREL2ABS case.
357
358         * recur.c (recursive_retrieve): Instead of the list
359         urls_downloaded, use hash tables dl_file_url_map and
360         dl_url_file_map.
361         (convert_all_links): Use them to retrieve data.
362
363         * host.c (clean_hosts): Free the hash tables.
364
365         * main.c (private_initialize): Call host_init().
366
367         * host.c (store_hostaddress): Use a saner, hash table-based data
368         model.
369         (realhost): Ditto.
370         (host_init): Initialize the hash tables.
371
372 2000-11-18  Hrvoje Niksic  <hniksic@arsdigita.com>
373
374         * utils.c (slist_append): Eviscerate NOSORT.  Hash tables are now
375         used for what the sorted slists used to be used for.
376         (slist_contains): Don't rely on the list being sorted.
377         (slist_append): Simplify the code.
378
379         * recur.c (recursive_cleanup): Use free_string_set.
380
381         * utils.c (string_set_add, string_set_exists, string_set_free):
382         New functions for easier freeing of hash tables whose keys are
383         strdup'ed strings.
384
385         * recur.c (recursive_retrieve): Use the hash table functions for
386         storing undesirable URLs.
387
388         * hash.c: New file.
389
390 2000-11-17  Hrvoje Niksic  <hniksic@arsdigita.com>
391
392         * main.c (private_initialize): Call url_init.
393         (main): Call private_initialize.
394
395         * url.c (unsafe_char_table): New table.
396         (UNSAFE_CHAR): Use it.
397         (init_unsafe_char_table): New function.
398         (url_init): New function; call init_unsafe_char_table.
399
400 2000-11-15  Hrvoje Niksic  <hniksic@arsdigita.com>
401
402         * html-url.c (handle_link): Handle HTML fragment identifiers.
403
404         * recur.c (recursive_retrieve): If norobot info is respected and
405         the file is specified not to be followed by robots, respect that.
406
407         * html-url.c (collect_tags_mapper): Handle <meta name=robots
408         content=X>.  For us the important cases are where X is NONE or
409         where X contains NOFOLLOW.
410         (get_urls_html): Propagate that information to the caller.
411
412 2000-11-13  Hrvoje Niksic  <hniksic@arsdigita.com>
413
414         * url.c (convert_links): Unlink the file we might be reading from
415         before writing to it.
416         (convert_links): Use alloca instead of malloc for
417         filename_plus_orig_suffix.
418
419 2000-11-10  Hrvoje Niksic  <hniksic@arsdigita.com>
420
421         * url.c (get_urls_file): Ditto.
422         (convert_links): Ditto.
423
424         * html-url.c (get_urls_html): Use read_file() instead of
425         load_file().
426
427         * utils.c (read_file): New function, instead of the old
428         load_file().
429         (read_file_free): Ditto.
430
431         * url.c (findurl): Search only for the supported protocols.
432         (convert_links): Use fwrite() when writing out a region of
433         characters.
434
435 2000-11-10  Hrvoje Niksic  <hniksic@arsdigita.com>
436
437         * ftp-ls.c: Move html_quote_string and ftp_index here.
438
439         * url.c: Remove get_urls_html, since that's now in html-url.c.
440
441         * html-url.c: New file.
442
443         * html-parse.c: New file.
444
445 2000-11-16  Hrvoje Niksic  <hniksic@arsdigita.com>
446
447         * mswindows.h: Define snprintf and vsnprintf to _snprintf and
448         _vsnprintf respectively.
449
450 2000-11-15  Hrvoje Niksic  <hniksic@arsdigita.com>
451
452         * config.h.in: Do the _XOPEN_SOURCE and _SVID_SOURCE things only
453         on Linux.
454
455 2000-11-12  Hrvoje Niksic  <hniksic@arsdigita.com>
456
457         * host.c (realhost): Add HOST to the list with quality==0 only if
458         it wasn't already there.
459         Based on analysis by Lu Guohan <feng@public.bjnet.edu.cn>.
460
461 2000-11-10  Hrvoje Niksic  <hniksic@arsdigita.com>
462
463         * init.c (run_wgetrc): Don't bother killing off '\r' since
464         pars_line() skips whitespace at end of line anyway.
465         (parse_line): Oops, it didn't.  Now it does.
466
467         * recur.c (parse_robots): Ditto here.
468
469         * ftp-ls.c (ftp_parse_unix_ls): Kill off the newline character
470         manually because read_whole_line no longer does.
471
472         * utils.c (read_whole_line): Rewrite to: a) use less memory
473         (reallocates to needed size after work), b) work faster -->
474         fgets() instead of getc, c) be more correct --> doesn't kill the
475         newline character at the end of line.
476
477 2000-11-10  Hrvoje Niksic  <hniksic@arsdigita.com>
478
479         * init.c (comind): Initialize MAX to array size - 1.
480
481 2000-11-08  Hrvoje Niksic  <hniksic@arsdigita.com>
482
483         * url.c (construct): Changed last_slash[-1] to *(last_slash - 1).
484         Suggested by Edward J. Sabol.
485
486 2000-11-08  Hrvoje Niksic  <hniksic@arsdigita.com>
487
488         * url.c (construct): Handle the case where host name is not
489         followed by a slash.
490
491 2000-11-06  Hrvoje Niksic  <hniksic@arsdigita.com>
492
493         * init.c: commands[] need to be sorted!  ("base" wasn't.)
494
495 2000-11-05  Hrvoje Niksic  <hniksic@arsdigita.com>
496
497         * wget.h (DO_REALLOC_FROM_ALLOCA): Use braces to disambiguate
498         `if'.
499
500 2000-11-05  Hrvoje Niksic  <hniksic@arsdigita.com>
501
502         * url.c (construct): Insert unneeded initialization for the
503         compiler to shut up.
504
505         * config.h.in: Define _XOPEN_SOURCE to 500 to get the prototype
506         for strptime() (*duh*).  Define _SVID_SOURCE to get S_IFLNK which
507         otherwise gets lost when you define _XOPEN_SOURCE.
508
509         * utils.c (touch): Include the file name in the error message.
510         From Debian.
511
512 2000-11-05  Hrvoje Niksic  <hniksic@arsdigita.com>
513
514         * log.c (logvprintf): Use vsnprintf() in all cases.  If necessary,
515         resize the buffer to fit the formated message.  That way, messages
516         of arbitrary size may be printed.
517         (logvprintf): Use saved_append() to optionally log the last
518         several lines of output.
519         (logputs): Ditto.
520         (log_close): Adapt to new data structures.
521         (log_dump): Ditto.
522         (redirect_output): Print messages to stderr, not to stdout.
523
524         * log.c (saved_append_1): New function.  Replaces the old logging
525         system ("log all output until 10M characters") with a new, much
526         more reasonable one ("log last screenful of text").
527         (saved_append): New function; call saved_append_1.
528         (free_log_line): New function.
529
530 2000-11-05  Hrvoje Niksic  <hniksic@arsdigita.com>
531
532         * url.c (construct): Fix comment.
533         (find_last_char): Document.
534
535 2000-11-04  Hrvoje Niksic  <hniksic@arsdigita.com>
536
537         * snprintf.c: New file.
538
539 2000-11-03  Hrvoje Niksic  <hniksic@arsdigita.com>
540
541         * wget.h: If HAVE_STDARG_H is not defined, don't declare argument
542         types to logprintf() and debug_logprintf().
543
544 2000-11-02  Hrvoje Niksic  <hniksic@arsdigita.com>
545
546         * ftp.c (ftp_loop_internal): Hide the password from the URL when
547         printing non-verbose.  Problem spotted by Dariusz Mlynarczyk
548         <darekm@bydg.lomac.com.pl>.
549
550 2000-11-02  Junio Hamano  <junio@twinsun.com>
551
552         * ftp-basic.c (ftp_login): Make comparison case-insensitive.
553
554 2000-11-02  Tyler Riddle  <triddle@liquidmarket.com>
555
556         * http.c (known_authentication_scheme_p): Recognize NTML
557         authentication.
558         (create_authorization_line): Treat NTML the same as `Basic'.
559
560 2000-11-02  Hrvoje Niksic  <hniksic@arsdigita.com>
561
562         * retr.c (retrieve_url): Free url before returning.
563         (retrieve_url): Free mynewloc before returning.
564         Spotted by Mark A. Mankins <Mankins_Mark@prc.com>.
565
566 2000-11-02  Hrvoje Niksic  <hniksic@arsdigita.com>
567
568         * url.c (parseurl): Remove possible reading past the end of
569         sup_protos[].  Spotted by Mark A. Mankins <Mankins_Mark@prc.com>.
570
571 2000-11-01  Hrvoje Niksic  <hniksic@arsdigita.com>
572
573         * main.c (main): In case of opt.downloaded overflowing, print
574         <overflow> instead of a totally bogus random value.
575
576         * retr.c (retrieve_from_file): Ditto.
577
578         * recur.c (recursive_retrieve): Ditto.
579
580         * main.c (main): Ditto.
581
582         * http.c (http_loop): Ditto.
583
584         * ftp.c (ftp_loop_internal): Use downloaded_increase() instead of
585         `+=', and downloaded_exceeds_quota() instead of the simple-minded
586         check.
587         (ftp_retrieve_list): Ditto.
588         (ftp_retrieve_dirs): Ditto.
589         (ftp_retrieve_glob): Ditto.
590
591         * retr.c (downloaded_increase): New function.  Notice overflows of
592         opt.downloaded.
593         (downloaded_exceeds_quota): Make sure that opt.downloaded is not
594         used if it overflowed.
595
596         * options.h (struct options): New member downloaded_overflow.
597
598 2000-11-01  Hrvoje Niksic  <hniksic@arsdigita.com>
599
600         * wget.h (enum): Remove extra space after last enumeration.
601
602 2000-11-01  Hrvoje Niksic  <hniksic@arsdigita.com>
603
604         * main.c (main): Use legible_very_long() for printing
605         opt.downloaded.
606
607         * utils.c (legible_1): New function that operates on strings and
608         does the brunt of legible()'s work.
609         (legible): Use legible_1().
610         (legible_very_long): New function; dump the argument with
611         sprintf(), and call legible_1().
612
613         * options.h (struct options): Use VERY_LONG_TYPE for
614         opt.downloaded.
615
616         * sysdep.h (VERY_LONG_TYPE): Define it to have a 64-bit or greater
617         type.
618
619         * config.h.in: Make sure that SIZEOF_LONG and SIZEOF_LONG_LONG get
620         defined.  Define HAVE_LONG_LONG if long long is available.
621
622 2000-11-01  Hrvoje Niksic  <hniksic@arsdigita.com>
623
624         * utils.c (long_to_string): Update with a later, better version.
625
626 2000-11-01  Hrvoje Niksic  <hniksic@arsdigita.com>
627
628         * url.c (path_simplify_with_kludge): New function.
629         (path_simplify_with_kludge): Disable it.  Instead...
630         (parse_dir): ...make sure that at this point the right thing is
631         done, i.e. that "query" part of the URL (?...) is always assigned
632         to the file, never to the directory portion of the path.
633
634 2000-11-01  Hrvoje Niksic  <hniksic@arsdigita.com>
635
636         * retr.c (retrieve_url): Detect redirection cycles.
637
638 2000-11-01  Hrvoje Niksic  <hniksic@arsdigita.com>
639
640         * url.c (get_urls_html): Decode HTML entities using
641         html_decode_entities.
642
643         * html.c (htmlfindurl): Don't count the `#' in numeric entities
644         (&#NNN;) as an HTML fragemnt.
645         (html_decode_entities): New function.
646
647 2000-11-01  Hrvoje Niksic  <hniksic@arsdigita.com>
648
649         * html.c (htmlfindurl): Fix recognition of # HTML fragments.
650
651 2000-11-01  Hrvoje Niksic  <hniksic@arsdigita.com>
652
653         * url.c (construct): Rewritten for clarity.  Avoids the
654         unnecessary copying and stack-allocation the old version
655         performed.
656
657 2000-10-31  Hrvoje Niksic  <hniksic@arsdigita.com>
658
659         * ftp.c (getftp): Ditto.
660
661         * http.c (gethttp): Rewind the stream when retrying from scratch.
662
663 2000-10-31  Hrvoje Niksic  <hniksic@arsdigita.com>
664
665         * retr.c (retrieve_url): Use url_concat() to handle relative
666         redirections instead of /ad hoc/ code.
667
668         * url.c (url_concat): New function encapsulating weird
669         construct().
670         (urllen_http_hack): New function.
671         (construct): When constructing new URLs, recognize that `?' does
672         not form part of the file name in HTTP.
673
674 2000-10-13  Adrian Aichner  <adrian@xemacs.org>
675
676         * retr.c: Add msec timing support for WINDOWS.
677         * retr.c (reset_timer): GetSystemTime() on WINDOWS.
678         * retr.c (elapsed_time): Calculate delta time to msec on WINDOWS.
679
680 2000-10-27  Dan Harkless  <wget@harkless.org>
681
682         * retr.c (retrieve_url): Manually applied T. Bharath
683         <TBharath@responsenetworks.com>'s patch to get wget to grok
684         illegal relative URL redirects.  Reformatted and re-commented it.
685
686 2000-10-23  Dan Harkless  <wget@harkless.org>
687
688         * connect.c (make_connection and bindport): Manually applied Rob
689         Mayoff <mayoff@dqd.com>'s 1.5.3 patch to add --bind-address,
690         changing coding style to GNU's.
691
692         * ftp.c (ftp_loop_internal): --delete-after wasn't implemented for
693         files downloaded via FTP.  Per a comment, .listing files were not
694         counted towards number of bytes and files downloaded because they're 
695         deleted anyway.  Well, they aren't under -nr, so count them then.
696
697         * init.c: Manually applied Rob Mayoff's 1.5.3 patch to add
698         --bind-address, alphabetizing, changing coding style to GNU's,
699         commenting, and renaming cmd_ip_address() to cmd_address() to
700         imply hostnames also okay.
701                 
702         * main.c (main): --delete-after didn't delete the root of the
703         tree.  Ignore --convert-links if --delete-after was specified.
704         Manually applied Rob Mayoff's 1.5.3 patch to add --bind-address,
705         fixing duplicate use of added-since-1.5.3 case value.
706         (print_help): Clarified that --delete-after deletes local files.
707         Rob forgot to add a line for his new --bind-address option.
708                 
709         * options.h (struct options): Manually applied Rob Mayoff's patch
710         to add --bind-address (bind_address structure member).
711                 
712         * recur.c (recursive_retrieve): Improved comment; added DEBUGP().
713         Ignore --convert-links if --delete-after was specified.
714                 
715         * retr.c (retrieve_from_file): Just added a DEBUGP().
716                 
717 2000-10-19  Dan Harkless  <wget@harkless.org>
718
719         * ftp.c (ftp_loop_internal): downloaded_file() enumerators changed.
720         (getftp): Applied Piotr Sulecki <Piotr.Sulecki@ios.krakow.pl>'s
721         patch to work around FTP servers that incorrectly respond to the
722         "REST" command with the remaining size rather than the total file size.
723                 
724         * http.c (gethttp): Improved a comment and added code to tack on
725         ".html" to text/html files without that extension when -E specified.
726         (http_loop): Use new downloaded_file() enumerators and deal with
727         the case of gethttp() called xrealloc() on u->local.
728
729         * init.c (commands): Added new "htmlextension" command.
730         Also renamed John Daily's cmd_quad() to the more descriptive
731         cmd_lockable_boolean(), alpha-sorted the CMD_DECLARE()s and
732         removed duplicate cmd_boolean() declaration.
733
734         * main.c (print_help): Added my new -E / --html-extension option.
735         (main): Undocumented --email-address option previously used -E synonym.
736         Stole it away for the much more deserving --html-extension's use.
737
738         * options.h (struct options): Added html_extension field.
739
740         * url.c (convert_links): URL X that we saved as X.html locally due
741         to -E needs to be backed up as X.orig, not X.html.orig.  Added comments.
742         (downloaded_file): Now remembers if we added .html extension to a file.
743
744         * url.h (downloaded_file_t): Added extra enumerators to support above.
745         (downloaded_file): Now takes and returns a downloaded_file_t.
746
747         * wget.h (unnamed "dt" enum): Added ADDED_HTML_EXTENSION enumerator.
748         
749 2000-10-09  Dan Harkless  <wget@harkless.org>
750
751         * html.c (htmlfindurl): Added unneeded initialization to quiet warning.
752                 
753         * main.c (print_help): Clarified what --retr-symlinks does.
754         
755 2000-09-15  John Daily  <jdaily@cyberdude.com>
756
757         * init.c: Add support for "always" and "never" values to allow
758         .wgetrc to override commandline (useful e.g. with .pm files
759         calling `wget --passive-ftp' when your firewall doesn't allow that).
760
761         * ftp.c (getftp): passive_ftp is first option to support always/never.
762
763 2000-08-30  Dan Harkless  <wget@harkless.org>
764
765         * ftp.c (ftp_retrieve_list): Use new INFINITE_RECURSION #define.
766         
767         * html.c: htmlfindurl() now takes final `dash_p_leaf_HTML' parameter.
768         Wrapped some > 80-column lines.  When -p is specified and we're at a 
769         leaf node, do not traverse <A>, <AREA>, or <LINK> tags other than 
770         <LINK REL="stylesheet">.
771         
772         * html.h (htmlfindurl): Now takes final `dash_p_leaf_HTML' parameter.
773         
774         * init.c: Added new -p / --page-requisites / page_requisites option.
775
776         * main.c (print_help): Clarified that -l inf and -l 0 both allow
777         infinite recursion.  Changed the unhelpful --mirrior description
778         to simply give the options it's equivalent to.  Added new -p option.
779         (main): Added some comments; handle new -p / --page-requisites.
780         
781         * options.h (struct options): Added new page_requisites field.
782
783         * recur.c: Changed "URL-s" to "URLs" and "HTML-s" to "HTMLs".
784         Calculate and pass down new `dash_p_leaf_HTML' parameter to
785         get_urls_html().  Use new INFINITE_RECURSION #define.
786
787         * retr.c: Changed "URL-s" to "URLs".  get_urls_html() now takes
788         final `dash_p_leaf_HTML' parameter.
789
790         * url.c: get_urls_html() and htmlfindurl() now take final
791         `dash_p_leaf_HTML' parameter.
792
793         * url.h (get_urls_html): Now takes final `dash_p_leaf_HTML' parameter.
794
795         * wget.h: Added some comments and new INFINITE_RECURSION #define.
796         
797 2000-08-23  Dan Harkless  <wget@harkless.org>
798
799         * main.c (print_help): -B / --base was not mentioned.
800
801 2000-08-22  Dan Harkless  <wget@harkless.org>
802
803         * main.c (print_help): Modified -nc description to mention that it
804         also prevents the creation of multiple versions of the same file
805         with ".<number>" suffixes.
806
807 2000-07-14  Jan Prikryl  <prikryl@cg.tuwien.ac.at>
808
809         * retr.c (retrieve_url): Consistently strdup opt.referer when
810         setting u->referer.
811
812 2000-06-09  Dan Harkless  <wget@harkless.org>
813
814         * main.c (print_help): --help output for --waitretry was over 80 cols.
815
816 2000-06-09  Hrvoje Niksic  <hniksic@iskon.hr>
817
818         * url.c (encode_string): Fix comment.
819         Suggested by Herold Heiko <Heiko.Herold@previnet.it>.
820
821 2000-06-01  Const Kaplinsky  <const@ce.cctpu.edu.ru>
822
823         * ftp.c (ftp_retrieve_list): Change permissions only on plain
824         files.
825
826 2000-06-01  Hrvoje Niksic  <hniksic@iskon.hr>
827
828         * url.c (str_url): Print the port number only if it's different
829         from the default port number for that protocol.
830
831 2000-05-22  Dan Harkless  <wget@harkless.org>
832
833         * main.c (print_help): Added --help line for Damir Dzeko
834         <ddzeko@zesoi.fer.hr>'s until-now-undocumented --referer option.
835         Removed comments that --referer and --waitretry were undocumented.
836         Changed "`.wgetrc' command" to "`.wgetrc'-style command" on --help
837         line for --execute.
838
839 2000-05-18  Hrvoje Niksic  <hniksic@iskon.hr>
840
841         * ftp.c (getftp): Ditto.
842
843         * http.c (gethttp): Check for return value of fclose/fflush.
844
845 2000-04-12  Hrvoje Niksic  <hniksic@iskon.hr>
846
847         * host.c (store_hostaddress): Instead of shifting ADDR, start
848         copying from the correct address.
849
850 2000-04-12  Hrvoje Niksic  <hniksic@iskon.hr>
851
852         * http.c (gethttp): Don't free REQUEST -- it was allocated with
853         alloca().
854         Pointed out by Gisle Vanem <gvanem@eunet.no>.
855
856 2000-04-04  Dan Harkless  <wget@harkless.org>
857
858         * host.c (store_hostaddress): R. K. Owen's patch introduces a
859         "left shift count >= width of type" warning on 32-bit
860         architectures.  Got rid of it by tricking the compiler w/ a variable.
861         
862         * url.c (UNSAFE_CHAR): The macro didn't include all the illegal
863         characters per RFC1738, namely everything above '~'.  It also
864         generated a warning on OSes where char =~ unsigned char.  Fixed.
865         
866 1998-10-17  Hrvoje Niksic  <hniksic@srce.hr>
867
868         * http.c (http_process_type): Removed needless strdup(), a memory
869         leak.
870
871 1998-09-25  Hrvoje Niksic  <hniksic@srce.hr>
872
873         * html.c (htmlfindurl): Set PH to the first occurrence of `#'.
874
875 1998-09-25  Simon Munton  <simonm@m4data.co.uk>
876
877         * init.c (wgetrc_file_name): Don't free HOME under Windows.
878
879 1998-12-01  "R. K. Owen"  <rkowen@Nersc.GOV>
880
881         * host.c (store_hostaddress): Fix for big endian 64-bit machines.
882
883 1998-12-01  Hrvoje Niksic  <hniksic@srce.hr>
884
885         * url.c (UNSAFE_CHAR): New macro.
886         (contains_unsafe): Use it.
887         (encode_string): Ditto.
888
889 1998-12-01  Hrvoje Niksic  <hniksic@srce.hr>
890
891         * main.c (i18n_initialize): Use LC_MESSAGES only if available.
892
893 2000-03-31  Hrvoje Niksic  <hniksic@srce.hr>
894
895         * Use TOUPPER/TOLOWER.
896
897 1998-12-22  Alexander V. Lukyanov  <lav@yars.free.net>
898
899         * ftp-opie.c (btoe): Zero-terminate OSTORE.
900
901 2000-03-21  Hrvoje Niksic  <hniksic@iskon.hr>
902
903         * wget.h (DO_REALLOC_FROM_ALLOCA): Ditto.
904
905         * sysdep.h (ISALNUM): New macro.
906         (TOLOWER): Ditto.
907         (TOUPPER): Ditto.
908
909 2000-03-10  Dan Harkless  <wget@harkless.org>
910
911         * html.c (idmatch): Implemented checking of my new --follow-tags
912         and --ignore-tags options.
913         
914         * init.c (commands): Added comment reminding people adding new
915         entries doing allocation to add corresponding freeing in cleanup().
916         (commands): Added new followtags and ignoretags commands.
917         (cleanup): Free storage for new followtags and ignoretags.
918         
919         * main.c: Use of "comma-separated list" was random -- normalized
920         it.  Did some alphabetization.  Added comments pointing out
921         "Options without arguments" and "Options accepting an argument"
922         sections of long_options[].  Added new options --follow-tags and
923         -G / --ignore-tags.  Added comment that Damir's --referer is
924         currently undocumented.  Added comment that Heiko's --waitretry is
925         partially undocumented (mentioned in --help but not in
926         wget.texi).  Moved improperly sorted 24, 129, and 'G' cases.
927         
928         * options.h (struct options): Added new fields follow_tags and
929         ignore_tags. 
930         
931         * wget.h: Added "#define EQ 0" so we can say "strcmp(a, b) == EQ".
932         
933 2000-03-02  Dan Harkless  <wget@harkless.org>
934
935         * ftp.c (ftp_loop_internal): Heiko introduced "suggest explicit
936         braces to avoid ambiguous `else'" warnings.  Eliminated them.
937         
938         * http.c (gethttp): Dan Berger's query string patch is totally
939         bogus.  If you have two different URLs, gen_page.cgi?page1 and
940         get_page.cgi?page2, they'll both be saved as get_page.cgi and the
941         second will overwrite the first.  Also, parameters to implicit
942         CGIs, like "http://www.host.com/db/?2000-03-02" cause the URLs to
943         be printed with trailing garbage characters, and could seg fault.
944         Backing out the patch, which Dan B. informed me by email was just
945         a kludge to download StarOffice from Sun made necessary due to
946         wget's unconditional escaping of certain characters (room for an
947         option there?).
948         (http_loop): Heiko introduced "suggest explicit braces to avoid
949         ambiguous `else'" warnings.  Eliminated them.
950         
951         * main.c: Heiko's --wait / --waitretry backwards compatibility
952         code looks to have been totally untested -- automatic variable
953         'wr' was used without being initialized, and a long int was passed
954         into setval()'s char* val parameter.
955         
956         * recur.c (parse_robots): Applied Edward J. Sabol
957         <sabol@alderaan.gsfc.nasa.gov>'s patch for Guan Yang's reported
958         problem with "User-agent:<space>*<space>" lines in robots.txt.
959         
960         * url.c (parseurl, str_url): Removing Dan Berger's code (see
961         http.c above for explanation).
962         
963 1999-08-25  Heiko Herold  <Heiko.Herold@previnet.it>
964
965         * ftp.c: Respect new option waitretry.
966
967 2000-01-30  Damir Dzeko  <ddzeko@zesoi.fer.hr>
968
969         * http.c (gethttp): Send custom Referer, if required.
970
971 1999-09-24  Charles G Waldman  <cgw@fnal.gov>
972
973         * netrc.c (parse_netrc): Allow passwords to contain spaces.
974
975         * netrc.c (parse_netrc): New function.
976
977 1999-09-17  Dan Berger  <dberger@ix.netcom.com>
978
979         * http.c (gethttp): Send it.
980
981         * url.c (parseurl): Detect query string in HTTP URL-s.
982         (str_url): Print it.
983
984 2000-03-02  HIROSE Masaaki  <hirose31@t3.rim.or.jp>
985
986         * html.c (html_allow): Add <link href=...> and <script src=...>.
987
988 1999-05-02  andrew deryabin  <djsf@softhome.net>
989
990         * http.c (gethttp): Specify port in `Host' header only if it's
991         different from 80.
992
993 1998-11-03  Edward J. Sabol  <sabol@alderaan.gsfc.nasa.gov>
994
995         * recur.c (recursive_retrieve): If a finite maximum depth is
996         specified, and we're are already at that depth, don't download the
997         HTML file for parsing.
998
999 2000-03-01  Dan Harkless  <wget@harkless.org>
1000
1001         * ftp.c (ftp_loop_internal): Call new downloaded_file() function,
1002         even though we don't do conversion on HTML files retrieved via
1003         FTP, so _current_ usage of downloaded_file() makes this call unneeded. 
1004         (ftp_retrieve_list): Added a comment saying where we need to
1005         stat() a .orig file if FTP'd HTML file conversion is ever implemented.
1006         (ftp_retrieve_list): "Local file '%s' is more recent," is sometimes
1007         a lie -- reworded as "Server file no newer than local file '%s' --".
1008         
1009         * http.c (http_loop): Fixed a typo and clarified a comment.
1010         (http_loop): When -K and -N are specified together, compare size
1011         and timestamp of server file X against local file X.orig (if
1012         extant) rather than converted local file X.
1013         (http_loop): "Local file '%s' is more recent," is sometimes a lie
1014         -- reworded as "Server file no newer than local file '%s' --".
1015         (http_loop): Call new downloaded_file() function to prevent
1016         wrongful overwriting of .orig file when -N is specified.
1017         
1018         * url.c (convert_links): When -K specified, only rename X to
1019         X.orig if downloaded_file() returns TRUE.  Otherwise when we skip
1020         file X due to -N, we clobber an X.orig from a previous invocation.
1021         (convert_links): Call the failsafe xstrdup(), not the real strdup().
1022         (convert_links): Added a note asking anyone who understands how
1023         multiple URLs can correspond to a single file to comment it.
1024         (downloaded_file): Added this new function.
1025         
1026         * url.h (downloaded_file): Added prototype for this new function
1027         as well as its downloaded_file_t enum type.
1028
1029         * wget.h (boolean): Added this new typedef and TRUE and FALSE #defines.
1030
1031 2000-02-29  Dan Harkless  <wget@harkless.org>
1032
1033         * version.c: Upped version to developer-only "1.5.3+dev".
1034
1035 2000-02-18  Dan Harkless  <wget@harkless.org>
1036
1037         * init.c (backup_converted): Added this new option.
1038
1039         * main.c (-K / --backup-converted): Added this new option.
1040
1041         * options.h (backup_converted): Added this new option.
1042
1043         * url.c (convert_links): When backup_converted is specified, save
1044         file X as X.orig before converting.
1045
1046         * url.h (urlpos): Fixed typo -- said "Rekative" instead of "Relative".
1047
1048 1998-09-21  Hrvoje Niksic  <hniksic@srce.hr>
1049
1050         * version.c: Wget 1.5.3 is released.
1051
1052 1998-09-21  Hrvoje Niksic  <hniksic@srce.hr>
1053
1054         * host.c (ftp_getaddress): Don't warn when reverse-lookup of local 
1055         address doesn't yield FQDN.
1056
1057 1998-09-21  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
1058
1059         * cmpt.c (strerror): Fix declaration of sys_errlist.
1060
1061 1998-09-11  Hrvoje Niksic  <hniksic@srce.hr>
1062
1063         * main.c (main): Don't use an array subscript as the first
1064         argument to STRDUP_ALLOCA.
1065         From Kaveh R. Ghazi.
1066
1067 1998-09-11  Szakacsits Szabolcs  <szaka@sienet.hu>
1068
1069         * html.c (htmlfindurl): Download table background.
1070
1071 1998-09-11  Hans Grobler  <grobh@conde.ee.sun.ac.za>
1072
1073         * init.c (parse_line): Would free *com before allocating it.
1074         (parse_line): Would free com instead of *com.
1075
1076 1998-09-10  Howard Gayle  <howard@fjst.com>
1077
1078         * url.c (get_urls_html): Would drop the last character of the
1079         link.
1080
1081 1998-09-10  Hrvoje Niksic  <hniksic@srce.hr>
1082
1083         * http.c (http_loop): Don't print status code if quiet.
1084
1085 1998-09-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1086
1087         * log.c: Use <stdarg.h> only when __STDC__.
1088
1089 1998-09-10  Adam D. Moss  <adam@foxbox.org>
1090
1091         * html.c (htmlfindurl): Download <layer src=...>.
1092
1093 1998-09-10  Howard Gayle  <howard@fjst.com>
1094
1095         * ftp.c (ftp_retrieve_list): Don't update the time stamp of a file 
1096         not retrieved.
1097
1098 1998-06-27  Hrvoje Niksic  <hniksic@srce.hr>
1099
1100         * utils.c: Include <libc.h> on NeXT.
1101
1102 1998-06-26  Heinz Salzmann  <heinz.salzmann@intermetall.de>
1103
1104         * url.c (get_urls_html): Fix calculation of URL position.
1105
1106 1998-06-23  Hrvoje Niksic  <hniksic@srce.hr>
1107
1108         * version.c: Wget 1.5.2 is released.
1109
1110 1998-06-23  Dave Love  <d.love@dl.ac.uk>
1111
1112         * ftp.c, init.c, netrc.c: Include errno.h.
1113
1114         * http.c: Include errno.h and time header.
1115
1116         * Makefile.in (exext): Define.
1117         (install.bin, uninstall.bin): Use it.
1118
1119 1998-06-21  Hrvoje Niksic  <hniksic@srce.hr>
1120
1121         * http.c (http_loop): Don't attempt to compare local and remote
1122         sizes if the remote size is unknown.
1123
1124 1998-06-16  Hrvoje Niksic  <hniksic@srce.hr>
1125
1126         * url.c (get_urls_html): Use malloc() instead of alloca in the
1127         loop.
1128
1129 1998-06-13  Hrvoje Niksic  <hniksic@srce.hr>
1130
1131         * version.c: Wget 1.5.2-b4 is released.
1132
1133 1998-06-13  Hrvoje Niksic  <hniksic@srce.hr>
1134
1135         * url.c (get_urls_html): Ignore spaces before and after the URI.
1136
1137 1998-06-08  Wanderlei Antonio Cavassin  <cavassin@conectiva.com.br>
1138
1139         * ftp.c (getftp): Translate `done'.
1140
1141 1998-06-06  Hrvoje Niksic  <hniksic@srce.hr>
1142
1143         * version.c: Wget 1.5.2-b3 is released.
1144
1145 1998-06-06  Alexander Kourakos  <awk@bnt.com>
1146
1147         * init.c (cleanup): Close dfp, don't free it.
1148
1149 1998-06-06  Hrvoje Niksic  <hniksic@srce.hr>
1150
1151         * utils.c (make_directory): Twiddle.
1152
1153         * config.h.in: Added template for access().
1154
1155 1998-06-05  Mathieu Guillaume  <mat@cythere.com>
1156
1157         * html.c (htmlfindurl): Download <input src=...>
1158
1159 1998-06-03  Hrvoje Niksic  <hniksic@srce.hr>
1160
1161         * utils.c (file_exists_p): Use access() with two arguments.
1162
1163 1998-05-27  Martin Kraemer  <Martin.Kraemer@mch.sni.de>
1164
1165         * netrc.c (parse_netrc): Correct logic.
1166
1167 1998-05-27  Hrvoje Niksic  <hniksic@srce.hr>
1168
1169         * ftp.c (getftp): Added `break'; suggested by Lin Zhe Min
1170         <ljm@ljm.wownet.net>.
1171
1172 1998-05-24  Hrvoje Niksic  <hniksic@srce.hr>
1173
1174         * version.c: Wget 1.5.2-b2 is released.
1175
1176 1998-05-18  Juan Jose Rodriguez  <jcnsoft@jal1.telmex.net.mx>
1177
1178         * mswindows.h: Don't translate mkdir to _mkdir under Borland.
1179
1180 1998-05-17  Hrvoje Niksic  <hniksic@srce.hr>
1181
1182         * retr.c (elapsed_time): Return correct value when
1183         HAVE_GETTIMEOFDAY is undefined.
1184
1185 1998-05-13  Hrvoje Niksic  <hniksic@srce.hr>
1186
1187         * version.c: Wget 1.5.2-b1 is released.
1188
1189 1998-05-08  Hrvoje Niksic  <hniksic@srce.hr>
1190
1191         * getopt.c (_getopt_internal): Use exec_name instead of argv[0].
1192         (_getopt_internal): Don't translate `#if 0'-ed strings.
1193
1194 1998-05-06  Douglas E. Wegscheid  <wegscd@whirlpool.com>
1195
1196         * mswindows.c (ws_handler): Use fork_to_background().
1197
1198 1998-05-05  Hrvoje Niksic  <hniksic@srce.hr>
1199
1200         * version.c: Wget 1.5.1 is released.
1201
1202 1998-05-05  Hrvoje Niksic  <hniksic@srce.hr>
1203
1204         * http.c (parse_http_status_line): Avoid `minor' and `major'
1205         names.
1206
1207 1998-05-02  Hrvoje Niksic  <hniksic@srce.hr>
1208
1209         * utils.c (mkdirhier): Renamed to make_directory.
1210
1211 1998-05-01  Hrvoje Niksic  <hniksic@srce.hr>
1212
1213         * mswindows.c (fork_to_background): Define under Windows.
1214
1215         * utils.c (fork_to_background): New function.
1216
1217         * html.c (htmlfindurl): Removed rerdundant casts.
1218
1219 1998-05-01  Douglas E. Wegscheid  <wegscd@whirlpool.com>
1220
1221         * mswindows.c (ws_mypath): Cache the path.
1222
1223 1998-04-30  Douglas E. Wegscheid  <wegscd@whirlpool.com>
1224
1225         * ftp.h: Prefix enum ftype members with FT_.
1226
1227         * ftp-ls.c, ftp.c, html.h: Adjust accordingly.
1228
1229         * mswindows.h: Use stat under Borland, _stat under MSVC.
1230
1231 1998-04-28  Hrvoje Niksic  <hniksic@srce.hr>
1232
1233         * http.c (known_authentication_scheme_p): New function.
1234         (gethttp): Handle authorization more correctly.
1235
1236         * ftp-basic.h: Removed.
1237
1238         * cmpt.h: Removed.
1239
1240         * utils.c: Include <unistd.h> before <pwd.h>; needed under SunOS
1241         with gcc 2.8.
1242         (numdigit): Use `while' loop.
1243
1244         * http.c (create_authorization_line): Detect authentication
1245         schemes case-insensitively.
1246
1247         * http.c (extract_header_attr): Use strdupdelim().
1248         (digest_authentication_encode): Move declaration of local
1249         variables to smaller scope.
1250         (digest_authentication_encode): Reset REALM, OPAQUE and NONCE.
1251         (create_authorization_line): Detect authentication schemes
1252         case-insensitively.
1253
1254         * utils.c (touch): Constify.
1255
1256         * http.c (gethttp): Report a nicer error when no data is received.
1257
1258         * rbuf.h (RBUF_READCHAR): Ditto.
1259
1260         * ftp-basic.c (ftp_response): Use sizeof.
1261
1262 1998-04-27  Hrvoje Niksic  <hniksic@srce.hr>
1263
1264         * retr.c (print_percentage): EXPECTED is long, not int.
1265         (print_percentage): Use floating-point arithmetic to avoid
1266         overflow with large files' sizes multiplied with 100.
1267
1268 1998-04-27  Gregor Hoffleit  <flight@mathi.uni-heidelberg.de>
1269
1270         * config.h.in: Added pid_t stub.
1271
1272         * sysdep.h (S_ISREG): Moved here from mswindows.h (NeXT doesn't
1273         define it).
1274
1275 1998-04-20  Hrvoje Niksic  <hniksic@srce.hr>
1276
1277         * version.c: Wget 1.5.0 is released.
1278
1279 1998-04-18  Hrvoje Niksic  <hniksic@srce.hr>
1280
1281         * url.c (str_url): Ditto.
1282
1283         * ftp-basic.c (ftp_rest): Use new name.
1284
1285         * utils.c (long_to_string): Renamed from prnum().
1286
1287 1998-04-16  Hrvoje Niksic  <hniksic@srce.hr>
1288
1289         * version.c: Wget 1.5-b17 is released.
1290
1291 1998-04-08  Hrvoje Niksic  <hniksic@srce.hr>
1292
1293         * headers.c (header_get): New argument FLAGS.
1294
1295         * http.c (gethttp): If request is malformed, bail out of the
1296         header loop.
1297         (gethttp): Check for empty header *after* the status line checks.
1298         (gethttp): Disallow continuations for status line.
1299
1300 1998-04-08  Hrvoje Niksic  <hniksic@srce.hr>
1301
1302         * version.c: Wget 1.5-b16 is released.
1303
1304 1998-04-08  Hrvoje Niksic  <hniksic@srce.hr>
1305
1306         * init.c (commands): Renamed `always_rest' to `continue'.
1307
1308 1998-04-05  Hrvoje Niksic  <hniksic@srce.hr>
1309
1310         * all: Use it.
1311
1312         * log.c (logputs): New argument.
1313         (logvprintf): Ditto.
1314         (logprintf): Ditto.
1315
1316 1998-04-04  Hrvoje Niksic  <hniksic@srce.hr>
1317
1318         * http.c (http_atotm): Update comment.
1319
1320         * main.c (i18n_initialize): Set LC_MESSAGES, not LC_ALL.
1321
1322         * wget.h: Renamed ENABLED_NLS to HAVE_NLS.
1323
1324         * main.c (i18n_initialize): New function.
1325         (main): Use it.
1326
1327         * log.c: Include <unistd.h>.
1328
1329         * retr.c (show_progress): Cast alloca to char *.
1330
1331 1998-04-04  Hrvoje Niksic  <hniksic@srce.hr>
1332
1333         * version.c: Wget 1.5-b15 is released.
1334
1335 1998-04-04  Hrvoje Niksic  <hniksic@srce.hr>
1336
1337         * utils.h: Declare file_non_directory_p().
1338
1339 1998-04-03  Hrvoje Niksic  <hniksic@srce.hr>
1340
1341         * main.c (main): It's `tries', not `numtries' now.
1342
1343 1998-04-01  Hrvoje Niksic  <hniksic@srce.hr>
1344
1345         * init.c (getperms): Removed.
1346
1347 1998-04-01  Tim Charron  <tcharron@interlog.com>
1348
1349         * log.c (logvprintf): Don't use ARGS twice.
1350
1351 1998-04-01  John  <john@futuresguide.com>
1352
1353         * mswindows.c: Cleaned up.
1354
1355 1998-04-01  Hrvoje Niksic  <hniksic@srce.hr>
1356
1357         * version.c: Wget 1.5-b14 is released.
1358
1359 1998-04-01  Hrvoje Niksic  <hniksic@srce.hr>
1360
1361         * ftp-opie.c (STRLEN4): New macro.
1362         (btoe): Use it.
1363
1364 1998-04-01  Junio Hamano  <junio@twinsun.com>
1365
1366         * http.c: Document all the Digest functions.
1367
1368 1998-04-01  Hrvoje Niksic  <hniksic@srce.hr>
1369
1370         * utils.c (file_non_directory_p): Renamed from isfile().
1371
1372         * mswindows.h (S_ISREG): New macro, suggested by Tim Adam.
1373
1374 1998-03-31  Hrvoje Niksic  <hniksic@srce.hr>
1375
1376         * utils.c (mkdirhier): Use 0777 instead of opt.dirmode.
1377
1378         * init.c (cmd_spec_dotstyle): Use 48 dots per line for binary
1379         style.
1380         (cmd_permissions): Removed.
1381
1382         * config.h.in: Add template for WORDS_BIGENDIAN.
1383
1384 1998-03-31  Junio Hamano  <junio@twinsun.com>
1385
1386         * http.c (HEXD2asc): New macro.
1387         (dump_hash): Use it.
1388
1389 1998-03-31  Hrvoje Niksic  <hniksic@srce.hr>
1390
1391         * version.c: Wget 1.5-b13 is released.
1392
1393 1998-03-31  Hrvoje Niksic  <hniksic@srce.hr>
1394
1395         * main.c (main): Don't try to use `com'.
1396
1397 1998-03-30  Hrvoje Niksic  <hniksic@srce.hr>
1398
1399         * init.c (cmd_permissions): New function.
1400
1401 1998-03-30  Hrvoje Niksic  <hniksic@srce.hr>
1402
1403         * version.c: Wget 1.5-b12 is released.
1404
1405 1998-03-30  Hrvoje Niksic  <hniksic@srce.hr>
1406
1407         * init.c (commands): Renamed `numtries' to `tries'.
1408         (cmd_spec_debug): Removed.
1409         (home_dir): Under Windows, return `C:\' if HOME is undefined.
1410
1411 1998-03-29  Hrvoje Niksic  <hniksic@srce.hr>
1412
1413         * config.h.in: Define _XOPEN_SOURCE.
1414
1415         * init.c (check_user_specified_header): New function.
1416         (cmd_spec_header): Use it.
1417         (cmd_spec_useragent): New function.
1418
1419 1998-03-29  Hrvoje Niksic  <hniksic@srce.hr>
1420
1421         * version.c: Wget 1.5-b11 is released.
1422
1423 1998-03-28  Hrvoje Niksic  <hniksic@srce.hr>
1424
1425         * wget.h: Include <libintl.h> only if NLS is enabled.
1426
1427 1998-03-26  Hrvoje Niksic  <hniksic@srce.hr>
1428
1429         * options.h (struct options): Made `wait' a long.
1430         (struct options): Ditto for `timeout'.
1431
1432 1998-03-19  Hrvoje Niksic  <hniksic@srce.hr>
1433
1434         * utils.c (exists): Renamed to file_exists_p.
1435         (file_exists_p): Use access() if available.
1436
1437 1998-03-17  Hrvoje Niksic  <hniksic@srce.hr>
1438
1439         * utils.c (memfatal): Set save_log_p to 0 to avoid potential
1440         infloop.
1441
1442         * log.c: do_logging -> save_log_p.
1443
1444         * config.h.in: Added template for HAVE_VSNPRINTF.
1445
1446 1998-03-16  Hrvoje Niksic  <hniksic@srce.hr>
1447
1448         * init.c: Ditto.
1449
1450         * http.c: Protect declaration against non-ANSI compiler.
1451
1452         * log.c (logvprintf): Use vsnprintf() if available.
1453
1454         * getopt.c (main): Don't translate test stuff.
1455
1456 1998-03-16  Hrvoje Niksic  <hniksic@srce.hr>
1457
1458         * version.c: Wget 1.5-b10 is released.
1459
1460 1998-03-11  Hrvoje Niksic  <hniksic@srce.hr>
1461
1462         * ftp.c (getftp): Don't translate "CWD %s".
1463
1464         * wget.h (GCC_FORMAT_ATTR): Renamed from FORMAT_ATTR.
1465
1466 1998-03-07  Hrvoje Niksic  <hniksic@srce.hr>
1467
1468         * ftp-opie.c (btoe): Use memcpy() instead of strncat().
1469
1470         * log.c (logputs): New function.
1471         (logvprintf): Renamed from vlogmsg; use logputs().
1472
1473         * retr.c (show_progress): Print `[100%]' when the retrieval is
1474         finished.
1475
1476         * init.c (run_wgetrc): Use FILE, not PATH.
1477         (wgetrc_file_name): Ditto.
1478
1479 1998-03-07  Tim Adam  <tma@osa.com.au>
1480
1481         * recur.c (parse_robots): Correctly reset `entries' on empty
1482         disallow.
1483
1484 1998-03-07  Hrvoje Niksic  <hniksic@srce.hr>
1485
1486         * init.c (cmd_spec_debug): Use cmd_boolean().
1487
1488 1998-02-23  Hrvoje Niksic  <hniksic@srce.hr>
1489
1490         * http.c (gethttp): Create proxy-authorization correctly.
1491
1492 1998-02-22  Hrvoje Niksic  <hniksic@srce.hr>
1493
1494         * md5.c: Ditto.
1495
1496         * getopt.c: Use ANSI function definitions.
1497
1498         * ftp-opie.c: New file.
1499
1500         * options.h: Don't redefine EXTERN.
1501
1502         * init.c: Sort it correctly.
1503
1504 1998-02-22  Hrvoje Niksic  <hniksic@srce.hr>
1505
1506         * version.c: Wget 1.5-b9 is released.
1507
1508 1998-02-22  Hrvoje Niksic  <hniksic@srce.hr>
1509
1510         * recur.c (recursive_retrieve): Reset `first_time'.
1511
1512         * ftp.c (getftp): Added `default' clause to switches of uerr_t.
1513
1514         * rbuf.c (rbuf_peek): Simplified.
1515         (rbuf_flush): Use MINVAL.
1516
1517         * wget.h (MINVAL): Moved from url.h.
1518
1519         * rbuf.h (RBUF_FD): New macro.
1520
1521         * url.c (add_url): Add to the head of the list.
1522
1523         * ftp.c (ftp_retrieve_list): Set the permissions to downloaded
1524         file.
1525         (getftp): Set the default permissions to 0600.
1526
1527 1998-02-21  Hrvoje Niksic  <hniksic@srce.hr>
1528
1529         * url.c (get_urls_html): Ditto.
1530         (convert_links): Ditto.
1531
1532         * recur.c (parse_robots): Ditto.
1533
1534         * html.c (ftp_index): Ditto.
1535
1536         * ftp-ls.c (ftp_parse_unix_ls): Open file as binary.
1537
1538         * init.c (defaults): Initialize `opt' to zero via memset.
1539
1540         * http.c (digest_authentication_encode): goto considered harmful.
1541
1542 1998-02-19  Hrvoje Niksic  <hniksic@srce.hr>
1543
1544         * ftp.c (delelement): Simplify and fix leak.
1545
1546 1998-02-18  Hrvoje Niksic  <hniksic@srce.hr>
1547
1548         * http.c (dump_hash): Use HEXD2ASC instead of home-grown stuff.
1549
1550         * url.h (HEXD2ASC): Removed warning.
1551
1552         * init.c (comind): Use binary search.
1553         (commands): Reorganized.
1554         (setval): Ditto.
1555         (cmd_boolean): New function.
1556         (cmd_number): Ditto.
1557         (cmd_number_inf): Ditto.
1558         (cmd_string): Ditto.
1559         (cmd_vector): Ditto.
1560         (cmd_directory_vector): Ditto.
1561         (cmd_bytes): Ditto.
1562         (cmd_time): Ditto.
1563         (cmd_spec_debug): Ditto.
1564         (cmd_spec_dirmode): Ditto.
1565         (cmd_spec_dirstruct): Ditto.
1566         (cmd_spec_dotstyle): Ditto.
1567         (cmd_spec_header): Ditto.
1568         (cmd_spec_htmlify): Ditto.
1569         (cmd_spec_mirror): Ditto.
1570         (cmd_spec_outputdocument): Ditto.
1571         (cmd_spec_recursive): Ditto.
1572         (settime): Merged with cmd_time().
1573         (setbytes): Merged with cmd_bytes().
1574         (setonoff): Merged with cmd_boolean().
1575         (onoff): Ditto.
1576
1577 1998-02-17  Hrvoje Niksic  <hniksic@srce.hr>
1578
1579         * Makefile.in (distclean): Remove `config.h'.
1580
1581 1998-02-17  Hrvoje Niksic  <hniksic@srce.hr>
1582
1583         * version.c: Wget 1.5-b8 is released.
1584
1585 1998-02-17  Hrvoje Niksic  <hniksic@srce.hr>
1586
1587         * http.c (digest_authentication_encode): New function.
1588         (create_authorization_line): Use it.
1589         (dump_hash): New function.
1590         (digest_authentication_encode): Use it.
1591
1592         * fnmatch.c: Renamed from `mtch.c'.
1593
1594 1998-02-15  Karl Eichwalder  <ke@suse.de>
1595
1596         * main.c (main): Tag "Written by..." string as translatable.
1597
1598 1998-02-15  Hrvoje Niksic  <hniksic@srce.hr>
1599
1600         * wget.h (FREE_MAYBE): New macro.
1601
1602         * http.c (create_authorization_line): Don't use ANSI C string
1603         concatenation feature.
1604         (basic_authentication_encode): Use alloca() for temporary
1605         variables.
1606
1607         * recur.h: Ditto.
1608
1609         * http.c: Ditto.
1610
1611         * headers.h: Ditto.
1612
1613         * ftp-basic.c: Protect declaration against non-ANSI compiler.
1614
1615         * http.c (create_authorization_line): Cast `unsigned char *' to
1616         `char *' for sprintf, to shut up the noisy Digital Unix cc.
1617
1618 1998-02-15  Hrvoje Niksic  <hniksic@srce.hr>
1619
1620         * version.c: Wget 1.5-b7 is released.
1621
1622 1998-02-15  Hrvoje Niksic  <hniksic@srce.hr>
1623
1624         * cmpt.c (strstr): Synched with glibc-2.0.6.
1625
1626         * ftp-basic.c (calculate_skey_response): Ditto.
1627         (calculate_skey_response): Use alloca().
1628
1629         * http.c (create_authorization_line): Work with FSF's version of
1630         md5.c.
1631
1632         * md5.c: New file, from GNU libc.
1633
1634 1998-02-14  Hrvoje Niksic  <hniksic@srce.hr>
1635
1636         * url.h (URL_CLEANSE): Name the temporary variable more carefully.
1637
1638 1998-02-13  Hrvoje Niksic  <hniksic@srce.hr>
1639
1640         * http.c (basic_authentication_encode): New function, instead of
1641         the macro.
1642
1643 1998-02-13  Junio Hamano  <junio@twinsun.com>
1644
1645         * http.c: Add HTTP-DA support.
1646         * ftp-basic.c: Add Opie/S-key support.
1647         * config.h.in, Makefile.in: Add HTTP-DA and Opie/S-key support.
1648         * md5.c, md5.h: New files.
1649
1650 1998-02-13  Hrvoje Niksic  <hniksic@srce.hr>
1651
1652         * http.c (http_process_range): Renamed from hprocrange().
1653         (http_process_range): Parse the whole header.
1654
1655         * headers.c: New file.
1656         (header_process): New function.
1657         (header_get): Renamed from fetch_next_header.
1658
1659         * all: Include utils.h only where necessary.
1660
1661         * wget.h: Declare xmalloc(), xrealloc() and xstrdup() here.
1662
1663         * wget.h: Add provisions for dmalloc.
1664
1665 1998-02-12  Hrvoje Niksic  <hniksic@srce.hr>
1666
1667         * version.c: Wget 1.5-b6 is released.
1668
1669 1998-02-12  Hrvoje Niksic  <hniksic@srce.hr>
1670
1671         * ftp.c (ftp_loop): Determine `filename' more precisely.
1672
1673         * init.c (setval): Don't set `opt.quiet' if output-document is
1674         `-'.
1675
1676         * log.c (log_init): Print to STDERR instead of STDOUT.
1677         (vlogmsg): Use STDERR by default.
1678         (logflush): Ditto.
1679
1680 1998-02-11  Simon Josefsson  <jas@pdc.kth.se>
1681
1682         * host.c: Use addr_in again.
1683
1684 1998-02-08  Karl Eichwalder  <karl@suse.de>
1685
1686         * http.c (gethttp): Fixed typo.
1687
1688 1998-02-08  Hrvoje Niksic  <hniksic@srce.hr>
1689
1690         * version.c: Wget 1.5-b5 is released.
1691
1692 1998-02-08  Hrvoje Niksic  <hniksic@srce.hr>
1693
1694         * retr.c (show_progress): Use it.
1695
1696         * log.c (logflush): New function.
1697
1698         * wget.h: Utilize __attribute__ if on gcc.
1699
1700 1998-02-07  Hrvoje Niksic  <hniksic@srce.hr>
1701
1702         * http.c (base64_encode_line): New argument LENGTH.
1703         (BASIC_AUTHENTICATION_ENCODE): Use it.
1704         (BASIC_AUTHENTICATION_ENCODE): Take length of HEADER into account.
1705
1706         * main.c (main): Fixed fprintf() format mismatch.
1707
1708 1998-02-06  Hrvoje Niksic  <hniksic@srce.hr>
1709
1710         * version.c: Wget 1.5-b4 is released.
1711
1712 1998-02-03  Simon Josefsson  <jas@pdc.kth.se>
1713
1714         * host.c: use sockaddr_in instead of addr_in.
1715
1716 1998-02-04  Hrvoje Niksic  <hniksic@srce.hr>
1717
1718         * init.c (cleanup): Use it.
1719
1720         * recur.c (recursive_cleanup): New function.
1721
1722         * retr.c (retrieve_from_file): Ditto.
1723
1724         * main.c (main): Use it.
1725
1726         * recur.c (recursive_reset): New function.
1727
1728         * retr.c (retrieve_from_file): Ditto.
1729
1730         * main.c (main): Simplify call to recursive_retrieve().
1731
1732         * recur.c (recursive_retrieve): Removed FLAGS argument.
1733
1734         * http.c (gethttp): Changed call to iwrite().
1735
1736 1998-02-03  Hrvoje Niksic  <hniksic@srce.hr>
1737
1738         * url.c (get_urls_html): Ditto.
1739         (free_urlpos): Ditto.
1740         (mkstruct): Ditto.
1741         (construct): Ditto.
1742
1743         * retr.c (retrieve_url): Move declaration of local variables to
1744         smaller scope.
1745
1746         * url.c (urlproto): Use it.
1747         (parseurl): Ditto.
1748         (str_url): Ditto.
1749         (get_urls_html): Ditto.
1750
1751         * utils.h (ARRAY_SIZE): New macro.
1752
1753         * url.c (proto): Moved from url.h.
1754
1755         * url.h (URL_CLEANSE): Reformatted.
1756         (USE_PROXY_P): Renamed from USE_PROXY.
1757
1758         * ftp-basic.c: Adjust to the new interface of iwrite().
1759
1760         * ftp-basic.c (ftp_port): Use alloca().
1761
1762 1998-02-03  Hrvoje Niksic  <hniksic@srce.hr>
1763
1764         * version.c: Wget 1.5-b3 is released.
1765
1766         * host.c (ftp_getaddress): Don't print to stderr directly.
1767
1768         * init.c (setbytes): Support `g' for gigabytes.
1769         (cmdtype): New specification CTIME.
1770         (setval): Use it with settime().
1771         (commands): Use it for WAIT and TIMEOUT.
1772
1773 1998-02-02  Hrvoje Niksic  <hniksic@srce.hr>
1774
1775         * http.c (BASIC_AUTHENTICATION_ENCODE): New macro.
1776         (gethttp): Use it.
1777
1778         * utils.c (unique_name_1): Moved from url.c.
1779         (unique_name): Ditto.
1780
1781         * url.c (url_filename): Ditto.
1782
1783         * log.c (redirect_output): Changed call to unique_name().
1784
1785         * url.c (unique_name_1): Renamed from unique_name().
1786         (unique_name): Changed interface.
1787
1788         * init.c (enum cmdid): Moved from init.h.
1789         (cmdtype): Ditto.
1790         (struct cmd): Ditto.
1791
1792         * main.c (main): Use it.
1793         (main): Moved `--backups' to not have a short option.
1794
1795         * options.h (struct options): New member BACKGROUND.
1796
1797         * main.c (print_help): Rearranged.
1798         (main): New long options for -n* short options: --no-directories,
1799         --no-host-directories, --non-verbose, --no-host-lookup and
1800         --dont-remove-listing.
1801
1802 1998-02-01  Hrvoje Niksic  <hniksic@srce.hr>
1803
1804         * main.c (main): Use log_close().
1805
1806         * log.c: New variable LOGFP.
1807         (vlogmsg): Use it.
1808         (redirect_output): Don't open /dev/null; set LOGFP to stdin
1809         instead.
1810         (log_close): New function.
1811
1812         * options.h (struct options): Removed LFILE.
1813
1814         * log.c (log_enable): Removed.
1815
1816         * main.c (main): Use it.
1817
1818         * log.c (log_init): New function.
1819
1820         * url.c (get_urls_html): Removed needless assignment to BASE.
1821
1822         * host.c (add_hlist): Don't set CMP needlessly.
1823
1824         * utils.c (match_backwards): Ditto.
1825         (in_acclist): Ditto.
1826
1827         * url.c (findurl): Ditto.
1828
1829         * netrc.c (parse_netrc): Ditto.
1830
1831         * log.c (log_dump): Ditto.
1832
1833         * html.c (html_quote_string): Ditto.
1834
1835         * ftp-basic.c (ftp_request): Made static.
1836
1837         * connect.c: Made global variables static.
1838
1839         * url.c (construct): Ditto.
1840
1841         * init.c (init_path): Avoid assignment inside `if'-condition.
1842
1843         * ftp.c: Don't include in.h or winsock.h.
1844
1845         * ftp.c (ftp_loop): Use SZ.
1846
1847         * connect.c (bindport): Cast &addrlen to int *.
1848         (conaddr): Ditto.
1849
1850         * init.c (initialize): Don't use SYSTEM_WGETRC unconditionally.
1851
1852 1998-01-31  Hrvoje Niksic  <hniksic@srce.hr>
1853
1854         * ftp.c (getftp): Initialize opt.ftp_pass here.
1855         (ftp_retrieve_dirs): Use alloca().
1856
1857         * init.c (defaults): Don't initialize opt.ftp_pass.
1858
1859         * sysdep.h (S_ISLNK): Declare for OS/2; ditto for lstat.
1860         From Ivan F. Martinez <ivanfm@ecodigit.com.br>.
1861
1862 1998-01-31  Hrvoje Niksic  <hniksic@srce.hr>
1863
1864         * recur.c (parse_robots): Check for comments more correctly.
1865
1866         * host.c (ftp_getaddress): Use STRDUP_ALLOCA.
1867         (ftp_getaddress): Add diagnostics when reverse-lookup yields only
1868         hostname.
1869
1870 1998-01-31  Hrvoje Niksic  <hniksic@srce.hr>
1871
1872         * version.c: Wget 1.5-b2 is released.
1873
1874         * netrc.c (NETRC_FILE_NAME): Moved from netrc.h.
1875
1876         * utils.c (proclist): Pass FNM_PATHNAME to fnmatch().
1877
1878         * ftp-basic.c (ftp_pasv): Avoid unnecessary casting to unsigned
1879         char.
1880
1881         * log.c: Don't attempt to hide arguments from ansi2knr.
1882
1883         * cmpt.c: Synched strptime() and mktime() with glibc-2.0.6.
1884
1885         * ansi2knr.c: Use a later version, from fileutils-3.16l alpha.
1886
1887         * ftp.c (getftp): Ditto.
1888
1889         * http.c (gethttp): Use it.
1890
1891         * retr.c (get_contents): New argument EXPECTED; pass it to
1892         show_progress().
1893         (show_progress): New argument EXPECTED; use it to display
1894         percentages.
1895
1896         * init.c (setval): Ditto.
1897
1898         * http.c (gethttp): Ditto.
1899         (http_loop): Ditto.
1900
1901         * ftp.c (getftp): Ditto.
1902         (ftp_loop_internal): Ditto.
1903
1904         * ftp-ls.c (ftp_parse_unix_ls): Use abort() instead of assert(0).
1905
1906         * sysdep.h (CLOSE): Simplify; use DEBUGP.
1907
1908         * netrc.c (search_netrc): Use alloca().
1909
1910         * init.c (defaults): Initialize no_flush.
1911
1912         * log.c (vlogmsg): Don't flush if no_flush.
1913
1914         * options.h (struct options): New variable no_flush.
1915
1916         * main.c (main): Don't play games with buffering.
1917
1918         * log.c (vlogmsg): Flush the output after every message.
1919
1920 1998-01-31  Hrvoje Niksic  <hniksic@srce.hr>
1921
1922         * init.c (parse_line): Ditto.
1923
1924         * url.c (get_urls_html): Ditto.
1925
1926         * main.c (main): Don't cast to unsigned char.
1927
1928         * init.c (run_wgetrc): Don't cast to unsigned char.
1929         (parse_line): Accept char instead of unsigned char.
1930
1931         * html.c (htmlfindurl): Use char instead of unsigned char.
1932
1933         * all: Use them.
1934
1935         * sysdep.h: Add wrappers to ctype macros to make them
1936         eight-bit-clean:
1937
1938 1998-01-30  Hrvoje Niksic  <hniksic@srce.hr>
1939
1940         * html.c (htmlfindurl): Download <img lowsrc=...>
1941
1942         * main.c (main): Ignore SIGPIPE.
1943
1944         * connect.c (select_fd): New argument WRITEP.
1945         (iwrite): Call select_fd().
1946
1947 1997-02-27  Fila Kolodny <fila@ibi.com>
1948
1949         * ftp.c (ftp_retrieve_list): If retrieving symlink and the proper
1950         one already exists, just skip it.
1951
1952 1998-01-30  Hrvoje Niksic  <hniksic@srce.hr>
1953
1954         * http.c (gethttp): Cosmetic changes.
1955
1956         * http.c (check_end): Allow `+D...' instead of `GMT'.
1957         From Fabrizio Pollastri <pollastri@cstv.to.cnr.it>.
1958
1959         * url.c (process_ftp_type): New function.
1960         (parseurl): Use it.
1961
1962         * connect.c (iwrite): Allow writing in a few chunks.
1963         (bindport): Made SRV static, so addr can point to it.
1964         (select_fd): Removed HPUX kludge.
1965
1966         * host.c (free_hlist): Incorporated into clean_hosts().
1967
1968 1998-01-29  Hrvoje Niksic  <hniksic@srce.hr>
1969
1970         * host.c (hlist): Made static.
1971         (search_address): Cosmetic change.
1972
1973 1998-01-29  Hrvoje Niksic  <hniksic@srce.hr>
1974
1975         * version.c: Wget v1.5-b1 is released.
1976
1977         * http.c (hgetlen): Use sizeof() to get the header length.
1978         (hgetrange): Ditto.
1979         (hgettype): Ditto.
1980         (hgetlocation): Ditto.
1981         (hgetmodified): Ditto.
1982         (haccepts_none): Ditto.
1983
1984         * main.c (main): Updated `--version' and `--help' output, as per
1985         Francois Pinard's suggestions.
1986
1987         * main.c: Include locale.h; call setlocale(), bindtextdomain() and 
1988         textdomain().
1989
1990         * config.h.in: Define stubs for I18N3.
1991
1992         * wget.h: Include libintl.h.
1993
1994 1998-01-28  Hrvoje Niksic  <hniksic@srce.hr>
1995
1996         * url.c (mkstruct): Check for opt.cut_dirs.
1997         (mkstruct): alloca()-te more, xmalloc() less.
1998
1999         * utils.c (load_file): Check for ferror().
2000
2001         * url.c (get_urls_file): Close only the files we opened.
2002         (get_urls_html): Ditto.
2003         (count_slashes): New function.
2004
2005         * http.h: Removed.
2006
2007         * http.c (gethttp): Respect username and password provided by
2008         proxy URL.
2009         (base64_encode_line): Write into an existing buffer instead of
2010         malloc-ing a new one.
2011         (struct http_stat): Moved from http.h
2012
2013         * retr.c (retrieve_url): Free SUF.
2014
2015         * all: Removed lots of unnecessary .h dependencies.
2016
2017         * html.c (global_state): Made static.
2018
2019         * utils.h (ALLOCA_ARRAY): New macro.
2020
2021         * main.c (main): New option `--cut-dirs'.
2022
2023         * url.c (construct): Use alloca() for T.
2024
2025         * utils.c (mkdirhier): Use STRDUP_ALLOCA.
2026
2027         * host.c (_host_t): Moved from host.h.
2028         (struct host): Renamed from _host_t.
2029         (store_hostaddress): Use STRDUP_ALLOCA for INET_S.
2030         (realhost): Ditto.
2031
2032         * host.h: Don't include url.h.
2033
2034         * ftp.c (LIST_FILENAME): Moved from ftp.h.
2035
2036         * init.c (DEFAULT_FTP_ACCT): Moved from ftp.h.
2037
2038         * main.c (main): Enable log if the output goes to a TTY.
2039
2040         * connect.h: Removed unused constant `BACKLOG'.
2041
2042         * config.h.in: Check for isatty().
2043
2044         * Makefile.in (LINK): Use CFLAGS when linking.
2045
2046 1998-01-27  Hrvoje Niksic  <hniksic@srce.hr>
2047
2048         * mswindows.c (ws_hangup): Use redirect_output().
2049
2050         * main.c (redirect_output_signal): New function; use
2051         redirect_output().
2052
2053         * log.c (redirect_output): New function, based on hangup(), which
2054         is deleted.
2055
2056         * log.c (vlogmsg): New function.
2057
2058         * wget.h (DEBUGP): Use debug_logmsg().
2059
2060         * main.c (hangup): Use it.
2061
2062         * log.c (log_dump): New function.
2063
2064         * utils.h (DO_REALLOC): Use `long' for various sizes.
2065
2066         * http.c (hskip_lws): Use `while', for clarity.
2067         (HTTP_DYNAMIC_LINE_BUFFER): New constant.
2068         (fetch_next_header): Use it instead of DYNAMIC_LINE_BUFFER.
2069
2070         * ftp-basic.c (FTP_DYNAMIC_LINE_BUFFER): New constant.
2071         (ftp_response): Use it instead of DYNAMIC_LINE_BUFFER.
2072
2073         * utils.c (DYNAMIC_LINE_BUFFER): Moved from utils.c.
2074         (LEGIBLE_SEPARATOR): Ditto.
2075         (FILE_BUFFER_SIZE): Ditto.
2076
2077         * retr.c (BUFFER_SIZE): Moved from retr.h.
2078
2079         * log.c: New file.
2080         (logmsg): Moved from utils.c.
2081         (debug_logmsg): New function.
2082
2083         * mswindows.h: Include it here.
2084
2085         * init.c: Ditto.
2086
2087         * utils.c: Don't include <windows.h>.
2088
2089 1998-01-25  Hrvoje Niksic  <hniksic@srce.hr>
2090
2091         * host.c (ftp_getaddress): Ditto.
2092
2093         * main.c (main): Use it.
2094
2095         * utils.h (STRDUP_ALLOCA): New macro.
2096
2097         * init.c: Prepend `wget: ' to error messages printed on stderr.
2098
2099         * utils.c (mkdirhier): Renamed from mymkdir.
2100         (touch): Renamed from my_touch.
2101         (pwd_cuserid): Renamed from my_cuserid().
2102
2103 1998-01-24  Andy Eskilsson  <andy.eskilsson@telelogic.se>
2104
2105         * utils.c (accdir): Process wildcards.
2106         (proclist): New function.
2107         (accdir): Use it to avoid code repetition.
2108
2109 1998-01-24  Hrvoje Niksic  <hniksic@srce.hr>
2110
2111         * recur.c (parse_robots): Respect opt.useragent; use alloca().
2112
2113         * http.c (gethttp): Construct useragent accordingly.
2114
2115         * version.c: Changed version string to numbers-only.
2116
2117         * main.c (print_help): List all the options.
2118
2119         * mswindows.c (windows_main_junk): Initialize argv0 here.
2120
2121 1998-01-24  Karl Heuer  <kwzh@gnu.org>
2122
2123         * netrc.c (search_netrc): Initialize `l' only after processing
2124         netrc.
2125
2126         * main.c (main): Don't trap SIGHUP if it's being ignored.
2127
2128 1998-01-24  Hrvoje Niksic  <hniksic@srce.hr>
2129
2130         * all: Use logmsg().
2131
2132         * utils.c (time_str): Moved from retr.c.
2133         (logmsg): New function.
2134         (logmsg_noflush): Ditto.
2135
2136         * rbuf.c: New file, moved buf_* functions here.
2137
2138         * ftp.c (ftp_expected_bytes): Moved from ftp-basic.c.
2139
2140         * ftp-basic.c (ftp_rest): Use prnum().
2141
2142         * ftp-basic.c: Ditto.
2143
2144         * ftp.c: Use the new reading functions and macros.
2145
2146         * retr.c (buf_initialize): New function.
2147         (buf_initialized_p): Ditto.
2148         (buf_uninitialize): Ditto.
2149         (buf_fd): Ditto.
2150
2151         * http.c (fetch_next_header): Use the BUF_READCHAR macro for
2152         efficiency.
2153         (gethttp): Use alloca() where appropriate.
2154
2155         * retr.c (buf_readchar): Use it.
2156         (buf_peek): Use rstreams.
2157
2158         * retr.h (BUF_READCHAR): New macro.
2159
2160         * init.c (home_dir): Rewritten for clarity.
2161         (init_path): Ditto.
2162
2163         * mswindows.c (ws_backgnd): Made static.
2164         (read_registry): Ditto.
2165         (ws_cleanup): Ditto.
2166         (ws_handler): Ditto.
2167
2168 1998-01-23  Hrvoje Niksic  <hniksic@srce.hr>
2169
2170         * alloca.c: New file.
2171
2172         * Makefile.in (ALLOCA): Define.
2173
2174         * mswindows.c (ws_help): Constify.
2175         (ws_help): Use alloca.
2176
2177         * mswindows.c: Reformat.
2178
2179         * all: Added _(...) annotations for I18N snarfing and translation.
2180
2181         * host.c (ftp_getaddress): Nuke SYSINFO.
2182         (ftp_getaddress): Don't use getdomainname().
2183         (ftp_getaddress): Use uname(), where available.
2184
2185         * http.c (gethttp): Protect a stray fprintf().
2186
2187         * init.c (settime): New function.
2188         (setval): Treat WAIT specially, allowing suffixes like `m' for
2189         minutes, etc.
2190
2191 1998-01-21  Hrvoje Niksic  <hniksic@srce.hr>
2192
2193         * url.c (get_urls_html): Use alloca() for TEMP.
2194
2195 1998-01-21  Jordan Mendelson  <jordy@wserv.com>
2196
2197         * url.c (rotate_backups): New function.
2198
2199         * http.c (gethttp): Ditto.
2200
2201         * ftp.c (getftp): Rotate backups.
2202
2203 1997-12-18  Hrvoje Niksic  <hniksic@srce.hr>
2204
2205         * all: Renamed nmalloc(), nrealloc() and nstrdup() to xmalloc(),
2206         xrealloc() and xstrdup().  Use the new functions.
2207
2208         * url.c (decode_string): Made static.
2209         (has_proto): Ditto.
2210         (parse_dir): Ditto.
2211         (parse_uname): Ditto.
2212         (mkstruct): Ditto.
2213         (construct): Ditto.
2214         (construct_relative): Ditto.
2215
2216         * retr.c (show_progress): Made static.
2217
2218         * recur.c (robots_url): Made static.
2219         (retrieve_robots): Ditto.
2220         (parse_robots): Ditto.
2221         (robots_match): Ditto.
2222
2223         * main.h: Removed.
2224
2225         * main.c (printhelp): Made static.
2226         (hangup): Ditto.
2227
2228         * init.c (comind): Made static.
2229         (defaults): Ditto.
2230         (init_path): Ditto.
2231         (run_wgetrc): Ditto.
2232         (onoff): Ditto.
2233         (setonoff): Ditto.
2234         (setnum): Ditto.
2235         (myatoi): Ditto.
2236         (getperms): Ditto.
2237         (setbytes): Ditto.
2238
2239         * http.c (fetch_next_header): Made static.
2240         (hparsestatline): Ditto.
2241         (hskip_lws): Ditto.
2242         (hgetlen): Ditto.
2243         (hgetrange): Ditto.
2244         (hgettype): Ditto.
2245         (hgetlocation): Ditto.
2246         (hgetmodified): Ditto.
2247         (haccepts_none): Ditto.
2248         (gethttp): Ditto.
2249         (base64_encode_line): Ditto.
2250         (mktime_from_utc): Ditto.
2251         (http_atotm): Ditto.
2252
2253         * html.c (idmatch): Made static.
2254
2255         * host.c (search_host): Made static.
2256         (search_address): Ditto.
2257         (free_hlist): Ditto.
2258
2259         * ftp.c (getftp): Made static.
2260         (ftp_loop_internal): Ditto.
2261         (ftp_get_listing): Ditto.
2262         (ftp_retrieve_list): Ditto.
2263         (ftp_retrieve_dirs): Ditto.
2264         (ftp_retrieve_glob): Ditto.
2265         (freefileinfo): Ditto.
2266         (delelement): Ditto.
2267
2268         * ftp-ls.c (symperms): Made static.
2269         (ftp_parse_unix_ls): Ditto.
2270
2271         * connect.c (select_fd): Made static.
2272
2273         * utils.c (xmalloc): Renamed from nmalloc.
2274         (xrealloc): Renamed from nrealloc.
2275         (xstrdup): Renamed from nstrdup.
2276
2277         * getopt.c (exchange): Use alloca.
2278
2279         * mswindows.c (mycuserid): Use strncpy.
2280
2281         * New files mswindows.c, mswindows.h, sysdep.h.  winjunk.c,
2282         systhings.h, windecl.h and winjunk.h removed.
2283
2284         * mswindows.c (sleep): New function.
2285
2286         * utils.c: Include <windows.h> under Windows.
2287
2288 1997-06-12  Darko Budor  <dbudor@zesoi.fer.hr>
2289
2290         * url.h (URL_UNSAFE): Change default under Windows.
2291
2292         * retr.c (retrieve_from_file): Respect opt.delete_after.
2293
2294         * main.c (main): Call ws_help on Windows.
2295
2296         * winjunk.c (windows_main_junk): New function.
2297
2298         * main.c (main): Junk-process argv[0].
2299
2300         * http.c (mktime_from_utc): Return -1 if mktime failed.
2301
2302         * http.c (http_loop): Ditto.
2303
2304         * ftp.c (ftp_loop_internal): Change title on Windows when using a
2305         new URL.
2306
2307         * winjunk.c (getdomainname): Lots of functions.
2308
2309 1997-06-12  Hrvoje Niksic  <hniksic@srce.hr>
2310
2311         * cmpt.c (strptime_internal): Handle years more correctly for
2312         `%y'.
2313
2314 1997-06-09  Mike Thomas <mthomas@reality.ctron.com>
2315
2316         * http.c (gethttp): Allocate enough space for
2317         `Proxy-Authorization' header.
2318
2319 1997-05-10  Hrvoje Niksic  <hniksic@srce.hr>
2320
2321         * version.c: Wget/1.4.5 is released.
2322
2323 1997-05-10  Hrvoje Niksic  <hniksic@srce.hr>
2324
2325         * retr.c (get_contents): Check return value of fwrite more
2326         carefully.
2327
2328 1997-03-30  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
2329
2330         * cmpt.c (strptime_internal) [case 'Y']: Always subtract 1900 from
2331         year, regardless of century.
2332
2333 1997-03-30  Hrvoje Niksic  <hniksic@srce.hr>
2334
2335         * utils.c (isfile): Use `lstat' instead of `stat'.
2336
2337 1997-03-29  Hrvoje Niksic  <hniksic@srce.hr>
2338
2339         * utils.c (numdigit): Use explicit test.
2340
2341 1997-03-21  Hrvoje Niksic  <hniksic@srce.hr>
2342
2343         * http.c (http_loop): Always use `url_filename' to get u->local.
2344
2345 1997-03-20  Hrvoje Niksic  <hniksic@srce.hr>
2346
2347         * url.c: Recognize https.
2348
2349 1997-03-13  Hrvoje Niksic  <hniksic@srce.hr>
2350
2351         * recur.c (recursive_retrieve): Lowercase just the host name.
2352
2353 1997-03-09  Hrvoje Niksic  <hniksic@srce.hr>
2354
2355         * url.c (get_urls_file): Use the correct test.
2356         (get_urls_html): Ditto.
2357
2358 1997-03-07  Hrvoje Niksic  <hniksic@srce.hr>
2359
2360         * connect.c: Reverted addrlen to int.
2361
2362         * init.c (parse_line): Check for -1 instead of NONE.
2363
2364         * version.c: Changed version to 1.4.5.
2365
2366 1997-02-17  Hrvoje Niksic  <hniksic@srce.hr>
2367
2368         * init.c: New option netrc.
2369         (initialize): Don't parse .netrc.
2370
2371         * cmpt.c (recursive): Return rp.
2372         (strptime_internal): Match the long strings first, the abbreviated
2373         second.
2374
2375 1997-02-16  Hrvoje Niksic  <hniksic@srce.hr>
2376
2377         * http.c (check_end): New function.
2378         (http_atotm): Use it.
2379  
2380 1997-02-13  gilles Cedoc  <gilles@cedocar.fr>
2381
2382         * http.c (gethttp): Use them.
2383
2384         * init.c: New options proxy_user and proxy_passwd.
2385
2386 1997-02-14  Hrvoje Niksic  <hniksic@srce.hr>
2387
2388         * ftp.c (ftp_retrieve_list): Create links even if not relative.
2389
2390 1997-02-10  Hrvoje Niksic  <hniksic@srce.hr>
2391
2392         * recur.c (recursive_retrieve): Lowercase the host name, if the
2393         URL is not "optimized".
2394
2395         * host.c (realhost): Return l->hostname, even if it matches with
2396         host.
2397
2398 1997-02-10  Marin Purgar  <pmc@asgard.hr>
2399
2400         * connect.c: Make addrlen size_t instead of int.
2401         (conaddr): Ditto.
2402
2403 1997-02-09  Gregor Hoffleit  <flight@mathi.uni-heidelberg.DE>
2404
2405         * systhings.h: Define S_ISLNK on NeXT too.
2406
2407 1997-02-09  Hrvoje Niksic  <hniksic@srce.hr>
2408
2409         * version.c: Released 1.4.3.
2410
2411         * url.c: Futher update to list of protostrings.
2412         (skip_proto): Skip `//' correctly for FTP and HTTP.
2413
2414         * url.c (get_urls_html): Handle bogus `http:' things a little
2415         different.
2416
2417         * main.c (main): Removed `follow-ftp' from `f'.
2418         (main): Dumped the `prefix-files' and `file-prefix' options and
2419         features; old and bogus.
2420         (main): Exit on failed setval() in `-e'.
2421
2422         * http.c (fetch_next_header): Use it to detect header continuation
2423         correctly.
2424
2425         * retr.c (buf_peek): New function.
2426
2427 1997-02-08  Hrvoje Niksic  <hniksic@srce.hr>
2428
2429         * wget.h: Include time.h and stuff.
2430
2431 1997-02-08  Roger Beeman  <beeman@cisco.com>
2432
2433         * ftp.c: Include <time.h>
2434
2435 1997-02-07  Hrvoje Niksic  <hniksic@srce.hr>
2436
2437         * url.c (findurl): Would read over buffer limits.
2438
2439 1997-02-06  Hrvoje Niksic  <hniksic@srce.hr>
2440
2441         * ftp-ls.c (ftp_parse_unix_ls): Allow spaces in file names.
2442
2443 1997-02-05  Hrvoje Niksic  <hniksic@srce.hr>
2444
2445         * http.c (http_atotm): Initialize tm.is_dst.
2446
2447 1997-02-02  Hrvoje Niksic  <hniksic@srce.hr>
2448
2449         * http.c (gethttp): Don't print the number of retrieved headers.
2450
2451         * main.c (main): New option `--no-clobber', alias for `-nc'.
2452
2453         * url.c: Recognize `https://'.
2454
2455 1997-02-01  Hrvoje Niksic  <hniksic@srce.hr>
2456
2457         * host.c (herrmsg): Don't use h_errno.
2458
2459 1997-01-30  Hrvoje Niksic  <hniksic@srce.hr>
2460
2461         * host.c (accept_domain): Use it.
2462
2463         * main.c (main): New option `--exclude-domains'.
2464
2465         * retr.c (retrieve_url): Use it.
2466         (retrieve_url): Bail out when an URL is redirecting to itself.
2467
2468         * url.c (url_equal): New function.
2469
2470 1997-01-29  Hrvoje Niksic  <hniksic@srce.hr>
2471
2472         * connect.c: Include arpa/inet.h instead of arpa/nameser.h.
2473
2474         * http.c (mk_utc_time): New function.
2475         (http_atotm): Use it; handle time zones correctly.
2476
2477 1997-01-28  Hrvoje Niksic  <hniksic@srce.hr>
2478
2479         * http.c: Ditto.
2480
2481         * ftp-basic.c: Use it instead of WRITE.
2482
2483         * connect.c (iwrite): New function.
2484
2485 1997-01-27  Hrvoje Niksic  <hniksic@srce.hr>
2486
2487         * cmpt.c (mktime): New function.
2488
2489         * netrc.c: Include <sys/types.h>.
2490
2491         * main.c (main): Wouldn't recognize --spider.
2492
2493         * retr.c (rate): Use `B', `KB' and `MB'.
2494         (reset_timer,elapsed_time): Moved from utils.c.
2495
2496         * ftp.c (ftp_retrieve_list): Ditto.
2497
2498         * http.c (http_loop): Don't touch the file if opt.dfp.
2499
2500 1997-01-24  Hrvoje Niksic  <hniksic@srce.hr>
2501
2502         * cmpt.c: New file.
2503
2504         * ftp.c (ftp_retrieve_glob): New argument semantics.
2505         (ftp_retrieve_dirs): Use it.
2506         (ftp_loop): Ditto.
2507
2508         * html.c (htmlfindurl): Recognize `'' as the quote char.
2509
2510 1997-01-23  Hrvoje Niksic  <hniksic@srce.hr>
2511
2512         * ftp.c (ftp_loop_internal): Use it.
2513
2514         * utils.c (remove_link): New function.
2515
2516 1997-01-22  Hrvoje Niksic  <hniksic@srce.hr>
2517
2518         * retr.c (retrieve_url): Require STRICT redirection URL.
2519
2520         * url.c (parseurl): New argument STRICT.
2521
2522         * http.c (hparsestatline): Be a little-bit less strict about
2523         status line format.
2524
2525 1997-01-21  Hrvoje Niksic  <hniksic@srce.hr>
2526
2527         * http.c (gethttp): Use it.
2528
2529         * main.c (main): Don't use '<digit>' as options.
2530
2531         * init.c: New option ignore_length.
2532
2533         * http.c (gethttp): Ditto.
2534         (http_loop): Check for redirection without Location:.
2535         (gethttp): Don't print Length unless RETROKF.
2536
2537         * ftp.c (getftp): Use it.
2538
2539         * url.c (mkalldirs): New function.
2540
2541         * utils.c (mymkdir): Don't check for existing non-directory.
2542
2543         * url.c (mkstruct): Don't create the directory.
2544
2545 1997-01-20  Hrvoje Niksic  <hniksic@srce.hr>
2546
2547         * init.c (setval): Removed NO_RECURSION checks.
2548
2549 1997-01-19  Hrvoje Niksic  <hniksic@srce.hr>
2550
2551         * version.c: "Released" 1.4.3-pre2.
2552
2553         * recur.c (recursive_retrieve): Bypass host checking only if URL
2554         is ftp AND parent URL is not ftp.
2555
2556         * ftp-basic.c (ftp_request): Print out Turtle Power.
2557
2558         * ftp.c (ftp_loop): Call ftp_retrieve_glob with 0 if there's no
2559         wildcard.
2560         (ftp_retrieve_glob): Call ftp_loop_internal even on empty list, if
2561         not glob.
2562
2563         * http.c (gethttp): Be a little bit smarter about status codes.
2564
2565         * recur.c (recursive_retrieve): Always reset opt.recursive when
2566         dealing with FTP.
2567
2568 1997-01-18  Hrvoje Niksic  <hniksic@srce.hr>
2569
2570         * retr.c (retrieve_url): New variable location_changed; use it for
2571         tests instead of mynewloc.
2572         (retrieve_url): Allow heuristic adding of html.
2573
2574         * url.c (url_filename): Don't use the `%' in Windows file names.
2575
2576         * http.c (http_loop): Always time-stamp the local file.
2577
2578         * http.c (http_loop): Ditto.
2579
2580         * ftp.c (ftp_retrieve_list): Use it.
2581
2582         * utils.c (my_touch): New function.
2583
2584         * ftp.c (ftp_retrieve_list): Use #ifdef HAVE_STRUCT_UTIMBUF
2585         instead of #ifndef NeXT.
2586
2587         * utils.c (strptime): New version, by Ulrich Drepper.
2588
2589 1997-01-17  Hrvoje Niksic  <hniksic@srce.hr>
2590
2591         * http.c (haccepts_none): Renamed from `haccepts_bytes'.
2592         (gethttp): If haccepts_none(), disable ACCEPTRANGES.
2593         (http_loop): Would remove ACCEPTRANGES.
2594
2595         * ftp.c (getftp): Call ftp_list with NULL.
2596
2597 1997-01-15  Hrvoje Niksic  <hniksic@srce.hr>
2598
2599         * html.c (ftp_index): Don't print minutes and seconds if we don't
2600         know them; beautify the output.
2601
2602         * ftp.c (getftp): Don't close the socket on FTPNSFOD.
2603
2604 1997-01-14  Hrvoje Niksic  <hniksic@srce.hr>
2605
2606         * utils.c (strptime): New function.
2607         (strptime): Don't use get_alt_number.
2608         (strptime): Don't use locale.
2609         (match_string): Made it a function.
2610
2611 1997-01-12  Hrvoje Niksic  <hniksic@srce.hr>
2612
2613         * http.c (http_atotm): New function.
2614         (http_loop): Use it.
2615
2616         * atotm.c: Removed from the distribution.
2617
2618         * http.c (base64_encode_line): Rewrite.
2619
2620 1997-01-09  Hrvoje Niksic  <hniksic@srce.hr>
2621
2622         * ftp.c (getftp): Use ftp_expected_bytes; print size.
2623
2624         * ftp-basic.c (ftp_response): Use ftp_last_respline.
2625         (ftp_expected_bytes): New function.
2626
2627         * ftp.c (getftp): Print the unauthoritative file length.
2628
2629         * ftp-ls.c: Renamed from ftp-unix.c.
2630         (ftp_parse_ls): Moved from ftp.c.
2631         (ftp_parse_unix_ls): Recognize seconds in time spec.
2632         (ftp_parse_unix_ls): Recognize year-less dates of the previous
2633         year.
2634
2635 1997-01-08  Hrvoje Niksic  <hniksic@srce.hr>
2636
2637         * ftp-basic.c: Don't declare errno if #defined.
2638
2639         * host.c (ftp_getaddress): Check for sysinfo legally.
2640
2641 1997-01-08  Darko Budor  <dbudor@diana.zems.fer.hr>
2642
2643         * connect.c (iread): Use READ.
2644
2645 1996-12-23  Hrvoje Niksic  <hniksic@srce.hr>
2646
2647         * url.c: Recognize finger, rlogin, tn3270, mid and cid as valid
2648         schemes.
2649
2650 1996-12-22  Hrvoje Niksic  <hniksic@srce.hr>
2651
2652         * host.c (ftp_getaddress): Allow `.' in hostname.
2653
2654 1996-12-26  Darko Budor <dbudor@zems.fer.hr>
2655
2656         * wget.h: READ and WRITE macros for use instead of read and write
2657         on sockets, grep READ *.c, grep WRITE *.c
2658
2659         * wsstartup.c: new file - startup for winsock
2660
2661         * wsstartup.h: new file
2662
2663         * win32decl.h: new file - fixup for <errno.h> and winsock trouble
2664
2665         * configure.bat: Configure utility for MSVC
2666
2667         * src/Makefile.ms,config.h.ms: new files for use with MSVC 4.x
2668
2669 1996-12-22  Hrvoje Niksic  <hniksic@srce.hr>
2670
2671         * version.c: Released 1.4.3-pre.
2672
2673         * utils.c (prnum): Accept long.
2674         (legible): Use prnum().
2675
2676         * connect.c (make_connection): Accept port as short.
2677         (bindport): Ditto.
2678
2679         * http.c (gethttp): Use search_netrc.
2680
2681 1996-12-21  Hrvoje Niksic  <hniksic@srce.hr>
2682
2683         * ftp.c (getftp): Use search_netrc.
2684
2685         * netrc.c (free_netrc): New function.
2686
2687         * init.c (home_dir): New function.
2688
2689         * url.c (convert_links): Allow REL2ABS changes.
2690
2691 1996-12-21  Gordon Matzigkeit  <gord@gnu.ai.mit.edu>
2692
2693         * netrc.c: New file.
2694         (parse_netrc, maybe_add_to_list): New functions.
2695
2696 1996-12-17  Hrvoje Niksic  <hniksic@srce.hr>
2697
2698         * retr.c (retrieve_url): Reset opt.recursion before calling
2699         ftp_loop if it is reached through newloc.
2700
2701         * init.c (run_wgetrc): Print the wgetrc path too, when reporting
2702         error; don't use "Syntax error", since we don't know if it is
2703         really a syntax error.
2704
2705 1996-12-16  Hrvoje Niksic  <hniksic@srce.hr>
2706
2707         * utils.c (acceptable): Extract the filename part of the path.
2708
2709         * recur.c (recursive_retrieve): Call acceptable() with the right
2710         argument; would bug out on wildcards.
2711
2712         * init.c (parse_line): Likewise.
2713
2714         * html.c (htmlfindurl): Cast to char * when calling stuff.
2715
2716 1996-12-15  Hrvoje Niksic  <hniksic@srce.hr>
2717
2718         * ftp.c (getftp): Use ftp_pasv.
2719
2720         * ftp-basic.c (ftp_request): Accept NULL value.
2721         (ftp_pasv): New function.
2722
2723         * options.h (struct options): Add passive FTP option.
2724
2725 1996-12-15  Hrvoje Niksic  <hniksic@srce.hr>
2726
2727         * url.c (parseurl): Debug output.
2728
2729         * utils.c (path_simplify): New one, adapted from bash's
2730         canonicalize_pathname().
2731
2732 1996-12-14  Hrvoje Niksic  <hniksic@srce.hr>
2733
2734         * ftp.c (getftp): Don't discard the buffer.
2735
2736         * retr.c (get_contents): New parameter nobuf.
2737
2738 1996-12-13  Shawn McHorse  <riffraff@txdirect.net>
2739
2740         * html.c (htmlfindurl): Recognize <meta contents="d; URL=...".
2741
2742         * init.c (setval): Strip the trailing slashes on CVECDIR.
2743
2744 1996-12-13  Hrvoje Niksic  <hniksic@srce.hr>
2745
2746         * init.c: Make excludes and includes under CVECDIR instead of
2747         CVEC.
2748
2749 1996-12-13  Shawn McHorse  <riffraff@txdirect.net>
2750
2751         * url.c (get_urls_html): Skip "http:".
2752
2753 1996-12-13  Hrvoje Niksic  <hniksic@srce.hr>
2754
2755         * utils.c (strcasecmp): From glibc.
2756         (strncasecmp): Also.
2757         (strstr): Also.
2758
2759         * url.c: Added javascript: to the list of URLs prefixes.
2760
2761 1996-12-12  Shawn McHorse  <riffraff@txdirect.net>
2762
2763         * recur.c (retrieve_robots): Print the warning message only if
2764         verbose.
2765
2766 1996-12-12  Gregor Hoffleit  <flight@mathi.uni-heidelberg.DE>
2767
2768         * ftp.c (ftp_retrieve_list): Use NeXT old utime interface.
2769
2770 1996-12-12  Hrvoje Niksic  <hniksic@srce.hr>
2771
2772         * systhings.h: New file.
2773
2774         * ../configure.in: Check for utime.h
2775
2776         * ftp.c: Check whether we have unistd.h.
2777
2778 1996-11-27  Hrvoje Niksic  <hniksic@srce.hr>
2779
2780         * recur.c (recursive_retrieve): Send the canonical URL as referer.
2781         (recursive_retrieve): Call get_urls_html with the canonical URL.
2782
2783 1996-12-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2784
2785         * (configure.in, config.h.in, src/Makefile.in, src/*.[ch]): Add
2786         ansi2knr support for compilers which don't support ANSI style
2787         function prototypes and signatures.
2788
2789         * (aclocal.m4, src/ansi2knr.c, src/ansi2knr.1): New files.
2790
2791 1996-11-26  Hrvoje Niksic  <hniksic@srce.hr>
2792
2793         * url.c: Use it; Recognize paths ending with "." and ".." as
2794         directories.
2795         (url_filename): Append .n whenever file exists and could be a
2796         directory.
2797
2798         * url.h (ISDDOT): New macro.
2799
2800         * init.c (parse_line): Use unsigned char.
2801
2802         * url.c (get_urls_html): Cast to unsigned char * when calling
2803         htmlfindurl.
2804
2805         * html.c (htmlfindurl): Use unsigned char.
2806
2807         * version.c: Changed version to 1.4.3.
2808
2809 1996-11-25  Hrvoje Niksic  <hniksic@srce.hr>
2810
2811         * version.c: Released 1.4.2.
2812
2813         * ftp.c (getftp): Simplified assertion.
2814         (ftp_loop_internal): Remove symlink before downloading.
2815         (ftp_retrieve_list): Unlink the symlink name before attempting to
2816         create a symlink!
2817
2818         * options.h (struct options): Renamed print_server_response to
2819         server_response.
2820
2821         * ftp.c (rel_constr): Removed.
2822         (ftp_retrieve_list): Don't use it.
2823         (ftp_retrieve_list): Use opt.retr_symlinks.
2824
2825 1996-11-24  Hrvoje Niksic  <hniksic@srce.hr>
2826
2827         * main.c (main): New option retr_symlinks.
2828
2829         * url.c (convert_links): Print verbose message.
2830
2831 1996-11-24  Hrvoje Niksic  <hniksic@srce.hr>
2832
2833         * http.c (http_loop): Reset newloc in the beginning of function;
2834         would cause FMR in retrieve_url.
2835
2836 1996-11-23  Hrvoje Niksic  <hniksic@srce.hr>
2837
2838         * recur.c (convert_all_links): Find the URL of each HTML document,
2839         and feed it to get_urls_html; would bug out.
2840         (convert_all_links): Check for l2 instead of dl; removed dl.
2841
2842         * url.c (convert_links): Don't refer to freed newname.
2843
2844         * recur.c (recursive_retrieve): Add this_url to urls_downloaded.
2845
2846         * main.c (main): Print the OS_TYPE in the debug output, too.
2847
2848         * recur.c (recursive_retrieve): Check for opt.delete_after.
2849
2850         * main.c (main): New option delete-after.
2851
2852         * init.c (setval): Cleaned up.
2853
2854 1996-11-21  Hrvoje Niksic  <hniksic@srce.hr>
2855
2856         * Makefile.in (wget): Make `wget' the default target.
2857
2858         * ftp.c (ftp_loop_internal): Move noclobber checking out of the
2859         loop.
2860         (ftp_retrieve_list): Warn about non-matching sizes.
2861
2862         * http.c (http_loop): Made -nc non-dependent on opt.recursive.
2863
2864         * init.c (setnum): Renamed from setnuminf; New argument flags.
2865         (setval): Use it.
2866
2867         * main.c (main): Sorted the options.
2868         (main): New option --wait.
2869
2870 1996-11-21  Shawn McHorse  <riffraff@txdirect.net>
2871
2872         * html.c (htmlfindurl): Reset s->in_quote after getting out of
2873         quotes.
2874
2875 1996-11-20  Hrvoje Niksic  <hniksic@srce.hr>
2876
2877         * version.c: Changed version to 1.4.2.
2878
2879 1996-11-20  Hrvoje Niksic  <hniksic@srce.hr>
2880
2881         * version.c: Released 1.4.1.
2882
2883         * html.c (html_quote_string): New function.
2884         (ftp_index): Use it.
2885         (htmlfindurl): A more gentle ending debug message.
2886
2887         * ftp.c (ftp_loop): Check for opt.htmlify.
2888
2889         * init.c: New command htmlify.
2890
2891         * ftp.c (getftp): Nicer error messages, with `'-encapsulated
2892         strings.
2893         (ftp_loop): Print size of index.html.
2894
2895         * init.c (setval): Implement "styles".
2896
2897         * main.c (main): New option dotstyle.
2898
2899 1996-11-19  Hrvoje Niksic  <hniksic@srce.hr>
2900
2901         * ftp.c (getftp): Close the master socket in case of errors, after
2902         bindport().
2903
2904         * connect.c (bindport): Initialize msock to -1.
2905
2906         * ftp.c (getftp): Initialize dtsock to -1.
2907
2908         * connect.c (closeport): Don't close sock if sock == -1.
2909
2910 1996-11-18  Hrvoje Niksic  <hniksic@srce.hr>
2911
2912         * init.c (setnuminf): Nuked default value -- just leave unchanged.
2913         (setval): Don't send default values.
2914         (defaults): Use DEFAULT_TIMEOUT -- aaargh.
2915
2916         * options.h (struct options): Use long for dot_bytes.
2917
2918         * init.c (setquota): Renamed to setbytes.
2919         (setval): Use setbytes on DOTBYTES.
2920
2921 1996-11-17  Hrvoje Niksic  <hniksic@srce.hr>
2922
2923         * ftp.c (getftp): Initialize con->dltime.
2924
2925         * recur.c (recursive_retrieve): Use same_host instead of
2926         try_robots; simply load robots_txt whenever the host is changed.
2927         (recursive_retrieve): Free forbidden before calling parse_robots.
2928
2929 1996-11-16  Hrvoje Niksic  <hniksic@srce.hr>
2930
2931         * retr.c (show_progress): Use them.
2932
2933         * options.h (struct options): New options dot_bytes, dots_on_line
2934         and dot_spacing.
2935
2936 1996-11-16  Mark Boyns  <boyns@sdsu.edu>
2937
2938         * recur.c (recursive_retrieve): Retrieve directories regardless of
2939         acc/rej rules; check for empty u->file.
2940
2941 1996-11-14  Hrvoje Niksic  <hniksic@srce.hr>
2942
2943         * init.c (setval): Use it.
2944
2945         * utils.c (merge_vecs): New function.
2946
2947         * init.c (setval): Reset the list-type functions when encountering
2948         "".
2949
2950 1996-11-14  Shawn McHorse  <riffraff@txdirect.net>
2951
2952         * recur.c (recursive_retrieve): Use base_url instead of this_url
2953         for no_parent.
2954
2955 1996-11-14  Shawn McHorse  <riffraff@txdirect.net>
2956
2957         * html.c (htmlfindurl): Reset s->in_quote after exiting the quote.
2958
2959 1996-11-13  Hrvoje Niksic  <hniksic@srce.hr>
2960
2961         * utils.c (sepstring): Rewrote; don't use strtok.
2962
2963         * recur.c (recursive_retrieve): Enter assorted this_url to slist
2964         when running the first time.
2965         (retrieve_robots): Warn to ignore errors when robots are loaded.
2966
2967         * utils.c (load_file): Moved from url.c.
2968
2969         * http.c: Made static variables const too in h* functions.
2970
2971         * main.c (main): Renamed --continue-ftp to --continue.
2972
2973         * recur.c (recursive_retrieve): Use it.
2974
2975         * utils.c (frontcmp): New function.
2976
2977         * url.c (accdir): New function.
2978
2979         * html.c (htmlfindurl): Recognize <area href=...>.
2980
2981         * ftp.c (ftp_retrieve_dirs): Implemented opt.includes.
2982
2983         * init.c (setval): Free the existing opt.excludes and
2984         opt.includes, if available.
2985
2986         * main.c (main): New option -I.
2987
2988 1996-11-12  Hrvoje Niksic  <hniksic@srce.hr>
2989
2990         * ftp.c (ftp_retrieve_glob): Do not weed out directories.
2991
2992         * version.c: Changed version to 1.4.1.
2993
2994 1996-11-11  Hrvoje Niksic  <hniksic@srce.hr>
2995
2996         * version.c: Released 1.4.0.
2997
2998 1996-11-10  Hrvoje Niksic  <hniksic@srce.hr>
2999
3000         * main.c (main): Free com and val after parse_line.
3001         (printhelp): Reorder the listing.
3002
3003         * http.c: More robust header parsing.
3004
3005         * http.c: Allow any number of spaces, or no spaces, precede ':'.
3006         (hskip_lws): New function.
3007         (haccepts_bytes): New function.
3008         (gethttp): Use it.
3009
3010         * init.c (setval): Check header sanity.
3011         (setval): Allow resetting of headers.
3012
3013 1996-11-10  Hrvoje Niksic  <hniksic@srce.hr>
3014
3015         * http.c (http_loop): Don't use has_wildcards.
3016
3017         * http.c (gethttp): Free all_headers -- would leak.
3018
3019         * recur.c (recursive_retrieve): Initialize depth to 1 instead of
3020         0 -- this fixes a long-standing bug in -rl.
3021
3022 1996-11-09  Hrvoje Niksic  <hniksic@srce.hr>
3023
3024         * ftp.c: Use -1 as "impossible" value for con->fd.
3025
3026         * url.h (URL_SEPARATOR): Don't treat `*' and `+' as separators.
3027
3028         * init.c (parse_line): Use isalpha.
3029
3030         * ftp-unix.c: Use HAVE_UNISTD_H.
3031
3032         * mtch.c (has_wildcards): Don't match \.
3033
3034         * http.c (http_loop): Warn on HTTP wildcard usage.
3035
3036 1996-11-08  Hrvoje Niksic  <hniksic@srce.hr>
3037
3038         * url.c (url_filename): Do not create numbered suffixes if
3039         opt.noclobber -- would bug out on -nc.
3040
3041 1996-11-07  Hrvoje Niksic  <hniksic@srce.hr>
3042
3043         * recur.c (parse_robots): Don't chuck out the commands without
3044         arguments (`Disallow:<empty>' didn't work).
3045         (parse_robots): Compare versions lowercase.
3046         (parse_robots): Match on base_version, not version_string!
3047         (parse_robots): Handle comments properly.
3048         (parse_robots): Match versions in a sane way.
3049
3050         * init.c: Print nicer error messages.
3051
3052         * version.c: Changed version to 1.4.0.
3053
3054 1996-11-06  Hrvoje Niksic  <hniksic@srce.hr>
3055
3056         * version.c: Released 1.4.0-test2.
3057
3058         * init.c (run_wgetrc): Close fp.
3059
3060         * ftp.c (ftp_retrieve_dirs): Allocate the correct length for
3061         u->dir.
3062
3063 1996-11-06  Hrvoje Niksic  <hniksic@srce.hr>
3064
3065         * init.c (setquota): Allow inf as quota specification.
3066
3067 1996-11-05  Hrvoje Niksic  <hniksic@srce.hr>
3068
3069         * ftp.c (ftp_retrieve_dirs): Return QUOTEXC if quota exceeded.
3070         (ftp_retrieve_glob): Return QUOTEXC on quota exceeded.
3071
3072         * main.c (main): Check for quota by comparison with downloaded
3073         stuff, not from status.
3074
3075         * connect.c (select_fd): Should compile on HPUX without warnings now.
3076
3077         * ftp.c (ftp_get_listing): Check whether ftp_loop_internal
3078         returned RETROK.
3079
3080 1996-11-04  Hrvoje Niksic  <hniksic@srce.hr>
3081
3082         * ftp.c (ftp_retrieve_glob): Print the pattern nicely.
3083         (getftp): Return FTPRETRINT on control connection error.
3084
3085         * html.c (htmlfindurl): Recognize <embed src=...> and
3086         <bgsound src=...>.
3087         (ftp_index): Handle username and password correctly.
3088
3089         * main.c (main): Made `-np' a synonim for --no-parent.
3090
3091 1996-11-02  Hrvoje Niksic  <hniksic@srce.hr>
3092
3093         * ftp.c (ftp_loop): Check for opt.ftp_glob too before calling
3094         ftp_retrieve_glob.
3095
3096         * version.c: Changed version to 1.4.0-test2.
3097
3098 1996-11-02  Hrvoje Niksic  <hniksic@srce.hr>
3099
3100         * version.c: Released 1.4.0-test1.
3101
3102         * url.c (str_url): Don't use sprintf when creating %2F-prefixed
3103         directory.
3104         (convert_links): Removed definition of make_backup.
3105
3106         * http.h: Removed definition of MAX_ERROR_LENGTH.
3107
3108         * host.c (ftp_getaddress): Check for "(none)" domains.
3109
3110         * ftp.c (ftp_retrieve_dirs): Docfix.
3111
3112         * http.c (gethttp): Use ou->referer instead of u->referer.
3113
3114         * retr.c (retrieve_url): Reset u to avoid freeing pointers twice;
3115         this was known to cause coredumps on Linux.
3116
3117         * html.c (ftp_index): Cast the argument to local_time to time_t *.
3118
3119 1996-11-01  Hrvoje Niksic  <hniksic@srce.hr>
3120
3121         * connect.c (select_fd): Use exceptfds -- once and for all.
3122
3123         * retr.c (retrieve_from_file): Free filename after
3124         recursive_retrieve.
3125         (retrieve_from_file): Send RFIRST_TIME to recursive_retrieve on
3126         first-time retrieval.
3127         (retrieve_from_file): Return uerr_t; new argument, count.
3128         (retrieve_from_file): Break on QUOTEXC.
3129
3130         * init.c (setquota): Fixed a bug that caused rejection of
3131         non-postfixed values..
3132
3133 1996-10-30  Hrvoje Niksic  <hniksic@srce.hr>
3134
3135         * version.c: Changed name to wget.
3136
3137         * connect.c (iread): Smarter use of select.
3138         (select_fd): Set errno on timeout.  If not timeout, return 1
3139         instead of 0.
3140
3141 1996-10-29  Hrvoje Niksic  <hniksic@srce.hr>
3142
3143         * ftp.c (ftp_loop_internal): Don't use con->cmd before
3144         establishing it.
3145
3146 1996-10-26  Hrvoje Niksic  <hniksic@srce.hr>
3147
3148         * http.c (gethttp): Send correct referer when using proxy.
3149         (gethttp): Use struct urlinfo ou to access the relevant data; send
3150         correct authorization in all cases.
3151
3152         * host.c (same_host): Use skip_uname to skip username and
3153         password.
3154
3155         * url.c (skip_uname): New function.
3156         (parseurl): Use it.
3157
3158         * host.c (same_host): Do not assume HTTP -- same_host should now
3159         be totally foolproof.
3160
3161         * url.c (skip_proto): New function.
3162         (parse_uname): Use it.
3163
3164         * http.c (gethttp): Create local user and passwd from what is
3165         given.
3166
3167         * url.c (parseurl): Check for HTTP username and password too.
3168
3169 1996-10-25  Hrvoje Niksic  <hniksic@srce.hr>
3170
3171         * config.h.in: Removed #define gethostbyname R...
3172
3173 1996-10-22  Hrvoje Niksic  <hniksic@srce.hr>
3174
3175         * version.c: Changed version to 1.4.0-test1.
3176
3177 1996-10-21  Hrvoje Niksic  <hniksic@srce.hr>
3178
3179         * version.c: "Released" 1.4b29.
3180
3181         * recur.c (recursive_retrieve): Check for no_parent.
3182
3183         * init.c (setval): Option update.
3184
3185         * main.c (main): New option no-parent.
3186
3187         * options.h (struct options): New variable no_parent.
3188
3189         * recur.c (recursive_retrieve): Only files are checked for
3190         opt.accepts and opt.rejects.
3191         (recursive_retrieve): Check directories for opt.excludes.
3192         (recursive_retrieve): Make the dir absolute when checking
3193         opt.excludes.
3194
3195         * html.c (htmlfindurl): Recognize <applet code=...> and <script
3196         src=...>
3197
3198 1996-10-18  Hrvoje Niksic  <hniksic@srce.hr>
3199
3200         * ftp.c (getftp): Do not line-break assert entries at all.
3201         (ftp_retrieve_dirs): docfix.
3202
3203         * connect.c (select_fd): Use fd + 1 as nfds.
3204
3205         * version.c: Changed version to 1.4b29.
3206
3207 1996-10-18  Hrvoje Niksic  <hniksic@srce.hr>
3208
3209         * version.c: "Released" 1.4b28.
3210
3211         * ftp.c (ftp_loop_internal): Check whether f->size == len and
3212         don't continue the loop if it is.
3213         (ftp_get_listing): Remove list_filename on unsuccesful loop.
3214
3215 1996-10-17  Hrvoje Niksic  <hniksic@srce.hr>
3216
3217         * ftp.c (ftp_loop_internal): Use strcpy to initialize tmp.
3218         (getftp): Do not use multiline assert.
3219
3220         * http.c (hparsestatline): Use mjr and mnr instead of major and
3221         minor, which don't compile on Ultrix.
3222         (http_loop): Use strcpy() to initialize tmp.
3223
3224         * all: Geturl -> Fetch
3225
3226 1996-10-17  Hrvoje Niksic  <hniksic@srce.hr>
3227
3228         * recur.c (parse_robots): Fixed an off-by-one bug when looking for
3229         ':'.
3230
3231         * html.c (htmlfindurl): Fixed several possible off-by-one bugs by
3232         moving `bufsize &&' to the beginning of each check in for-loops.
3233
3234         * recur.c (parse_robots): Close fp on exit.
3235
3236         * url.c (mymkdir): Check for each directory before creating.
3237
3238 1996-10-16  Hrvoje Niksic  <hniksic@srce.hr>
3239
3240         * version.c: Changed version to 1.4b28.
3241
3242 1996-10-16  Hrvoje Niksic  <hniksic@srce.hr>
3243
3244         * version.c: "Released" 1.4b27.
3245
3246         * init.c (parse_line): Use isspace.
3247         (parse_line): Free *com on all errors.
3248
3249         * ftp.c (ftp_loop): Change FTPOK to RETROK before exiting.
3250         (delelement): Use next instead of f->next and prev instead of
3251         f->prev.
3252         (delelement): Free the members of the deleted element.
3253
3254         * http.c (http_loop): Do not return RETROK on code != 20x.
3255
3256         * init.c (cleanup): Free opt.user_header.
3257         (cleanup): Free opt.domains.
3258
3259         * url.c (freelists): Moved to cleanup().
3260
3261         * http.c (hparsestatline): Docfix.
3262
3263         * main.c (main): Return with error status on unsuccesful
3264         retrieval.
3265
3266         * init.c (setval): Do not remove listing when mirroring.
3267
3268         * url.c (url_filename): Use opt.fileprefix.
3269
3270         * ftp.c (ftp_get_listing): Use url_filename to get filename for
3271         .listing.
3272
3273         * main.c (main): New option: -rn.
3274
3275 1996-10-15  Hrvoje Niksic  <hniksic@srce.hr>
3276
3277         * Makefile.in (RM): Added RM = rm -f.
3278
3279         * host.c (clean_hosts): New function.
3280         (free_hlist): Just free the list, no reset.
3281
3282         * version.c: Changed version to 1.4b27.
3283
3284 1996-10-13  Hrvoje Niksic  <hniksic@srce.hr>
3285
3286         * version.c: "Released" 1.4b26.
3287
3288         * retr.c (retrieve_from_file): If call get_urls_html with
3289         opt.spider to make it silent in spider mode.
3290
3291         * url.c (str_url): Use CLEANDUP instead of URL_CLEANSE.
3292
3293         * url.h (CLEANDUP): New macro.
3294
3295         * http.c (gethttp): Fixed a bug that freed location only when it
3296         was NULL.
3297
3298         * retr.c (retrieve_url): Free url if it will not be stored,
3299         i.e. newloc is NULL.
3300
3301         * html.c (htmlfindurl): Handle exiting from quotes correctly; the
3302         old version would bug out on <a href="x#a"href="y">.
3303
3304         * html.h (state_t): New member in_quote.
3305
3306         * html.c (htmlfindurl): Free s->attr at the beginning of
3307         attr-loop.
3308
3309         * recur.c (recursive_retrieve): Recognize RCLEANUP.
3310         (tried_robots): Make hosts a global variable.
3311         (recursive_retrieve): Free constr after URL host optimization.
3312         (tried_robots): Free urlinfo before exiting.
3313
3314         * utils.c (free_slist): New function.
3315
3316         * recur.c (recursive_retrieve): Use flags to add cleanup
3317         possibility.
3318
3319         * main.c (main): Free filename after recursive_retrieve.
3320
3321         * http.c (gethttp): Store successful responses too.
3322
3323 1996-10-12  Hrvoje Niksic  <hniksic@srce.hr>
3324
3325         * all: Constified the whole source.  This required some minor
3326         changes in many functions in url.c, possibly introducing bugs -- I
3327         hope not.
3328
3329         * ftp-basic.c: Removed last_respline.
3330
3331         * http.c (gethttp): Free type.
3332
3333         * host.c (same_host): Free real1 and real2.
3334
3335         * main.c (main): New option --spider.
3336
3337         * retr.c (get_contents): Don't reset errno.
3338
3339         * main.c (main): Sorted the options.
3340
3341         * connect.c (iread): Set errno to ETIMEDOUT only if it was left
3342         uninitialized by select().
3343
3344         * http.c (http_loop): Print the time when the connection is
3345         closed.
3346         (gethttp): Debug-print the HTTP request.
3347
3348 1996-10-11  Hrvoje Niksic  <hniksic@srce.hr>
3349
3350         * connect.c (iread): Do not try reading after timeout.
3351
3352         * main.c (main): Would bug out on -T.
3353
3354         * connect.c (select_fd): Do not use exceptfds.
3355         (iread): Set ETIMEDOUT on select_fd <= 0.
3356
3357         * version.c: Changed version to 1.4b26.
3358
3359 1996-10-10  Hrvoje Niksic  <hniksic@srce.hr>
3360
3361         * version.c: "Released" 1.4b25.
3362
3363         * ftp-unix.c (ftp_parse_unix_ls): Ignore lines without file name
3364         or link name.
3365
3366         * http.c (gethttp): Add errcode to struct hstat.
3367         (http_loop): Use it.
3368
3369         * url.c (no_proxy_match): Simplify using char** for no_proxy.
3370
3371         * options.h (struct options): Make opt.no_proxy a vector.
3372
3373         * utils.c (sepstring): Use !*s instead of !strlen(s).
3374
3375         * init.c (setval): Set opt.maxreclevel to 0 on --mirror.
3376         (getperms): Use ISODIGIT instead of isdigit.
3377
3378         * ftp.c (getftp): Print time.
3379
3380         * main.c (main): Use legible output of downloaded quantity.
3381
3382         * ftp.c (getftp): Use elapsed_time().
3383         (ftp_loop_internal): Use rate().
3384
3385         * http.c (http_loop): Add download ratio output; Use rate().
3386
3387         * utils.c (rate): New function.
3388
3389 1996-10-09  Hrvoje Niksic  <hniksic@srce.hr>
3390
3391         * http.c (http_loop): Use timer.
3392
3393         * ftp.c: Split to ftp-basic.c and ftp.c
3394
3395         * utils.c (reset_timer): New function.
3396         (elapsed_time): New function.
3397
3398         * retr.c (show_progress): Make bytes_in_line and offs long; should
3399         work on 16-bit machines.
3400
3401 1996-10-08  Hrvoje Niksic  <hniksic@srce.hr>
3402
3403         * url.c (in_acclist): New argument backward.
3404
3405         * ftp.c (ftp_retrieve_glob): Use acceptable() to determine whether
3406         a file should be retrieved according to suffix.
3407         (ftp_get_listing): Check the return value of unlink; Do not call
3408         ftp_retrieve_dirs if depth reached maxreclevel.
3409         (ftp_retrieve_dirs): Check whether the directory is in
3410         exclude-list.
3411
3412         * main.c (main): Print the version number at the beginning of
3413         DEBUG output.
3414         (main): Use strrchr when creating exec_name.
3415
3416         * ftp.c (ftp_retrieve_glob): Do not close control connection.
3417
3418         * version.c: Changed version to 1.4b25.
3419
3420 1996-10-07  Hrvoje Niksic  <hniksic@srce.hr>
3421
3422         * version.c: "Released" 1.4b24.
3423
3424         * Makefile.in: Rewrite.
3425
3426         * ftp.c (ftp_loop_internal): Likewise.
3427
3428         * retr.c (time_str): Check for failed time().
3429
3430         * html.c (htmlfindurl): Recognize <fig src> and <overlay src> from
3431         HTML3.0.
3432
3433         * retr.c (time_str): Return time_t *.
3434
3435         * connect.c (bindport): Close msock on unsuccesful bind.
3436         (bindport): The same for getsockname and listen.
3437
3438         * retr.c (retrieve_url): Allow any number of retries on
3439         proxy.
3440
3441         * http.c (gethttp): Do not treat errno == 0 as timeout.
3442         (http_loop): Likewise.
3443         (http_loop): Cosmetic changes.
3444
3445         * connect.c (iread): Set errno to ETIMEDOUT in case of timeout.
3446
3447         * retr.c (get_contents): Reset errno.
3448
3449         * ftp.c (getftp): Minor fixes.
3450
3451 1996-10-06  Hrvoje Niksic  <hniksic@srce.hr>
3452
3453         * http.c: Do not use backups.
3454
3455         * geturl.1 (WARNING): Warn that man-page could be obsolete.
3456
3457         * getopt.c (getopt_long): Moved to getopt.c
3458
3459         * geturl.texi: Enhanced.
3460
3461         * main.c (main): Use it.
3462
3463         * recur.c (convert_all_links): New function.
3464
3465         * utils.c (add_slist): New argument flags.
3466
3467         * recur.c (recursive_retrieve): Update a list of downloaded URLs.
3468         (parse_robots): Do not chuck out empty value fields.
3469         (parse_robots): Make yourself welcome on empty Disallow.
3470
3471         * version.c: Changed version to 1.4b24.
3472
3473 1996-10-06  Hrvoje Niksic  <hniksic@srce.hr>
3474
3475         * version.c: "Released" 1.4b23.
3476
3477         * ftp.c (ftp_loop_internal): Get the time after getftp.
3478
3479         * Makefile.in (install.info): New target.
3480         (install): Use it.
3481
3482         * http.c (http_loop): Fix output when doing -O.
3483
3484 1996-10-05  Hrvoje Niksic  <hniksic@srce.hr>
3485
3486         * geturl.texi: New file.
3487
3488         * main.c (main): Do not print the warnings and download summary if
3489         opt.quiet is set.
3490
3491         * version.c: Changed version to 1.4b23.
3492
3493 1996-10-05  Hrvoje Niksic  <hniksic@srce.hr>
3494
3495         * "Released" 1.4b22.
3496
3497         * atotm.c (atotm): Use True and False instead of TRUE and FALSE,
3498         to avoid redefinition warnings.
3499
3500         * host.c (store_hostaddress): Use memcpy() to copy the address
3501         returned by inet_addr.
3502
3503         * version.c: Changed version to 1.4b22.
3504
3505 1996-10-04  Hrvoje Niksic  <hniksic@srce.hr>
3506
3507         * version.c: "Released" 1.4b21.
3508
3509         * ftp-unix.c (ftp_parse_ls): Renamed to ftp_parse_unix_ls.
3510
3511         * ftp.c (ftp_port): Use conaddr.
3512         (getftp): Print the file length.
3513         (ftp_retrieve_list): Check the stamps of plain files only.
3514
3515         * connect.c (closeport): Do not call shutdown().
3516         (conaddr): New function.
3517
3518         * html.c (ftp_index): Made it dfp-aware.
3519
3520         * init.c (cleanup): New name of freemem. Close opt.dfp.
3521
3522         * ftp.c (getftp): Use opt.dfp if it is set.
3523
3524         * ftp-unix.c (ftp_parse_ls): Recognize time in h:mm format.
3525
3526         * ftp.c (ftp_retrieve_dirs): Fixed a bug that caused incorrect
3527         CWDs to be sent with recursive FTP retrievals.
3528
3529 1996-10-03  Hrvoje Niksic  <hniksic@srce.hr>
3530
3531         * recur.c (parse_robots): Made it more compliant with "official"
3532         specifications.
3533
3534         * http.c: New function.
3535
3536         * ftp-unix.c (ftp_parse_ls): Added better debug output.
3537
3538         * ftp.c (getftp): Print out the LIST in case of
3539         opt.print_server_response.
3540
3541         * version.c: Changed version to 1.4b21.
3542
3543 1996-10-01  Hrvoje Niksic  <hniksic@srce.hr>
3544
3545         * version.c: "Released" 1.4b20.
3546
3547         * README: Update.
3548
3549         * http.c (gethttp): Preset lengths of various headers instead of
3550         calculating them dynamically.
3551         (gethttp): Check for 206 partial contents.
3552
3553 1996-09-30  Hrvoje Niksic  <hniksic@srce.hr>
3554
3555         * configure.in: Set SYSTEM_GETURLRC to $libdir/geturlrc
3556
3557         * http.c (gethttp): Send the port number in the Host: header.
3558
3559 1996-09-29  Hrvoje Niksic  <hniksic@srce.hr>
3560
3561         * http.c (gethttp): Send host: header.
3562         (gethttp): Add the possibility of user-defined headers.
3563         (gethttp): Move decision about pragma: no-cache to http_loop,
3564         where it belongs.
3565         (gethttp): Pass a struct instead of enormous argument list.
3566         (http_loop): Use a new, fancier display format.
3567         (ftp_loop): Likewise.
3568
3569         * main.c: (hangup): Turn off buffering of the new log file.
3570
3571         * install-sh: Likewise.
3572
3573         * config.sub: Replace with the one in autoconf-2.10
3574
3575         * geturl.1: Update.
3576
3577         * init.c: New options httpuser and httppasswd.
3578
3579         * http.c: (base64_encode_line): New function.
3580         (gethttp): Send authentication.
3581
3582         * connect.c (make_connection): Use store_hostaddress.
3583
3584 1996-09-28  Hrvoje Niksic  <hniksic@srce.hr>
3585
3586         * host.c (store_hostaddress): New function.
3587
3588         * NEWS: Update.
3589
3590         * http.c (hgetrange): New function.
3591         (gethttp): Use ranges.
3592
3593         * utils.c (numdigit): Accept long instead of int.
3594
3595         * http.c (http_loop): Add restart capabilities.
3596
3597         * ftp.c (ftp_retrieve_glob): Fixed a bug that could cause matchres
3598         being used uninitialized.
3599         (ftp_retrieve_list): Similar fix.
3600
3601         * host.c (add_hlist): Fixed a bug that could cause cmp being used
3602         uninitialized.
3603
3604         * url.c (construct_relative): New function.
3605
3606         * recur.c (recursive_retrieve): Use it.
3607
3608         * retr.c (convert_links): New function.
3609
3610 1996-09-27  Hrvoje Niksic  <hniksic@srce.hr>
3611
3612         * url.c (free_urlpos): New function.
3613
3614         * recur.c (recursive_retrieve): Adapt.
3615
3616         * url.c (get_urls_html): Return a linked list instead of a vector.
3617
3618         * url.c (get_urls_file): Return a linked list instead of a vector.
3619
3620         * geturl.1: Update.
3621
3622         * http.c (gethttp): Implement it.
3623
3624         * init.c (setval): New option: SAVEHEADERS
3625
3626         * ftp.c (ftp_loop_internal): Do not set restval if listing is to
3627         be retrieved. Lack of this test caused bugs when the connection
3628         was lost during listing.
3629
3630         * retr.c (retrieve_url): Fixed a bug that caused
3631         coredumps. *newloc is now reset by default.
3632         (retrieve_url): Lift the twenty-tries limit on proxies.
3633
3634         * version.c: Changed version to 1.4b20.
3635
3636 1996-09-20  Hrvoje Niksic  <hniksic@srce.hr>
3637
3638         * version.c: "Released" 1.4b19.
3639
3640 1996-09-19  Hrvoje Niksic  <hniksic@srce.hr>
3641
3642         * ftp.c (ftp_loop_internal): Renamed from ftp_1fl_loop.
3643         (getftp): Changed prototype to accept ccon *.
3644
3645 1996-09-17  Hrvoje Niksic  <hniksic@srce.hr>
3646
3647         * ftp.c (ftp_retrieve_list): Fixed a bug that caused setting
3648         incorrect values to files pointed to by symbolic links.
3649         (ftp_1fl_loop): Do not count listings among the downloaded URL-s.
3650
3651 1996-09-16  Hrvoje Niksic  <hniksic@srce.hr>
3652
3653         * url.c (mkstruct): Do not prepend "./" in front of a pathname.
3654
3655         * main.c (main): New option: --user-agent.
3656
3657         * geturl.1: Ditto.
3658
3659         * init.h: Ditto.
3660
3661         * init.c (setval): Ditto.
3662
3663         * main.c (main): Rename "server-headers" to "server-response".
3664
3665         * ftp-unix.c (ftp_parse_ls): Check for asterisks at the end of
3666         executables in 'ls -F' listings.
3667
3668 1996-09-15  Hrvoje Niksic  <hniksic@srce.hr>
3669
3670         * url.c (parseurl): Remove realloc() and sprintf().
3671         (str_url): Get rid of sprintf().
3672
3673         * recur.c (recursive_retrieve): Enable FTP recursion through proxy
3674         servers.
3675
3676         * url.h (URL_CLEANSE): Made it else-resistant.
3677         (USE_PROXY): New macro.
3678
3679 1996-09-14  Hrvoje Niksic  <hniksic@srce.hr>
3680
3681         * NEWS: Update.
3682
3683         * version.c: Changed version to 1.4b19.
3684
3685 1996-09-14  Hrvoje Niksic  <hniksic@srce.hr>
3686
3687         * version.c: "Released" 1.4b18.
3688
3689         * url.c: Made it reallocate space exponentially.
3690
3691 1996-09-14  Drazen Kacar  <dave@fly.cc.fer.hr>
3692
3693         * html.c (htmlfindurl): Added <frame src> and <iframe src> among
3694         the list of stuff to fetch.
3695
3696 1996-09-13  Hrvoje Niksic  <hniksic@srce.hr>
3697
3698         * url.c (get_urls_html): Fixed a bug that caused SIGSEGV's with
3699         -Fi.
3700
3701         * html.c (htmlfindurl): Rewrite.
3702
3703         * http.c (gethttp): Use opt.proxy_cache.
3704
3705         * main.c (main): Added --cache option.
3706
3707         * ftp.c (ftp_response): Print server response if opt.print_server
3708         response is set.
3709         (getftp): Print newlines after each request if the server response
3710         is to be printed.
3711         (ftp_response): Copy the last response line to last_respline.
3712
3713         * http.c (gethttp): Add Pragma: nocache for retried
3714         proxy-retrievals.
3715
3716         * ftp.c (getftp): Use it.
3717
3718         * retr.c (buf_discard): New function.
3719
3720         * ftp.c (ftp_response): Use buf_readchar().
3721         (getftp): Flush the control connection buffer before calling
3722         get_contents().
3723
3724         * retr.c (buf_readchar): New function.
3725         (buf_flush): New function.
3726         (get_contents): Use buf_readchar() instead of read(x, x, 1).
3727         (get_contents): Use buf_flush.
3728
3729 1996-09-12  Hrvoje Niksic  <hniksic@srce.hr>
3730
3731         * ftp.c: Incorporate changes to ftp_response.
3732
3733         * ftp.c (ftp_response): Allocate the server response dynamically,
3734         as in read_whole_line and fetch_next_header.
3735
3736         * utils.c (read_whole_line): Fixed a bug that prevented reading
3737         the last line if it is not \n-terminated. Also fixed a possible
3738         memory overflow.
3739
3740         * http.c (fetch_next_header): Return malloc-ed string as large as
3741         needed.
3742         (gethttp): Use new fetch_next_header.
3743
3744 1996-09-12  Hrvoje Niksic  <hniksic@srce.hr>
3745
3746         * http.c (hgetlen): Compute the header length the first time only.
3747         (hgettype): Ditto.
3748         (hgetlocation): Ditto.
3749         (hgetmodified): Ditto.
3750
3751 1996-09-11  Hrvoje Niksic  <hniksic@srce.hr>
3752
3753         * sample.geturlrc: Update.
3754
3755 1996-09-10  Hrvoje Niksic  <hniksic@srce.hr>
3756
3757         * http.c (http_loop): Ditto.
3758
3759         * ftp.c (getftp): Open the output file as binary.
3760
3761         * version.c: Changed version to 1.4b18.
3762
3763 1996-09-10  Hrvoje Niksic  <hniksic@srce.hr>
3764
3765         * version.c: "Released" 1.4b17.
3766
3767         * ftp-unix.c (ftp_parse_ls): If unable to open file, return NULL
3768         instead of failed assertion.
3769
3770 1996-09-09  Hrvoje Niksic  <hniksic@srce.hr>
3771
3772         * ftp.c (ftp_get_listing): Add a numbered suffix to LIST_FILENAME
3773         if a file of that name already exists.
3774
3775 1996-09-05  Hrvoje Niksic  <hniksic@srce.hr>
3776
3777         * ftp.c (ftp_1fl_loop): Handler FTPPORTERR and FOPENERR correctly.
3778
3779         * config.h.in: Define gethostbyname as Rgethostbyname when using
3780         Socks.
3781
3782         * configure.in: Check for -lresolv if using Socks.
3783
3784         * version.c: Changed version to 1.4b17.
3785
3786 1996-07-15  Hrvoje Niksic  <hniksic@srce.hr>
3787
3788         * version.c: "Released" 1.4b16.
3789
3790         * http.c (gethttp): More intelligent check for first line of HTTP
3791         response.
3792         (gethttp): Would bug out on time-stamping.
3793
3794         * version.c: Changed version to 1.4b16.
3795
3796 1996-07-11  Hrvoje Niksic  <hniksic@srce.hr>
3797
3798         * version.c: Released 1.4b15.
3799
3800         * http.c (http_loop): Print \n after the loop entry, not before.
3801
3802         * url.c (url_filename): Use ISDOT.
3803
3804         * url.h (ISDOT): New macro.
3805
3806         * recur.c (recursive_retrieve): Change only opt.recursive for
3807         following FTP.
3808
3809 1996-07-11  Antonio Rosella <antonio.rosella@agip.it>
3810
3811         * socks/geturl.cgi: Fixed version No.
3812
3813         * socks/download-netscape.html: Ditto.
3814
3815         * socks/download.html: Changed socks.html to download.html.
3816
3817 1996-07-11  Hrvoje Niksic  <hniksic@srce.hr>
3818
3819         * url.c (url_filename): Check for opt.dirstruct instead for
3820         opt.recursive && opt.dirstruct.
3821
3822         * init.c (defaults): Ditto.
3823         (defaults): Reset dirstruct by default.
3824         (setval): Set opt.dirstruct whenever setting recursive.
3825
3826         * init.h: Removed FORCEDIRHIER.
3827
3828         * INSTALL: Added -L to socks-description.
3829
3830         * version.c: Changed version to 1.4b15.
3831
3832 1996-07-10  Hrvoje Niksic  <hniksic@srce.hr>
3833
3834         * version.c: "Released" 1.4b14.
3835
3836         * geturl.1: Update AUTHOR to include Rosella as contributor.
3837
3838         * NEWS: Update.
3839
3840         * socks/geturl.cgi: Simplified command creation, nuked <blink>.
3841
3842         * socks/geturl.cgi: Wrap nutscape extensions within if $netscape.
3843         (cal_time): Fix == to eq.
3844
3845         * socks/geturl.cgi: GPL-ized with permission of A. Rosella.
3846
3847         * geturl.1 (hostname): Moved URL CONVENTIONS to the beginning.
3848
3849         * Makefile.in: Use @VERSION@.
3850
3851         * configure.in: Check version from version.c.
3852
3853         * socks/geturl.cgi: Changed /pub/bin/perl to /usr/bin/perl.
3854
3855         * socks/download.html: Created from download-netscape.html, made
3856         HTML-2.0 compliant.
3857
3858         * recur.c (recursive_retrieve): Set opt.force_dir_hier when
3859         following FTP links from recursions.
3860
3861 1996-07-09  Hrvoje Niksic  <hniksic@srce.hr>
3862
3863         * url.c (mymkdir): Fixed a bug that prevented mymkdir() to create
3864         absolute directories correctly.
3865
3866         * version.c: Changed version to 1.4b14.
3867
3868 1996-07-09  Hrvoje Niksic  <hniksic@srce.hr>
3869
3870         * version.c: "Released" 1.4b13.
3871
3872         * url.c (make_backup): New function.
3873
3874         * http.c (http_loop): Make a backup copy of the local file (using
3875         rename(2)) before opening it.
3876
3877         * main.c (main): Added --backups.
3878
3879         * host.c (ftp_getaddress): Bail out on failed mycuserid().
3880         (ftp_getaddress): Check for leading dot on MY_DOMAIN.
3881         (ftp_getaddress): Check for empty, null or (null) domain.
3882
3883         * url.c (get_urls_html): If this_url is NULL, the base must have a
3884         protocol.
3885         (parseurl): Use has_proto.
3886
3887         * retr.c (retrieve_url): Warn when proxy is used with more than 20
3888         retries.
3889
3890         * url.c (mkstruct): Create the directory (calling mymkdir()) only
3891         if it is not already there.
3892         (has_proto): New function.
3893         (get_urls_html): Eliminate the remaining call to findurl -- use
3894         has_proto.
3895
3896         * geturl.1: Ditto.
3897
3898         * main.c: Change -X to -x.
3899
3900         * url.c (url_filename): Simplify creation of filename if
3901         prefix_files is set.
3902         (url_filename): Simplify everything. And I do mean *everything*.
3903         (mkstruct): Add dir_prefix before hostname.
3904         (path_simplify): Fixed a bug that caused writing outside the path
3905         string in case of "." and ".." path strings.
3906
3907 1996-07-06  Hrvoje Niksic  <hniksic@srce.hr>
3908
3909         * init.c: Added --mirror.
3910
3911         * main.c (main): Added -X to force saving of directory hierarchy.
3912
3913         * ftp.c (ftp_retrieve_list): Added recursion depth counter.
3914         (ftp_retrieve_list): Check whether quota is exceeded.
3915
3916         * url.c (get_urls_html): Skip leading blanks for absolute URIs.
3917
3918         * http.c (gethttp): Use referer if present.
3919
3920         * recur.c (recursive_retrieve): Set u->referer before calling
3921         retrieve_url.
3922
3923         * url.c (newurl): Use memset to nullify the struct members.
3924         (freeurl): Free the referer field too.
3925
3926         * url.h: Added referer to urlinfo.
3927
3928         * geturl.1: Updated the manual to document some of the new features.
3929
3930         * utils.c (numdigit): Moved from url.c.
3931
3932         * README: Rewritten.
3933
3934         * config.h.in: Add the support for socks.
3935
3936         * configure.in: Add the support for socks.
3937
3938         * url.c (url_filename): If the dir_prefix is ".", work with just
3939         the file name.
3940         (url_filename): Do not look for .n extensions if timestamping if
3941         turned on.
3942
3943         * retr.c (show_progress): Skip the over-abundant restval data, and
3944         print the rest of it with ',' instead of '.'.
3945
3946 1996-07-05  Hrvoje Niksic  <hniksic@srce.hr>
3947
3948         * retr.c (show_progress): Changed second arg. to long (as it
3949         should be).
3950         (show_progress): Moved to retr.c.
3951         (get_contents): Moved to retr.c.
3952
3953         * version.c: Change version to 1.4b13.
3954
3955 1996-07-05  Hrvoje Lacko <hlacko@fly.cc.fer.hr>
3956
3957         * url.c (in_acclist): Would return after the first suffix.
3958
3959 1996-07-04  Hrvoje Niksic  <hniksic@srce.hr>
3960
3961         * version.c: "Released" 1.4b12.
3962
3963         * url.c (path_simplify): More kludgifications.
3964         (get_urls_html): Use new parameters for htmlfindurl.
3965
3966         * html.c: Removed memorizing "parser states", since the new
3967         organization does not require them.
3968
3969         * init.c (run_geturlrc): Use read_whole_line.
3970
3971         * ftp-unix.c (ftp_parse_ls): Use read_whole_line.
3972
3973         * recur.c (parse_robots): Use read_whole_line.
3974
3975         * utils.c (read_whole_line): New function.
3976
3977         * recur.c (tried_robots): Use add_slist/in_slist, *much* cleaner.
3978
3979         * host.c (ngethostbyname): Call inet_addr just once. Yet to be
3980         tested on OSF and Ultrix.
3981         (add_hlist): New function.
3982         (free_hlist): New function.
3983         (search_host): New function.
3984         (search_address): New function.
3985         (realhost): Use search_host, search_address and add_hlist.
3986         (same_host): Replaced realloc() with strdupdelim(), made
3987         case-insensitive, fixed a memory leak.
3988
3989         * html.c (ftp_index): Fixed tm_min and tm_sec to be tm_hour and
3990         tm_min, like intended.
3991
3992         * version.c: Change user agent information to
3993         Geturl/version.
3994
3995 1996-07-03  Hrvoje Niksic  <hniksic@srce.hr>
3996
3997         * utils.c: Renamed nmalloc.c to utils.c, .h likewise.
3998
3999         * url.c (acceptable): Always accept directories.
4000
4001         * ftp-unix.c (ftp_parse_ls): Support brain-damaged "ls -F"-loving
4002         servers by stripping trailing @ from symlinks and trailing / from
4003         directories.
4004
4005         * ftp.c (ftp_loop): Debugged the "enhanced" heuristics. :-)
4006
4007         * url.c (skip_url): Use toupper instead of UCASE.
4008
4009         * host.c (sufmatch): Made it case-insensitive.
4010
4011         * url.c (match_backwards_or_pattern): Fixed i == -1 to j == -1.
4012         (match_backwards): New function, instead of
4013         match_backwards_or_pattern.
4014
4015         * recur.c (recursive_retrieve): Increased performance by
4016         introducing inl, which reduces number of calls to in_slist to only
4017         one.
4018
4019         * ftp.c (ftp_loop): Enhanced the heuristics that decides which
4020         routine to use.
4021
4022         * main.c (printhelp): Removed the warranty stuff.
4023
4024 1996-07-02  Hrvoje Niksic  <hniksic@srce.hr>
4025
4026         * url.c (add_slist): Simplify.
4027         (match_backwards_or_pattern): New function.
4028         (in_acclist): Use match_backwards_or_pattern.
4029         (matches): Remove.
4030
4031 1996-06-30  Hrvoje Niksic  <hniksic@srce.hr>
4032
4033         * ftp.c (ftp_loop): Call ftp_index on empty file names, if not
4034         recursive.
4035
4036         * html.c (ftp_index): Fixed to work. Beautified the output.
4037
4038         * ftp.c (ftp_retrieve_glob): Another argument to control whether
4039         globbing is to be used.
4040         (ftp_retrieve_list): Compare the time-stamps of local and remote
4041         files to determine whether to download.
4042
4043 1996-06-29  Hrvoje Niksic  <hniksic@srce.hr>
4044
4045         * ftp.c (rel_constr): New function.
4046
4047         * retr.c (retrieve_from_file): Check for text/html before
4048         retrieving recursively.
4049
4050         * main.c (main): Check whether the file is HTML before going into
4051         recursive HTML retrieving.
4052
4053         * ftp.c (ftp_retrieve_list): Manage directories.
4054         (ftp_retrieve_glob): Pass all the file-types to ftp_retrieve_list.
4055         (ftp_1fl_loop): Fixed a bug that caused con->com to be incorrectly
4056         initialized, causing bugchecks in getftp to fail.
4057
4058         * configure.in: Check for symlink.
4059
4060         * ftp.c (ftp_retrieve_list): Added support for symlinks.
4061
4062         * version.c: "Released" 1.4b10.
4063
4064         * atotm.c (atotm): Redeclared as time_t.
4065
4066         * init.c: New variable "timestamping".
4067
4068         * main.c (main): New option 'N'.
4069
4070         * http.c (hgetlocation): Case-insensitive match.
4071         (hgetmodified): New function.
4072         (http_loop): Implement time-stamping.
4073
4074 1996-06-28  Hrvoje Niksic  <hniksic@srce.hr>
4075
4076         * version.c: Changed version to 1.4b10
4077
4078         * atotm.c: New file, from phttpd.
4079
4080         * options.h (struct options): New parameter timestamping.
4081
4082         * version.c: 1.4b9 "released".
4083
4084         * recur.c (recursive_retrieve): Used linked list (ulist) for
4085         faster storing of URLs.
4086
4087         * url.c (get_urls_html): Removed the old kludge with comparing the
4088         outputs of htmlfindurl and findurl.
4089         (get_urls_html): Added better protocol support here.
4090         (create_hash): Removed, as well as add_hash and in_hash.
4091         (addslist): New function.
4092         (in_slist): ditto
4093
4094         * version.c: Released 1.4b8, changed version to b9.
4095
4096 1996-06-27  Hrvoje Niksic  <hniksic@srce.hr>
4097
4098         * ftp.c (freefileinfo): New function.
4099         (delelement): New function.
4100
4101         * everywhere: GPL!
4102
4103         * ftp.c (ftp_loop): Use ccon.
4104         (ftp_retrieve_glob): Likewise.
4105
4106         * ftp.h: Define ccon, to define status of control connection.
4107
4108         * ftp.c (ftp_get_listing): New function.
4109         (ftp_retrieve_more): New function.
4110         (ftp_retrieve_glob): New function.
4111
4112 1996-06-25  Hrvoje Niksic  <hniksic@srce.hr>
4113
4114         * configure.in: Removed the search for cuserid().
4115
4116         * init.c (getmode): Renamed to getperms.
4117
4118 1996-06-24  Hrvoje Niksic  <hniksic@srce.hr>
4119
4120         * version.c: New version.
4121
4122         * main.c (hangup): New function, that handles hangup. Hangup
4123         signal now causes geturl to stop writing on stdout, and to write
4124         to a log file.
4125
4126         * ftp.c (getftp): "Released" 1.4b7.
4127
4128         * html.c (htmlfindurl): Ignore everything inside <head>...</head>.
4129         (ftp_index): Use fileinfo/urlinfo.
4130
4131         * ftp-unix.c (ftp_parse_ls): New function.
4132         (symperms): New function.
4133
4134         * ftp.c (ftp_1fl_loop): New function, to handle 1-file loops.
4135
4136         * retr.c (retrieve_url): Added FTP support.
4137
4138 1996-06-23  Hrvoje Niksic  <hniksic@srce.hr>
4139
4140         * geturl.h: Removed NOTFTP2HTML enum.
4141         Added DO_LOGIN, DO_CWD and DO_LIST. LIST_ONLY is obsolete.
4142
4143         * ftp.c (getftp): Resynched with urlinfo.
4144         (getftp): Removed HMTL-ization of index.html from getftp.
4145
4146         * version.c: 1.4b6 "released".
4147
4148         * options.h (options): New struct, to keep options in.
4149
4150         * http.c (http_loop,gethttp): Synched with proxy.
4151
4152         * retr.c (retrieve_url): Implemented proxy retrieval.
4153
4154         * main.c (main): Use retrieve_from_file.
4155
4156 1996-06-22  Hrvoje Niksic  <hniksic@srce.hr>
4157
4158         * retr.c (retrieve_from_file): New function.
4159
4160         * url.c (parseurl): Modified to return URLOK if all OK. Protocol
4161         can be found in u->proto.
4162
4163         * ftp.c (ftp_response): Fixed to accept multi-line responses as
4164         per RFC 959.
4165
4166         * recr.c (recursive_retrieve): Take newloc from retrieve_url.
4167
4168         * url.c (mymkdir): Removed the file of the same name, if one
4169         exists.
4170         (isfile): New function.
4171         (mkstruct): Fixed the '/' glitches.
4172         (path_simplify): Hacked to treat something/.. correctly.
4173
4174 1996-06-21  Hrvoje Niksic  <hniksic@srce.hr>
4175
4176         * http.c (gethttp): Close the socket after error in headers.
4177         (http_loop): HEOF no longer a fatal header.
4178
4179         * loop.c (retrieve_url): When dt is NULL, do not modify it. This
4180         simplifies the syntax of calling retrieve_url.
4181
4182         * recr.c (recursive_retrieve): Modified to use get_urls_html.
4183
4184         * url.c (get_urls_file): New function.
4185         (get_urls_html): New function.
4186
4187         * recr.c (recursive_retrieve): Patched up to conform to the
4188         standards.
4189
4190         * http.c (gethttp): Synched with the rest...
4191         (gethttp): Treat only CONREFUSED specially, with connection
4192         errors.
4193
4194         * init.c,geturl.1,http.c (http_loop): Removed kill_error.
4195
4196 1996-06-20  Hrvoje Niksic  <hniksic@srce.hr>
4197
4198         * http.c (http_loop): New function.
4199
4200         * loop.c: Removed *lots* of stuff from retrieve_url.
4201
4202         * url.c (parseurl): Changed to work with urlinfo. Integrated
4203         username finding and path parsing.
4204         (newurl): New function.
4205         (freeurl): New function.
4206         (mkstruct): Removed the old bogosities, made it urlinfo-compliant.
4207         (url_filename): Likewise.
4208         (path_simplify): Accept relative paths too.
4209         (opt_url): Made urlinfo-compliant, removed bogosities.
4210         (path_simplify): Expanded to accept relative paths.
4211         (str_url): A replacement for hide_url
4212         (decode_string): Fixed a bug that caused malfunctioning when
4213         encountering an illegal %.. combination.
4214         (opt_url): Removed the argument. Dot-optimizations are now default.
4215
4216         * nmalloc.c (strdupdelim): New function.
4217
4218         * url.h: Added the urlinfo structure
4219
4220 1996-06-19  Hrvoje Niksic  <hniksic@srce.hr>
4221
4222         * url.c (hide_url): Thrown out the protocol assertion. Do not
4223         change the URL if the protocol if not recognized.
4224         (findurl): Put continue instead of break.
4225
4226 1996-06-18  Hrvoje Niksic  <hniksic@srce.hr>
4227
4228         * sample.geturlrc: Changed the defaults to be commented out and
4229         harmless (previous defaults caused pains if copied to
4230         ~/.geturlrc).
4231
4232         * http.c (gethttp): Print the HTTP request in debug mode.
4233
4234         * connect.c (iread): Added EINTR check loop to select-ing
4235         too. EINTR is now correctly handled with select().
4236
4237         * TODO: new file
4238
4239 1996-05-07  Hrvoje Niksic  <hniksic@srce.hr>
4240
4241         * host.c (same_host): Made the function a little bit more
4242         intelligent regarding diversified URL syntaxes.
4243
4244         * url.c (skip_url): Spaces are now skipped after URL:
4245
4246         * Released 1.3.1 with the patch to prevent crashing when sending
4247         NULL to robot* functions and the patch to compile "out of the box"
4248         on AIX.
4249
4250         * recr.c (recursive_retrieve): Added checking whether this_url is
4251         NULL when calling the robot functions.
4252
4253         * ChangeLog: New file.