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