mirror of
https://github.com/moparisthebest/wget
synced 2024-07-03 16:38:41 -04:00
Removed form feeds from sources and NEWS
This commit is contained in:
parent
6a9b2d36e1
commit
3c51ad7f02
@ -1,3 +1,7 @@
|
|||||||
|
2014-11-20 Tim Ruehsen <tim.ruehsen@gmx.de>
|
||||||
|
|
||||||
|
* NEWS: remove form feeds
|
||||||
|
|
||||||
2014-11-20 Darshit Shah <darnir@gmail.com>
|
2014-11-20 Darshit Shah <darnir@gmail.com>
|
||||||
|
|
||||||
* .gitignore: po/stamp-po should be ignored
|
* .gitignore: po/stamp-po should be ignored
|
||||||
|
70
NEWS
70
NEWS
@ -6,14 +6,14 @@ Foundation, Inc.
|
|||||||
See the end for copying conditions.
|
See the end for copying conditions.
|
||||||
|
|
||||||
Please send GNU Wget bug reports to <bug-wget@gnu.org>.
|
Please send GNU Wget bug reports to <bug-wget@gnu.org>.
|
||||||
|
|
||||||
* Changes in Wget X.Y.Z
|
* Changes in Wget X.Y.Z
|
||||||
|
|
||||||
** Add --disable-assert configure option. Recommended for distro maintainers.
|
** Add --disable-assert configure option. Recommended for distro maintainers.
|
||||||
|
|
||||||
** Use pkg-config to check for libraries presence.
|
** Use pkg-config to check for libraries presence.
|
||||||
|
|
||||||
|
|
||||||
* Changes in Wget 1.16
|
* Changes in Wget 1.16
|
||||||
|
|
||||||
** No longer create local symbolic links by default. Closes CVE-2014-4877.
|
** No longer create local symbolic links by default. Closes CVE-2014-4877.
|
||||||
@ -29,7 +29,7 @@ Please send GNU Wget bug reports to <bug-wget@gnu.org>.
|
|||||||
** Introduce --start-pos to allow starting downloads from a specified position.
|
** Introduce --start-pos to allow starting downloads from a specified position.
|
||||||
|
|
||||||
** Fix a problem with ISA Server Proxy and keep-alive connections.
|
** Fix a problem with ISA Server Proxy and keep-alive connections.
|
||||||
|
|
||||||
* Changes in Wget 1.15
|
* Changes in Wget 1.15
|
||||||
|
|
||||||
** Add support for --method.
|
** Add support for --method.
|
||||||
@ -61,7 +61,7 @@ Please send GNU Wget bug reports to <bug-wget@gnu.org>.
|
|||||||
** Specify Host with the HTTP CONNECT method.
|
** Specify Host with the HTTP CONNECT method.
|
||||||
|
|
||||||
** Use the correct HTTP method on a redirection.
|
** Use the correct HTTP method on a redirection.
|
||||||
|
|
||||||
* Changes in Wget 1.14
|
* Changes in Wget 1.14
|
||||||
|
|
||||||
** Add support for content-on-error. It allows to store the HTTP
|
** Add support for content-on-error. It allows to store the HTTP
|
||||||
@ -88,7 +88,7 @@ Please send GNU Wget bug reports to <bug-wget@gnu.org>.
|
|||||||
** The GNU TLS backend honors correctly the timeout value.
|
** The GNU TLS backend honors correctly the timeout value.
|
||||||
|
|
||||||
** Add support for RFC 2617 Digest Access Authentication.
|
** Add support for RFC 2617 Digest Access Authentication.
|
||||||
|
|
||||||
* Changes in Wget 1.13.4
|
* Changes in Wget 1.13.4
|
||||||
|
|
||||||
** Now --version and --help work again.
|
** Now --version and --help work again.
|
||||||
@ -101,7 +101,7 @@ Please send GNU Wget bug reports to <bug-wget@gnu.org>.
|
|||||||
is specified.
|
is specified.
|
||||||
|
|
||||||
** Fix a segfault on an incomplete STYLE tag.
|
** Fix a segfault on an incomplete STYLE tag.
|
||||||
|
|
||||||
* Changes in Wget 1.13.3
|
* Changes in Wget 1.13.3
|
||||||
|
|
||||||
** Support HTTP/1.1
|
** Support HTTP/1.1
|
||||||
@ -167,7 +167,7 @@ Please send GNU Wget bug reports to <bug-wget@gnu.org>.
|
|||||||
|
|
||||||
** Introduce `show_all_dns_entries' to print all IP addresses corresponding to
|
** Introduce `show_all_dns_entries' to print all IP addresses corresponding to
|
||||||
a DNS name when it is resolved.
|
a DNS name when it is resolved.
|
||||||
|
|
||||||
* Changes in Wget 1.12
|
* Changes in Wget 1.12
|
||||||
|
|
||||||
** Mailing list MOVED to bug-wget@gnu.org
|
** Mailing list MOVED to bug-wget@gnu.org
|
||||||
@ -221,7 +221,7 @@ forces the percent-encoding of all non-ASCII bytes
|
|||||||
now documented: save_headers, spider, and user_agent,
|
now documented: save_headers, spider, and user_agent,
|
||||||
auth_no_challenge, and keep_session_cookies. Also added documentation
|
auth_no_challenge, and keep_session_cookies. Also added documentation
|
||||||
for the "lowercase" and "uppercase" values for --restrict-file-names, which had been present since Wget 1.11.
|
for the "lowercase" and "uppercase" values for --restrict-file-names, which had been present since Wget 1.11.
|
||||||
|
|
||||||
* Changes in Wget 1.11.4
|
* Changes in Wget 1.11.4
|
||||||
|
|
||||||
** Fixed an issue (apparently a regression) where -O would refuse to
|
** Fixed an issue (apparently a regression) where -O would refuse to
|
||||||
@ -235,13 +235,13 @@ locally with content.
|
|||||||
to a pointer-to-time_t.
|
to a pointer-to-time_t.
|
||||||
|
|
||||||
** Translation updates for Catalan.
|
** Translation updates for Catalan.
|
||||||
|
|
||||||
* Changes in Wget 1.11.3
|
* Changes in Wget 1.11.3
|
||||||
|
|
||||||
** Downgraded -N with -O to a warning, rather than an error.
|
** Downgraded -N with -O to a warning, rather than an error.
|
||||||
|
|
||||||
** Translation updates
|
** Translation updates
|
||||||
|
|
||||||
* Changes in Wget 1.11.2
|
* Changes in Wget 1.11.2
|
||||||
|
|
||||||
** Fixed a problem in authenticating over HTTPS through a proxy.
|
** Fixed a problem in authenticating over HTTPS through a proxy.
|
||||||
@ -263,7 +263,7 @@ multiple times. This has been fixed in 1.11.2.
|
|||||||
for improved conformance with RFC 3986. However, this behavior presents
|
for improved conformance with RFC 3986. However, this behavior presents
|
||||||
problems for some FTP setups, and so they are now preserved again, for
|
problems for some FTP setups, and so they are now preserved again, for
|
||||||
FTP URLs only.
|
FTP URLs only.
|
||||||
|
|
||||||
* Changes in Wget 1.11.1.
|
* Changes in Wget 1.11.1.
|
||||||
|
|
||||||
** Interrupted downloads no longer result in renaming the file
|
** Interrupted downloads no longer result in renaming the file
|
||||||
@ -285,7 +285,7 @@ be surprising, and notes that they may change in the future.
|
|||||||
|
|
||||||
** Documentation of --no-parents now explains how a trailing slash, or
|
** Documentation of --no-parents now explains how a trailing slash, or
|
||||||
lack thereof, in the specified URL, will affect behavior.
|
lack thereof, in the specified URL, will affect behavior.
|
||||||
|
|
||||||
* Changes in Wget 1.11.
|
* Changes in Wget 1.11.
|
||||||
|
|
||||||
** Timestamping now uses the value from the most recent HTTP response,
|
** Timestamping now uses the value from the most recent HTTP response,
|
||||||
@ -331,7 +331,7 @@ available at http://hg.addictivecode.org/. Prior to this, the source
|
|||||||
code was hosted on Subversion (migrated from the original CVS); you can
|
code was hosted on Subversion (migrated from the original CVS); you can
|
||||||
still get access to older tags and branches for Wget in the Subversion
|
still get access to older tags and branches for Wget in the Subversion
|
||||||
repository at http://addictivecode.org/svn/wget/.
|
repository at http://addictivecode.org/svn/wget/.
|
||||||
|
|
||||||
* Changes in Wget 1.10.
|
* Changes in Wget 1.10.
|
||||||
|
|
||||||
** Downloading files larger than 2GB, sometimes referred to as "large
|
** Downloading files larger than 2GB, sometimes referred to as "large
|
||||||
@ -442,9 +442,9 @@ http_password and proxy_password respectively. The login and passwd
|
|||||||
.wgetrc commands have been deprecated.
|
.wgetrc commands have been deprecated.
|
||||||
|
|
||||||
* `wget -b' now works correctly under Windows.
|
* `wget -b' now works correctly under Windows.
|
||||||
|
|
||||||
* Wget 1.9.1 is a bugfix release with no user-visible changes.
|
* Wget 1.9.1 is a bugfix release with no user-visible changes.
|
||||||
|
|
||||||
* Changes in Wget 1.9.
|
* Changes in Wget 1.9.
|
||||||
|
|
||||||
** It is now possible to specify that POST method be used for HTTP
|
** It is now possible to specify that POST method be used for HTTP
|
||||||
@ -496,11 +496,11 @@ values "yes" and "no" along with the traditional "on" and "off".
|
|||||||
** It is now possible to specify decimal values for timeouts, waiting
|
** It is now possible to specify decimal values for timeouts, waiting
|
||||||
periods, and download rate. For instance, `--wait=0.5' now works as
|
periods, and download rate. For instance, `--wait=0.5' now works as
|
||||||
expected, as does `--dns-timeout=0.5' and even `--limit-rate=2.5k'.
|
expected, as does `--dns-timeout=0.5' and even `--limit-rate=2.5k'.
|
||||||
|
|
||||||
* Wget 1.8.2 is a bugfix release with no user-visible changes.
|
* Wget 1.8.2 is a bugfix release with no user-visible changes.
|
||||||
|
|
||||||
* Wget 1.8.1 is a bugfix release with no user-visible changes.
|
* Wget 1.8.1 is a bugfix release with no user-visible changes.
|
||||||
|
|
||||||
* Changes in Wget 1.8.
|
* Changes in Wget 1.8.
|
||||||
|
|
||||||
** A new progress indicator is now available and used by default.
|
** A new progress indicator is now available and used by default.
|
||||||
@ -560,9 +560,9 @@ no longer translated to `?', nor `%2B' to `+'. Unsafe characters
|
|||||||
which are not reserved are still escaped, of course.
|
which are not reserved are still escaped, of course.
|
||||||
|
|
||||||
** No more than 20 successive redirections are allowed.
|
** No more than 20 successive redirections are allowed.
|
||||||
|
|
||||||
* Wget 1.7.1 is a bugfix release with no user-visible changes.
|
* Wget 1.7.1 is a bugfix release with no user-visible changes.
|
||||||
|
|
||||||
* Changes in Wget 1.7.
|
* Changes in Wget 1.7.
|
||||||
|
|
||||||
** SSL (`https') pages now work if you compile Wget with SSL support;
|
** SSL (`https') pages now work if you compile Wget with SSL support;
|
||||||
@ -604,7 +604,7 @@ large sites (thousands of documents).
|
|||||||
documentation. (The last version that shipped with a man page was
|
documentation. (The last version that shipped with a man page was
|
||||||
1.4.5). To get this, you need to have pod2man from the Perl
|
1.4.5). To get this, you need to have pod2man from the Perl
|
||||||
distribution installed on your system.
|
distribution installed on your system.
|
||||||
|
|
||||||
* Changes in Wget 1.6
|
* Changes in Wget 1.6
|
||||||
|
|
||||||
** Administrative changes.
|
** Administrative changes.
|
||||||
@ -655,13 +655,13 @@ passive_ftp is the only .wgetrc command which takes a lockable Boolean.
|
|||||||
bound to multiple IP addresses.
|
bound to multiple IP addresses.
|
||||||
|
|
||||||
** wget now accepts (illegal per HTTP spec) relative URLs in HTTP redirects.
|
** wget now accepts (illegal per HTTP spec) relative URLs in HTTP redirects.
|
||||||
|
|
||||||
* Wget 1.5.3 is a bugfix release with no user-visible changes.
|
* Wget 1.5.3 is a bugfix release with no user-visible changes.
|
||||||
|
|
||||||
* Wget 1.5.2 is a bugfix release with no user-visible changes.
|
* Wget 1.5.2 is a bugfix release with no user-visible changes.
|
||||||
|
|
||||||
* Wget 1.5.1 is a bugfix release with no user-visible changes.
|
* Wget 1.5.1 is a bugfix release with no user-visible changes.
|
||||||
|
|
||||||
* Changes in Wget 1.5.0
|
* Changes in Wget 1.5.0
|
||||||
|
|
||||||
** Wget speaks many languages!
|
** Wget speaks many languages!
|
||||||
@ -707,11 +707,11 @@ download.
|
|||||||
|
|
||||||
** The manual page, now hopelessly out of date, is no longer
|
** The manual page, now hopelessly out of date, is no longer
|
||||||
distributed with Wget.
|
distributed with Wget.
|
||||||
|
|
||||||
* Wget 1.4.5 is a bugfix release with no user-visible changes.
|
* Wget 1.4.5 is a bugfix release with no user-visible changes.
|
||||||
|
|
||||||
* Wget 1.4.4 is a bugfix release with no user-visible changes.
|
* Wget 1.4.4 is a bugfix release with no user-visible changes.
|
||||||
|
|
||||||
* Changes in Wget 1.4.3
|
* Changes in Wget 1.4.3
|
||||||
|
|
||||||
** Wget is now a GNU utility.
|
** Wget is now a GNU utility.
|
||||||
@ -727,7 +727,7 @@ distributed with Wget.
|
|||||||
** Global wgetrc now goes to /usr/local/etc (i.e. $sysconfdir).
|
** Global wgetrc now goes to /usr/local/etc (i.e. $sysconfdir).
|
||||||
|
|
||||||
** Lots of bugfixes.
|
** Lots of bugfixes.
|
||||||
|
|
||||||
* Changes in Wget 1.4.2
|
* Changes in Wget 1.4.2
|
||||||
|
|
||||||
** New mirror site at ftp://sunsite.auc.dk/pub/infosystems/wget/,
|
** New mirror site at ftp://sunsite.auc.dk/pub/infosystems/wget/,
|
||||||
@ -745,7 +745,7 @@ files.
|
|||||||
** --convert-links should work now.
|
** --convert-links should work now.
|
||||||
|
|
||||||
** Minor bugfixes.
|
** Minor bugfixes.
|
||||||
|
|
||||||
* Changes in Wget 1.4.1
|
* Changes in Wget 1.4.1
|
||||||
|
|
||||||
** Minor bugfixes.
|
** Minor bugfixes.
|
||||||
@ -753,7 +753,7 @@ files.
|
|||||||
** Added -I (the opposite of -X).
|
** Added -I (the opposite of -X).
|
||||||
|
|
||||||
** Dot tracing is now customizable; try wget --dot-style=binary
|
** Dot tracing is now customizable; try wget --dot-style=binary
|
||||||
|
|
||||||
* Changes in Wget 1.4.0
|
* Changes in Wget 1.4.0
|
||||||
|
|
||||||
** Wget 1.4.0 [formerly known as Geturl] is an extensive rewrite of
|
** Wget 1.4.0 [formerly known as Geturl] is an extensive rewrite of
|
||||||
@ -834,7 +834,7 @@ turn on mirroring options).
|
|||||||
** Lots of small features I can't remember. :-)
|
** Lots of small features I can't remember. :-)
|
||||||
|
|
||||||
** A host of bugfixes.
|
** A host of bugfixes.
|
||||||
|
|
||||||
* Changes in Geturl 1.3
|
* Changes in Geturl 1.3
|
||||||
|
|
||||||
** Added FTP globbing support (ftp://fly.cc.fer.hr/*)
|
** Added FTP globbing support (ftp://fly.cc.fer.hr/*)
|
||||||
@ -852,9 +852,9 @@ turn on mirroring options).
|
|||||||
** Added support for robots.txt
|
** Added support for robots.txt
|
||||||
|
|
||||||
** Fixed some minor bugs
|
** Fixed some minor bugs
|
||||||
|
|
||||||
* Geturl 1.2 is a bugfix release with no user-visible changes.
|
* Geturl 1.2 is a bugfix release with no user-visible changes.
|
||||||
|
|
||||||
* Changes in Geturl 1.1
|
* Changes in Geturl 1.1
|
||||||
|
|
||||||
** REST supported in FTP
|
** REST supported in FTP
|
||||||
@ -872,7 +872,7 @@ geturl -vo log http://fly.cc.fer.hr/
|
|||||||
** <base href="xxx"> supported
|
** <base href="xxx"> supported
|
||||||
|
|
||||||
** autoconf supported
|
** autoconf supported
|
||||||
|
|
||||||
----------------------------------------------------------------------
|
----------------------------------------------------------------------
|
||||||
Copyright information:
|
Copyright information:
|
||||||
|
|
||||||
|
@ -1,3 +1,7 @@
|
|||||||
|
2014-11-20 Tim Ruehsen <tim.ruehsen@gmx.de>
|
||||||
|
|
||||||
|
* Removed form feeds (\014) from *.c and *.h
|
||||||
|
|
||||||
2014-11-20 Gisle Vanem <gvanem@yahoo.no>
|
2014-11-20 Gisle Vanem <gvanem@yahoo.no>
|
||||||
|
|
||||||
* http.c (parse_content_disposition): Fix C89 issue found by MSVC 16
|
* http.c (parse_content_disposition): Fix C89 issue found by MSVC 16
|
||||||
|
@ -46,7 +46,7 @@ as that of the covered work. */
|
|||||||
implementations of such missing functions. It should *not* define
|
implementations of such missing functions. It should *not* define
|
||||||
new Wget-specific interfaces -- those should be placed in utils.c
|
new Wget-specific interfaces -- those should be placed in utils.c
|
||||||
or elsewhere. */
|
or elsewhere. */
|
||||||
|
|
||||||
/* strcasecmp and strncasecmp apparently originated with BSD 4.4.
|
/* strcasecmp and strncasecmp apparently originated with BSD 4.4.
|
||||||
SUSv3 seems to be the only standard out there (that I can find)
|
SUSv3 seems to be the only standard out there (that I can find)
|
||||||
that requires their existence, so in theory there might be systems
|
that requires their existence, so in theory there might be systems
|
||||||
@ -126,7 +126,7 @@ memrchr (const void *s, int c, size_t n)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* strptime is required by POSIX, but it is missing from Windows,
|
/* strptime is required by POSIX, but it is missing from Windows,
|
||||||
which means we must keep a fallback implementation. It is
|
which means we must keep a fallback implementation. It is
|
||||||
reportedly missing or broken on many older Unix systems as well, so
|
reportedly missing or broken on many older Unix systems as well, so
|
||||||
@ -1052,7 +1052,7 @@ const unsigned short int __mon_yday[2][13] =
|
|||||||
{ 0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335, 366 }
|
{ 0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335, 366 }
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* fnmatch is required by POSIX, but we include an implementation for
|
/* fnmatch is required by POSIX, but we include an implementation for
|
||||||
the sake of systems that don't have it, most notably Windows. Some
|
the sake of systems that don't have it, most notably Windows. Some
|
||||||
systems do have fnmatch, but Apache's installation process installs
|
systems do have fnmatch, but Apache's installation process installs
|
||||||
@ -1238,7 +1238,7 @@ fnmatch (const char *pattern, const char *string, int flags)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#endif /* not SYSTEM_FNMATCH */
|
#endif /* not SYSTEM_FNMATCH */
|
||||||
|
|
||||||
#ifndef HAVE_TIMEGM
|
#ifndef HAVE_TIMEGM
|
||||||
/* timegm is a GNU extension, but lately also available on *BSD
|
/* timegm is a GNU extension, but lately also available on *BSD
|
||||||
systems and possibly elsewhere. */
|
systems and possibly elsewhere. */
|
||||||
|
@ -168,7 +168,7 @@ sockaddr_size (const struct sockaddr *sa)
|
|||||||
abort ();
|
abort ();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Resolve the bind address specified via --bind-address and store it
|
/* Resolve the bind address specified via --bind-address and store it
|
||||||
to SA. The resolved value is stored in a static variable and
|
to SA. The resolved value is stored in a static variable and
|
||||||
reused after the first invocation of this function.
|
reused after the first invocation of this function.
|
||||||
@ -213,7 +213,7 @@ resolve_bind_address (struct sockaddr *sa)
|
|||||||
should_bind = true;
|
should_bind = true;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct cwt_context {
|
struct cwt_context {
|
||||||
int fd;
|
int fd;
|
||||||
const struct sockaddr *addr;
|
const struct sockaddr *addr;
|
||||||
@ -250,7 +250,7 @@ connect_with_timeout (int fd, const struct sockaddr *addr, socklen_t addrlen,
|
|||||||
errno = ETIMEDOUT;
|
errno = ETIMEDOUT;
|
||||||
return ctx.result;
|
return ctx.result;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Connect via TCP to the specified address and port.
|
/* Connect via TCP to the specified address and port.
|
||||||
|
|
||||||
If PRINT is non-NULL, it is the host name to print that we're
|
If PRINT is non-NULL, it is the host name to print that we're
|
||||||
@ -429,7 +429,7 @@ connect_to_host (const char *host, int port)
|
|||||||
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Create a socket, bind it to local interface BIND_ADDRESS on port
|
/* Create a socket, bind it to local interface BIND_ADDRESS on port
|
||||||
*PORT, set up a listen backlog, and return the resulting socket, or
|
*PORT, set up a listen backlog, and return the resulting socket, or
|
||||||
-1 in case of error.
|
-1 in case of error.
|
||||||
@ -746,7 +746,7 @@ wget uses blocking sockets so we must convert them back to blocking
|
|||||||
or EOF/error. */
|
or EOF/error. */
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Basic socket operations, mostly EINTR wrappers. */
|
/* Basic socket operations, mostly EINTR wrappers. */
|
||||||
|
|
||||||
static int
|
static int
|
||||||
@ -794,7 +794,7 @@ sock_close (int fd)
|
|||||||
#undef read
|
#undef read
|
||||||
#undef write
|
#undef write
|
||||||
#undef close
|
#undef close
|
||||||
|
|
||||||
/* Reading and writing from the network. We build around the socket
|
/* Reading and writing from the network. We build around the socket
|
||||||
(file descriptor) API, but support "extended" operations for things
|
(file descriptor) API, but support "extended" operations for things
|
||||||
that are not mere file descriptors under the hood, such as SSL
|
that are not mere file descriptors under the hood, such as SSL
|
||||||
|
@ -661,7 +661,7 @@ local_quote_string (const char *file, bool no_html_quote)
|
|||||||
|
|
||||||
return no_html_quote ? strdup (newname) : html_quote_string (newname);
|
return no_html_quote ? strdup (newname) : html_quote_string (newname);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Book-keeping code for dl_file_url_map, dl_url_file_map,
|
/* Book-keeping code for dl_file_url_map, dl_url_file_map,
|
||||||
downloaded_html_list, and downloaded_html_set. Other code calls
|
downloaded_html_list, and downloaded_html_set. Other code calls
|
||||||
these functions to let us know that a file has been downloaded. */
|
these functions to let us know that a file has been downloaded. */
|
||||||
@ -916,7 +916,7 @@ convert_cleanup (void)
|
|||||||
if (converted_files)
|
if (converted_files)
|
||||||
string_set_free (converted_files);
|
string_set_free (converted_files);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Book-keeping code for downloaded files that enables extension
|
/* Book-keeping code for downloaded files that enables extension
|
||||||
hacks. */
|
hacks. */
|
||||||
|
|
||||||
@ -1012,7 +1012,7 @@ downloaded_files_free (void)
|
|||||||
downloaded_files_hash = NULL;
|
downloaded_files_hash = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* The function returns the pointer to the malloc-ed quoted version of
|
/* The function returns the pointer to the malloc-ed quoted version of
|
||||||
string s. It will recognize and quote numeric and special graphic
|
string s. It will recognize and quote numeric and special graphic
|
||||||
entities, as per RFC1866:
|
entities, as per RFC1866:
|
||||||
|
@ -59,7 +59,7 @@ as that of the covered work. */
|
|||||||
#include "cookies.h"
|
#include "cookies.h"
|
||||||
#include "http.h" /* for http_atotm */
|
#include "http.h" /* for http_atotm */
|
||||||
#include "c-strcase.h"
|
#include "c-strcase.h"
|
||||||
|
|
||||||
|
|
||||||
/* Declarations of `struct cookie' and the most basic functions. */
|
/* Declarations of `struct cookie' and the most basic functions. */
|
||||||
|
|
||||||
@ -159,7 +159,7 @@ delete_cookie (struct cookie *cookie)
|
|||||||
xfree_null (cookie->value);
|
xfree_null (cookie->value);
|
||||||
xfree (cookie);
|
xfree (cookie);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Functions for storing cookies.
|
/* Functions for storing cookies.
|
||||||
|
|
||||||
All cookies can be reached beginning with jar->chains. The key in
|
All cookies can be reached beginning with jar->chains. The key in
|
||||||
@ -319,7 +319,7 @@ discard_matching_cookie (struct cookie_jar *jar, struct cookie *cookie)
|
|||||||
DEBUGP (("Discarded old cookie.\n"));
|
DEBUGP (("Discarded old cookie.\n"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Functions for parsing the `Set-Cookie' header, and creating new
|
/* Functions for parsing the `Set-Cookie' header, and creating new
|
||||||
cookies from the wire. */
|
cookies from the wire. */
|
||||||
|
|
||||||
@ -458,7 +458,7 @@ parse_set_cookie (const char *set_cookie, bool silent)
|
|||||||
|
|
||||||
#undef TOKEN_IS
|
#undef TOKEN_IS
|
||||||
#undef TOKEN_NON_EMPTY
|
#undef TOKEN_NON_EMPTY
|
||||||
|
|
||||||
/* Sanity checks. These are important, otherwise it is possible for
|
/* Sanity checks. These are important, otherwise it is possible for
|
||||||
mailcious attackers to destroy important cookie information and/or
|
mailcious attackers to destroy important cookie information and/or
|
||||||
violate your privacy. */
|
violate your privacy. */
|
||||||
@ -694,7 +694,7 @@ check_path_match (const char *cookie_path, const char *path)
|
|||||||
s = PS_newstr; \
|
s = PS_newstr; \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
|
|
||||||
/* Process the HTTP `Set-Cookie' header. This results in storing the
|
/* Process the HTTP `Set-Cookie' header. This results in storing the
|
||||||
cookie or discarding a matching one, or ignoring it completely, all
|
cookie or discarding a matching one, or ignoring it completely, all
|
||||||
depending on the contents. */
|
depending on the contents. */
|
||||||
@ -778,7 +778,7 @@ cookie_handle_set_cookie (struct cookie_jar *jar,
|
|||||||
if (cookie)
|
if (cookie)
|
||||||
delete_cookie (cookie);
|
delete_cookie (cookie);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Support for sending out cookies in HTTP requests, based on
|
/* Support for sending out cookies in HTTP requests, based on
|
||||||
previously stored cookies. Entry point is
|
previously stored cookies. Entry point is
|
||||||
`build_cookies_request'. */
|
`build_cookies_request'. */
|
||||||
@ -1109,7 +1109,7 @@ cookie_header (struct cookie_jar *jar, const char *host,
|
|||||||
assert (pos == result_size);
|
assert (pos == result_size);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Support for loading and saving cookies. The format used for
|
/* Support for loading and saving cookies. The format used for
|
||||||
loading and saving should be the format of the `cookies.txt' file
|
loading and saving should be the format of the `cookies.txt' file
|
||||||
used by Netscape and Mozilla, at least the Unix versions.
|
used by Netscape and Mozilla, at least the Unix versions.
|
||||||
@ -1348,7 +1348,7 @@ cookie_jar_save (struct cookie_jar *jar, const char *file)
|
|||||||
|
|
||||||
DEBUGP (("Done saving cookies.\n"));
|
DEBUGP (("Done saving cookies.\n"));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Clean up cookie-related data. */
|
/* Clean up cookie-related data. */
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -1371,7 +1371,7 @@ cookie_jar_delete (struct cookie_jar *jar)
|
|||||||
hash_table_destroy (jar->chains);
|
hash_table_destroy (jar->chains);
|
||||||
xfree (jar);
|
xfree (jar);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Test cases. Currently this is only tests parse_set_cookies. To
|
/* Test cases. Currently this is only tests parse_set_cookies. To
|
||||||
use, recompile Wget with -DTEST_COOKIES and call test_cookies()
|
use, recompile Wget with -DTEST_COOKIES and call test_cookies()
|
||||||
from main. */
|
from main. */
|
||||||
|
@ -45,7 +45,7 @@ as that of the covered work. */
|
|||||||
#include "retr.h"
|
#include "retr.h"
|
||||||
#include "c-strcase.h"
|
#include "c-strcase.h"
|
||||||
|
|
||||||
|
|
||||||
/* Get the response of FTP server and allocate enough room to handle
|
/* Get the response of FTP server and allocate enough room to handle
|
||||||
it. <CR> and <LF> characters are stripped from the line, and the
|
it. <CR> and <LF> characters are stripped from the line, and the
|
||||||
line is 0-terminated. All the response lines but the last one are
|
line is 0-terminated. All the response lines but the last one are
|
||||||
|
@ -1052,7 +1052,7 @@ Unsupported listing type, trying Unix listing parser.\n"));
|
|||||||
return ftp_parse_unix_ls (file, 0);
|
return ftp_parse_unix_ls (file, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Stuff for creating FTP index. */
|
/* Stuff for creating FTP index. */
|
||||||
|
|
||||||
/* The function creates an HTML index containing references to given
|
/* The function creates an HTML index containing references to given
|
||||||
|
@ -585,7 +585,7 @@ hash_table_count (const struct hash_table *ht)
|
|||||||
{
|
{
|
||||||
return ht->count;
|
return ht->count;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Functions from this point onward are meant for convenience and
|
/* Functions from this point onward are meant for convenience and
|
||||||
don't strictly belong to this file. However, this is as good a
|
don't strictly belong to this file. However, this is as good a
|
||||||
place for them as any. */
|
place for them as any. */
|
||||||
@ -740,7 +740,7 @@ cmp_pointer (const void *ptr1, const void *ptr2)
|
|||||||
{
|
{
|
||||||
return ptr1 == ptr2;
|
return ptr1 == ptr2;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef TEST
|
#ifdef TEST
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
10
src/host.c
10
src/host.c
@ -309,7 +309,7 @@ address_list_release (struct address_list *al)
|
|||||||
address_list_delete (al);
|
address_list_delete (al);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Versions of gethostbyname and getaddrinfo that support timeout. */
|
/* Versions of gethostbyname and getaddrinfo that support timeout. */
|
||||||
|
|
||||||
#ifndef ENABLE_IPV6
|
#ifndef ENABLE_IPV6
|
||||||
@ -408,7 +408,7 @@ getaddrinfo_with_timeout (const char *node, const char *service,
|
|||||||
}
|
}
|
||||||
|
|
||||||
#endif /* ENABLE_IPV6 */
|
#endif /* ENABLE_IPV6 */
|
||||||
|
|
||||||
/* Return a textual representation of ADDR, i.e. the dotted quad for
|
/* Return a textual representation of ADDR, i.e. the dotted quad for
|
||||||
IPv4 addresses, and the colon-separated list of hex words (with all
|
IPv4 addresses, and the colon-separated list of hex words (with all
|
||||||
zeros omitted, etc.) for IPv6 addresses. */
|
zeros omitted, etc.) for IPv6 addresses. */
|
||||||
@ -570,7 +570,7 @@ is_valid_ipv6_address (const char *str, const char *end)
|
|||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Simple host cache, used by lookup_host to speed up resolving. The
|
/* Simple host cache, used by lookup_host to speed up resolving. The
|
||||||
cache doesn't handle TTL because Wget is a fairly short-lived
|
cache doesn't handle TTL because Wget is a fairly short-lived
|
||||||
application. Refreshing is attempted when connect fails, though --
|
application. Refreshing is attempted when connect fails, though --
|
||||||
@ -637,7 +637,7 @@ cache_remove (const char *host)
|
|||||||
hash_table_remove (host_name_addresses_map, host);
|
hash_table_remove (host_name_addresses_map, host);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Look up HOST in DNS and return a list of IP addresses.
|
/* Look up HOST in DNS and return a list of IP addresses.
|
||||||
|
|
||||||
This function caches its result so that, if the same host is passed
|
This function caches its result so that, if the same host is passed
|
||||||
@ -848,7 +848,7 @@ lookup_host (const char *host, int flags)
|
|||||||
|
|
||||||
return al;
|
return al;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Determine whether a URL is acceptable to be followed, according to
|
/* Determine whether a URL is acceptable to be followed, according to
|
||||||
a list of domains to accept. */
|
a list of domains to accept. */
|
||||||
bool
|
bool
|
||||||
|
@ -253,7 +253,7 @@ struct pool {
|
|||||||
(sizevar) = ga_newsize; \
|
(sizevar) = ga_newsize; \
|
||||||
} \
|
} \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
/* Test whether n+1-sized entity name fits in P. We don't support
|
/* Test whether n+1-sized entity name fits in P. We don't support
|
||||||
IE-style non-terminated entities, e.g. "<foo" -> "<foo".
|
IE-style non-terminated entities, e.g. "<foo" -> "<foo".
|
||||||
However, "<foo" will work, as will "<!foo", "<", etc. In
|
However, "<foo" will work, as will "<!foo", "<", etc. In
|
||||||
@ -517,7 +517,7 @@ convert_and_copy (struct pool *pool, const char *beg, const char *end, int flags
|
|||||||
*p = c_tolower (*p);
|
*p = c_tolower (*p);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Originally we used to adhere to rfc 1866 here, and allowed only
|
/* Originally we used to adhere to rfc 1866 here, and allowed only
|
||||||
letters, digits, periods, and hyphens as names (of tags or
|
letters, digits, periods, and hyphens as names (of tags or
|
||||||
attributes). However, this broke too many pages which used
|
attributes). However, this broke too many pages which used
|
||||||
@ -770,7 +770,7 @@ find_comment_end (const char *beg, const char *end)
|
|||||||
}
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Return true if the string containing of characters inside [b, e) is
|
/* Return true if the string containing of characters inside [b, e) is
|
||||||
present in hash table HT. */
|
present in hash table HT. */
|
||||||
|
|
||||||
@ -1167,7 +1167,7 @@ map_html_tags (const char *text, int size,
|
|||||||
#undef ADVANCE
|
#undef ADVANCE
|
||||||
#undef SKIP_WS
|
#undef SKIP_WS
|
||||||
#undef SKIP_NON_WS
|
#undef SKIP_NON_WS
|
||||||
|
|
||||||
#ifdef STANDALONE
|
#ifdef STANDALONE
|
||||||
static void
|
static void
|
||||||
test_mapper (struct taginfo *taginfo, void *arg)
|
test_mapper (struct taginfo *taginfo, void *arg)
|
||||||
|
@ -379,7 +379,7 @@ append_url (const char *link_uri, int position, int size,
|
|||||||
|
|
||||||
return newel;
|
return newel;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
check_style_attr (struct taginfo *tag, struct map_context *ctx)
|
check_style_attr (struct taginfo *tag, struct map_context *ctx)
|
||||||
{
|
{
|
||||||
@ -702,7 +702,7 @@ collect_tags_mapper (struct taginfo *tag, void *arg)
|
|||||||
tag->contents_end - tag->contents_begin);
|
tag->contents_end - tag->contents_begin);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Analyze HTML tags FILE and construct a list of URLs referenced from
|
/* Analyze HTML tags FILE and construct a list of URLs referenced from
|
||||||
it. It merges relative links in FILE with URL. It is aware of
|
it. It merges relative links in FILE with URL. It is aware of
|
||||||
<base href=...> and does the right thing. */
|
<base href=...> and does the right thing. */
|
||||||
|
@ -74,13 +74,13 @@ as that of the covered work. */
|
|||||||
/* Define this to make the type-3 message include the NT response message */
|
/* Define this to make the type-3 message include the NT response message */
|
||||||
#define USE_NTRESPONSES 1
|
#define USE_NTRESPONSES 1
|
||||||
|
|
||||||
|
|
||||||
/* Flag bits definitions available at on
|
/* Flag bits definitions available at on
|
||||||
http://davenport.sourceforge.net/ntlm.html */
|
http://davenport.sourceforge.net/ntlm.html */
|
||||||
|
|
||||||
#define NTLMFLAG_NEGOTIATE_OEM (1<<1)
|
#define NTLMFLAG_NEGOTIATE_OEM (1<<1)
|
||||||
#define NTLMFLAG_NEGOTIATE_NTLM_KEY (1<<9)
|
#define NTLMFLAG_NEGOTIATE_NTLM_KEY (1<<9)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
(*) = A "security buffer" is a triplet consisting of two shorts and one
|
(*) = A "security buffer" is a triplet consisting of two shorts and one
|
||||||
long:
|
long:
|
||||||
|
16
src/http.c
16
src/http.c
@ -85,7 +85,7 @@ static void load_cookies (void);
|
|||||||
# define MIN(x, y) ((x) > (y) ? (y) : (x))
|
# define MIN(x, y) ((x) > (y) ? (y) : (x))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
static bool cookies_loaded_p;
|
static bool cookies_loaded_p;
|
||||||
static struct cookie_jar *wget_cookie_jar;
|
static struct cookie_jar *wget_cookie_jar;
|
||||||
|
|
||||||
@ -131,7 +131,7 @@ static struct cookie_jar *wget_cookie_jar;
|
|||||||
#define HTTP_STATUS_BAD_GATEWAY 502
|
#define HTTP_STATUS_BAD_GATEWAY 502
|
||||||
#define HTTP_STATUS_UNAVAILABLE 503
|
#define HTTP_STATUS_UNAVAILABLE 503
|
||||||
#define HTTP_STATUS_GATEWAY_TIMEOUT 504
|
#define HTTP_STATUS_GATEWAY_TIMEOUT 504
|
||||||
|
|
||||||
enum rp {
|
enum rp {
|
||||||
rel_none, rel_name, rel_value, rel_both
|
rel_none, rel_name, rel_value, rel_both
|
||||||
};
|
};
|
||||||
@ -505,7 +505,7 @@ body_file_send (int sock, const char *file_name, wgint promised_size, FILE *warc
|
|||||||
DEBUGP (("done]\n"));
|
DEBUGP (("done]\n"));
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Determine whether [START, PEEKED + PEEKLEN) contains an empty line.
|
/* Determine whether [START, PEEKED + PEEKLEN) contains an empty line.
|
||||||
If so, return the pointer to the position after the line, otherwise
|
If so, return the pointer to the position after the line, otherwise
|
||||||
return NULL. This is used as callback to fd_read_hunk. The data
|
return NULL. This is used as callback to fd_read_hunk. The data
|
||||||
@ -1227,7 +1227,7 @@ parse_content_disposition (const char *hdr, char **filename)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Persistent connections. Currently, we cache the most recently used
|
/* Persistent connections. Currently, we cache the most recently used
|
||||||
connection as persistent, provided that the HTTP server agrees to
|
connection as persistent, provided that the HTTP server agrees to
|
||||||
make it such. The persistence data is stored in the variables
|
make it such. The persistence data is stored in the variables
|
||||||
@ -1443,7 +1443,7 @@ persistent_available_p (const char *host, int port, bool ssl,
|
|||||||
fd_close (fd); \
|
fd_close (fd); \
|
||||||
fd = -1; \
|
fd = -1; \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
struct http_stat
|
struct http_stat
|
||||||
{
|
{
|
||||||
wgint len; /* received length */
|
wgint len; /* received length */
|
||||||
@ -3606,7 +3606,7 @@ exit:
|
|||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Check whether the result of strptime() indicates success.
|
/* Check whether the result of strptime() indicates success.
|
||||||
strptime() returns the pointer to how far it got to in the string.
|
strptime() returns the pointer to how far it got to in the string.
|
||||||
The processing has been successful if the string is at `GMT' or
|
The processing has been successful if the string is at `GMT' or
|
||||||
@ -3717,7 +3717,7 @@ http_atotm (const char *time_string)
|
|||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Authorization support: We support three authorization schemes:
|
/* Authorization support: We support three authorization schemes:
|
||||||
|
|
||||||
* `Basic' scheme, consisting of base64-ing USER:PASSWORD string;
|
* `Basic' scheme, consisting of base64-ing USER:PASSWORD string;
|
||||||
@ -4038,7 +4038,7 @@ create_authorization_line (const char *au, const char *user,
|
|||||||
abort ();
|
abort ();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
load_cookies (void)
|
load_cookies (void)
|
||||||
{
|
{
|
||||||
|
12
src/init.c
12
src/init.c
@ -331,7 +331,7 @@ command_by_name (const char *cmdname)
|
|||||||
}
|
}
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Reset the variables to default values. */
|
/* Reset the variables to default values. */
|
||||||
void
|
void
|
||||||
defaults (void)
|
defaults (void)
|
||||||
@ -437,7 +437,7 @@ defaults (void)
|
|||||||
opt.show_progress = false;
|
opt.show_progress = false;
|
||||||
opt.noscroll = false;
|
opt.noscroll = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Return the user's home directory (strdup-ed), or NULL if none is
|
/* Return the user's home directory (strdup-ed), or NULL if none is
|
||||||
found. */
|
found. */
|
||||||
char *
|
char *
|
||||||
@ -899,7 +899,7 @@ run_command (const char *cmdopt)
|
|||||||
exit (WGET_EXIT_PARSE_ERROR);
|
exit (WGET_EXIT_PARSE_ERROR);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Generic helper functions, for use with `commands'. */
|
/* Generic helper functions, for use with `commands'. */
|
||||||
|
|
||||||
/* Forward declarations: */
|
/* Forward declarations: */
|
||||||
@ -1294,7 +1294,7 @@ cmd_cert_type (const char *com, const char *val, void *place)
|
|||||||
return ok;
|
return ok;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Specialized helper functions, used by `commands' to handle some
|
/* Specialized helper functions, used by `commands' to handle some
|
||||||
options specially. */
|
options specially. */
|
||||||
|
|
||||||
@ -1589,7 +1589,7 @@ cmd_spec_verbose (const char *com, const char *val, void *place_ignored _GL_UNUS
|
|||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Miscellaneous useful routines. */
|
/* Miscellaneous useful routines. */
|
||||||
|
|
||||||
/* A very simple atoi clone, more useful than atoi because it works on
|
/* A very simple atoi clone, more useful than atoi because it works on
|
||||||
@ -1817,7 +1817,7 @@ cleanup (void)
|
|||||||
|
|
||||||
#endif /* DEBUG_MALLOC */
|
#endif /* DEBUG_MALLOC */
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Unit testing routines. */
|
/* Unit testing routines. */
|
||||||
|
|
||||||
#ifdef TESTING
|
#ifdef TESTING
|
||||||
|
14
src/log.c
14
src/log.c
@ -73,7 +73,7 @@ as that of the covered work. */
|
|||||||
- Inhibiting output. When Wget receives SIGHUP, but redirecting
|
- Inhibiting output. When Wget receives SIGHUP, but redirecting
|
||||||
the output fails, logging is inhibited. */
|
the output fails, logging is inhibited. */
|
||||||
|
|
||||||
|
|
||||||
/* The file descriptor used for logging. This is NULL before log_init
|
/* The file descriptor used for logging. This is NULL before log_init
|
||||||
is called; logging functions log to stderr then. log_init sets it
|
is called; logging functions log to stderr then. log_init sets it
|
||||||
either to stderr or to a file pointer obtained from fopen(). If
|
either to stderr or to a file pointer obtained from fopen(). If
|
||||||
@ -142,7 +142,7 @@ static int log_line_current = -1;
|
|||||||
static bool trailing_line;
|
static bool trailing_line;
|
||||||
|
|
||||||
static void check_redirect_output (void);
|
static void check_redirect_output (void);
|
||||||
|
|
||||||
#define ROT_ADVANCE(num) do { \
|
#define ROT_ADVANCE(num) do { \
|
||||||
if (++num >= SAVED_LOG_LINES) \
|
if (++num >= SAVED_LOG_LINES) \
|
||||||
num = 0; \
|
num = 0; \
|
||||||
@ -265,7 +265,7 @@ saved_append (const char *s)
|
|||||||
s = end;
|
s = end;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Check X against opt.verbose and opt.quiet. The semantics is as
|
/* Check X against opt.verbose and opt.quiet. The semantics is as
|
||||||
follows:
|
follows:
|
||||||
|
|
||||||
@ -338,7 +338,7 @@ log_set_warc_log_fp (FILE * fp)
|
|||||||
{
|
{
|
||||||
warclogfp = fp;
|
warclogfp = fp;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Log a literal string S. The string is logged as-is, without a
|
/* Log a literal string S. The string is logged as-is, without a
|
||||||
newline appended. */
|
newline appended. */
|
||||||
|
|
||||||
@ -580,7 +580,7 @@ debug_logprintf (const char *fmt, ...)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif /* ENABLE_DEBUG */
|
#endif /* ENABLE_DEBUG */
|
||||||
|
|
||||||
/* Open FILE and set up a logging stream. If FILE cannot be opened,
|
/* Open FILE and set up a logging stream. If FILE cannot be opened,
|
||||||
exit with status of 1. */
|
exit with status of 1. */
|
||||||
void
|
void
|
||||||
@ -675,7 +675,7 @@ log_dump_context (void)
|
|||||||
fflush (fp);
|
fflush (fp);
|
||||||
fflush (warcfp);
|
fflush (warcfp);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* String escape functions. */
|
/* String escape functions. */
|
||||||
|
|
||||||
/* Return the number of non-printable characters in SOURCE.
|
/* Return the number of non-printable characters in SOURCE.
|
||||||
@ -849,7 +849,7 @@ log_cleanup (void)
|
|||||||
for (i = 0; i < countof (ring); i++)
|
for (i = 0; i < countof (ring); i++)
|
||||||
xfree_null (ring[i].buffer);
|
xfree_null (ring[i].buffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* When SIGHUP or SIGUSR1 are received, the output is redirected
|
/* When SIGHUP or SIGUSR1 are received, the output is redirected
|
||||||
elsewhere. Such redirection is only allowed once. */
|
elsewhere. Such redirection is only allowed once. */
|
||||||
static enum { RR_NONE, RR_REQUESTED, RR_DONE } redirect_request = RR_NONE;
|
static enum { RR_NONE, RR_REQUESTED, RR_DONE } redirect_request = RR_NONE;
|
||||||
|
@ -93,7 +93,7 @@ const char *exec_name;
|
|||||||
|
|
||||||
/* Number of successfully downloaded URLs */
|
/* Number of successfully downloaded URLs */
|
||||||
int numurls = 0;
|
int numurls = 0;
|
||||||
|
|
||||||
#ifndef TESTING
|
#ifndef TESTING
|
||||||
/* Initialize I18N/L10N. That amounts to invoking setlocale, and
|
/* Initialize I18N/L10N. That amounts to invoking setlocale, and
|
||||||
setting up gettext's message catalog using bindtextdomain and
|
setting up gettext's message catalog using bindtextdomain and
|
||||||
@ -136,7 +136,7 @@ i18n_initialize (void)
|
|||||||
textdomain ("wget");
|
textdomain ("wget");
|
||||||
#endif /* ENABLE_NLS */
|
#endif /* ENABLE_NLS */
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Definition of command-line options. */
|
/* Definition of command-line options. */
|
||||||
|
|
||||||
static void _Noreturn print_help (void);
|
static void _Noreturn print_help (void);
|
||||||
|
@ -85,7 +85,7 @@ windows_main (char **exec_name)
|
|||||||
if (p)
|
if (p)
|
||||||
*p = '\0';
|
*p = '\0';
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
ws_cleanup (void)
|
ws_cleanup (void)
|
||||||
{
|
{
|
||||||
@ -477,7 +477,7 @@ ws_startup (void)
|
|||||||
set_sleep_mode ();
|
set_sleep_mode ();
|
||||||
SetConsoleCtrlHandler (ws_handler, TRUE);
|
SetConsoleCtrlHandler (ws_handler, TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* run_with_timeout Windows implementation. */
|
/* run_with_timeout Windows implementation. */
|
||||||
|
|
||||||
/* Stack size 0 uses default thread stack-size (reserve+commit).
|
/* Stack size 0 uses default thread stack-size (reserve+commit).
|
||||||
|
@ -196,7 +196,7 @@ progress_finish (void *progress, double dltime)
|
|||||||
{
|
{
|
||||||
current_impl->finish (progress, dltime);
|
current_impl->finish (progress, dltime);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Dot-printing. */
|
/* Dot-printing. */
|
||||||
|
|
||||||
struct dot_progress {
|
struct dot_progress {
|
||||||
@ -466,7 +466,7 @@ dot_set_params (char *params)
|
|||||||
_("Invalid dot style specification %s; leaving unchanged.\n"),
|
_("Invalid dot style specification %s; leaving unchanged.\n"),
|
||||||
quote (params));
|
quote (params));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* "Thermometer" (bar) progress. */
|
/* "Thermometer" (bar) progress. */
|
||||||
|
|
||||||
/* Assumed screen width if we can't find the real value. */
|
/* Assumed screen width if we can't find the real value. */
|
||||||
|
@ -291,7 +291,7 @@ windows_resolution (void)
|
|||||||
return 10; /* according to MSDN */
|
return 10; /* according to MSDN */
|
||||||
}
|
}
|
||||||
#endif /* PTIMER_WINDOWS */
|
#endif /* PTIMER_WINDOWS */
|
||||||
|
|
||||||
/* The code below this point is independent of timer implementation. */
|
/* The code below this point is independent of timer implementation. */
|
||||||
|
|
||||||
struct ptimer {
|
struct ptimer {
|
||||||
|
@ -50,7 +50,7 @@ as that of the covered work. */
|
|||||||
#include "html-url.h"
|
#include "html-url.h"
|
||||||
#include "css-url.h"
|
#include "css-url.h"
|
||||||
#include "spider.h"
|
#include "spider.h"
|
||||||
|
|
||||||
/* Functions for maintaining the URL queue. */
|
/* Functions for maintaining the URL queue. */
|
||||||
|
|
||||||
struct queue_element {
|
struct queue_element {
|
||||||
@ -159,7 +159,7 @@ url_dequeue (struct url_queue *queue, struct iri **i,
|
|||||||
xfree (qel);
|
xfree (qel);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool download_child_p (const struct urlpos *, struct url *, int,
|
static bool download_child_p (const struct urlpos *, struct url *, int,
|
||||||
struct url *, struct hash_table *, struct iri *);
|
struct url *, struct hash_table *, struct iri *);
|
||||||
static bool descend_redirect_p (const char *, struct url *, int,
|
static bool descend_redirect_p (const char *, struct url *, int,
|
||||||
|
14
src/res.c
14
src/res.c
@ -98,7 +98,7 @@ struct robot_specs {
|
|||||||
int size;
|
int size;
|
||||||
struct path_info *paths;
|
struct path_info *paths;
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Parsing the robot spec. */
|
/* Parsing the robot spec. */
|
||||||
|
|
||||||
/* Check whether AGENT (a string of length LENGTH) equals "wget" or
|
/* Check whether AGENT (a string of length LENGTH) equals "wget" or
|
||||||
@ -407,7 +407,7 @@ free_specs (struct robot_specs *specs)
|
|||||||
xfree_null (specs->paths);
|
xfree_null (specs->paths);
|
||||||
xfree (specs);
|
xfree (specs);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Matching of a path according to the specs. */
|
/* Matching of a path according to the specs. */
|
||||||
|
|
||||||
/* If C is '%' and (ptr[1], ptr[2]) form a hexadecimal number, and if
|
/* If C is '%' and (ptr[1], ptr[2]) form a hexadecimal number, and if
|
||||||
@ -472,7 +472,7 @@ res_match_path (const struct robot_specs *specs, const char *path)
|
|||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Registering the specs. */
|
/* Registering the specs. */
|
||||||
|
|
||||||
static struct hash_table *registered_specs;
|
static struct hash_table *registered_specs;
|
||||||
@ -522,7 +522,7 @@ res_get_specs (const char *host, int port)
|
|||||||
return NULL;
|
return NULL;
|
||||||
return hash_table_get (registered_specs, hp);
|
return hash_table_get (registered_specs, hp);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Loading the robots file. */
|
/* Loading the robots file. */
|
||||||
|
|
||||||
#define RES_SPECS_LOCATION "/robots.txt"
|
#define RES_SPECS_LOCATION "/robots.txt"
|
||||||
@ -583,7 +583,7 @@ res_retrieve_file (const char *url, char **file, struct iri *iri)
|
|||||||
}
|
}
|
||||||
return err == RETROK;
|
return err == RETROK;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
is_robots_txt_url (const char *url)
|
is_robots_txt_url (const char *url)
|
||||||
{
|
{
|
||||||
@ -594,7 +594,7 @@ is_robots_txt_url (const char *url)
|
|||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
res_cleanup (void)
|
res_cleanup (void)
|
||||||
{
|
{
|
||||||
@ -612,7 +612,7 @@ res_cleanup (void)
|
|||||||
registered_specs = NULL;
|
registered_specs = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef TESTING
|
#ifdef TESTING
|
||||||
|
|
||||||
const char *
|
const char *
|
||||||
|
@ -70,7 +70,7 @@ FILE *output_stream;
|
|||||||
/* Whether output_document is a regular file we can manipulate,
|
/* Whether output_document is a regular file we can manipulate,
|
||||||
i.e. not `-' or a device file. */
|
i.e. not `-' or a device file. */
|
||||||
bool output_stream_regular;
|
bool output_stream_regular;
|
||||||
|
|
||||||
static struct {
|
static struct {
|
||||||
wgint chunk_bytes;
|
wgint chunk_bytes;
|
||||||
double chunk_start;
|
double chunk_start;
|
||||||
@ -445,7 +445,7 @@ fd_read_body (const char *downloaded_filename, int fd, FILE *out, wgint toread,
|
|||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Read a hunk of data from FD, up until a terminator. The hunk is
|
/* Read a hunk of data from FD, up until a terminator. The hunk is
|
||||||
limited by whatever the TERMINATOR callback chooses as its
|
limited by whatever the TERMINATOR callback chooses as its
|
||||||
terminator. For example, if terminator stops at newline, the hunk
|
terminator. For example, if terminator stops at newline, the hunk
|
||||||
@ -622,7 +622,7 @@ fd_read_line (int fd)
|
|||||||
{
|
{
|
||||||
return fd_read_hunk (fd, line_terminator, 128, FD_READ_LINE_MAX);
|
return fd_read_hunk (fd, line_terminator, 128, FD_READ_LINE_MAX);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Return a printed representation of the download rate, along with
|
/* Return a printed representation of the download rate, along with
|
||||||
the units appropriate for the download speed. */
|
the units appropriate for the download speed. */
|
||||||
|
|
||||||
@ -686,7 +686,7 @@ calc_rate (wgint bytes, double secs, int *units)
|
|||||||
|
|
||||||
return dlrate;
|
return dlrate;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#define SUSPEND_METHOD do { \
|
#define SUSPEND_METHOD do { \
|
||||||
method_suspended = true; \
|
method_suspended = true; \
|
||||||
|
@ -51,7 +51,7 @@ spider_cleanup (void)
|
|||||||
if (nonexisting_urls_set)
|
if (nonexisting_urls_set)
|
||||||
string_set_free (nonexisting_urls_set);
|
string_set_free (nonexisting_urls_set);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Remembers broken links. */
|
/* Remembers broken links. */
|
||||||
void
|
void
|
||||||
nonexisting_url (const char *url)
|
nonexisting_url (const char *url)
|
||||||
|
24
src/url.c
24
src/url.c
@ -86,7 +86,7 @@ static struct scheme_data supported_schemes[] =
|
|||||||
/* Forward declarations: */
|
/* Forward declarations: */
|
||||||
|
|
||||||
static bool path_simplify (enum url_scheme, char *);
|
static bool path_simplify (enum url_scheme, char *);
|
||||||
|
|
||||||
/* Support for escaping and unescaping of URL strings. */
|
/* Support for escaping and unescaping of URL strings. */
|
||||||
|
|
||||||
/* Table of "reserved" and "unsafe" characters. Those terms are
|
/* Table of "reserved" and "unsafe" characters. Those terms are
|
||||||
@ -273,7 +273,7 @@ url_escape_allow_passthrough (const char *s)
|
|||||||
{
|
{
|
||||||
return url_escape_1 (s, urlchr_unsafe, true);
|
return url_escape_1 (s, urlchr_unsafe, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Decide whether the char at position P needs to be encoded. (It is
|
/* Decide whether the char at position P needs to be encoded. (It is
|
||||||
not enough to pass a single char *P because the function may need
|
not enough to pass a single char *P because the function may need
|
||||||
to inspect the surrounding context.)
|
to inspect the surrounding context.)
|
||||||
@ -419,7 +419,7 @@ reencode_escapes (const char *s)
|
|||||||
assert (p2 - newstr == newlen);
|
assert (p2 - newstr == newlen);
|
||||||
return newstr;
|
return newstr;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Returns the scheme type if the scheme is supported, or
|
/* Returns the scheme type if the scheme is supported, or
|
||||||
SCHEME_INVALID if not. */
|
SCHEME_INVALID if not. */
|
||||||
|
|
||||||
@ -586,7 +586,7 @@ rewrite_shorthand_url (const char *url)
|
|||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void split_path (const char *, char **, char **);
|
static void split_path (const char *, char **, char **);
|
||||||
|
|
||||||
/* Like strpbrk, with the exception that it returns the pointer to the
|
/* Like strpbrk, with the exception that it returns the pointer to the
|
||||||
@ -1188,7 +1188,7 @@ url_free (struct url *url)
|
|||||||
|
|
||||||
xfree (url);
|
xfree (url);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Create all the necessary directories for PATH (a file). Calls
|
/* Create all the necessary directories for PATH (a file). Calls
|
||||||
make_directory internally. */
|
make_directory internally. */
|
||||||
int
|
int
|
||||||
@ -1240,7 +1240,7 @@ mkalldirs (const char *path)
|
|||||||
xfree (t);
|
xfree (t);
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Functions for constructing the file name out of URL components. */
|
/* Functions for constructing the file name out of URL components. */
|
||||||
|
|
||||||
/* A growable string structure, used by url_file_name and friends.
|
/* A growable string structure, used by url_file_name and friends.
|
||||||
@ -1696,7 +1696,7 @@ url_file_name (const struct url *u, char *replaced_filename)
|
|||||||
|
|
||||||
return unique;
|
return unique;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Resolve "." and ".." elements of PATH by destructively modifying
|
/* Resolve "." and ".." elements of PATH by destructively modifying
|
||||||
PATH and return true if PATH has been modified, false otherwise.
|
PATH and return true if PATH has been modified, false otherwise.
|
||||||
|
|
||||||
@ -1782,7 +1782,7 @@ path_simplify (enum url_scheme scheme, char *path)
|
|||||||
|
|
||||||
return t != h;
|
return t != h;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Return the length of URL's path. Path is considered to be
|
/* Return the length of URL's path. Path is considered to be
|
||||||
terminated by one or more of the ?query or ;params or #fragment,
|
terminated by one or more of the ?query or ;params or #fragment,
|
||||||
depending on the scheme. */
|
depending on the scheme. */
|
||||||
@ -1993,7 +1993,7 @@ uri_merge (const char *base, const char *link)
|
|||||||
|
|
||||||
return merge;
|
return merge;
|
||||||
}
|
}
|
||||||
|
|
||||||
#define APPEND(p, s) do { \
|
#define APPEND(p, s) do { \
|
||||||
int len = strlen (s); \
|
int len = strlen (s); \
|
||||||
memcpy (p, s, len); \
|
memcpy (p, s, len); \
|
||||||
@ -2110,7 +2110,7 @@ url_string (const struct url *url, enum url_auth_mode auth_mode)
|
|||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Return true if scheme a is similar to scheme b.
|
/* Return true if scheme a is similar to scheme b.
|
||||||
|
|
||||||
Schemes are similar if they are equal. If SSL is supported, schemes
|
Schemes are similar if they are equal. If SSL is supported, schemes
|
||||||
@ -2128,7 +2128,7 @@ schemes_are_similar_p (enum url_scheme a, enum url_scheme b)
|
|||||||
#endif
|
#endif
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
getchar_from_escaped_string (const char *str, char *c)
|
getchar_from_escaped_string (const char *str, char *c)
|
||||||
{
|
{
|
||||||
@ -2189,7 +2189,7 @@ are_urls_equal (const char *u1, const char *u2)
|
|||||||
|
|
||||||
return (*p == 0 && *q == 0 ? true : false);
|
return (*p == 0 && *q == 0 ? true : false);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef TESTING
|
#ifdef TESTING
|
||||||
/* Debugging and testing support for path_simplify. */
|
/* Debugging and testing support for path_simplify. */
|
||||||
|
|
||||||
|
28
src/utils.c
28
src/utils.c
@ -268,7 +268,7 @@ sepstring (const char *s)
|
|||||||
res[i + 1] = NULL;
|
res[i + 1] = NULL;
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Like sprintf, but prints into a string of sufficient size freshly
|
/* Like sprintf, but prints into a string of sufficient size freshly
|
||||||
allocated with malloc, which is returned. If unable to print due
|
allocated with malloc, which is returned. If unable to print due
|
||||||
to invalid format, returns NULL. Inability to allocate needed
|
to invalid format, returns NULL. Inability to allocate needed
|
||||||
@ -440,7 +440,7 @@ datetime_str (time_t t)
|
|||||||
{
|
{
|
||||||
return fmttime(t, "%Y-%m-%d %H:%M:%S");
|
return fmttime(t, "%Y-%m-%d %H:%M:%S");
|
||||||
}
|
}
|
||||||
|
|
||||||
/* The Windows versions of the following two functions are defined in
|
/* The Windows versions of the following two functions are defined in
|
||||||
mswindows.c. On MSDOS this function should never be called. */
|
mswindows.c. On MSDOS this function should never be called. */
|
||||||
|
|
||||||
@ -505,7 +505,7 @@ fork_to_background (void)
|
|||||||
|
|
||||||
#endif /* def __VMS [else] */
|
#endif /* def __VMS [else] */
|
||||||
|
|
||||||
|
|
||||||
/* "Touch" FILE, i.e. make its mtime ("modified time") equal the time
|
/* "Touch" FILE, i.e. make its mtime ("modified time") equal the time
|
||||||
specified with TM. The atime ("access time") is set to the current
|
specified with TM. The atime ("access time") is set to the current
|
||||||
time. */
|
time. */
|
||||||
@ -815,7 +815,7 @@ fopen_excl (const char *fname, int binary)
|
|||||||
return fopen (fname, binary ? "wb" : "w");
|
return fopen (fname, binary ? "wb" : "w");
|
||||||
#endif /* not O_EXCL */
|
#endif /* not O_EXCL */
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Create DIRECTORY. If some of the pathname components of DIRECTORY
|
/* Create DIRECTORY. If some of the pathname components of DIRECTORY
|
||||||
are missing, create them first. In case any mkdir() call fails,
|
are missing, create them first. In case any mkdir() call fails,
|
||||||
return its error status. Returns 0 on successful completion.
|
return its error status. Returns 0 on successful completion.
|
||||||
@ -881,7 +881,7 @@ file_merge (const char *base, const char *file)
|
|||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Like fnmatch, but performs a case-insensitive match. */
|
/* Like fnmatch, but performs a case-insensitive match. */
|
||||||
|
|
||||||
int
|
int
|
||||||
@ -1272,7 +1272,7 @@ wget_read_file_free (struct file_memory *fm)
|
|||||||
}
|
}
|
||||||
xfree (fm);
|
xfree (fm);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Free the pointers in a NULL-terminated vector of pointers, then
|
/* Free the pointers in a NULL-terminated vector of pointers, then
|
||||||
free the pointer itself. */
|
free the pointer itself. */
|
||||||
void
|
void
|
||||||
@ -1341,7 +1341,7 @@ vec_append (char **vec, const char *str)
|
|||||||
vec[cnt] = NULL;
|
vec[cnt] = NULL;
|
||||||
return vec;
|
return vec;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Sometimes it's useful to create "sets" of strings, i.e. special
|
/* Sometimes it's useful to create "sets" of strings, i.e. special
|
||||||
hash tables where you want to store strings as keys and merely
|
hash tables where you want to store strings as keys and merely
|
||||||
query for their existence. Here is a set of utility routines that
|
query for their existence. Here is a set of utility routines that
|
||||||
@ -1406,7 +1406,7 @@ free_keys_and_values (struct hash_table *ht)
|
|||||||
xfree (iter.value);
|
xfree (iter.value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Get digit grouping data for thousand separors by calling
|
/* Get digit grouping data for thousand separors by calling
|
||||||
localeconv(). The data includes separator string and grouping info
|
localeconv(). The data includes separator string and grouping info
|
||||||
and is cached after the first call to the function.
|
and is cached after the first call to the function.
|
||||||
@ -1797,7 +1797,7 @@ convert_to_bits (wgint num)
|
|||||||
return num;
|
return num;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Determine the width of the terminal we're running on. If that's
|
/* Determine the width of the terminal we're running on. If that's
|
||||||
not possible, return 0. */
|
not possible, return 0. */
|
||||||
|
|
||||||
@ -1827,7 +1827,7 @@ determine_screen_width (void)
|
|||||||
return 0;
|
return 0;
|
||||||
#endif /* neither TIOCGWINSZ nor WINDOWS */
|
#endif /* neither TIOCGWINSZ nor WINDOWS */
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Whether the rnd system (either rand or [dl]rand48) has been
|
/* Whether the rnd system (either rand or [dl]rand48) has been
|
||||||
seeded. */
|
seeded. */
|
||||||
static int rnd_seeded;
|
static int rnd_seeded;
|
||||||
@ -1905,7 +1905,7 @@ random_float (void)
|
|||||||
+ random_number (10000) / (10000.0 * 10000.0 * 10000.0 * 10000.0));
|
+ random_number (10000) / (10000.0 * 10000.0 * 10000.0 * 10000.0));
|
||||||
#endif /* not HAVE_DRAND48 */
|
#endif /* not HAVE_DRAND48 */
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Implementation of run_with_timeout, a generic timeout-forcing
|
/* Implementation of run_with_timeout, a generic timeout-forcing
|
||||||
routine for systems with Unix-like signal handling. */
|
routine for systems with Unix-like signal handling. */
|
||||||
|
|
||||||
@ -2064,7 +2064,7 @@ run_with_timeout (double timeout, void (*fun) (void *), void *arg)
|
|||||||
}
|
}
|
||||||
#endif /* not WINDOWS */
|
#endif /* not WINDOWS */
|
||||||
#endif /* not USE_SIGNAL_TIMEOUT */
|
#endif /* not USE_SIGNAL_TIMEOUT */
|
||||||
|
|
||||||
#ifndef WINDOWS
|
#ifndef WINDOWS
|
||||||
|
|
||||||
/* Sleep the specified amount of seconds. On machines without
|
/* Sleep the specified amount of seconds. On machines without
|
||||||
@ -2365,7 +2365,7 @@ match_posix_regex (const void *regex, const char *str)
|
|||||||
|
|
||||||
#undef IS_ASCII
|
#undef IS_ASCII
|
||||||
#undef NEXT_CHAR
|
#undef NEXT_CHAR
|
||||||
|
|
||||||
/* Simple merge sort for use by stable_sort. Implementation courtesy
|
/* Simple merge sort for use by stable_sort. Implementation courtesy
|
||||||
Zeljko Vrba with additional debugging by Nenad Barbutov. */
|
Zeljko Vrba with additional debugging by Nenad Barbutov. */
|
||||||
|
|
||||||
@ -2411,7 +2411,7 @@ stable_sort (void *base, size_t nmemb, size_t size,
|
|||||||
mergesort_internal (base, temp, size, 0, nmemb - 1, cmpfun);
|
mergesort_internal (base, temp, size, 0, nmemb - 1, cmpfun);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Print a decimal number. If it is equal to or larger than ten, the
|
/* Print a decimal number. If it is equal to or larger than ten, the
|
||||||
number is rounded. Otherwise it is printed with one significant
|
number is rounded. Otherwise it is printed with one significant
|
||||||
digit without trailing zeros and with no more than three fractional
|
digit without trailing zeros and with no more than three fractional
|
||||||
|
@ -313,7 +313,7 @@ typedef double SUM_SIZE_INT;
|
|||||||
#define MAX_INT_TO_STRING_LEN(x) ((sizeof(x) * 24082 / 10000) + 2)
|
#define MAX_INT_TO_STRING_LEN(x) ((sizeof(x) * 24082 / 10000) + 2)
|
||||||
|
|
||||||
extern const char *exec_name;
|
extern const char *exec_name;
|
||||||
|
|
||||||
/* Document type ("dt") flags */
|
/* Document type ("dt") flags */
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user