Published in <sxsadwt2nkg.fsf@florida.arsdigita.de>.
+2001-12-09 Hrvoje Niksic <hniksic@arsdigita.com>
+
+ * url.c (reencode_string): Declare static.
+
+ * res.c (registered_specs): Declare static.
+
+ * progress.c (current_impl_locked): Declare static.
+
+ * log.c (flush_log_p): Declare static.
+ (needs_flushing): Ditto.
+
+ * http.c (digest_authentication_encode): Declare static.
+
+ * html-url.c (init_interesting): Declare static.
+
+ * host.c (host_name_addresses_map): Declare static.
+
+ * cookies.c (find_matching_chains): Declare static.
+
+ * ftp-ls.c (ftp_parse_vms_ls): Warn about the memory leak
+ indicated by lint.
+
+ * utils.c (path_simplify): Remove unused variable STUB_CHAR.
+
+ * host.c (address_list_set_faulty): Document that INDEX is
+ currently unused.
+
+ * url.c (rewrite_shorthand_url): Remove unused variable PATH.
+
2001-12-08 Hrvoje Niksic <hniksic@arsdigita.com>
* version.c: Wget 1.8-pre2 is released.
SIZE matches are written; if more matches are present, return the
number of chains that would have been written. */
-int
+static int
find_matching_chains (const char *host, int port,
struct cookie *store[], int size)
{
}
dir = l = NULL;
+ /* #### The next three lines are a memory leak because they don't
+ bother to free the pointer that read_whole_line() returns!
+ FIXME! */
+
/* Empty line */
read_whole_line (fp);
/* "Directory PUB$DEVICE[PUB]" */
/* Mapping between known hosts and to lists of their addresses. */
-struct hash_table *host_name_addresses_map;
+static struct hash_table *host_name_addresses_map;
\f
/* Lists of addresses. This should eventually be extended to handle
IPv6. */
void
address_list_set_faulty (struct address_list *al, int index)
{
+#if 0
+ /* Warning: INDEX is unused, so this assumes that the address list
+ is traversed in order. In the next release, either enable this
+ assert, or use INDEX. */
+ assert (index == al->faulty);
+#endif
+
++al->faulty;
if (al->faulty >= al->count)
/* All addresses have been proven faulty. Since there's not much
static const char **interesting_tags;
static const char **interesting_attributes;
-void
+static void
init_interesting (void)
{
/* Init the variables interesting_tags and interesting_attributes
/* Take the line apart to find the challenge, and compose a digest
authorization header. See RFC2069 section 2.1.2. */
-char *
+static char *
digest_authentication_encode (const char *au, const char *user,
const char *passwd, const char *method,
const char *path)
int save_log_p;
/* Whether the log is flushed after each command. */
-int flush_log_p = 1;
-int needs_flushing;
+static int flush_log_p = 1;
+static int needs_flushing;
/* In the event of a hang-up, and if its output was on a TTY, Wget
redirects its output to `wget-log'.
{ "bar", bar_create, bar_update, bar_finish, bar_set_params }
};
static struct progress_implementation *current_impl;
-int current_impl_locked;
+static int current_impl_locked;
/* Progress implementation used by default. Can be overriden in
wgetrc or by the fallback one. */
\f
/* Registering the specs. */
-struct hash_table *registered_specs;
+static struct hash_table *registered_specs;
/* Stolen from cookies.c. */
#define SET_HOSTPORT(host, port, result) do { \
"foo+bar" -> "foo+bar" (plus is reserved!)
"foo%2b+bar" -> "foo%2b+bar" */
-char *
+static char *
reencode_string (const char *s)
{
const char *p1;
if (*p == ':')
{
- const char *pp, *path;
+ const char *pp;
char *res;
/* If the characters after the colon and before the next slash
or end of string are all digits, it's HTTP. */
int digits = 0;
for (pp = p + 1; ISDIGIT (*pp); pp++)
++digits;
- if (digits > 0
- && (*pp == '/' || *pp == '\0'))
+ if (digits > 0 && (*pp == '/' || *pp == '\0'))
goto http;
/* Prepend "ftp://" to the entire URL... */
- path = p + 1;
res = xmalloc (6 + strlen (url) + 1);
sprintf (res, "ftp://%s", url);
/* ...and replace ':' with '/'. */
{
register int i, start;
int changes = 0;
- char stub_char;
if (!*path)
return 0;
- stub_char = '/';
-
if (path[0] == '/')
/* Preserve initial '/'. */
++path;