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