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