1
0
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:
Tim Rühsen 2014-11-20 16:35:34 +01:00
parent 6a9b2d36e1
commit 3c51ad7f02
28 changed files with 151 additions and 143 deletions

View File

@ -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>
* .gitignore: po/stamp-po should be ignored

70
NEWS
View File

@ -6,14 +6,14 @@ Foundation, Inc.
See the end for copying conditions.
Please send GNU Wget bug reports to <bug-wget@gnu.org>.
* Changes in Wget X.Y.Z
** Add --disable-assert configure option. Recommended for distro maintainers.
** Use pkg-config to check for libraries presence.
* Changes in Wget 1.16
** 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.
** Fix a problem with ISA Server Proxy and keep-alive connections.
* Changes in Wget 1.15
** 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.
** Use the correct HTTP method on a redirection.
* Changes in Wget 1.14
** 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.
** Add support for RFC 2617 Digest Access Authentication.
* Changes in Wget 1.13.4
** Now --version and --help work again.
@ -101,7 +101,7 @@ Please send GNU Wget bug reports to <bug-wget@gnu.org>.
is specified.
** Fix a segfault on an incomplete STYLE tag.
* Changes in Wget 1.13.3
** 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
a DNS name when it is resolved.
* Changes in Wget 1.12
** 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,
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.
* Changes in Wget 1.11.4
** Fixed an issue (apparently a regression) where -O would refuse to
@ -235,13 +235,13 @@ locally with content.
to a pointer-to-time_t.
** Translation updates for Catalan.
* Changes in Wget 1.11.3
** Downgraded -N with -O to a warning, rather than an error.
** Translation updates
* Changes in Wget 1.11.2
** 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
problems for some FTP setups, and so they are now preserved again, for
FTP URLs only.
* Changes in Wget 1.11.1.
** 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
lack thereof, in the specified URL, will affect behavior.
* Changes in Wget 1.11.
** 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
still get access to older tags and branches for Wget in the Subversion
repository at http://addictivecode.org/svn/wget/.
* Changes in Wget 1.10.
** 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.
* `wget -b' now works correctly under Windows.
* Wget 1.9.1 is a bugfix release with no user-visible changes.
* Changes in Wget 1.9.
** 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
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'.
* 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.
* Changes in Wget 1.8.
** 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.
** No more than 20 successive redirections are allowed.
* Wget 1.7.1 is a bugfix release with no user-visible changes.
* Changes in Wget 1.7.
** 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
1.4.5). To get this, you need to have pod2man from the Perl
distribution installed on your system.
* Changes in Wget 1.6
** Administrative changes.
@ -655,13 +655,13 @@ passive_ftp is the only .wgetrc command which takes a lockable Boolean.
bound to multiple IP addresses.
** 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.2 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
** Wget speaks many languages!
@ -707,11 +707,11 @@ download.
** The manual page, now hopelessly out of date, is no longer
distributed with Wget.
* 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.
* Changes in Wget 1.4.3
** Wget is now a GNU utility.
@ -727,7 +727,7 @@ distributed with Wget.
** Global wgetrc now goes to /usr/local/etc (i.e. $sysconfdir).
** Lots of bugfixes.
* Changes in Wget 1.4.2
** New mirror site at ftp://sunsite.auc.dk/pub/infosystems/wget/,
@ -745,7 +745,7 @@ files.
** --convert-links should work now.
** Minor bugfixes.
* Changes in Wget 1.4.1
** Minor bugfixes.
@ -753,7 +753,7 @@ files.
** Added -I (the opposite of -X).
** Dot tracing is now customizable; try wget --dot-style=binary
* Changes in Wget 1.4.0
** 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. :-)
** A host of bugfixes.
* Changes in Geturl 1.3
** Added FTP globbing support (ftp://fly.cc.fer.hr/*)
@ -852,9 +852,9 @@ turn on mirroring options).
** Added support for robots.txt
** Fixed some minor bugs
* Geturl 1.2 is a bugfix release with no user-visible changes.
* Changes in Geturl 1.1
** REST supported in FTP
@ -872,7 +872,7 @@ geturl -vo log http://fly.cc.fer.hr/
** <base href="xxx"> supported
** autoconf supported
----------------------------------------------------------------------
Copyright information:

View File

@ -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>
* http.c (parse_content_disposition): Fix C89 issue found by MSVC 16

View File

@ -46,7 +46,7 @@ as that of the covered work. */
implementations of such missing functions. It should *not* define
new Wget-specific interfaces -- those should be placed in utils.c
or elsewhere. */
/* strcasecmp and strncasecmp apparently originated with BSD 4.4.
SUSv3 seems to be the only standard out there (that I can find)
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;
}
#endif
/* strptime is required by POSIX, but it is missing from Windows,
which means we must keep a fallback implementation. It is
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 }
};
#endif
/* fnmatch is required by POSIX, but we include an implementation for
the sake of systems that don't have it, most notably Windows. Some
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 */
#ifndef HAVE_TIMEGM
/* timegm is a GNU extension, but lately also available on *BSD
systems and possibly elsewhere. */

View File

@ -168,7 +168,7 @@ sockaddr_size (const struct sockaddr *sa)
abort ();
}
}
/* Resolve the bind address specified via --bind-address and store it
to SA. The resolved value is stored in a static variable and
reused after the first invocation of this function.
@ -213,7 +213,7 @@ resolve_bind_address (struct sockaddr *sa)
should_bind = true;
return true;
}
struct cwt_context {
int fd;
const struct sockaddr *addr;
@ -250,7 +250,7 @@ connect_with_timeout (int fd, const struct sockaddr *addr, socklen_t addrlen,
errno = ETIMEDOUT;
return ctx.result;
}
/* Connect via TCP to the specified address and port.
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;
}
/* Create a socket, bind it to local interface BIND_ADDRESS on port
*PORT, set up a listen backlog, and return the resulting socket, or
-1 in case of error.
@ -746,7 +746,7 @@ wget uses blocking sockets so we must convert them back to blocking
or EOF/error. */
return false;
}
/* Basic socket operations, mostly EINTR wrappers. */
static int
@ -794,7 +794,7 @@ sock_close (int fd)
#undef read
#undef write
#undef close
/* Reading and writing from the network. We build around the socket
(file descriptor) API, but support "extended" operations for things
that are not mere file descriptors under the hood, such as SSL

View File

@ -661,7 +661,7 @@ local_quote_string (const char *file, bool no_html_quote)
return no_html_quote ? strdup (newname) : html_quote_string (newname);
}
/* Book-keeping code for dl_file_url_map, dl_url_file_map,
downloaded_html_list, and downloaded_html_set. Other code calls
these functions to let us know that a file has been downloaded. */
@ -916,7 +916,7 @@ convert_cleanup (void)
if (converted_files)
string_set_free (converted_files);
}
/* Book-keeping code for downloaded files that enables extension
hacks. */
@ -1012,7 +1012,7 @@ downloaded_files_free (void)
downloaded_files_hash = NULL;
}
}
/* The function returns the pointer to the malloc-ed quoted version of
string s. It will recognize and quote numeric and special graphic
entities, as per RFC1866:

View File

@ -59,7 +59,7 @@ as that of the covered work. */
#include "cookies.h"
#include "http.h" /* for http_atotm */
#include "c-strcase.h"
/* Declarations of `struct cookie' and the most basic functions. */
@ -159,7 +159,7 @@ delete_cookie (struct cookie *cookie)
xfree_null (cookie->value);
xfree (cookie);
}
/* Functions for storing cookies.
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"));
}
}
/* Functions for parsing the `Set-Cookie' header, and creating new
cookies from the wire. */
@ -458,7 +458,7 @@ parse_set_cookie (const char *set_cookie, bool silent)
#undef TOKEN_IS
#undef TOKEN_NON_EMPTY
/* Sanity checks. These are important, otherwise it is possible for
mailcious attackers to destroy important cookie information and/or
violate your privacy. */
@ -694,7 +694,7 @@ check_path_match (const char *cookie_path, const char *path)
s = PS_newstr; \
} while (0)
/* Process the HTTP `Set-Cookie' header. This results in storing the
cookie or discarding a matching one, or ignoring it completely, all
depending on the contents. */
@ -778,7 +778,7 @@ cookie_handle_set_cookie (struct cookie_jar *jar,
if (cookie)
delete_cookie (cookie);
}
/* Support for sending out cookies in HTTP requests, based on
previously stored cookies. Entry point is
`build_cookies_request'. */
@ -1109,7 +1109,7 @@ cookie_header (struct cookie_jar *jar, const char *host,
assert (pos == result_size);
return result;
}
/* Support for loading and saving cookies. The format used for
loading and saving should be the format of the `cookies.txt' file
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"));
}
/* Clean up cookie-related data. */
void
@ -1371,7 +1371,7 @@ cookie_jar_delete (struct cookie_jar *jar)
hash_table_destroy (jar->chains);
xfree (jar);
}
/* Test cases. Currently this is only tests parse_set_cookies. To
use, recompile Wget with -DTEST_COOKIES and call test_cookies()
from main. */

View File

@ -45,7 +45,7 @@ as that of the covered work. */
#include "retr.h"
#include "c-strcase.h"
/* Get the response of FTP server and allocate enough room to handle
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

View File

@ -1052,7 +1052,7 @@ Unsupported listing type, trying Unix listing parser.\n"));
return ftp_parse_unix_ls (file, 0);
}
}
/* Stuff for creating FTP index. */
/* The function creates an HTML index containing references to given

View File

@ -585,7 +585,7 @@ hash_table_count (const struct hash_table *ht)
{
return ht->count;
}
/* Functions from this point onward are meant for convenience and
don't strictly belong to this file. However, this is as good a
place for them as any. */
@ -740,7 +740,7 @@ cmp_pointer (const void *ptr1, const void *ptr2)
{
return ptr1 == ptr2;
}
#ifdef TEST
#include <stdio.h>

View File

@ -309,7 +309,7 @@ address_list_release (struct address_list *al)
address_list_delete (al);
}
}
/* Versions of gethostbyname and getaddrinfo that support timeout. */
#ifndef ENABLE_IPV6
@ -408,7 +408,7 @@ getaddrinfo_with_timeout (const char *node, const char *service,
}
#endif /* ENABLE_IPV6 */
/* Return a textual representation of ADDR, i.e. the dotted quad for
IPv4 addresses, and the colon-separated list of hex words (with all
zeros omitted, etc.) for IPv6 addresses. */
@ -570,7 +570,7 @@ is_valid_ipv6_address (const char *str, const char *end)
return true;
}
/* Simple host cache, used by lookup_host to speed up resolving. The
cache doesn't handle TTL because Wget is a fairly short-lived
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);
}
}
/* 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
@ -848,7 +848,7 @@ lookup_host (const char *host, int flags)
return al;
}
/* Determine whether a URL is acceptable to be followed, according to
a list of domains to accept. */
bool

View File

@ -253,7 +253,7 @@ struct pool {
(sizevar) = ga_newsize; \
} \
} while (0)
/* Test whether n+1-sized entity name fits in P. We don't support
IE-style non-terminated entities, e.g. "&ltfoo" -> "<foo".
However, "&lt;foo" will work, as will "&lt!foo", "&lt", etc. In
@ -517,7 +517,7 @@ convert_and_copy (struct pool *pool, const char *beg, const char *end, int flags
*p = c_tolower (*p);
}
}
/* Originally we used to adhere to rfc 1866 here, and allowed only
letters, digits, periods, and hyphens as names (of tags or
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 true if the string containing of characters inside [b, e) is
present in hash table HT. */
@ -1167,7 +1167,7 @@ map_html_tags (const char *text, int size,
#undef ADVANCE
#undef SKIP_WS
#undef SKIP_NON_WS
#ifdef STANDALONE
static void
test_mapper (struct taginfo *taginfo, void *arg)

View File

@ -379,7 +379,7 @@ append_url (const char *link_uri, int position, int size,
return newel;
}
static void
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);
}
}
/* 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
<base href=...> and does the right thing. */

View File

@ -74,13 +74,13 @@ as that of the covered work. */
/* Define this to make the type-3 message include the NT response message */
#define USE_NTRESPONSES 1
/* Flag bits definitions available at on
http://davenport.sourceforge.net/ntlm.html */
#define NTLMFLAG_NEGOTIATE_OEM (1<<1)
#define NTLMFLAG_NEGOTIATE_NTLM_KEY (1<<9)
/*
(*) = A "security buffer" is a triplet consisting of two shorts and one
long:

View File

@ -85,7 +85,7 @@ static void load_cookies (void);
# define MIN(x, y) ((x) > (y) ? (y) : (x))
#endif
static bool cookies_loaded_p;
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_UNAVAILABLE 503
#define HTTP_STATUS_GATEWAY_TIMEOUT 504
enum rp {
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"));
return 0;
}
/* Determine whether [START, PEEKED + PEEKLEN) contains an empty line.
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
@ -1227,7 +1227,7 @@ parse_content_disposition (const char *hdr, char **filename)
return false;
}
/* Persistent connections. Currently, we cache the most recently used
connection as persistent, provided that the HTTP server agrees to
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 = -1; \
} while (0)
struct http_stat
{
wgint len; /* received length */
@ -3606,7 +3606,7 @@ exit:
return ret;
}
/* Check whether the result of strptime() indicates success.
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
@ -3717,7 +3717,7 @@ http_atotm (const char *time_string)
return ret;
}
/* Authorization support: We support three authorization schemes:
* `Basic' scheme, consisting of base64-ing USER:PASSWORD string;
@ -4038,7 +4038,7 @@ create_authorization_line (const char *au, const char *user,
abort ();
}
}
static void
load_cookies (void)
{

View File

@ -331,7 +331,7 @@ command_by_name (const char *cmdname)
}
return -1;
}
/* Reset the variables to default values. */
void
defaults (void)
@ -437,7 +437,7 @@ defaults (void)
opt.show_progress = false;
opt.noscroll = false;
}
/* Return the user's home directory (strdup-ed), or NULL if none is
found. */
char *
@ -899,7 +899,7 @@ run_command (const char *cmdopt)
exit (WGET_EXIT_PARSE_ERROR);
}
}
/* Generic helper functions, for use with `commands'. */
/* Forward declarations: */
@ -1294,7 +1294,7 @@ cmd_cert_type (const char *com, const char *val, void *place)
return ok;
}
#endif
/* Specialized helper functions, used by `commands' to handle some
options specially. */
@ -1589,7 +1589,7 @@ cmd_spec_verbose (const char *com, const char *val, void *place_ignored _GL_UNUS
}
return false;
}
/* Miscellaneous useful routines. */
/* A very simple atoi clone, more useful than atoi because it works on
@ -1817,7 +1817,7 @@ cleanup (void)
#endif /* DEBUG_MALLOC */
}
/* Unit testing routines. */
#ifdef TESTING

View File

@ -73,7 +73,7 @@ as that of the covered work. */
- Inhibiting output. When Wget receives SIGHUP, but redirecting
the output fails, logging is inhibited. */
/* The file descriptor used for logging. This is NULL before log_init
is called; logging functions log to stderr then. log_init sets it
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 void check_redirect_output (void);
#define ROT_ADVANCE(num) do { \
if (++num >= SAVED_LOG_LINES) \
num = 0; \
@ -265,7 +265,7 @@ saved_append (const char *s)
s = end;
}
}
/* Check X against opt.verbose and opt.quiet. The semantics is as
follows:
@ -338,7 +338,7 @@ log_set_warc_log_fp (FILE * fp)
{
warclogfp = fp;
}
/* Log a literal string S. The string is logged as-is, without a
newline appended. */
@ -580,7 +580,7 @@ debug_logprintf (const char *fmt, ...)
}
}
#endif /* ENABLE_DEBUG */
/* Open FILE and set up a logging stream. If FILE cannot be opened,
exit with status of 1. */
void
@ -675,7 +675,7 @@ log_dump_context (void)
fflush (fp);
fflush (warcfp);
}
/* String escape functions. */
/* Return the number of non-printable characters in SOURCE.
@ -849,7 +849,7 @@ log_cleanup (void)
for (i = 0; i < countof (ring); i++)
xfree_null (ring[i].buffer);
}
/* When SIGHUP or SIGUSR1 are received, the output is redirected
elsewhere. Such redirection is only allowed once. */
static enum { RR_NONE, RR_REQUESTED, RR_DONE } redirect_request = RR_NONE;

View File

@ -93,7 +93,7 @@ const char *exec_name;
/* Number of successfully downloaded URLs */
int numurls = 0;
#ifndef TESTING
/* Initialize I18N/L10N. That amounts to invoking setlocale, and
setting up gettext's message catalog using bindtextdomain and
@ -136,7 +136,7 @@ i18n_initialize (void)
textdomain ("wget");
#endif /* ENABLE_NLS */
}
/* Definition of command-line options. */
static void _Noreturn print_help (void);

View File

@ -85,7 +85,7 @@ windows_main (char **exec_name)
if (p)
*p = '\0';
}
static void
ws_cleanup (void)
{
@ -477,7 +477,7 @@ ws_startup (void)
set_sleep_mode ();
SetConsoleCtrlHandler (ws_handler, TRUE);
}
/* run_with_timeout Windows implementation. */
/* Stack size 0 uses default thread stack-size (reserve+commit).

View File

@ -196,7 +196,7 @@ progress_finish (void *progress, double dltime)
{
current_impl->finish (progress, dltime);
}
/* Dot-printing. */
struct dot_progress {
@ -466,7 +466,7 @@ dot_set_params (char *params)
_("Invalid dot style specification %s; leaving unchanged.\n"),
quote (params));
}
/* "Thermometer" (bar) progress. */
/* Assumed screen width if we can't find the real value. */

View File

@ -291,7 +291,7 @@ windows_resolution (void)
return 10; /* according to MSDN */
}
#endif /* PTIMER_WINDOWS */
/* The code below this point is independent of timer implementation. */
struct ptimer {

View File

@ -50,7 +50,7 @@ as that of the covered work. */
#include "html-url.h"
#include "css-url.h"
#include "spider.h"
/* Functions for maintaining the URL queue. */
struct queue_element {
@ -159,7 +159,7 @@ url_dequeue (struct url_queue *queue, struct iri **i,
xfree (qel);
return true;
}
static bool download_child_p (const struct urlpos *, struct url *, int,
struct url *, struct hash_table *, struct iri *);
static bool descend_redirect_p (const char *, struct url *, int,

View File

@ -98,7 +98,7 @@ struct robot_specs {
int size;
struct path_info *paths;
};
/* Parsing the robot spec. */
/* 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 (specs);
}
/* Matching of a path according to the specs. */
/* 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;
}
/* Registering the specs. */
static struct hash_table *registered_specs;
@ -522,7 +522,7 @@ res_get_specs (const char *host, int port)
return NULL;
return hash_table_get (registered_specs, hp);
}
/* Loading the robots file. */
#define RES_SPECS_LOCATION "/robots.txt"
@ -583,7 +583,7 @@ res_retrieve_file (const char *url, char **file, struct iri *iri)
}
return err == RETROK;
}
bool
is_robots_txt_url (const char *url)
{
@ -594,7 +594,7 @@ is_robots_txt_url (const char *url)
return ret;
}
void
res_cleanup (void)
{
@ -612,7 +612,7 @@ res_cleanup (void)
registered_specs = NULL;
}
}
#ifdef TESTING
const char *

View File

@ -70,7 +70,7 @@ FILE *output_stream;
/* Whether output_document is a regular file we can manipulate,
i.e. not `-' or a device file. */
bool output_stream_regular;
static struct {
wgint chunk_bytes;
double chunk_start;
@ -445,7 +445,7 @@ fd_read_body (const char *downloaded_filename, int fd, FILE *out, wgint toread,
return ret;
}
/* Read a hunk of data from FD, up until a terminator. The hunk is
limited by whatever the TERMINATOR callback chooses as its
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 a printed representation of the download rate, along with
the units appropriate for the download speed. */
@ -686,7 +686,7 @@ calc_rate (wgint bytes, double secs, int *units)
return dlrate;
}
#define SUSPEND_METHOD do { \
method_suspended = true; \

View File

@ -51,7 +51,7 @@ spider_cleanup (void)
if (nonexisting_urls_set)
string_set_free (nonexisting_urls_set);
}
/* Remembers broken links. */
void
nonexisting_url (const char *url)

View File

@ -86,7 +86,7 @@ static struct scheme_data supported_schemes[] =
/* Forward declarations: */
static bool path_simplify (enum url_scheme, char *);
/* Support for escaping and unescaping of URL strings. */
/* 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);
}
/* 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
to inspect the surrounding context.)
@ -419,7 +419,7 @@ reencode_escapes (const char *s)
assert (p2 - newstr == newlen);
return newstr;
}
/* Returns the scheme type if the scheme is supported, or
SCHEME_INVALID if not. */
@ -586,7 +586,7 @@ rewrite_shorthand_url (const char *url)
}
return ret;
}
static void split_path (const char *, char **, char **);
/* Like strpbrk, with the exception that it returns the pointer to the
@ -1188,7 +1188,7 @@ url_free (struct url *url)
xfree (url);
}
/* Create all the necessary directories for PATH (a file). Calls
make_directory internally. */
int
@ -1240,7 +1240,7 @@ mkalldirs (const char *path)
xfree (t);
return res;
}
/* Functions for constructing the file name out of URL components. */
/* 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;
}
/* Resolve "." and ".." elements of PATH by destructively modifying
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 the length of URL's path. Path is considered to be
terminated by one or more of the ?query or ;params or #fragment,
depending on the scheme. */
@ -1993,7 +1993,7 @@ uri_merge (const char *base, const char *link)
return merge;
}
#define APPEND(p, s) do { \
int len = strlen (s); \
memcpy (p, s, len); \
@ -2110,7 +2110,7 @@ url_string (const struct url *url, enum url_auth_mode auth_mode)
return result;
}
/* Return true if scheme a is similar to scheme b.
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
return false;
}
static int
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);
}
#ifdef TESTING
/* Debugging and testing support for path_simplify. */

View File

@ -268,7 +268,7 @@ sepstring (const char *s)
res[i + 1] = NULL;
return res;
}
/* Like sprintf, but prints into a string of sufficient size freshly
allocated with malloc, which is returned. If unable to print due
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");
}
/* The Windows versions of the following two functions are defined in
mswindows.c. On MSDOS this function should never be called. */
@ -505,7 +505,7 @@ fork_to_background (void)
#endif /* def __VMS [else] */
/* "Touch" FILE, i.e. make its mtime ("modified time") equal the time
specified with TM. The atime ("access time") is set to the current
time. */
@ -815,7 +815,7 @@ fopen_excl (const char *fname, int binary)
return fopen (fname, binary ? "wb" : "w");
#endif /* not O_EXCL */
}
/* Create DIRECTORY. If some of the pathname components of DIRECTORY
are missing, create them first. In case any mkdir() call fails,
return its error status. Returns 0 on successful completion.
@ -881,7 +881,7 @@ file_merge (const char *base, const char *file)
return result;
}
/* Like fnmatch, but performs a case-insensitive match. */
int
@ -1272,7 +1272,7 @@ wget_read_file_free (struct file_memory *fm)
}
xfree (fm);
}
/* Free the pointers in a NULL-terminated vector of pointers, then
free the pointer itself. */
void
@ -1341,7 +1341,7 @@ vec_append (char **vec, const char *str)
vec[cnt] = NULL;
return vec;
}
/* Sometimes it's useful to create "sets" of strings, i.e. special
hash tables where you want to store strings as keys and merely
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);
}
}
/* Get digit grouping data for thousand separors by calling
localeconv(). The data includes separator string and grouping info
and is cached after the first call to the function.
@ -1797,7 +1797,7 @@ convert_to_bits (wgint num)
return num;
}
/* Determine the width of the terminal we're running on. If that's
not possible, return 0. */
@ -1827,7 +1827,7 @@ determine_screen_width (void)
return 0;
#endif /* neither TIOCGWINSZ nor WINDOWS */
}
/* Whether the rnd system (either rand or [dl]rand48) has been
seeded. */
static int rnd_seeded;
@ -1905,7 +1905,7 @@ random_float (void)
+ random_number (10000) / (10000.0 * 10000.0 * 10000.0 * 10000.0));
#endif /* not HAVE_DRAND48 */
}
/* Implementation of run_with_timeout, a generic timeout-forcing
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 USE_SIGNAL_TIMEOUT */
#ifndef WINDOWS
/* 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 NEXT_CHAR
/* Simple merge sort for use by stable_sort. Implementation courtesy
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);
}
}
/* Print a decimal number. If it is equal to or larger than ten, the
number is rounded. Otherwise it is printed with one significant
digit without trailing zeros and with no more than three fractional

View File

@ -313,7 +313,7 @@ typedef double SUM_SIZE_INT;
#define MAX_INT_TO_STRING_LEN(x) ((sizeof(x) * 24082 / 10000) + 2)
extern const char *exec_name;
/* Document type ("dt") flags */
enum
{