From 4a08094db88011153adadbf995103770b20d2a31 Mon Sep 17 00:00:00 2001 From: Micah Cowan Date: Mon, 21 Sep 2009 20:39:44 -0700 Subject: [PATCH] [mq]: cfg-mk --- .x-sc_po_check | 1 + .x-sc_trailing_blank | 9 ++ ChangeLog | 4 + ChangeLog.README | 2 +- NEWS | 4 +- cfg.mk | 28 +++++ configure.ac | 4 +- doc/sample.wgetrc | 2 +- doc/texi2pod.pl | 2 +- m4/wget.m4 | 2 +- po/POTFILES.in | 6 - src/ChangeLog | 7 ++ src/connect.c | 2 +- src/convert.c | 2 +- src/cookies.c | 6 +- src/css-url.c | 3 +- src/ftp-basic.c | 64 +++++----- src/ftp-ls.c | 20 +-- src/ftp.c | 46 +++---- src/gnutls.c | 2 +- src/hash.c | 10 +- src/host.c | 14 +-- src/html-url.c | 2 +- src/http-ntlm.c | 26 ++-- src/http.c | 78 ++++++------ src/init.c | 38 +++--- src/iri.c | 3 +- src/main.c | 34 +++--- src/mswindows.c | 1 - src/netrc.c | 2 +- src/openssl.c | 12 +- src/options.h | 4 +- src/progress.c | 2 +- src/ptimer.c | 2 +- src/res.c | 8 +- src/snprintf.c | 114 +++++++++--------- src/spider.c | 10 +- src/test.c | 14 +-- src/url.c | 22 ++-- src/utils.c | 30 ++--- src/wget.h | 12 +- tests/ChangeLog | 26 ++-- tests/FTPServer.pm | 8 +- tests/FTPTest.pm | 2 +- tests/Test--no-content-disposition-trivial.px | 6 +- tests/Test--no-content-disposition.px | 6 +- tests/Test--spider-fail.px | 6 +- ...pider-r--no-content-disposition-trivial.px | 6 +- .../Test--spider-r--no-content-disposition.px | 6 +- ...Test--spider-r-HTTP-Content-Disposition.px | 6 +- tests/Test--spider-r.px | 6 +- tests/Test--spider.px | 6 +- tests/Test-E-k-K.px | 6 +- tests/Test-E-k.px | 6 +- tests/Test-HTTP-Content-Disposition-1.px | 6 +- tests/Test-HTTP-Content-Disposition-2.px | 6 +- tests/Test-HTTP-Content-Disposition.px | 6 +- .../Test-N--no-content-disposition-trivial.px | 6 +- tests/Test-N--no-content-disposition.px | 6 +- tests/Test-N-HTTP-Content-Disposition.px | 6 +- tests/Test-N-current.px | 6 +- tests/Test-N-no-info.px | 6 +- tests/Test-N-old.px | 6 +- tests/Test-N-smaller.px | 6 +- tests/Test-N.px | 6 +- .../Test-O--no-content-disposition-trivial.px | 6 +- tests/Test-O--no-content-disposition.px | 6 +- tests/Test-O-HTTP-Content-Disposition.px | 6 +- tests/Test-O-nc.px | 6 +- tests/Test-O-nonexisting.px | 6 +- tests/Test-O.px | 6 +- tests/Test-Restrict-Lowercase.px | 6 +- tests/Test-Restrict-Uppercase.px | 6 +- tests/Test-auth-basic.px | 6 +- tests/Test-auth-no-challenge-url.px | 6 +- tests/Test-auth-no-challenge.px | 6 +- tests/Test-auth-with-content-disposition.px | 6 +- tests/Test-c-full.px | 6 +- tests/Test-c-partial.px | 6 +- tests/Test-c-shorter.px | 6 +- tests/Test-c.px | 6 +- tests/Test-cookies-401.px | 6 +- tests/Test-cookies.px | 6 +- tests/Test-ftp-bad-list.px | 6 +- tests/Test-ftp-iri-disabled.px | 6 +- tests/Test-ftp-iri-fallback.px | 6 +- tests/Test-ftp-iri-recursive.px | 6 +- tests/Test-ftp-iri.px | 6 +- tests/Test-ftp-pasv-fail.px | 6 +- tests/Test-ftp-recursive.px | 6 +- tests/Test-ftp.px | 6 +- tests/Test-idn-cmd.px | 6 +- tests/Test-idn-headers.px | 6 +- tests/Test-idn-meta.px | 6 +- tests/Test-idn-robots.px | 6 +- tests/Test-iri-disabled.px | 6 +- tests/Test-iri-forced-remote.px | 6 +- tests/Test-iri-list.px | 6 +- tests/Test-meta-robots.px | 6 +- tests/Test-nonexisting-quiet.px | 6 +- tests/Test-noop.px | 6 +- tests/Test-np.px | 10 +- tests/Test-proxy-auth-basic.px | 6 +- tests/Test-restrict-ascii.px | 6 +- vms/DESCRIP.MMS | 2 +- vms/DESCRIP_MKDEPS.MMS | 4 +- vms/DESCRIP_SRC.MMS | 4 +- vms/VMS-WGET.COM | 2 +- vms/VMS_NOTES.TXT | 38 +++--- vms/WGET.HLP | 2 +- vms/vms.c | 6 +- windows/ChangeLog | 14 +-- windows/Makefile.top | 4 +- windows/Makefile.top.bor | 6 +- windows/README | 14 +-- 115 files changed, 595 insertions(+), 555 deletions(-) create mode 100644 .x-sc_po_check create mode 100644 .x-sc_trailing_blank diff --git a/.x-sc_po_check b/.x-sc_po_check new file mode 100644 index 00000000..288e6e49 --- /dev/null +++ b/.x-sc_po_check @@ -0,0 +1 @@ +src/wget.h diff --git a/.x-sc_trailing_blank b/.x-sc_trailing_blank new file mode 100644 index 00000000..f5297f26 --- /dev/null +++ b/.x-sc_trailing_blank @@ -0,0 +1,9 @@ +doc/wget.texi +po/bg.po +ChangeLog +doc/ChangeLog +src/ChangeLog +windows/ChangeLog +msdos/ChangeLog +tests/ChangeLog +build-aux/texinfo.tex diff --git a/ChangeLog b/ChangeLog index cf002bcc..b7f6b6a1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2009-09-21 Micah Cowan + * vms/VMS-WGET.COM: "the the" -> "the". + + * po/POTFILES.in: Removed some files that are not using gettext. + * po/*.po: Updated from translationproject.org. 2009-09-20 Micah Cowan diff --git a/ChangeLog.README b/ChangeLog.README index 19394501..3a0dbf01 100644 --- a/ChangeLog.README +++ b/ChangeLog.README @@ -2,7 +2,7 @@ Please note that Wget has more than one ChangeLog file: ./ChangeLog: documents changes to files in the top-level directory and to files in subdirectories like po/ that don't have - their own ChangeLogs + their own ChangeLogs src/ChangeLog: documents only changes to files in the src directory diff --git a/NEWS b/NEWS index 488c9a50..a6e7edb6 100644 --- a/NEWS +++ b/NEWS @@ -40,7 +40,7 @@ support alternative default names for index.html. ** --ask-password option (and associated wgetrc command) added to support password prompts at the console. - + ** The --input-file option now also handles retrieving links from an external file. @@ -489,7 +489,7 @@ passive_ftp is the only .wgetrc command which takes a lockable Boolean. ** A number of new translation files have been added. -** New --bind-address / bind_address =
option for people on hosts +** New --bind-address / bind_address =
option for people on hosts bound to multiple IP addresses. ** wget now accepts (illegal per HTTP spec) relative URLs in HTTP redirects. diff --git a/cfg.mk b/cfg.mk index 8b137891..98bcabc8 100644 --- a/cfg.mk +++ b/cfg.mk @@ -1 +1,29 @@ +export VC_LIST_EXCEPT_DEFAULT=^(lib/.*|m4/.*|md5/.*|build-aux/.*|src/gettext\.h|.*ChangeLog)$$ +local-checks-to-skip = \ + sc_const_long_option \ + sc_error_message_uppercase \ + sc_file_system \ + sc_makefile_TAB_only_indentation \ + sc_immutable_NEWS \ + sc_copyright_check \ + sc_makefile_path_separator_check \ + sc_require_config_h \ + sc_require_config_h_first \ + sc_two_space_separator_in_usage \ + sc_useless_cpp_parens \ + \ + sc_space_tab \ + sc_prohibit_atoi_atof \ + sc_prohibit_strcmp \ + sc_makefile_check \ + sc_cast_of_alloca_return_value \ + sc_cast_of_x_alloc_return_value \ + sc_prohibit_S_IS_definition \ + \ + sc_program_name \ + + +#SHELL=bash -x +show-vc-list-except: + @$(VC_LIST_EXCEPT) diff --git a/configure.ac b/configure.ac index 2b3a68d0..be5618a6 100644 --- a/configure.ac +++ b/configure.ac @@ -30,7 +30,7 @@ dnl dnl Process this file with autoconf to produce a configure script. dnl -AC_INIT([wget], +AC_INIT([wget], [1.12-devel], [bug-wget@gnu.org]) AC_PREREQ(2.61) @@ -537,7 +537,7 @@ if test "X$iri" != "Xno"; then fi if test "X$iri" != "Xno" ; then - AC_DEFINE(ENABLE_IRI, 1, [Define if IRI support is enabled.]) + AC_DEFINE([ENABLE_IRI], 1, [Define if IRI support is enabled.]) AC_MSG_NOTICE([Enabling support for IRI.]) else AC_MSG_WARN([Libidn not found]) diff --git a/doc/sample.wgetrc b/doc/sample.wgetrc index 1ce90dea..064ceb16 100644 --- a/doc/sample.wgetrc +++ b/doc/sample.wgetrc @@ -6,7 +6,7 @@ ## avoid having to type many many command-line options. This file does ## not contain a comprehensive list of commands -- look at the manual ## to find out what you can put into this file. -## +## ## Wget initialization file can reside in /usr/local/etc/wgetrc ## (global, for all users) or $HOME/.wgetrc (for a single user). ## diff --git a/doc/texi2pod.pl b/doc/texi2pod.pl index 1435136f..d2f3a026 100755 --- a/doc/texi2pod.pl +++ b/doc/texi2pod.pl @@ -231,7 +231,7 @@ while(<$inf>) { $file = postprocess($1); # Try cwd and $ibase. - open($inf, "<" . $file) + open($inf, "<" . $file) or open($inf, "<" . $ibase . "/" . $file) or die "cannot open $file or $ibase/$file: $!\n"; next; diff --git a/m4/wget.m4 b/m4/wget.m4 index 58256fe4..f6232813 100644 --- a/m4/wget.m4 +++ b/m4/wget.m4 @@ -165,7 +165,7 @@ AC_DEFUN([TYPE_STRUCT_SOCKADDR_IN6],[ AC_DEFUN([MEMBER_SIN6_SCOPE_ID],[ AC_REQUIRE([TYPE_STRUCT_SOCKADDR_IN6]) - + wget_member_sin6_scope_id= if test "X$wget_have_sockaddr_in6" = "Xyes"; then AC_CHECK_MEMBER([struct sockaddr_in6.sin6_scope_id],[ diff --git a/po/POTFILES.in b/po/POTFILES.in index c5674902..a8c4f97e 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -7,19 +7,13 @@ lib/error.c lib/getopt.c lib/quotearg.c lib/xalloc-die.c -src/cmpt.c src/connect.c src/convert.c src/cookies.c -src/ftp-basic.c src/ftp-ls.c -src/ftp-opie.c src/ftp.c -src/gen-md5.c src/gnutls.c -src/hash.c src/host.c -src/html-parse.c src/html-url.c src/http.c src/init.c diff --git a/src/ChangeLog b/src/ChangeLog index f2ddf258..0a526037 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,10 @@ +2009-09-21 Micah Cowan + + * progress.c (update_speed_ring): "the the" -> "the". + + * css-url.c, iri.c, mswindows.c: Removed assert.h inclusion (not + using it). + 2009-09-11 Steven Schweda * utils.c, utils.h (fopen_excl): Make second argument an int, diff --git a/src/connect.c b/src/connect.c index 854eebbc..604e7a11 100644 --- a/src/connect.c +++ b/src/connect.c @@ -312,7 +312,7 @@ connect_to_ip (const ip_address *ip, int port, const char *print) /* In case of error, we will go on anyway... */ int err = setsockopt (sock, IPPROTO_IPV6, IPV6_V6ONLY, &on, sizeof (on)); IF_DEBUG - if (err < 0) + if (err < 0) DEBUGP (("Failed setting IPV6_V6ONLY: %s", strerror (errno))); } #endif diff --git a/src/convert.c b/src/convert.c index 653c7b4d..61bbe6e2 100644 --- a/src/convert.c +++ b/src/convert.c @@ -918,7 +918,7 @@ static struct hash_table *downloaded_files_hash; However, our hash tables only accept pointers for keys and values. So when we need a pointer, we use the address of a downloaded_file_t variable of static storage. */ - + static downloaded_file_t * downloaded_mode_to_ptr (downloaded_file_t mode) { diff --git a/src/cookies.c b/src/cookies.c index f9b206e1..d5ae7bf7 100644 --- a/src/cookies.c +++ b/src/cookies.c @@ -441,7 +441,7 @@ parse_set_cookie (const char *set_cookie, bool silent) if (!silent) logprintf (LOG_NOTQUIET, _("Syntax error in Set-Cookie: %s at position %d.\n"), - quotearg_style (escape_quoting_style, set_cookie), + quotearg_style (escape_quoting_style, set_cookie), (int) (ptr - set_cookie)); delete_cookie (cookie); return NULL; @@ -684,7 +684,7 @@ cookie_handle_set_cookie (struct cookie_jar *jar, { logprintf (LOG_NOTQUIET, _("Cookie coming from %s attempted to set domain to %s\n"), - quotearg_style (escape_quoting_style, host), + quotearg_style (escape_quoting_style, host), quotearg_style (escape_quoting_style, cookie->domain)); xfree (cookie->domain); goto copy_domain; @@ -733,7 +733,7 @@ cookie_handle_set_cookie (struct cookie_jar *jar, /* Support for sending out cookies in HTTP requests, based on previously stored cookies. Entry point is `build_cookies_request'. */ - + /* Return a count of how many times CHR occurs in STRING. */ static int diff --git a/src/css-url.c b/src/css-url.c index 621c17dd..355e780a 100644 --- a/src/css-url.c +++ b/src/css-url.c @@ -49,7 +49,6 @@ as that of the covered work. */ #include #include #include -#include #include "wget.h" #include "utils.h" @@ -144,7 +143,7 @@ get_uri_string (const char *at, int *pos, int *length) if (uri) { strncpy (uri, at + *pos, *length); - uri[*length] = '\0'; + uri[*length] = '\0'; } return uri; diff --git a/src/ftp-basic.c b/src/ftp-basic.c index 324e1ce5..f0022116 100644 --- a/src/ftp-basic.c +++ b/src/ftp-basic.c @@ -76,7 +76,7 @@ ftp_response (int fd, char **ret_line) *--p = '\0'; if (opt.server_response) - logprintf (LOG_NOTQUIET, "%s\n", + logprintf (LOG_NOTQUIET, "%s\n", quotearg_style (escape_quoting_style, line)); else DEBUGP (("%s\n", quotearg_style (escape_quoting_style, line))); @@ -117,7 +117,7 @@ ftp_request (const char *command, const char *value) if (*p == '\r' || *p == '\n') *p = ' '; DEBUGP (("\nDetected newlines in %s \"%s\"; changing to %s \"%s\"\n", - command, quotearg_style (escape_quoting_style, value), + command, quotearg_style (escape_quoting_style, value), command, quotearg_style (escape_quoting_style, defanged))); /* Make VALUE point to the defanged copy of the string. */ value = defanged; @@ -246,7 +246,7 @@ ftp_login (int csock, const char *acc, const char *pass) } static void -ip_address_to_port_repr (const ip_address *addr, int port, char *buf, +ip_address_to_port_repr (const ip_address *addr, int port, char *buf, size_t buflen) { unsigned char *ptr; @@ -322,7 +322,7 @@ ftp_port (int csock, int *local_sock) #ifdef ENABLE_IPV6 static void -ip_address_to_lprt_repr (const ip_address *addr, int port, char *buf, +ip_address_to_lprt_repr (const ip_address *addr, int port, char *buf, size_t buflen) { unsigned char *ptr = IP_INADDR_DATA (addr); @@ -331,18 +331,18 @@ ip_address_to_lprt_repr (const ip_address *addr, int port, char *buf, assert (buflen >= 21 * 4); /* Construct the argument of LPRT (of the form af,n,h1,h2,...,hn,p1,p2). */ - switch (addr->family) + switch (addr->family) { - case AF_INET: - snprintf (buf, buflen, "%d,%d,%d,%d,%d,%d,%d,%d,%d", 4, 4, + case AF_INET: + snprintf (buf, buflen, "%d,%d,%d,%d,%d,%d,%d,%d,%d", 4, 4, ptr[0], ptr[1], ptr[2], ptr[3], 2, (port & 0xff00) >> 8, port & 0xff); break; - case AF_INET6: + case AF_INET6: snprintf (buf, buflen, "%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d", 6, 16, - ptr[0], ptr[1], ptr[2], ptr[3], ptr[4], ptr[5], ptr[6], ptr[7], + ptr[0], ptr[1], ptr[2], ptr[3], ptr[4], ptr[5], ptr[6], ptr[7], ptr[8], ptr[9], ptr[10], ptr[11], ptr[12], ptr[13], ptr[14], ptr[15], 2, (port & 0xff00) >> 8, port & 0xff); break; @@ -410,15 +410,15 @@ ftp_lprt (int csock, int *local_sock) } static void -ip_address_to_eprt_repr (const ip_address *addr, int port, char *buf, +ip_address_to_eprt_repr (const ip_address *addr, int port, char *buf, size_t buflen) { int afnum; - /* buf must contain the argument of EPRT (of the form |af|addr|port|). - * 4 chars for the | separators, INET6_ADDRSTRLEN chars for addr + /* buf must contain the argument of EPRT (of the form |af|addr|port|). + * 4 chars for the | separators, INET6_ADDRSTRLEN chars for addr * 1 char for af (1-2) and 5 chars for port (0-65535) */ - assert (buflen >= 4 + INET6_ADDRSTRLEN + 1 + 5); + assert (buflen >= 4 + INET6_ADDRSTRLEN + 1 + 5); /* Construct the argument of EPRT (of the form |af|addr|port|). */ afnum = (addr->family == AF_INET ? 1 : 2); @@ -437,8 +437,8 @@ ftp_eprt (int csock, int *local_sock) ip_address addr; int nwritten; int port; - /* Must contain the argument of EPRT (of the form |af|addr|port|). - * 4 chars for the | separators, INET6_ADDRSTRLEN chars for addr + /* Must contain the argument of EPRT (of the form |af|addr|port|). + * 4 chars for the | separators, INET6_ADDRSTRLEN chars for addr * 1 char for af (1-2) and 5 chars for port (0-65535) */ char bytes[4 + INET6_ADDRSTRLEN + 1 + 5 + 1]; @@ -587,7 +587,7 @@ ftp_lpsv (int csock, ip_address *addr, int *port) { xfree (respline); return FTPNOPASV; - } + } /* Parse the response. */ s = respline; @@ -750,7 +750,7 @@ ftp_epsv (int csock, ip_address *ip, int *port) { xfree (respline); return FTPNOPASV; - } + } assert (respline != NULL); @@ -765,7 +765,7 @@ ftp_epsv (int csock, ip_address *ip, int *port) { xfree (respline); return FTPINVPASV; - } + } /* Skip the first two void fields */ s = start + 1; @@ -774,26 +774,26 @@ ftp_epsv (int csock, ip_address *ip, int *port) { xfree (respline); return FTPINVPASV; - } + } for (i = 0; i < 2; i++) { - if (*s++ != delim) + if (*s++ != delim) { xfree (respline); return FTPINVPASV; - } + } } /* Finally, get the port number */ - tport = 0; - for (i = 1; c_isdigit (*s); s++) + tport = 0; + for (i = 1; c_isdigit (*s); s++) { if (i > 5) { xfree (respline); return FTPINVPASV; - } + } tport = (*s - '0') + 10 * tport; } @@ -802,13 +802,13 @@ ftp_epsv (int csock, ip_address *ip, int *port) { xfree (respline); return FTPINVPASV; - } + } if (*s++ != ')') { xfree (respline); return FTPINVPASV; - } + } *port = tport; @@ -966,7 +966,7 @@ ftp_list (int csock, const char *file, enum stype rs) bool ok = false; size_t i = 0; /* Try `LIST -a' first and revert to `LIST' in case of failure. */ - const char *list_commands[] = { "LIST -a", + const char *list_commands[] = { "LIST -a", "LIST" }; /* 2008-01-29 SMS. For a VMS FTP server, where "LIST -a" may not @@ -999,7 +999,7 @@ ftp_list (int csock, const char *file, enum stype rs) err = FTPOK; ok = true; } - else + else { err = FTPRERR; } @@ -1007,7 +1007,7 @@ ftp_list (int csock, const char *file, enum stype rs) } ++i; } while (i < countof (list_commands) && !ok); - + return err; } @@ -1142,9 +1142,9 @@ ftp_size (int csock, const char *file, wgint *size) } if (*respline == '5') { - /* + /* * Probably means SIZE isn't supported on this server. - * Error is nonfatal since SIZE isn't in RFC 959 + * Error is nonfatal since SIZE isn't in RFC 959 */ xfree (respline); *size = 0; @@ -1155,7 +1155,7 @@ ftp_size (int csock, const char *file, wgint *size) *size = str_to_wgint (respline + 4, NULL, 10); if (errno) { - /* + /* * Couldn't parse the response for some reason. On the (few) * tests I've done, the response is 213 with nothing else - * maybe something a bit more resilient is necessary. It's not a diff --git a/src/ftp-ls.c b/src/ftp-ls.c index e0b474e1..21159220 100644 --- a/src/ftp-ls.c +++ b/src/ftp-ls.c @@ -1,6 +1,6 @@ /* Parsing FTP `ls' output. Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, - 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. + 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. This file is part of GNU Wget. @@ -72,13 +72,13 @@ static int clean_line(char *line) { int len = strlen (line); - if (!len) return 0; + if (!len) return 0; if (line[len - 1] == '\n') line[--len] = '\0'; - if (!len) return 0; + if (!len) return 0; if (line[len - 1] == '\r') line[--len] = '\0'; - for ( ; *line ; line++ ) if (*line == '\t') *line = ' '; + for ( ; *line ; line++ ) if (*line == '\t') *line = ' '; return len; } @@ -487,9 +487,9 @@ ftp_parse_winnt_ls (const char *file) if (hour == 12) hour = 0; if (*tok == 'P') hour += 12; - DEBUGP(("YYYY/MM/DD HH:MM - %d/%02d/%02d %02d:%02d\n", + DEBUGP(("YYYY/MM/DD HH:MM - %d/%02d/%02d %02d:%02d\n", year+1900, month, day, hour, min)); - + /* Build the time-stamp (copy & paste from above) */ timestruct.tm_sec = 0; timestruct.tm_min = min; @@ -567,7 +567,7 @@ ftp_parse_winnt_ls (const char *file) more or less. (Different VMS FTP servers may have different headers, and may not supply the same data, but all should be subsets of this.) - VMS normally provides local (server) time and date information. + VMS normally provides local (server) time and date information. Define the logical name or environment variable "WGET_TIMEZONE_DIFFERENTIAL" (seconds) to adjust the receiving local times if different from the remote local times. @@ -770,7 +770,7 @@ ftp_parse_vms_ls (const char *file) #endif /* (!defined( __VMS) && !defined( PRESERVE_VMS_VERSIONS)) */ /* 2005-02-23 SMS. - Eliminate "^" escape characters from ODS5 extended file name. + Eliminate "^" escape characters from ODS5 extended file name. (A caret is invalid in an ODS2 name, so this is always safe.) */ eat_carets( tok); @@ -824,7 +824,7 @@ ftp_parse_vms_ls (const char *file) */ tok = strtok(NULL, " "); - if (tok == NULL) + if (tok == NULL) { DEBUGP(("Getting additional line.\n")); xfree (line); @@ -944,7 +944,7 @@ ftp_parse_vms_ls (const char *file) } else { - /* Nondescript. Probably size(s), probably in blocks. + /* Nondescript. Probably size(s), probably in blocks. Could be "No privilege ..." message. (Ignore.) */ DEBUGP (("Ignored (size?).\n")); diff --git a/src/ftp.c b/src/ftp.c index 9d4344a8..dfdd83c8 100644 --- a/src/ftp.c +++ b/src/ftp.c @@ -69,7 +69,7 @@ typedef struct int cmd; /* command code */ int csock; /* control connection socket */ double dltime; /* time of the download in msecs */ - enum stype rs; /* remote system reported by ftp server */ + enum stype rs; /* remote system reported by ftp server */ char *id; /* initial directory */ char *target; /* target file name */ struct url *proxy; /* FTWK-style proxy */ @@ -110,7 +110,7 @@ ftp_expected_bytes (const char *s) } #ifdef ENABLE_IPV6 -/* +/* * This function sets up a passive data connection with the FTP server. * It is merely a wrapper around ftp_epsv, ftp_lpsv and ftp_pasv. */ @@ -125,8 +125,8 @@ ftp_do_pasv (int csock, ip_address *addr, int *port) if (!socket_ip_address (csock, addr, ENDPOINT_PEER)) abort (); - /* If our control connection is over IPv6, then we first try EPSV and then - * LPSV if the former is not supported. If the control connection is over + /* If our control connection is over IPv6, then we first try EPSV and then + * LPSV if the former is not supported. If the control connection is over * IPv4, we simply issue the good old PASV request. */ switch (addr->family) { @@ -155,7 +155,7 @@ ftp_do_pasv (int csock, ip_address *addr, int *port) return err; } -/* +/* * This function sets up an active data connection with the FTP server. * It is merely a wrapper around ftp_eprt, ftp_lprt and ftp_port. */ @@ -168,8 +168,8 @@ ftp_do_port (int csock, int *local_sock) if (!socket_ip_address (csock, &cip, ENDPOINT_PEER)) abort (); - /* If our control connection is over IPv6, then we first try EPRT and then - * LPRT if the former is not supported. If the control connection is over + /* If our control connection is over IPv6, then we first try EPRT and then + * LPRT if the former is not supported. If the control connection is over * IPv4, we simply issue the good old PORT request. */ switch (cip.family) { @@ -312,7 +312,7 @@ getftp (struct url *u, wgint passed_expected_bytes, wgint *qtyread, con->csock = -1; /* Second: Login with proper USER/PASS sequence. */ - logprintf (LOG_VERBOSE, _("Logging in as %s ... "), + logprintf (LOG_VERBOSE, _("Logging in as %s ... "), quotearg_style (escape_quoting_style, user)); if (opt.server_response) logputs (LOG_ALWAYS, "\n"); @@ -429,7 +429,7 @@ Error in server response, closing control connection.\n")); */ /* VMS will report something like "PUB$DEVICE:[INITIAL.FOLDER]". - Convert it to "/INITIAL/FOLDER" */ + Convert it to "/INITIAL/FOLDER" */ if (con->rs == ST_VMS) { char *path = strchr (con->id, '['); @@ -529,7 +529,7 @@ Error in server response, closing control connection.\n")); Why is this wise even on UNIX? It certainly fouls VMS. See below for a more reliable, more universal method. */ - + /* 2008-04-22 MJC. I'm not crazy about it either. I'm informed it's useful for misconfigured servers that have some dirs in the path @@ -603,7 +603,7 @@ Error in server response, closing control connection.\n")); #endif /* 0 */ /* 2004-09-20 SMS. - A relative directory is relative to the initial directory. + A relative directory is relative to the initial directory. Thus, what _is_ useful on VMS (and probably elsewhere) is to CWD to the initial directory (ideally, whatever the server reports, _exactly_, NOT badly UNIX-ixed), and then @@ -738,7 +738,7 @@ Error in server response, closing control connection.\n")); if (opt.verbose) { if (!opt.server_response) - logprintf (LOG_VERBOSE, "==> SIZE %s ... ", + logprintf (LOG_VERBOSE, "==> SIZE %s ... ", quotearg_style (escape_quoting_style, u->file)); } @@ -805,7 +805,7 @@ Error in server response, closing control connection.\n")); } /* switch (err) */ if (err==FTPOK) { - DEBUGP (("trying to connect to %s port %d\n", + DEBUGP (("trying to connect to %s port %d\n", print_address (&passive_addr), passive_port)); dtsock = connect_to_ip (&passive_addr, passive_port, NULL); if (dtsock < 0) @@ -935,14 +935,14 @@ Error in server response, closing control connection.\n")); uerr_t res; struct fileinfo *f; res = ftp_get_listing (u, con, &f); - /* Set the DO_RETR command flag again, because it gets unset when - calling ftp_get_listing() and would otherwise cause an assertion - failure earlier on when this function gets repeatedly called + /* Set the DO_RETR command flag again, because it gets unset when + calling ftp_get_listing() and would otherwise cause an assertion + failure earlier on when this function gets repeatedly called (e.g., when recursing). */ con->cmd |= DO_RETR; if (res == RETROK) { - while (f) + while (f) { if (!strcmp (f->name, u->file)) { @@ -977,7 +977,7 @@ Error in server response, closing control connection.\n")); { if (restval) logputs (LOG_VERBOSE, "\n"); - logprintf (LOG_VERBOSE, "==> RETR %s ... ", + logprintf (LOG_VERBOSE, "==> RETR %s ... ", quotearg_style (escape_quoting_style, u->file)); } } @@ -1095,7 +1095,7 @@ Error in server response, closing control connection.\n")); } /* Open the file -- if output_stream is set, use it instead. */ - + /* 2005-04-17 SMS. Note that having the output_stream ("-O") file opened in main() (main.c) rather limits the ability in VMS to open the file @@ -1116,7 +1116,7 @@ Error in server response, closing control connection.\n")); con->target = targ; } #endif /* def __VMS */ - + mkalldirs (con->target); if (opt.backups) rotate_backups (con->target); @@ -1135,7 +1135,7 @@ Error in server response, closing control connection.\n")); #else /* def __VMS */ # define BIN_TYPE_FILE 1 #endif /* def __VMS [else] */ - + if (restval && !(con->cmd & DO_LIST)) { #ifdef __VMS @@ -1331,7 +1331,7 @@ Error in server response, closing control connection.\n")); char *p = strchr (line, '\0'); while (p > line && (p[-1] == '\n' || p[-1] == '\r')) *--p = '\0'; - logprintf (LOG_ALWAYS, "%s\n", + logprintf (LOG_ALWAYS, "%s\n", quotearg_style (escape_quoting_style, line)); xfree (line); } @@ -2033,7 +2033,7 @@ ftp_retrieve_glob (struct url *u, ccon *con, int action) if (matchres == -1) { logprintf (LOG_NOTQUIET, _("Error matching %s against %s: %s\n"), - u->file, quotearg_style (escape_quoting_style, f->name), + u->file, quotearg_style (escape_quoting_style, f->name), strerror (errno)); break; } diff --git a/src/gnutls.c b/src/gnutls.c index 7da0c1be..af46171f 100644 --- a/src/gnutls.c +++ b/src/gnutls.c @@ -181,7 +181,7 @@ static struct transport_implementation wgnutls_transport = { }; bool -ssl_connect (int fd) +ssl_connect (int fd) { static const int cert_type_priority[] = { GNUTLS_CRT_X509, GNUTLS_CRT_OPENPGP, 0 diff --git a/src/hash.c b/src/hash.c index 273fd9a6..7160006a 100644 --- a/src/hash.c +++ b/src/hash.c @@ -630,7 +630,7 @@ hash_table_count (const struct hash_table *ht) * Support for hash tables whose keys are strings. * */ - + /* Base 31 hash function. Taken from Gnome's glib, modified to use standard C types. @@ -643,11 +643,11 @@ hash_string (const void *key) { const char *p = key; unsigned int h = *p; - + if (h) for (p += 1; *p != '\0'; p++) h = (h << 5) - h + *p; - + return h; } @@ -681,11 +681,11 @@ hash_string_nocase (const void *key) { const char *p = key; unsigned int h = c_tolower (*p); - + if (h) for (p += 1; *p != '\0'; p++) h = (h << 5) - h + c_tolower (*p); - + return h; } diff --git a/src/host.c b/src/host.c index 5cab4494..4497bad2 100644 --- a/src/host.c +++ b/src/host.c @@ -202,7 +202,7 @@ address_list_from_addrinfo (const struct addrinfo *ai) ip = al->addresses; for (ptr = ai; ptr != NULL; ptr = ptr->ai_next) - if (ptr->ai_family == AF_INET6) + if (ptr->ai_family == AF_INET6) { const struct sockaddr_in6 *sin6 = (const struct sockaddr_in6 *)ptr->ai_addr; @@ -212,7 +212,7 @@ address_list_from_addrinfo (const struct addrinfo *ai) ip->ipv6_scope = sin6->sin6_scope_id; #endif ++ip; - } + } else if (ptr->ai_family == AF_INET) { const struct sockaddr_in *sin = @@ -462,7 +462,7 @@ is_valid_ipv4_address (const char *str, const char *end) } if (octets < 4) return false; - + return true; } @@ -487,7 +487,7 @@ is_valid_ipv6_address (const char *str, const char *end) if (str == end) return false; - + /* Leading :: requires some special handling. */ if (*str == ':') { @@ -544,20 +544,20 @@ is_valid_ipv6_address (const char *str, const char *end) saw_xdigit = false; break; } - + return false; } if (saw_xdigit) { - if (tp > ns_in6addrsz - ns_int16sz) + if (tp > ns_in6addrsz - ns_int16sz) return false; tp += ns_int16sz; } if (colonp != NULL) { - if (tp == ns_in6addrsz) + if (tp == ns_in6addrsz) return false; tp = ns_in6addrsz; } diff --git a/src/html-url.c b/src/html-url.c index 0e707740..f938c80c 100644 --- a/src/html-url.c +++ b/src/html-url.c @@ -625,7 +625,7 @@ collect_tags_mapper (struct taginfo *tag, void *arg) /* Find the tag in our table of tags. This must not fail because map_html_tags only returns tags found in interesting_tags. - + I've changed this for now, I'm passing NULL as interesting_tags to map_html_tags. This way we can check all tags for a style attribute. diff --git a/src/http-ntlm.c b/src/http-ntlm.c index e4f358d3..a3423d5e 100644 --- a/src/http-ntlm.c +++ b/src/http-ntlm.c @@ -32,7 +32,7 @@ as that of the covered work. */ #include "wget.h" /* NTLM details: - + http://davenport.sourceforge.net/ntlm.html http://www.innovation.ch/java/ntlm.html @@ -246,7 +246,7 @@ mkhash(const char *password, if (len > 14) len = 14; - + for (i=0; istate) { case NTLMSTATE_TYPE1: default: /* for the weird cases we (re)start here */ @@ -332,7 +332,7 @@ ntlm_output (struct ntlmdata *ntlm, const char *user, const char *passwd, domoff = hostoff + hostlen; DEBUGP (("Creating a type-1 NTLM message.\n")); - + /* Create and send a type-1 message: Index Description Content @@ -385,7 +385,7 @@ ntlm_output (struct ntlmdata *ntlm, const char *user, const char *passwd, output = concat_strings ("NTLM ", base64, (char *) 0); break; - + case NTLMSTATE_TYPE2: /* We received the type-2 already, create a type-3 message: @@ -403,7 +403,7 @@ ntlm_output (struct ntlmdata *ntlm, const char *user, const char *passwd, 52 (64) start of data block */ - + { int lmrespoff; int ntrespoff; @@ -461,20 +461,20 @@ ntlm_output (struct ntlmdata *ntlm, const char *user, const char *passwd, "%c%c" /* domain allocated space */ "%c%c" /* domain name offset */ "%c%c" /* 2 zeroes */ - + "%c%c" /* user length */ "%c%c" /* user allocated space */ "%c%c" /* user offset */ "%c%c" /* 2 zeroes */ - + "%c%c" /* host length */ "%c%c" /* host allocated space */ "%c%c" /* host offset */ "%c%c%c%c%c%c" /* 6 zeroes */ - + "\xff\xff" /* message length */ "%c%c" /* 2 zeroes */ - + "\x01\x82" /* flags */ "%c%c" /* 2 zeroes */ @@ -529,7 +529,7 @@ ntlm_output (struct ntlmdata *ntlm, const char *user, const char *passwd, before we copy them there. */ if(((size_t) size + userlen + domlen) >= sizeof(ntlmbuf)) return NULL; - + memcpy(&ntlmbuf[size], domain, domlen); size += domlen; @@ -543,7 +543,7 @@ ntlm_output (struct ntlmdata *ntlm, const char *user, const char *passwd, } #ifdef USE_NTRESPONSES - if(size < ((int)sizeof(ntlmbuf) - 0x18)) { + if(size < ((int)sizeof(ntlmbuf) - 0x18)) { memcpy(&ntlmbuf[size], ntresp, 0x18); size += 0x18; } diff --git a/src/http.c b/src/http.c index dfe03ce0..3a467646 100644 --- a/src/http.c +++ b/src/http.c @@ -774,7 +774,7 @@ resp_status (const struct response *resp, char **message) while (p < end && c_isdigit (*p)) ++p; if (p < end && *p == '.') - ++p; + ++p; while (p < end && c_isdigit (*p)) ++p; } @@ -819,7 +819,7 @@ print_response_line(const char *prefix, const char *b, const char *e) { char *copy; BOUNDED_TO_ALLOCA(b, e, copy); - logprintf (LOG_ALWAYS, "%s%s\n", prefix, + logprintf (LOG_ALWAYS, "%s%s\n", prefix, quotearg_style (escape_quoting_style, copy)); } @@ -1059,12 +1059,12 @@ parse_content_disposition (const char *hdr, char **filename) bool add_slash = (opt.dir_prefix[prefix_length - 1] != '/'); int total_length; - if (add_slash) + if (add_slash) ++prefix_length; - total_length = prefix_length + (value.e - value.b); + total_length = prefix_length + (value.e - value.b); *filename = xmalloc (total_length + 1); strcpy (*filename, opt.dir_prefix); - if (add_slash) + if (add_slash) (*filename)[prefix_length - 1] = '/'; memcpy (*filename + prefix_length, value.b, (value.e - value.b)); (*filename)[total_length] = '\0'; @@ -1314,12 +1314,12 @@ struct http_stat existence after having begun to download (needed in gethttp for when connection is interrupted/restarted. */ - bool timestamp_checked; /* true if pre-download time-stamping checks + bool timestamp_checked; /* true if pre-download time-stamping checks * have already been performed */ char *orig_file_name; /* name of file to compare for time-stamping * (might be != local_file if -K is set) */ wgint orig_file_size; /* size of file to compare for time-stamping */ - time_t orig_file_tstamp; /* time-stamp of file to compare for + time_t orig_file_tstamp; /* time-stamp of file to compare for * time-stamping */ }; @@ -1658,7 +1658,7 @@ gethttp (struct url *u, struct http_stat *hs, int *dt, struct url *proxy, sock = pconn.socket; using_ssl = pconn.ssl; logprintf (LOG_VERBOSE, _("Reusing existing connection to %s:%d.\n"), - quotearg_style (escape_quoting_style, pconn.host), + quotearg_style (escape_quoting_style, pconn.host), pconn.port); DEBUGP (("Reusing fd %d.\n", sock)); if (pconn.authorized) @@ -1977,17 +1977,17 @@ gethttp (struct url *u, struct http_stat *hs, int *dt, struct url *proxy, pconn.authorized = true; } - /* Determine the local filename if needed. Notice that if -O is used + /* Determine the local filename if needed. Notice that if -O is used * hstat.local_file is set by http_loop to the argument of -O. */ if (!hs->local_file) { /* Honor Content-Disposition whether possible. */ if (!opt.content_disposition - || !resp_header_copy (resp, "Content-Disposition", + || !resp_header_copy (resp, "Content-Disposition", hdrval, sizeof (hdrval)) || !parse_content_disposition (hdrval, &hs->local_file)) { - /* The Content-Disposition header is missing or broken. + /* The Content-Disposition header is missing or broken. * Choose unique file name according to given URL. */ hs->local_file = url_file_name (u); } @@ -2169,7 +2169,7 @@ File %s already there; not retrieving.\n\n"), quote (hs->local_file)); content-type. */ if (!type || 0 == strncasecmp (type, TEXTHTML_S, strlen (TEXTHTML_S)) || - 0 == strncasecmp (type, TEXTXHTML_S, strlen (TEXTXHTML_S))) + 0 == strncasecmp (type, TEXTXHTML_S, strlen (TEXTXHTML_S))) *dt |= TEXTHTML; else *dt &= ~TEXTHTML; @@ -2362,10 +2362,10 @@ File %s already there; not retrieving.\n\n"), quote (hs->local_file)); /* Print fetch message, if opt.verbose. */ if (opt.verbose) { - logprintf (LOG_NOTQUIET, _("Saving to: %s\n"), + logprintf (LOG_NOTQUIET, _("Saving to: %s\n"), HYPHENP (hs->local_file) ? quote ("STDOUT") : quote (hs->local_file)); } - + /* This confuses the timestamping code that checks for file size. #### The timestamping code should be smarter about file size. */ if (opt.save_headers && hs->restval == 0) @@ -2495,7 +2495,7 @@ File %s already there; not retrieving.\n\n"), && (got_name || !opt.content_disposition)) send_head_first = false; - /* Send preliminary HEAD request if -N is given and we have an existing + /* Send preliminary HEAD request if -N is given and we have an existing * destination file. */ file_name = url_file_name (u); if (opt.timestamping @@ -2503,7 +2503,7 @@ File %s already there; not retrieving.\n\n"), && file_exists_p (file_name)) send_head_first = true; xfree (file_name); - + /* THE loop */ do { @@ -2602,7 +2602,7 @@ Spider mode enabled. Check if remote file exists.\n")); logputs (LOG_VERBOSE, "\n"); logprintf (LOG_NOTQUIET, _("Cannot write to %s (%s).\n"), quote (hstat.local_file), strerror (errno)); - case HOSTERR: case CONIMPOSSIBLE: case PROXERR: case AUTHFAILED: + case HOSTERR: case CONIMPOSSIBLE: case PROXERR: case AUTHFAILED: case SSLINITFAILED: case CONTNOTSUPPORTED: case VERIFCERTERR: /* Fatal errors just return from the function. */ ret = err; @@ -2700,7 +2700,7 @@ Last-modified header invalid -- time-stamp ignored.\n")); if (*dt & HEAD_ONLY) time_came_from_head = true; } - + if (send_head_first) { /* The time-stamping section. */ @@ -2711,7 +2711,7 @@ Last-modified header invalid -- time-stamp ignored.\n")); we're supposed to download already exists. */ { - if (hstat.remote_time && + if (hstat.remote_time && tmr != (time_t) (-1)) { /* Now time-stamping can be used validly. @@ -2722,7 +2722,7 @@ Last-modified header invalid -- time-stamp ignored.\n")); download procedure is resumed. */ if (hstat.orig_file_tstamp >= tmr) { - if (hstat.contlen == -1 + if (hstat.contlen == -1 || hstat.orig_file_size == hstat.contlen) { logprintf (LOG_VERBOSE, _("\ @@ -2745,11 +2745,11 @@ The sizes do not match (local %s) -- retrieving.\n"), logputs (LOG_VERBOSE, "\n"); } } - + /* free_hstat (&hstat); */ hstat.timestamp_checked = true; } - + if (opt.spider) { bool finished = true; @@ -2761,7 +2761,7 @@ The sizes do not match (local %s) -- retrieving.\n"), Remote file exists and could contain links to other resources -- retrieving.\n\n")); finished = false; } - else + else { logprintf (LOG_VERBOSE, _("\ Remote file exists but does not contain any link -- not retrieving.\n\n")); @@ -2776,18 +2776,18 @@ Remote file exists but does not contain any link -- not retrieving.\n\n")); Remote file exists and could contain further links,\n\ but recursion is disabled -- not retrieving.\n\n")); } - else + else { logprintf (LOG_VERBOSE, _("\ Remote file exists.\n\n")); } ret = RETROK; /* RETRUNNEEDED is not for caller. */ } - + if (finished) { - logprintf (LOG_NONVERBOSE, - _("%s URL: %s %2d %s\n"), + logprintf (LOG_NONVERBOSE, + _("%s URL: %s %2d %s\n"), tms, u->url, hstat.statcode, hstat.message ? quotearg_style (escape_quoting_style, hstat.message) : ""); goto exit; @@ -2800,7 +2800,7 @@ Remote file exists.\n\n")); continue; } /* send_head_first */ } /* !got_head */ - + if ((tmr != (time_t) (-1)) && ((hstat.len == hstat.contlen) || ((hstat.res == 0) && (hstat.contlen == -1)))) @@ -2833,7 +2833,7 @@ Remote file exists.\n\n")); bool write_to_stdout = (opt.output_document && HYPHENP (opt.output_document)); logprintf (LOG_VERBOSE, - write_to_stdout + write_to_stdout ? _("%s (%s) - written to stdout %s[%s/%s]\n\n") : _("%s (%s) - %s saved [%s/%s]\n\n"), tms, tmrate, @@ -2862,7 +2862,7 @@ Remote file exists.\n\n")); else if (hstat.res == 0) /* No read error */ { if (hstat.contlen == -1) /* We don't know how much we were supposed - to get, so assume we succeeded. */ + to get, so assume we succeeded. */ { if (*dt & RETROKF) { @@ -2872,7 +2872,7 @@ Remote file exists.\n\n")); write_to_stdout ? _("%s (%s) - written to stdout %s[%s]\n\n") : _("%s (%s) - %s saved [%s]\n\n"), - tms, tmrate, + tms, tmrate, write_to_stdout ? "" : quote (hstat.local_file), number_to_static_string (hstat.len)); logprintf (LOG_NONVERBOSE, @@ -2888,7 +2888,7 @@ Remote file exists.\n\n")); downloaded_file(FILE_DOWNLOADED_AND_HTML_EXTENSION_ADDED, hstat.local_file); else downloaded_file(FILE_DOWNLOADED_NORMALLY, hstat.local_file); - + ret = RETROK; goto exit; } @@ -2942,10 +2942,10 @@ Remote file exists.\n\n")); while (!opt.ntry || (count < opt.ntry)); exit: - if (ret == RETROK) + if (ret == RETROK) *local_file = xstrdup (hstat.local_file); free_hstat (&hstat); - + return ret; } @@ -3355,7 +3355,7 @@ test_parse_content_disposition() { int i; struct { - char *hdrval; + char *hdrval; char *opt_dir_prefix; char *filename; bool result; @@ -3369,8 +3369,8 @@ test_parse_content_disposition() { "attachment", NULL, NULL, false }, { "attachment", "somedir", NULL, false }, }; - - for (i = 0; i < sizeof(test_array)/sizeof(test_array[0]); ++i) + + for (i = 0; i < sizeof(test_array)/sizeof(test_array[0]); ++i) { char *filename; bool res; @@ -3378,9 +3378,9 @@ test_parse_content_disposition() opt.dir_prefix = test_array[i].opt_dir_prefix; res = parse_content_disposition (test_array[i].hdrval, &filename); - mu_assert ("test_parse_content_disposition: wrong result", + mu_assert ("test_parse_content_disposition: wrong result", res == test_array[i].result - && (res == false + && (res == false || 0 == strcmp (test_array[i].filename, filename))); } diff --git a/src/init.c b/src/init.c index 91512e84..5a05d035 100644 --- a/src/init.c +++ b/src/init.c @@ -391,12 +391,12 @@ home_dir (void) return home ? xstrdup (home) : NULL; } -/* Check the 'WGETRC' environment variable and return the file name - if 'WGETRC' is set and is a valid file. +/* Check the 'WGETRC' environment variable and return the file name + if 'WGETRC' is set and is a valid file. If the `WGETRC' variable exists but the file does not exist, the function will exit(). */ char * -wgetrc_env_file_name (void) +wgetrc_env_file_name (void) { char *env = getenv ("WGETRC"); if (env && *env) @@ -415,7 +415,7 @@ wgetrc_env_file_name (void) /* Check for the existance of '$HOME/.wgetrc' and return it's path if it exists and is set. */ char * -wgetrc_user_file_name (void) +wgetrc_user_file_name (void) { char *home = home_dir (); char *file = NULL; @@ -443,7 +443,7 @@ wgetrc_user_file_name (void) /* Return the path to the user's .wgetrc. This is either the value of `WGETRC' environment variable, or `$HOME/.wgetrc'. - Additionally, for windows, look in the directory where wget.exe + Additionally, for windows, look in the directory where wget.exe resides. */ char * wgetrc_file_name (void) @@ -451,7 +451,7 @@ wgetrc_file_name (void) char *file = wgetrc_env_file_name (); if (file && *file) return file; - + file = wgetrc_user_file_name (); #ifdef WINDOWS @@ -564,8 +564,8 @@ initialize (void) /* Load the hard-coded defaults. */ defaults (); - - /* Run a non-standard system rc file when the according environment + + /* Run a non-standard system rc file when the according environment variable has been set. For internal testing purposes only! */ env_sysrc = getenv ("SYSTEM_WGETRC"); if (env_sysrc && file_exists_p (env_sysrc)) @@ -1310,7 +1310,7 @@ cmd_spec_restrict_file_names (const char *com, const char *val, void *place_igno return false; } - if (*end) + if (*end) val = end + 1; } while (*val && *end); @@ -1321,7 +1321,7 @@ cmd_spec_restrict_file_names (const char *com, const char *val, void *place_igno opt.restrict_files_ctrl = restrict_ctrl; opt.restrict_files_case = restrict_case; opt.restrict_files_nonascii = restrict_nonascii; - + return true; } @@ -1601,7 +1601,7 @@ cleanup (void) xfree_null (opt.user); xfree_null (opt.passwd); xfree_null (opt.base_href); - + #endif /* DEBUG_MALLOC */ } @@ -1622,9 +1622,9 @@ test_commands_sorted() { mu_assert ("FAILED", false); break; - } + } else - { + { prev_idx ++; next_idx ++; } @@ -1648,11 +1648,11 @@ test_cmd_spec_restrict_file_names() { "windows,lowercase", restrict_windows, true, restrict_lowercase, true }, { "unix,nocontrol,lowercase,", restrict_unix, false, restrict_lowercase, true }, }; - - for (i = 0; i < sizeof(test_array)/sizeof(test_array[0]); ++i) + + for (i = 0; i < sizeof(test_array)/sizeof(test_array[0]); ++i) { bool res; - + defaults(); res = cmd_spec_restrict_file_names ("dummy", test_array[i].val, NULL); @@ -1662,10 +1662,10 @@ test_cmd_spec_restrict_file_names() fprintf (stderr, "opt.restrict_files_ctrl: %d\n", opt.restrict_files_ctrl); fflush (stderr); fprintf (stderr, "opt.restrict_files_case: %d\n", opt.restrict_files_case); fflush (stderr); */ - mu_assert ("test_cmd_spec_restrict_file_names: wrong result", + mu_assert ("test_cmd_spec_restrict_file_names: wrong result", res == test_array[i].result - && opt.restrict_files_os == test_array[i].expected_restrict_files_os - && opt.restrict_files_ctrl == test_array[i].expected_restrict_files_ctrl + && opt.restrict_files_os == test_array[i].expected_restrict_files_os + && opt.restrict_files_ctrl == test_array[i].expected_restrict_files_ctrl && opt.restrict_files_case == test_array[i].expected_restrict_files_case); } diff --git a/src/iri.c b/src/iri.c index 4f6d866f..51c23291 100644 --- a/src/iri.c +++ b/src/iri.c @@ -31,7 +31,6 @@ as that of the covered work. */ #include #include -#include #include #include #include @@ -138,7 +137,7 @@ locale_to_utf8 (const char *str) l2u = iconv_open ("UTF-8", opt.locale); if (l2u != (iconv_t)(-1)) - { + { logprintf (LOG_VERBOSE, _("Conversion from %s to %s isn't supported\n"), quote (opt.locale), quote ("UTF-8")); return str; diff --git a/src/main.c b/src/main.c index c74f6ca3..dddc4b24 100644 --- a/src/main.c +++ b/src/main.c @@ -737,11 +737,11 @@ prompt_for_password (void) lines.*/ static void format_and_print_line (const char *prefix, const char *line, - int line_length) + int line_length) { int remaining_chars; char *line_dup, *token; - + assert (prefix != NULL); assert (line != NULL); @@ -754,12 +754,12 @@ format_and_print_line (const char *prefix, const char *line, remaining_chars = line_length; /* We break on spaces. */ token = strtok (line_dup, " "); - while (token != NULL) + while (token != NULL) { /* If however a token is much larger than the maximum line length, all bets are off and we simply print the token on the next line. */ - if (remaining_chars <= strlen (token)) + if (remaining_chars <= strlen (token)) { printf ("\n%*c", TABULATION, ' '); remaining_chars = line_length - TABULATION; @@ -794,10 +794,10 @@ print_version (void) /* compiled_features is a char*[]. We limit the characters per line to MAX_CHARS_PER_LINE and prefix each line with a constant number of spaces for proper alignment. */ - for (i = 0; compiled_features[i] != NULL; ) + for (i = 0; compiled_features[i] != NULL; ) { int line_length = MAX_CHARS_PER_LINE; - while ((line_length > 0) && (compiled_features[i] != NULL)) + while ((line_length > 0) && (compiled_features[i] != NULL)) { printf ("%s ", compiled_features[i]); line_length -= strlen (compiled_features[i]) + 2; @@ -806,17 +806,17 @@ print_version (void) printf ("\n"); } printf ("\n"); - /* Handle the case when $WGETRC is unset and $HOME/.wgetrc is + /* Handle the case when $WGETRC is unset and $HOME/.wgetrc is absent. */ printf ("%s\n", wgetrc_title); env_wgetrc = wgetrc_env_file_name (); - if (env_wgetrc && *env_wgetrc) + if (env_wgetrc && *env_wgetrc) { printf (_(" %s (env)\n"), env_wgetrc); xfree (env_wgetrc); } user_wgetrc = wgetrc_user_file_name (); - if (user_wgetrc) + if (user_wgetrc) { printf (_(" %s (user)\n"), user_wgetrc); xfree (user_wgetrc); @@ -830,7 +830,7 @@ print_version (void) LOCALEDIR, MAX_CHARS_PER_LINE); #endif /* def ENABLE_NLS */ - + format_and_print_line (compile_title, compilation_string, MAX_CHARS_PER_LINE); @@ -1050,7 +1050,7 @@ Can't timestamp and not clobber old files at the same time.\n")); #endif if (opt.output_document) { - if (opt.convert_links + if (opt.convert_links && (nurl > 1 || opt.page_requisites || opt.recursive)) { fputs (_("\ @@ -1073,12 +1073,12 @@ WARNING: timestamping does nothing in combination with -O. See the manual\n\ for details.\n\n")); opt.timestamping = false; } - if (opt.noclobber && file_exists_p(opt.output_document)) - { + if (opt.noclobber && file_exists_p(opt.output_document)) + { /* Check if output file exists; if it does, exit. */ logprintf (LOG_VERBOSE, _("File `%s' already there; not retrieving.\n"), opt.output_document); exit(1); - } + } } if (opt.ask_passwd && opt.passwd) @@ -1282,9 +1282,9 @@ WARNING: Can't reopen standard output in binary mode;\n\ int old_follow_ftp = opt.follow_ftp; /* Turn opt.follow_ftp on in case of recursive FTP retrieval */ - if (url_scheme (*t) == SCHEME_FTP) + if (url_scheme (*t) == SCHEME_FTP) opt.follow_ftp = 1; - + status = retrieve_tree (url_parsed, NULL); opt.follow_ftp = old_follow_ftp; @@ -1324,7 +1324,7 @@ WARNING: Can't reopen standard output in binary mode;\n\ { print_broken_links(); } - + /* Print the downloaded sum. */ if ((opt.recursive || opt.page_requisites || nurl > 1 diff --git a/src/mswindows.c b/src/mswindows.c index 870d7fda..d3deceda 100644 --- a/src/mswindows.c +++ b/src/mswindows.c @@ -35,7 +35,6 @@ as that of the covered work. */ #include #include #include -#include #include #include diff --git a/src/netrc.c b/src/netrc.c index 5c7efb29..352e3c84 100644 --- a/src/netrc.c +++ b/src/netrc.c @@ -253,7 +253,7 @@ static void shift_left(char *string) { char *p; - + for (p=string; *p; ++p) *p = *(p+1); } diff --git a/src/openssl.c b/src/openssl.c index 6f591f3f..b85a0422 100644 --- a/src/openssl.c +++ b/src/openssl.c @@ -124,7 +124,7 @@ init_prng (void) /* Print errors in the OpenSSL error stack. */ static void -print_errors (void) +print_errors (void) { unsigned long err; while ((err = ERR_get_error ()) != 0) @@ -390,7 +390,7 @@ static struct transport_implementation openssl_transport = { Returns true on success, false on failure. */ bool -ssl_connect_wget (int fd) +ssl_connect_wget (int fd) { SSL *conn; struct openssl_transport_context *ctx; @@ -512,7 +512,7 @@ ssl_check_certificate (int fd, const char *host) char *subject = X509_NAME_oneline (X509_get_subject_name (cert), 0, 0); char *issuer = X509_NAME_oneline (X509_get_issuer_name (cert), 0, 0); DEBUGP (("certificate:\n subject: %s\n issuer: %s\n", - quotearg_style (escape_quoting_style, subject), + quotearg_style (escape_quoting_style, subject), quotearg_style (escape_quoting_style, issuer))); OPENSSL_free (subject); OPENSSL_free (issuer); @@ -524,7 +524,7 @@ ssl_check_certificate (int fd, const char *host) char *issuer = X509_NAME_oneline (X509_get_issuer_name (cert), 0, 0); logprintf (LOG_NOTQUIET, _("%s: cannot verify %s's certificate, issued by %s:\n"), - severity, quotearg_style (escape_quoting_style, host), + severity, quotearg_style (escape_quoting_style, host), quote (issuer)); /* Try to print more user-friendly (and translated) messages for the frequent verification errors. */ @@ -605,7 +605,7 @@ ssl_check_certificate (int fd, const char *host) xentry = X509_NAME_get_entry(xname,i); sdata = X509_NAME_ENTRY_get_data(xentry); - if (strlen (common_name) != ASN1_STRING_length (sdata)) + if (strlen (common_name) != ASN1_STRING_length (sdata)) { logprintf (LOG_NOTQUIET, _("\ %s: certificate common name is invalid (contains a NUL character).\n\ @@ -615,7 +615,7 @@ This may be an indication that the host is not who it claims to be\n\ success = false; } } - + if (success) DEBUGP (("X509 certificate successfully verified and matches host %s\n", diff --git a/src/options.h b/src/options.h index caa7a9cb..a8958637 100644 --- a/src/options.h +++ b/src/options.h @@ -88,7 +88,7 @@ struct options char *user; /* Generic username */ char *passwd; /* Generic password */ bool ask_passwd; /* Ask for password? */ - + bool always_rest; /* Always use REST. */ char *ftp_user; /* FTP username */ char *ftp_passwd; /* FTP password */ @@ -233,7 +233,7 @@ struct options prefer_none } prefer_family; /* preferred address family when more than one type is available */ - + bool content_disposition; /* Honor HTTP Content-Disposition header. */ bool auth_without_challenge; /* Issue Basic authentication creds without waiting for a challenge. */ diff --git a/src/progress.c b/src/progress.c index 1ed1b730..00f2a937 100644 --- a/src/progress.c +++ b/src/progress.c @@ -715,7 +715,7 @@ update_speed_ring (struct bar_progress *bp, wgint howmuch, double dltime) if (bp->stalled) { bp->stalled = false; - /* "recent_age" includes the the entired stalled period, which + /* "recent_age" includes the entired stalled period, which could be very long. Don't update the speed ring with that value because the current bandwidth would start too small. Start with an arbitrary (but more reasonable) time value and diff --git a/src/ptimer.c b/src/ptimer.c index 843d9226..ad1e878a 100644 --- a/src/ptimer.c +++ b/src/ptimer.c @@ -353,7 +353,7 @@ ptimer_reset (struct ptimer *pt) } /* Measure the elapsed time since timer creation/reset. This causes - the timer to internally call clock_gettime (or gettimeofday, etc.) + the timer to internally call clock_gettime (or gettimeofday, etc.) to update its idea of current time. The time is returned, but is also stored for later access through ptimer_read(). diff --git a/src/res.c b/src/res.c index 1260e7da..679a4746 100644 --- a/src/res.c +++ b/src/res.c @@ -590,7 +590,7 @@ is_robots_txt_url (const char *url) bool ret = are_urls_equal (url, robots_url); xfree (robots_url); - + return ret; } @@ -626,10 +626,10 @@ test_is_robots_txt_url() { "http://www.yoyodyne.com/somepath/", false }, { "http://www.yoyodyne.com/somepath/robots.txt", false }, }; - - for (i = 0; i < sizeof(test_array)/sizeof(test_array[0]); ++i) + + for (i = 0; i < sizeof(test_array)/sizeof(test_array[0]); ++i) { - mu_assert ("test_is_robots_txt_url: wrong result", + mu_assert ("test_is_robots_txt_url: wrong result", is_robots_txt_url (test_array[i].url) == test_array[i].expected_result); } diff --git a/src/snprintf.c b/src/snprintf.c index 2f2698be..4478f6f3 100644 --- a/src/snprintf.c +++ b/src/snprintf.c @@ -44,9 +44,9 @@ * original. Also, there is now a builtin-test, just compile with: * gcc -DTEST_SNPRINTF -o snprintf snprintf.c -lm * and run snprintf for results. - * + * * Thomas Roessler 01/27/98 for mutt 0.89i - * The PGP code was using unsigned hexadecimal formats. + * The PGP code was using unsigned hexadecimal formats. * Unfortunately, unsigned formats simply didn't work. * * Michael Elkins 03/05/98 for mutt 0.90.8 @@ -188,7 +188,7 @@ static int dopr (char *buffer, size_t maxlen, const char *format, va_list args) int cflags; int total; size_t currlen; - + state = DP_S_DEFAULT; currlen = flags = cflags = min = 0; max = -1; @@ -200,17 +200,17 @@ static int dopr (char *buffer, size_t maxlen, const char *format, va_list args) if (ch == '\0') state = DP_S_DONE; - switch(state) + switch(state) { case DP_S_DEFAULT: - if (ch == '%') + if (ch == '%') state = DP_S_FLAGS; - else + else total += dopr_outch (buffer, &currlen, maxlen, ch); ch = *format++; break; case DP_S_FLAGS: - switch (ch) + switch (ch) { case '-': flags |= DP_F_MINUS; @@ -242,23 +242,23 @@ static int dopr (char *buffer, size_t maxlen, const char *format, va_list args) { min = 10*min + char_to_int (ch); ch = *format++; - } - else if (ch == '*') + } + else if (ch == '*') { min = va_arg (args, int); ch = *format++; state = DP_S_DOT; - } - else + } + else state = DP_S_DOT; break; case DP_S_DOT: - if (ch == '.') + if (ch == '.') { state = DP_S_MAX; ch = *format++; - } - else + } + else state = DP_S_MOD; break; case DP_S_MAX: @@ -268,18 +268,18 @@ static int dopr (char *buffer, size_t maxlen, const char *format, va_list args) max = 0; max = 10*max + char_to_int (ch); ch = *format++; - } - else if (ch == '*') + } + else if (ch == '*') { max = va_arg (args, int); ch = *format++; state = DP_S_MOD; - } - else + } + else state = DP_S_MOD; break; case DP_S_MOD: - switch (ch) + switch (ch) { case 'h': cflags = DP_C_SHORT; @@ -314,11 +314,11 @@ static int dopr (char *buffer, size_t maxlen, const char *format, va_list args) state = DP_S_CONV; break; case DP_S_CONV: - switch (ch) + switch (ch) { case 'd': case 'i': - if (cflags == DP_C_SHORT) + if (cflags == DP_C_SHORT) value = (short int) va_arg (args, int); else if (cflags == DP_C_LONG) value = va_arg (args, long int); @@ -408,25 +408,25 @@ static int dopr (char *buffer, size_t maxlen, const char *format, va_list args) max, flags); break; case 'n': - if (cflags == DP_C_SHORT) + if (cflags == DP_C_SHORT) { short int *num; num = va_arg (args, short int *); *num = currlen; } - else if (cflags == DP_C_LONG) + else if (cflags == DP_C_LONG) { long int *num; num = va_arg (args, long int *); *num = currlen; - } - else if (cflags == DP_C_LLONG) + } + else if (cflags == DP_C_LLONG) { LLONG *num; num = va_arg (args, LLONG *); *num = currlen; - } - else + } + else { int *num; num = va_arg (args, int *); @@ -458,9 +458,9 @@ static int dopr (char *buffer, size_t maxlen, const char *format, va_list args) } if (buffer != NULL) { - if (currlen < maxlen - 1) + if (currlen < maxlen - 1) buffer[currlen] = '\0'; - else + else buffer[maxlen - 1] = '\0'; } return total; @@ -472,7 +472,7 @@ static int fmtstr (char *buffer, size_t *currlen, size_t maxlen, int padlen, strln; /* amount to pad */ int cnt = 0; int total = 0; - + if (value == 0) { value = "(null)"; @@ -486,9 +486,9 @@ static int fmtstr (char *buffer, size_t *currlen, size_t maxlen, for (strln = 0; strln < max && value[strln]; ++strln) ; padlen = min - strln; - if (padlen < 0) + if (padlen < 0) padlen = 0; - if (flags & DP_F_MINUS) + if (flags & DP_F_MINUS) padlen = -padlen; /* Left Justify */ while (padlen > 0) @@ -522,7 +522,7 @@ static int fmtint (char *buffer, size_t *currlen, size_t maxlen, int zpadlen = 0; /* amount to zero pad */ const char *digits; int total = 0; - + if (max < 0) max = 0; @@ -541,7 +541,7 @@ static int fmtint (char *buffer, size_t *currlen, size_t maxlen, if (flags & DP_F_SPACE) signvalue = ' '; } - + if (flags & DP_F_UP) /* Should characters be upper case? */ digits = "0123456789ABCDEF"; @@ -564,7 +564,7 @@ static int fmtint (char *buffer, size_t *currlen, size_t maxlen, zpadlen = MAX(zpadlen, spadlen); spadlen = 0; } - if (flags & DP_F_MINUS) + if (flags & DP_F_MINUS) spadlen = -spadlen; /* Left Justifty */ #ifdef DEBUG_SNPRINTF @@ -573,18 +573,18 @@ static int fmtint (char *buffer, size_t *currlen, size_t maxlen, #endif /* Spaces */ - while (spadlen > 0) + while (spadlen > 0) { total += dopr_outch (buffer, currlen, maxlen, ' '); --spadlen; } /* Sign */ - if (signvalue) + if (signvalue) total += dopr_outch (buffer, currlen, maxlen, signvalue); /* Zeros */ - if (zpadlen > 0) + if (zpadlen > 0) { while (zpadlen > 0) { @@ -594,9 +594,9 @@ static int fmtint (char *buffer, size_t *currlen, size_t maxlen, } /* Digits */ - while (place > 0) + while (place > 0) total += dopr_outch (buffer, currlen, maxlen, convert[--place]); - + /* Left Justified spaces */ while (spadlen < 0) { total += dopr_outch (buffer, currlen, maxlen, ' '); @@ -625,7 +625,7 @@ static LDOUBLE pow10_int (int exp) result *= 10; exp--; } - + return result; } @@ -651,7 +651,7 @@ static int fmtfp (char *buffer, size_t *currlen, size_t maxlen, int iplace = 0; int fplace = 0; int padlen = 0; /* amount to pad */ - int zpadlen = 0; + int zpadlen = 0; int total = 0; LLONG intpart; LLONG fracpart; @@ -659,8 +659,8 @@ static int fmtfp (char *buffer, size_t *currlen, size_t maxlen, int leadingfrac0s = 0; /* zeros at the start of fractional part */ int omitzeros = 0; int omitcount = 0; - - /* + + /* * AIX manpage says the default is 0, but Solaris says the default * is 6, and sprintf on AIX defaults to 6 */ @@ -719,7 +719,7 @@ static int fmtfp (char *buffer, size_t *currlen, size_t maxlen, # define MAX_DIGITS 9 /* just long */ #endif - /* + /* * Sorry, we only support several digits past the decimal because of * our conversion method */ @@ -780,14 +780,14 @@ static int fmtfp (char *buffer, size_t *currlen, size_t maxlen, zpadlen = max - fplace; if (zpadlen < 0) zpadlen = 0; - if (padlen < 0) + if (padlen < 0) padlen = 0; - if (flags & DP_F_MINUS) + if (flags & DP_F_MINUS) padlen = -padlen; /* Left Justifty */ - if ((flags & DP_F_ZERO) && (padlen > 0)) + if ((flags & DP_F_ZERO) && (padlen > 0)) { - if (signvalue) + if (signvalue) { total += dopr_outch (buffer, currlen, maxlen, signvalue); --padlen; @@ -804,10 +804,10 @@ static int fmtfp (char *buffer, size_t *currlen, size_t maxlen, total += dopr_outch (buffer, currlen, maxlen, ' '); --padlen; } - if (signvalue) + if (signvalue) total += dopr_outch (buffer, currlen, maxlen, signvalue); - while (iplace > 0) + while (iplace > 0) total += dopr_outch (buffer, currlen, maxlen, iconvert[--iplace]); /* @@ -818,7 +818,7 @@ static int fmtfp (char *buffer, size_t *currlen, size_t maxlen, { total += dopr_outch (buffer, currlen, maxlen, '.'); - while (fplace > omitcount) + while (fplace > omitcount) total += dopr_outch (buffer, currlen, maxlen, fconvert[--fplace]); } @@ -828,7 +828,7 @@ static int fmtfp (char *buffer, size_t *currlen, size_t maxlen, --zpadlen; } - while (padlen < 0) + while (padlen < 0) { total += dopr_outch (buffer, currlen, maxlen, ' '); ++padlen; @@ -912,7 +912,7 @@ int main (void) #endif NULL }; - double fp_nums[] = { -1.5, 134.21, 91340.2, 341.1234, 0203.9, 0.96, 0.996, + double fp_nums[] = { -1.5, 134.21, 91340.2, 341.1234, 0203.9, 0.96, 0.996, 0.9996, 1.996, 4.136, 0.00205, 0.0001, 321.000009, 0}; char *int_fmt[] = { @@ -963,7 +963,7 @@ int main (void) sprintf (buf2, fp_fmt[x], fp_nums[y]); if (strcmp (buf1, buf2)) { - printf("snprintf doesn't match Format: %s\n\tsnprintf = %s\n\tsprintf = %s\n", + printf("snprintf doesn't match Format: %s\n\tsnprintf = %s\n\tsprintf = %s\n", fp_fmt[x], buf1, buf2); fail++; } @@ -977,7 +977,7 @@ int main (void) sprintf (buf2, int_fmt[x], int_nums[y]); if (strcmp (buf1, buf2)) { - printf("snprintf doesn't match Format: %s\n\tsnprintf = %s\n\tsprintf = %s\n", + printf("snprintf doesn't match Format: %s\n\tsnprintf = %s\n\tsprintf = %s\n", int_fmt[x], buf1, buf2); fail++; } @@ -992,7 +992,7 @@ int main (void) sprintf (buf2, llong_fmt[x], llong_nums[y]); if (strcmp (buf1, buf2)) { - printf("snprintf doesn't match Format: %s\n\tsnprintf = %s\n\tsprintf = %s\n", + printf("snprintf doesn't match Format: %s\n\tsnprintf = %s\n\tsprintf = %s\n", llong_fmt[x], buf1, buf2); fail++; } diff --git a/src/spider.c b/src/spider.c index cefff739..b540b95f 100644 --- a/src/spider.c +++ b/src/spider.c @@ -68,26 +68,26 @@ print_broken_links (void) { hash_table_iterator iter; int num_elems; - - if (!nonexisting_urls_set) + + if (!nonexisting_urls_set) { logprintf (LOG_NOTQUIET, _("Found no broken links.\n\n")); return; } - + num_elems = hash_table_count (nonexisting_urls_set); assert (num_elems > 0); logprintf (LOG_NOTQUIET, ngettext("Found %d broken link.\n\n", "Found %d broken links.\n\n", num_elems), num_elems); - + for (hash_table_iterate (nonexisting_urls_set, &iter); hash_table_iter_next (&iter); ) { /* Struct url_list *list; */ const char *url = (const char *) iter.key; - + logprintf (LOG_NOTQUIET, _("%s\n"), url); } logputs (LOG_NOTQUIET, "\n"); diff --git a/src/test.c b/src/test.c index 4e67b923..2d7e41f8 100644 --- a/src/test.c +++ b/src/test.c @@ -60,32 +60,32 @@ all_tests() mu_run_test (test_append_uri_pathel); mu_run_test (test_are_urls_equal); mu_run_test (test_is_robots_txt_url); - + return NULL; } char *program_name; /* Needed by lib/error.c. */ int -main (int argc, char *argv[]) +main (int argc, char *argv[]) { const char *result; program_name = argv[0]; result = all_tests(); - - if (result != NULL) + + if (result != NULL) { puts (result); } - else + else { printf ("ALL TESTS PASSED\n"); } - + printf ("Tests run: %d\n", tests_run); - + return result != 0; } diff --git a/src/url.c b/src/url.c index ed4a0f46..d0b94a98 100644 --- a/src/url.c +++ b/src/url.c @@ -1432,7 +1432,7 @@ append_uri_pathel (const char *b, const char *e, bool escaped, } assert (q - TAIL (dest) == outlen); } - + /* Perform inline case transformation if required. */ if (opt.restrict_files_case == restrict_lowercase || opt.restrict_files_case == restrict_uppercase) @@ -1446,7 +1446,7 @@ append_uri_pathel (const char *b, const char *e, bool escaped, *q = c_toupper (*q); } } - + TAIL_INCR (dest, outlen); } @@ -1507,7 +1507,7 @@ url_file_name (const struct url *u) /* If an alternative index file was defined, change index_filename */ if (opt.default_page) index_filename = opt.default_page; - + /* Start with the directory prefix, if specified. */ if (opt.dir_prefix) @@ -2019,7 +2019,7 @@ url_string (const struct url *url, enum url_auth_mode auth_mode) } /* Return true if scheme a is similar to scheme b. - + Schemes are similar if they are equal. If SSL is supported, schemes are also similar if one is http (SCHEME_HTTP) and the other is https (SCHEME_HTTPS). */ @@ -2203,18 +2203,18 @@ test_append_uri_pathel() { "http://www.yoyodyne.com/path/", "somepage.html", false, "http://www.yoyodyne.com/path/somepage.html" }, }; - for (i = 0; i < sizeof(test_array)/sizeof(test_array[0]); ++i) + for (i = 0; i < sizeof(test_array)/sizeof(test_array[0]); ++i) { struct growable dest; const char *p = test_array[i].input; - + memset (&dest, 0, sizeof (dest)); - + append_string (test_array[i].original_url, &dest); append_uri_pathel (p, p + strlen(p), test_array[i].escaped, &dest); append_char ('\0', &dest); - mu_assert ("test_append_uri_pathel: wrong result", + mu_assert ("test_append_uri_pathel: wrong result", strcmp (dest.base, test_array[i].expected_result) == 0); } @@ -2237,10 +2237,10 @@ test_are_urls_equal() { "http://www.adomain.com/longer-path/", "http://www.adomain.com/path/", false }, { "http://www.adomain.com/path%2f", "http://www.adomain.com/path/", false }, }; - - for (i = 0; i < sizeof(test_array)/sizeof(test_array[0]); ++i) + + for (i = 0; i < sizeof(test_array)/sizeof(test_array[0]); ++i) { - mu_assert ("test_are_urls_equal: wrong result", + mu_assert ("test_are_urls_equal: wrong result", are_urls_equal (test_array[i].url1, test_array[i].url2) == test_array[i].expected_result); } diff --git a/src/utils.c b/src/utils.c index a9d729d4..bf7b78a1 100644 --- a/src/utils.c +++ b/src/utils.c @@ -90,7 +90,7 @@ as that of the covered work. */ #ifdef TESTING #include "test.h" -#endif +#endif static void memfatal (const char *context, long attempted_size) @@ -271,7 +271,7 @@ sepstring (const char *s) fallback implementation of vsnprintf, this should be portable. */ /* Constant is using for limits memory allocation for text buffer. - Applicable in situation when: vasprintf is not available in the system + Applicable in situation when: vasprintf is not available in the system and vsnprintf return -1 when long line is truncated (in old versions of glibc and in other system where C99 doesn`t support) */ @@ -323,7 +323,7 @@ aprintf (const char *fmt, ...) else if (size >= FMT_MAX_LENGTH) /* We have a huge buffer, */ { /* maybe we have some wrong format string? */ - logprintf (LOG_ALWAYS, + logprintf (LOG_ALWAYS, _("%s: aprintf: text buffer is too big (%ld bytes), " "aborting.\n"), exec_name, size); /* printout a log message */ @@ -696,7 +696,7 @@ unique_create (const char *name, bool binary, char **opened_name) If opening the file fails for any reason, including the file having previously existed, this function returns NULL and sets errno appropriately. */ - + FILE * fopen_excl (const char *fname, int binary) { @@ -890,7 +890,7 @@ acceptable (const char *s) } /* Check if D2 is a subdirectory of D1. E.g. if D1 is `/something', subdir_p() - will return true if and only if D2 begins with `/something/' or is exactly + will return true if and only if D2 begins with `/something/' or is exactly '/something'. */ bool subdir_p (const char *d1, const char *d2) @@ -903,7 +903,7 @@ subdir_p (const char *d1, const char *d2) else for (; *d1 && *d2 && (c_tolower (*d1) == c_tolower (*d2)); ++d1, ++d2) ; - + return *d1 == '\0' && (*d2 == '\0' || *d2 == '/'); } @@ -932,7 +932,7 @@ dir_matches_p (char **dirlist, const char *dir) break; } } - + return *x ? true : false; } @@ -1069,7 +1069,7 @@ has_wildcards_p (const char *s) /* Return true if FNAME ends with a typical HTML suffix. The following (case-insensitive) suffixes are presumed to be HTML files: - + html htm ?html (`?' matches one character) @@ -2368,12 +2368,12 @@ test_subdir_p() { "/somedir", "/somedir/d2", true }, { "/somedir/d1", "/somedir", false }, }; - - for (i = 0; i < countof(test_array); ++i) + + for (i = 0; i < countof(test_array); ++i) { bool res = subdir_p (test_array[i].d1, test_array[i].d2); - mu_assert ("test_subdir_p: wrong result", + mu_assert ("test_subdir_p: wrong result", res == test_array[i].result); } @@ -2405,12 +2405,12 @@ test_dir_matches_p() { { "/Tmp/has", NULL, NULL }, "/Tmp/has space", false }, { { "/Tmp/has", NULL, NULL }, "/Tmp/has,comma", false }, }; - - for (i = 0; i < countof(test_array); ++i) + + for (i = 0; i < countof(test_array); ++i) { bool res = dir_matches_p (test_array[i].dirlist, test_array[i].dir); - - mu_assert ("test_dir_matches_p: wrong result", + + mu_assert ("test_dir_matches_p: wrong result", res == test_array[i].result); } diff --git a/src/wget.h b/src/wget.h index cc25acbc..bc868ff4 100644 --- a/src/wget.h +++ b/src/wget.h @@ -332,20 +332,20 @@ typedef enum /* 0 */ NOCONERROR, HOSTERR, CONSOCKERR, CONERROR, CONSSLERR, CONIMPOSSIBLE, NEWLOCATION, NOTENOUGHMEM /* ! */, - CONPORTERR /* ! */, CONCLOSED /* ! */, + CONPORTERR /* ! */, CONCLOSED /* ! */, /* 10 */ FTPOK, FTPLOGINC, FTPLOGREFUSED, FTPPORTERR, FTPSYSERR, - FTPNSFOD, FTPRETROK /* ! */, FTPUNKNOWNTYPE, FTPRERR, FTPREXC /* ! */, + FTPNSFOD, FTPRETROK /* ! */, FTPUNKNOWNTYPE, FTPRERR, FTPREXC /* ! */, /* 20 */ - FTPSRVERR, FTPRETRINT, FTPRESTFAIL, URLERROR, FOPENERR, + FTPSRVERR, FTPRETRINT, FTPRESTFAIL, URLERROR, FOPENERR, FOPEN_EXCL_ERR, FWRITEERR, HOK /* ! */, HLEXC /* ! */, HEOF, /* 30 */ HERR, RETROK, RECLEVELEXC, FTPACCDENIED /* ! */, WRONGCODE, - FTPINVPASV, FTPNOPASV, CONTNOTSUPPORTED, RETRUNNEEDED, RETRFINISHED, + FTPINVPASV, FTPNOPASV, CONTNOTSUPPORTED, RETRUNNEEDED, RETRFINISHED, /* 40 */ - READERR, TRYLIMEXC, URLBADPATTERN /* ! */, FILEBADFILE /* ! */, RANGEERR, + READERR, TRYLIMEXC, URLBADPATTERN /* ! */, FILEBADFILE /* ! */, RANGEERR, RETRBADPATTERN, RETNOTSUP /* ! */, ROBOTSOK /* ! */, NOROBOTS /* ! */, - PROXERR, + PROXERR, /* 50 */ AUTHFAILED, QUOTEXC, WRITEFAILED, SSLINITFAILED, VERIFCERTERR } uerr_t; diff --git a/tests/ChangeLog b/tests/ChangeLog index 2da6ef70..7a0c6b8d 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -206,7 +206,7 @@ 2009-04-11 Steven Schubiger - * run-px: Skip testing with real rc files by setting + * run-px: Skip testing with real rc files by setting SYSTEM_WGETRC and WGETRC to /dev/null. 2009-02-25 Benjamin Wolsey @@ -230,8 +230,8 @@ * Test-auth-basic.px, Test-auth-no-challenge.px, Test-auth-no-challenge-url.px, Test-c-full.px, Test-c-partial.px, Test-c.px, Test-c-shorter.px, - Test-E-k-K.px, Test-E-k.px, Test-ftp.px, - Test-HTTP-Content-Disposition-1.px, + Test-E-k-K.px, Test-E-k.px, Test-ftp.px, + Test-HTTP-Content-Disposition-1.px, Test-HTTP-Content-Disposition-2.px, Test-HTTP-Content-Disposition.px, Test-N-current.px, Test-N-HTTP-Content-Disposition.px, @@ -240,9 +240,9 @@ Test-N-no-info.px, Test--no-content-disposition.px, Test--no-content-disposition-trivial.px, Test-N-old.px, Test-nonexisting-quiet.px, Test-noop.px, Test-np.px, - Test-N.px, Test-N-smaller.px, + Test-N.px, Test-N-smaller.px, Test-O-HTTP-Content-Disposition.px, Test-O-nc.px, - Test-O--no-content-disposition.px, + Test-O--no-content-disposition.px, Test-O--no-content-disposition-trivial.px, Test-O-nonexisting.px, Test-O.px, Test-proxy-auth-basic.px, Test-Restrict-Lowercase.px, @@ -646,7 +646,7 @@ 2006-05-26 Mauro Tortonesi - * HTTPServer.pm: Fixed bug when returning 404. Improved logging. + * HTTPServer.pm: Fixed bug when returning 404. Improved logging. * Test.pm: Added support for command lines which use an absolute path for the Wget binary. @@ -671,7 +671,7 @@ * HTTPTest.pm: Updated to new test format. - * Test.pm: Improved test setup, verification and cleanup. Major + * Test.pm: Improved test setup, verification and cleanup. Major refactoring. * Test1.px: Updated to new test format. @@ -685,17 +685,17 @@ 2005-12-05 Mauro Tortonesi - * HTTPServer.pm: Refactored as a subclass of HTTP::Daemon. - Removed the old run method and renamed the old run_daemon - method to run. Added support for partial + * HTTPServer.pm: Refactored as a subclass of HTTP::Daemon. + Removed the old run method and renamed the old run_daemon + method to run. Added support for partial * Testing.pm: Renamed to HTTPTest.pm. - * HTTPTest.pm: Refactored as a subclass of Test. Renamed - Run_HTTP_Test to run, verify_download to _verify_download + * HTTPTest.pm: Refactored as a subclass of Test. Renamed + Run_HTTP_Test to run, verify_download to _verify_download and added support for timestamp checking. - * Test.pm: Added Test class as the super class of every + * Test.pm: Added Test class as the super class of every testcase. * test1: Renamed to Test1.px. diff --git a/tests/FTPServer.pm b/tests/FTPServer.pm index dd065387..2758ab1e 100644 --- a/tests/FTPServer.pm +++ b/tests/FTPServer.pm @@ -457,7 +457,7 @@ sub __open_data_connection $_attr_data{$attr}; } - sub _standard_keys + sub _standard_keys { keys %_attr_data; } @@ -562,10 +562,10 @@ sub run print STDERR "in child\n" if $log; - my $conn = { + my $conn = { 'paths' => FTPPaths->new($self->{'_input'}, $self->{'_server_behavior'}), - 'socket' => $socket, + 'socket' => $socket, 'state' => $_connection_states{NEWCONN}, 'dir' => '/', 'restart' => 0, @@ -778,7 +778,7 @@ sub get_list { my $info = $self->get_info($path); return undef unless defined $info; my $list = []; - + if ($info->{'_type'} eq 'd') { for my $item (keys %$info) { next if $item =~ /^_/; diff --git a/tests/FTPTest.pm b/tests/FTPTest.pm index a820ef51..c1d3d266 100644 --- a/tests/FTPTest.pm +++ b/tests/FTPTest.pm @@ -21,7 +21,7 @@ my $VERSION = 0.01; return $self->SUPER::_default_for($attr); } - sub _standard_keys + sub _standard_keys { my ($self) = @_; ($self->SUPER::_standard_keys(), keys %_attr_data); diff --git a/tests/Test--no-content-disposition-trivial.px b/tests/Test--no-content-disposition-trivial.px index 43eb7bfd..26e18208 100755 --- a/tests/Test--no-content-disposition-trivial.px +++ b/tests/Test--no-content-disposition-trivial.px @@ -46,9 +46,9 @@ my %expected_downloaded_files = ( ############################################################################### my $the_test = HTTPTest->new (name => "Test--no-content-disposition-trivial", - input => \%urls, - cmdline => $cmdline, - errcode => $expected_error_code, + input => \%urls, + cmdline => $cmdline, + errcode => $expected_error_code, output => \%expected_downloaded_files); exit $the_test->run(); diff --git a/tests/Test--no-content-disposition.px b/tests/Test--no-content-disposition.px index 7736a2e5..2327d6d9 100755 --- a/tests/Test--no-content-disposition.px +++ b/tests/Test--no-content-disposition.px @@ -47,9 +47,9 @@ my %expected_downloaded_files = ( ############################################################################### my $the_test = HTTPTest->new (name => "Test--no-content-disposition", - input => \%urls, - cmdline => $cmdline, - errcode => $expected_error_code, + input => \%urls, + cmdline => $cmdline, + errcode => $expected_error_code, output => \%expected_downloaded_files); exit $the_test->run(); diff --git a/tests/Test--spider-fail.px b/tests/Test--spider-fail.px index ac8f5e6d..39974dae 100755 --- a/tests/Test--spider-fail.px +++ b/tests/Test--spider-fail.px @@ -43,9 +43,9 @@ my %expected_downloaded_files = ( ############################################################################### my $the_test = HTTPTest->new (name => "Test--spider-fail", - input => \%urls, - cmdline => $cmdline, - errcode => $expected_error_code, + input => \%urls, + cmdline => $cmdline, + errcode => $expected_error_code, output => \%expected_downloaded_files); exit $the_test->run(); diff --git a/tests/Test--spider-r--no-content-disposition-trivial.px b/tests/Test--spider-r--no-content-disposition-trivial.px index d18be997..ed6e46eb 100755 --- a/tests/Test--spider-r--no-content-disposition-trivial.px +++ b/tests/Test--spider-r--no-content-disposition-trivial.px @@ -100,9 +100,9 @@ my %expected_downloaded_files = ( ############################################################################### my $the_test = HTTPTest->new (name => "Test--spider-r--no-content-disposition-trivial", - input => \%urls, - cmdline => $cmdline, - errcode => $expected_error_code, + input => \%urls, + cmdline => $cmdline, + errcode => $expected_error_code, output => \%expected_downloaded_files); exit $the_test->run(); diff --git a/tests/Test--spider-r--no-content-disposition.px b/tests/Test--spider-r--no-content-disposition.px index b4c80ea0..831a9388 100755 --- a/tests/Test--spider-r--no-content-disposition.px +++ b/tests/Test--spider-r--no-content-disposition.px @@ -101,9 +101,9 @@ my %expected_downloaded_files = ( ############################################################################### my $the_test = HTTPTest->new (name => "Test--spider-r--no-content-disposition", - input => \%urls, - cmdline => $cmdline, - errcode => $expected_error_code, + input => \%urls, + cmdline => $cmdline, + errcode => $expected_error_code, output => \%expected_downloaded_files); exit $the_test->run(); diff --git a/tests/Test--spider-r-HTTP-Content-Disposition.px b/tests/Test--spider-r-HTTP-Content-Disposition.px index a2cc5741..768659b5 100755 --- a/tests/Test--spider-r-HTTP-Content-Disposition.px +++ b/tests/Test--spider-r-HTTP-Content-Disposition.px @@ -101,9 +101,9 @@ my %expected_downloaded_files = ( ############################################################################### my $the_test = HTTPTest->new (name => "Test--spider-r-HTTP-Content-Disposition", - input => \%urls, - cmdline => $cmdline, - errcode => $expected_error_code, + input => \%urls, + cmdline => $cmdline, + errcode => $expected_error_code, output => \%expected_downloaded_files); exit $the_test->run(); diff --git a/tests/Test--spider-r.px b/tests/Test--spider-r.px index b7ad76c9..e0e424b6 100755 --- a/tests/Test--spider-r.px +++ b/tests/Test--spider-r.px @@ -100,9 +100,9 @@ my %expected_downloaded_files = ( ############################################################################### my $the_test = HTTPTest->new (name => "Test--spider-r", - input => \%urls, - cmdline => $cmdline, - errcode => $expected_error_code, + input => \%urls, + cmdline => $cmdline, + errcode => $expected_error_code, output => \%expected_downloaded_files); exit $the_test->run(); diff --git a/tests/Test--spider.px b/tests/Test--spider.px index 6e8ba499..3b5bc150 100755 --- a/tests/Test--spider.px +++ b/tests/Test--spider.px @@ -43,9 +43,9 @@ my %expected_downloaded_files = ( ############################################################################### my $the_test = HTTPTest->new (name => "Test--spider", - input => \%urls, - cmdline => $cmdline, - errcode => $expected_error_code, + input => \%urls, + cmdline => $cmdline, + errcode => $expected_error_code, output => \%expected_downloaded_files); exit $the_test->run(); diff --git a/tests/Test-E-k-K.px b/tests/Test-E-k-K.px index 4a2cf614..07197a3b 100755 --- a/tests/Test-E-k-K.px +++ b/tests/Test-E-k-K.px @@ -80,9 +80,9 @@ my %expected_downloaded_files = ( ############################################################################### my $the_test = HTTPTest->new (name => "Test-E-k-K", - input => \%urls, - cmdline => $cmdline, - errcode => $expected_error_code, + input => \%urls, + cmdline => $cmdline, + errcode => $expected_error_code, output => \%expected_downloaded_files); exit $the_test->run(); diff --git a/tests/Test-E-k.px b/tests/Test-E-k.px index 40d6b6dc..48fb52dd 100755 --- a/tests/Test-E-k.px +++ b/tests/Test-E-k.px @@ -77,9 +77,9 @@ my %expected_downloaded_files = ( ############################################################################### my $the_test = HTTPTest->new (name => "Test-E-k", - input => \%urls, - cmdline => $cmdline, - errcode => $expected_error_code, + input => \%urls, + cmdline => $cmdline, + errcode => $expected_error_code, output => \%expected_downloaded_files); exit $the_test->run(); diff --git a/tests/Test-HTTP-Content-Disposition-1.px b/tests/Test-HTTP-Content-Disposition-1.px index 3d270143..1ee5e25d 100755 --- a/tests/Test-HTTP-Content-Disposition-1.px +++ b/tests/Test-HTTP-Content-Disposition-1.px @@ -66,9 +66,9 @@ my %expected_downloaded_files = ( ############################################################################### my $the_test = HTTPTest->new (name => "Test-HTTP-Content-Disposition-1", - input => \%urls, - cmdline => $cmdline, - errcode => $expected_error_code, + input => \%urls, + cmdline => $cmdline, + errcode => $expected_error_code, existing => \%existing_files, output => \%expected_downloaded_files); exit $the_test->run(); diff --git a/tests/Test-HTTP-Content-Disposition-2.px b/tests/Test-HTTP-Content-Disposition-2.px index 6550d36f..d424fcc2 100755 --- a/tests/Test-HTTP-Content-Disposition-2.px +++ b/tests/Test-HTTP-Content-Disposition-2.px @@ -66,9 +66,9 @@ my %expected_downloaded_files = ( ############################################################################### my $the_test = HTTPTest->new (name => "Test-HTTP-Content-Disposition-2", - input => \%urls, - cmdline => $cmdline, - errcode => $expected_error_code, + input => \%urls, + cmdline => $cmdline, + errcode => $expected_error_code, existing => \%existing_files, output => \%expected_downloaded_files); exit $the_test->run(); diff --git a/tests/Test-HTTP-Content-Disposition.px b/tests/Test-HTTP-Content-Disposition.px index afc964a4..19cc908d 100755 --- a/tests/Test-HTTP-Content-Disposition.px +++ b/tests/Test-HTTP-Content-Disposition.px @@ -47,9 +47,9 @@ my %expected_downloaded_files = ( ############################################################################### my $the_test = HTTPTest->new (name => "Test-HTTP-Content-Disposition", - input => \%urls, - cmdline => $cmdline, - errcode => $expected_error_code, + input => \%urls, + cmdline => $cmdline, + errcode => $expected_error_code, output => \%expected_downloaded_files); exit $the_test->run(); diff --git a/tests/Test-N--no-content-disposition-trivial.px b/tests/Test-N--no-content-disposition-trivial.px index 83f0e4ed..cd65b28b 100755 --- a/tests/Test-N--no-content-disposition-trivial.px +++ b/tests/Test-N--no-content-disposition-trivial.px @@ -39,9 +39,9 @@ my %expected_downloaded_files = ( ############################################################################### my $the_test = HTTPTest->new (name => "Test-N--no-content-disposition-trivial", - input => \%urls, - cmdline => $cmdline, - errcode => $expected_error_code, + input => \%urls, + cmdline => $cmdline, + errcode => $expected_error_code, output => \%expected_downloaded_files); exit $the_test->run(); diff --git a/tests/Test-N--no-content-disposition.px b/tests/Test-N--no-content-disposition.px index f142d306..074327c6 100755 --- a/tests/Test-N--no-content-disposition.px +++ b/tests/Test-N--no-content-disposition.px @@ -40,9 +40,9 @@ my %expected_downloaded_files = ( ############################################################################### my $the_test = HTTPTest->new (name => "Test-N--no-content-disposition", - input => \%urls, - cmdline => $cmdline, - errcode => $expected_error_code, + input => \%urls, + cmdline => $cmdline, + errcode => $expected_error_code, output => \%expected_downloaded_files); exit $the_test->run(); diff --git a/tests/Test-N-HTTP-Content-Disposition.px b/tests/Test-N-HTTP-Content-Disposition.px index d33155e4..937868b4 100755 --- a/tests/Test-N-HTTP-Content-Disposition.px +++ b/tests/Test-N-HTTP-Content-Disposition.px @@ -41,9 +41,9 @@ my %expected_downloaded_files = ( ############################################################################### my $the_test = HTTPTest->new (name => "Test-N-HTTP-Content-Disposition", - input => \%urls, - cmdline => $cmdline, - errcode => $expected_error_code, + input => \%urls, + cmdline => $cmdline, + errcode => $expected_error_code, output => \%expected_downloaded_files); exit $the_test->run(); diff --git a/tests/Test-N-current.px b/tests/Test-N-current.px index 0ef47289..fcb3e8ed 100755 --- a/tests/Test-N-current.px +++ b/tests/Test-N-current.px @@ -55,9 +55,9 @@ my %expected_downloaded_files = ( ############################################################################### my $the_test = HTTPTest->new (name => "Test-N-current", - input => \%urls, - cmdline => $cmdline, - errcode => $expected_error_code, + input => \%urls, + cmdline => $cmdline, + errcode => $expected_error_code, existing => \%existing_files, output => \%expected_downloaded_files); exit $the_test->run(); diff --git a/tests/Test-N-no-info.px b/tests/Test-N-no-info.px index 9dec6eda..3d6e0d56 100755 --- a/tests/Test-N-no-info.px +++ b/tests/Test-N-no-info.px @@ -53,9 +53,9 @@ my %expected_downloaded_files = ( ############################################################################### my $the_test = HTTPTest->new (name => "Test-N-current", - input => \%urls, - cmdline => $cmdline, - errcode => $expected_error_code, + input => \%urls, + cmdline => $cmdline, + errcode => $expected_error_code, existing => \%existing_files, output => \%expected_downloaded_files); exit $the_test->run(); diff --git a/tests/Test-N-old.px b/tests/Test-N-old.px index fe16dbfb..b9faa55e 100755 --- a/tests/Test-N-old.px +++ b/tests/Test-N-old.px @@ -53,9 +53,9 @@ my %expected_downloaded_files = ( ############################################################################### my $the_test = HTTPTest->new (name => "Test-N-old", - input => \%urls, - cmdline => $cmdline, - errcode => $expected_error_code, + input => \%urls, + cmdline => $cmdline, + errcode => $expected_error_code, existing => \%existing_files, output => \%expected_downloaded_files); exit $the_test->run(); diff --git a/tests/Test-N-smaller.px b/tests/Test-N-smaller.px index e5dceae6..3d075205 100755 --- a/tests/Test-N-smaller.px +++ b/tests/Test-N-smaller.px @@ -56,9 +56,9 @@ my %expected_downloaded_files = ( ############################################################################### my $the_test = HTTPTest->new (name => "Test-N-current", - input => \%urls, - cmdline => $cmdline, - errcode => $expected_error_code, + input => \%urls, + cmdline => $cmdline, + errcode => $expected_error_code, existing => \%existing_files, output => \%expected_downloaded_files); exit $the_test->run(); diff --git a/tests/Test-N.px b/tests/Test-N.px index 2f139b51..66c97a43 100755 --- a/tests/Test-N.px +++ b/tests/Test-N.px @@ -39,9 +39,9 @@ my %expected_downloaded_files = ( ############################################################################### my $the_test = HTTPTest->new (name => "Test-N", - input => \%urls, - cmdline => $cmdline, - errcode => $expected_error_code, + input => \%urls, + cmdline => $cmdline, + errcode => $expected_error_code, output => \%expected_downloaded_files); exit $the_test->run(); diff --git a/tests/Test-O--no-content-disposition-trivial.px b/tests/Test-O--no-content-disposition-trivial.px index 75a3e6f1..379bca03 100755 --- a/tests/Test-O--no-content-disposition-trivial.px +++ b/tests/Test-O--no-content-disposition-trivial.px @@ -37,9 +37,9 @@ my %expected_downloaded_files = ( ############################################################################### my $the_test = HTTPTest->new (name => "Test-O--no-content-disposition-trivial", - input => \%urls, - cmdline => $cmdline, - errcode => $expected_error_code, + input => \%urls, + cmdline => $cmdline, + errcode => $expected_error_code, output => \%expected_downloaded_files); exit $the_test->run(); diff --git a/tests/Test-O--no-content-disposition.px b/tests/Test-O--no-content-disposition.px index 3369ec42..3c57f054 100755 --- a/tests/Test-O--no-content-disposition.px +++ b/tests/Test-O--no-content-disposition.px @@ -38,9 +38,9 @@ my %expected_downloaded_files = ( ############################################################################### my $the_test = HTTPTest->new (name => "Test-O--no-content-disposition", - input => \%urls, - cmdline => $cmdline, - errcode => $expected_error_code, + input => \%urls, + cmdline => $cmdline, + errcode => $expected_error_code, output => \%expected_downloaded_files); exit $the_test->run(); diff --git a/tests/Test-O-HTTP-Content-Disposition.px b/tests/Test-O-HTTP-Content-Disposition.px index e18880a7..4f6e312a 100755 --- a/tests/Test-O-HTTP-Content-Disposition.px +++ b/tests/Test-O-HTTP-Content-Disposition.px @@ -38,9 +38,9 @@ my %expected_downloaded_files = ( ############################################################################### my $the_test = HTTPTest->new (name => "Test-O-HTTP-Content-Disposition", - input => \%urls, - cmdline => $cmdline, - errcode => $expected_error_code, + input => \%urls, + cmdline => $cmdline, + errcode => $expected_error_code, output => \%expected_downloaded_files); exit $the_test->run(); diff --git a/tests/Test-O-nc.px b/tests/Test-O-nc.px index 530ac654..dc0265ae 100755 --- a/tests/Test-O-nc.px +++ b/tests/Test-O-nc.px @@ -37,9 +37,9 @@ my %expected_downloaded_files = ( ############################################################################### my $the_test = HTTPTest->new (name => "Test-O-nc", - input => \%urls, - cmdline => $cmdline, - errcode => $expected_error_code, + input => \%urls, + cmdline => $cmdline, + errcode => $expected_error_code, output => \%expected_downloaded_files); exit $the_test->run(); diff --git a/tests/Test-O-nonexisting.px b/tests/Test-O-nonexisting.px index c8df6d72..8d71bb65 100755 --- a/tests/Test-O-nonexisting.px +++ b/tests/Test-O-nonexisting.px @@ -37,9 +37,9 @@ my %expected_downloaded_files = ( ############################################################################### my $the_test = HTTPTest->new (name => "Test-O-nonexisting", - input => \%urls, - cmdline => $cmdline, - errcode => $expected_error_code, + input => \%urls, + cmdline => $cmdline, + errcode => $expected_error_code, output => \%expected_downloaded_files); exit $the_test->run(); diff --git a/tests/Test-O.px b/tests/Test-O.px index 552c6654..2842b553 100755 --- a/tests/Test-O.px +++ b/tests/Test-O.px @@ -37,9 +37,9 @@ my %expected_downloaded_files = ( ############################################################################### my $the_test = HTTPTest->new (name => "Test-O", - input => \%urls, - cmdline => $cmdline, - errcode => $expected_error_code, + input => \%urls, + cmdline => $cmdline, + errcode => $expected_error_code, output => \%expected_downloaded_files); exit $the_test->run(); diff --git a/tests/Test-Restrict-Lowercase.px b/tests/Test-Restrict-Lowercase.px index e5d270dc..e237279b 100755 --- a/tests/Test-Restrict-Lowercase.px +++ b/tests/Test-Restrict-Lowercase.px @@ -46,9 +46,9 @@ my %expected_downloaded_files = ( ############################################################################### my $the_test = HTTPTest->new (name => "Test-Restrict-Lowercase", - input => \%urls, - cmdline => $cmdline, - errcode => $expected_error_code, + input => \%urls, + cmdline => $cmdline, + errcode => $expected_error_code, output => \%expected_downloaded_files); exit $the_test->run(); diff --git a/tests/Test-Restrict-Uppercase.px b/tests/Test-Restrict-Uppercase.px index 1175fbd2..afbae15f 100755 --- a/tests/Test-Restrict-Uppercase.px +++ b/tests/Test-Restrict-Uppercase.px @@ -46,9 +46,9 @@ my %expected_downloaded_files = ( ############################################################################### my $the_test = HTTPTest->new (name => "Test-Restrict-Uppercase", - input => \%urls, - cmdline => $cmdline, - errcode => $expected_error_code, + input => \%urls, + cmdline => $cmdline, + errcode => $expected_error_code, output => \%expected_downloaded_files); exit $the_test->run(); diff --git a/tests/Test-auth-basic.px b/tests/Test-auth-basic.px index e60be4c7..09ea6907 100755 --- a/tests/Test-auth-basic.px +++ b/tests/Test-auth-basic.px @@ -39,9 +39,9 @@ my %expected_downloaded_files = ( ############################################################################### my $the_test = HTTPTest->new (name => "Test-auth-basic", - input => \%urls, - cmdline => $cmdline, - errcode => $expected_error_code, + input => \%urls, + cmdline => $cmdline, + errcode => $expected_error_code, output => \%expected_downloaded_files); exit $the_test->run(); diff --git a/tests/Test-auth-no-challenge-url.px b/tests/Test-auth-no-challenge-url.px index 4b947ed2..dc8dc062 100755 --- a/tests/Test-auth-no-challenge-url.px +++ b/tests/Test-auth-no-challenge-url.px @@ -40,9 +40,9 @@ my %expected_downloaded_files = ( ############################################################################### my $the_test = HTTPTest->new (name => "Test-auth-no-challenge-url", - input => \%urls, - cmdline => $cmdline, - errcode => $expected_error_code, + input => \%urls, + cmdline => $cmdline, + errcode => $expected_error_code, output => \%expected_downloaded_files); exit $the_test->run(); diff --git a/tests/Test-auth-no-challenge.px b/tests/Test-auth-no-challenge.px index ec322844..7678f3fe 100755 --- a/tests/Test-auth-no-challenge.px +++ b/tests/Test-auth-no-challenge.px @@ -41,9 +41,9 @@ my %expected_downloaded_files = ( ############################################################################### my $the_test = HTTPTest->new (name => "Test-auth-no-challenge", - input => \%urls, - cmdline => $cmdline, - errcode => $expected_error_code, + input => \%urls, + cmdline => $cmdline, + errcode => $expected_error_code, output => \%expected_downloaded_files); exit $the_test->run(); diff --git a/tests/Test-auth-with-content-disposition.px b/tests/Test-auth-with-content-disposition.px index a8849d8d..5fd201c3 100755 --- a/tests/Test-auth-with-content-disposition.px +++ b/tests/Test-auth-with-content-disposition.px @@ -40,9 +40,9 @@ my %expected_downloaded_files = ( ############################################################################### my $the_test = HTTPTest->new (name => "Test-auth-with-content-disposition", - input => \%urls, - cmdline => $cmdline, - errcode => $expected_error_code, + input => \%urls, + cmdline => $cmdline, + errcode => $expected_error_code, output => \%expected_downloaded_files); exit $the_test->run(); diff --git a/tests/Test-c-full.px b/tests/Test-c-full.px index 2d107453..1216984d 100755 --- a/tests/Test-c-full.px +++ b/tests/Test-c-full.px @@ -47,9 +47,9 @@ my %expected_downloaded_files = ( ############################################################################### my $the_test = HTTPTest->new (name => "Test-c-full", - input => \%urls, - cmdline => $cmdline, - errcode => $expected_error_code, + input => \%urls, + cmdline => $cmdline, + errcode => $expected_error_code, existing => \%existing_files, output => \%expected_downloaded_files); exit $the_test->run(); diff --git a/tests/Test-c-partial.px b/tests/Test-c-partial.px index 57095472..28030cbc 100755 --- a/tests/Test-c-partial.px +++ b/tests/Test-c-partial.px @@ -57,9 +57,9 @@ my %expected_downloaded_files = ( ############################################################################### my $the_test = HTTPTest->new (name => "Test-c-partial", - input => \%urls, - cmdline => $cmdline, - errcode => $expected_error_code, + input => \%urls, + cmdline => $cmdline, + errcode => $expected_error_code, existing => \%existing_files, output => \%expected_downloaded_files); exit $the_test->run(); diff --git a/tests/Test-c-shorter.px b/tests/Test-c-shorter.px index 9823e746..3342592c 100755 --- a/tests/Test-c-shorter.px +++ b/tests/Test-c-shorter.px @@ -54,9 +54,9 @@ my %expected_downloaded_files = ( ############################################################################### my $the_test = HTTPTest->new (name => "Test-c-partial", - input => \%urls, - cmdline => $cmdline, - errcode => $expected_error_code, + input => \%urls, + cmdline => $cmdline, + errcode => $expected_error_code, existing => \%existing_files, output => \%expected_downloaded_files); exit $the_test->run(); diff --git a/tests/Test-c.px b/tests/Test-c.px index 2fb705f1..3da87714 100755 --- a/tests/Test-c.px +++ b/tests/Test-c.px @@ -44,9 +44,9 @@ my %expected_downloaded_files = ( ############################################################################### my $the_test = HTTPTest->new (name => "Test-c", - input => \%urls, - cmdline => $cmdline, - errcode => $expected_error_code, + input => \%urls, + cmdline => $cmdline, + errcode => $expected_error_code, existing => \%existing_files, output => \%expected_downloaded_files); exit $the_test->run(); diff --git a/tests/Test-cookies-401.px b/tests/Test-cookies-401.px index e1030c3b..ffa9b72b 100755 --- a/tests/Test-cookies-401.px +++ b/tests/Test-cookies-401.px @@ -43,9 +43,9 @@ my %expected_downloaded_files = ( ############################################################################### my $the_test = HTTPTest->new (name => "Test-cookies-401", - input => \%urls, - cmdline => $cmdline, - errcode => $expected_error_code, + input => \%urls, + cmdline => $cmdline, + errcode => $expected_error_code, output => \%expected_downloaded_files); exit $the_test->run(); diff --git a/tests/Test-cookies.px b/tests/Test-cookies.px index ec22ef21..cb4ce069 100755 --- a/tests/Test-cookies.px +++ b/tests/Test-cookies.px @@ -49,9 +49,9 @@ my %expected_downloaded_files = ( ############################################################################### my $the_test = HTTPTest->new (name => "Test-cookies", - input => \%urls, - cmdline => $cmdline, - errcode => $expected_error_code, + input => \%urls, + cmdline => $cmdline, + errcode => $expected_error_code, output => \%expected_downloaded_files); exit $the_test->run(); diff --git a/tests/Test-ftp-bad-list.px b/tests/Test-ftp-bad-list.px index 11a973fd..b0855fce 100755 --- a/tests/Test-ftp-bad-list.px +++ b/tests/Test-ftp-bad-list.px @@ -57,9 +57,9 @@ my %preexisting_files = ( ############################################################################### my $the_test = FTPTest->new (name => "Test-ftp-bad-list", - input => \%urls, - cmdline => $cmdline, - errcode => $expected_error_code, + input => \%urls, + cmdline => $cmdline, + errcode => $expected_error_code, output => \%expected_downloaded_files, existing => \%preexisting_files, server_behavior => {bad_list => 1}); diff --git a/tests/Test-ftp-iri-disabled.px b/tests/Test-ftp-iri-disabled.px index 4ded28ff..53e4b486 100755 --- a/tests/Test-ftp-iri-disabled.px +++ b/tests/Test-ftp-iri-disabled.px @@ -42,9 +42,9 @@ my %expected_downloaded_files = ( ############################################################################### my $the_test = FTPTest->new (name => "Test-ftp-iri", - input => \%urls, - cmdline => $cmdline, - errcode => $expected_error_code, + input => \%urls, + cmdline => $cmdline, + errcode => $expected_error_code, output => \%expected_downloaded_files); exit $the_test->run(); diff --git a/tests/Test-ftp-iri-fallback.px b/tests/Test-ftp-iri-fallback.px index c3f97385..1173a077 100755 --- a/tests/Test-ftp-iri-fallback.px +++ b/tests/Test-ftp-iri-fallback.px @@ -38,9 +38,9 @@ my %expected_downloaded_files = ( ############################################################################### my $the_test = FTPTest->new (name => "Test-ftp-iri", - input => \%urls, - cmdline => $cmdline, - errcode => $expected_error_code, + input => \%urls, + cmdline => $cmdline, + errcode => $expected_error_code, output => \%expected_downloaded_files); exit $the_test->run(); diff --git a/tests/Test-ftp-iri-recursive.px b/tests/Test-ftp-iri-recursive.px index 1a664e95..f0d978f6 100755 --- a/tests/Test-ftp-iri-recursive.px +++ b/tests/Test-ftp-iri-recursive.px @@ -38,9 +38,9 @@ my %expected_downloaded_files = ( ############################################################################### my $the_test = FTPTest->new (name => "Test-ftp-iri-recursive", - input => \%urls, - cmdline => $cmdline, - errcode => $expected_error_code, + input => \%urls, + cmdline => $cmdline, + errcode => $expected_error_code, output => \%expected_downloaded_files); exit $the_test->run(); diff --git a/tests/Test-ftp-iri.px b/tests/Test-ftp-iri.px index 7594a80c..cf2a5815 100755 --- a/tests/Test-ftp-iri.px +++ b/tests/Test-ftp-iri.px @@ -39,9 +39,9 @@ my %expected_downloaded_files = ( ############################################################################### my $the_test = FTPTest->new (name => "Test-ftp-iri", - input => \%urls, - cmdline => $cmdline, - errcode => $expected_error_code, + input => \%urls, + cmdline => $cmdline, + errcode => $expected_error_code, output => \%expected_downloaded_files); exit $the_test->run(); diff --git a/tests/Test-ftp-pasv-fail.px b/tests/Test-ftp-pasv-fail.px index 0a8e26e1..59771b23 100755 --- a/tests/Test-ftp-pasv-fail.px +++ b/tests/Test-ftp-pasv-fail.px @@ -48,9 +48,9 @@ my %expected_downloaded_files = ( my $the_test = FTPTest->new (name => "Test-ftp-pasv-fail", server_behavior => {fail_on_pasv => 1}, - input => \%urls, - cmdline => $cmdline, - errcode => $expected_error_code, + input => \%urls, + cmdline => $cmdline, + errcode => $expected_error_code, output => \%expected_downloaded_files); exit $the_test->run(); diff --git a/tests/Test-ftp-recursive.px b/tests/Test-ftp-recursive.px index 5a86a166..45af5d68 100755 --- a/tests/Test-ftp-recursive.px +++ b/tests/Test-ftp-recursive.px @@ -45,9 +45,9 @@ my %expected_downloaded_files = ( ############################################################################### my $the_test = FTPTest->new (name => "Test-ftp-recursive", - input => \%urls, - cmdline => $cmdline, - errcode => $expected_error_code, + input => \%urls, + cmdline => $cmdline, + errcode => $expected_error_code, output => \%expected_downloaded_files); exit $the_test->run(); diff --git a/tests/Test-ftp.px b/tests/Test-ftp.px index a98d745f..49a96810 100755 --- a/tests/Test-ftp.px +++ b/tests/Test-ftp.px @@ -35,9 +35,9 @@ my %expected_downloaded_files = ( ############################################################################### my $the_test = FTPTest->new (name => "Test-ftp", - input => \%urls, - cmdline => $cmdline, - errcode => $expected_error_code, + input => \%urls, + cmdline => $cmdline, + errcode => $expected_error_code, output => \%expected_downloaded_files); exit $the_test->run(); diff --git a/tests/Test-idn-cmd.px b/tests/Test-idn-cmd.px index 4f92ea0c..49a251ea 100755 --- a/tests/Test-idn-cmd.px +++ b/tests/Test-idn-cmd.px @@ -42,9 +42,9 @@ my %expected_downloaded_files = ( ############################################################################### my $the_test = HTTPTest->new (name => "Test-idn-cmd", - input => \%urls, - cmdline => $cmdline, - errcode => $expected_error_code, + input => \%urls, + cmdline => $cmdline, + errcode => $expected_error_code, output => \%expected_downloaded_files); exit $the_test->run(); diff --git a/tests/Test-idn-headers.px b/tests/Test-idn-headers.px index f5858137..ab12c0f1 100755 --- a/tests/Test-idn-headers.px +++ b/tests/Test-idn-headers.px @@ -57,9 +57,9 @@ my %expected_downloaded_files = ( ############################################################################### my $the_test = HTTPTest->new (name => "Test-idn-headers", - input => \%urls, - cmdline => $cmdline, - errcode => $expected_error_code, + input => \%urls, + cmdline => $cmdline, + errcode => $expected_error_code, output => \%expected_downloaded_files); exit $the_test->run(); diff --git a/tests/Test-idn-meta.px b/tests/Test-idn-meta.px index 199eabe2..fdebe66d 100755 --- a/tests/Test-idn-meta.px +++ b/tests/Test-idn-meta.px @@ -58,9 +58,9 @@ my %expected_downloaded_files = ( ############################################################################### my $the_test = HTTPTest->new (name => "Test-idn-meta", - input => \%urls, - cmdline => $cmdline, - errcode => $expected_error_code, + input => \%urls, + cmdline => $cmdline, + errcode => $expected_error_code, output => \%expected_downloaded_files); exit $the_test->run(); diff --git a/tests/Test-idn-robots.px b/tests/Test-idn-robots.px index 3f0f8dde..b10163dc 100755 --- a/tests/Test-idn-robots.px +++ b/tests/Test-idn-robots.px @@ -69,9 +69,9 @@ my %expected_downloaded_files = ( ############################################################################### my $the_test = HTTPTest->new (name => "Test-idn-robots", - input => \%urls, - cmdline => $cmdline, - errcode => $expected_error_code, + input => \%urls, + cmdline => $cmdline, + errcode => $expected_error_code, output => \%expected_downloaded_files); exit $the_test->run(); diff --git a/tests/Test-iri-disabled.px b/tests/Test-iri-disabled.px index 01231a44..179b6249 100755 --- a/tests/Test-iri-disabled.px +++ b/tests/Test-iri-disabled.px @@ -187,9 +187,9 @@ my %expected_downloaded_files = ( ############################################################################### my $the_test = HTTPTest->new (name => "Test-iri-disabled", - input => \%urls, - cmdline => $cmdline, - errcode => $expected_error_code, + input => \%urls, + cmdline => $cmdline, + errcode => $expected_error_code, output => \%expected_downloaded_files); exit $the_test->run(); diff --git a/tests/Test-iri-forced-remote.px b/tests/Test-iri-forced-remote.px index 9c3d5b6b..7c46ea8d 100755 --- a/tests/Test-iri-forced-remote.px +++ b/tests/Test-iri-forced-remote.px @@ -199,9 +199,9 @@ my %expected_downloaded_files = ( ############################################################################### my $the_test = HTTPTest->new (name => "Test-iri-forced-remote", - input => \%urls, - cmdline => $cmdline, - errcode => $expected_error_code, + input => \%urls, + cmdline => $cmdline, + errcode => $expected_error_code, output => \%expected_downloaded_files); exit $the_test->run(); diff --git a/tests/Test-iri-list.px b/tests/Test-iri-list.px index 8110358a..dc55eeca 100755 --- a/tests/Test-iri-list.px +++ b/tests/Test-iri-list.px @@ -165,9 +165,9 @@ my %expected_downloaded_files = ( ############################################################################### my $the_test = HTTPTest->new (name => "Test-iri-list", - input => \%urls, - cmdline => $cmdline, - errcode => $expected_error_code, + input => \%urls, + cmdline => $cmdline, + errcode => $expected_error_code, output => \%expected_downloaded_files); exit $the_test->run(); diff --git a/tests/Test-meta-robots.px b/tests/Test-meta-robots.px index 2560369a..fb627c61 100755 --- a/tests/Test-meta-robots.px +++ b/tests/Test-meta-robots.px @@ -105,9 +105,9 @@ my %expected_downloaded_files = ( ############################################################################### my $the_test = HTTPTest->new (name => "Test-meta-robots", - input => \%urls, - cmdline => $cmdline, - errcode => $expected_error_code, + input => \%urls, + cmdline => $cmdline, + errcode => $expected_error_code, output => \%expected_downloaded_files); exit $the_test->run(); diff --git a/tests/Test-nonexisting-quiet.px b/tests/Test-nonexisting-quiet.px index fa6fa0f2..f150da1b 100755 --- a/tests/Test-nonexisting-quiet.px +++ b/tests/Test-nonexisting-quiet.px @@ -34,9 +34,9 @@ my %expected_downloaded_files = ( ############################################################################### my $the_test = HTTPTest->new (name => "Test-nonexisting-quiet", - input => \%urls, - cmdline => $cmdline, - errcode => $expected_error_code, + input => \%urls, + cmdline => $cmdline, + errcode => $expected_error_code, output => \%expected_downloaded_files); exit $the_test->run(); diff --git a/tests/Test-noop.px b/tests/Test-noop.px index 1e0d1871..b825c540 100755 --- a/tests/Test-noop.px +++ b/tests/Test-noop.px @@ -47,9 +47,9 @@ my %expected_downloaded_files = ( ############################################################################### my $the_test = HTTPTest->new (name => "Test-noop", - input => \%urls, - cmdline => $cmdline, - errcode => $expected_error_code, + input => \%urls, + cmdline => $cmdline, + errcode => $expected_error_code, output => \%expected_downloaded_files); exit $the_test->run(); diff --git a/tests/Test-np.px b/tests/Test-np.px index f674193a..c81b93c6 100755 --- a/tests/Test-np.px +++ b/tests/Test-np.px @@ -55,7 +55,7 @@ my $fourthpage = <

This page is only linked by the higher level page. Therefore, it should not - be downloaded. + be downloaded.

@@ -69,7 +69,7 @@ my $higherlevelpage = <

This page is on a higher level in the URL path hierarchy. Therefore, it - should not be downloaded. Wget should not visit the following link to a + should not be downloaded. Wget should not visit the following link to a fourth page.

@@ -139,9 +139,9 @@ my %expected_downloaded_files = ( ############################################################################### my $the_test = HTTPTest->new (name => "Test-np", - input => \%urls, - cmdline => $cmdline, - errcode => $expected_error_code, + input => \%urls, + cmdline => $cmdline, + errcode => $expected_error_code, output => \%expected_downloaded_files); exit $the_test->run(); diff --git a/tests/Test-proxy-auth-basic.px b/tests/Test-proxy-auth-basic.px index 033ce039..7e0fc5cd 100755 --- a/tests/Test-proxy-auth-basic.px +++ b/tests/Test-proxy-auth-basic.px @@ -39,9 +39,9 @@ my %expected_downloaded_files = ( ############################################################################### my $the_test = HTTPTest->new (name => "Test-auth-basic", - input => \%urls, - cmdline => $cmdline, - errcode => $expected_error_code, + input => \%urls, + cmdline => $cmdline, + errcode => $expected_error_code, output => \%expected_downloaded_files); exit $the_test->run(); diff --git a/tests/Test-restrict-ascii.px b/tests/Test-restrict-ascii.px index ec76349d..4d938b71 100755 --- a/tests/Test-restrict-ascii.px +++ b/tests/Test-restrict-ascii.px @@ -59,9 +59,9 @@ my %expected_downloaded_files = ( ############################################################################### my $the_test = HTTPTest->new (name => "Test-restrict-ascii", - input => \%urls, - cmdline => $cmdline, - errcode => $expected_error_code, + input => \%urls, + cmdline => $cmdline, + errcode => $expected_error_code, output => \%expected_downloaded_files); exit $the_test->run(); diff --git a/vms/DESCRIP.MMS b/vms/DESCRIP.MMS index 2808f87f..a746b2f9 100644 --- a/vms/DESCRIP.MMS +++ b/vms/DESCRIP.MMS @@ -15,7 +15,7 @@ # CLEAN_ALL deletes all generated files, except the main (collected) # source dependency file. # -# CLEAN_EXE deletes only the architecture-specific executable. +# CLEAN_EXE deletes only the architecture-specific executable. # Handy if all you wish to do is re-link the executable. # diff --git a/vms/DESCRIP_MKDEPS.MMS b/vms/DESCRIP_MKDEPS.MMS index 2c695008..b7d0bd6c 100644 --- a/vms/DESCRIP_MKDEPS.MMS +++ b/vms/DESCRIP_MKDEPS.MMS @@ -18,7 +18,7 @@ # will need to recover it from the original distribution kit. # # Note: This dependency generation scheme assumes that the dependencies -# do not depend on host architecture type or other such variables. +# do not depend on host architecture type or other such variables. # Therefore, no "#include" directive in the C source itself should be # conditional on such variables. # @@ -40,7 +40,7 @@ INCL_DESCRIP_SRC = 1 # The ultimate product, a comprehensive dependency list. -DEPS_FILE = [-.VMS]descrip_deps.mms +DEPS_FILE = [-.VMS]descrip_deps.mms # Detect valid qualifier and/or macro options. diff --git a/vms/DESCRIP_SRC.MMS b/vms/DESCRIP_SRC.MMS index df20e234..ea6f60df 100644 --- a/vms/DESCRIP_SRC.MMS +++ b/vms/DESCRIP_SRC.MMS @@ -170,7 +170,7 @@ SSL_CDEFINES = , "HAVE_SSL", "ENABLE_NTLM" SSL_LINK_OPT = , [-.VMS]WGET_SSL.OPT /OPTIONS .ELSE # SSL SSL_CDEFINES = -SSL_LINK_OPT = +SSL_LINK_OPT = .ENDIF # SSL .ENDIF # HPSSL @@ -190,7 +190,7 @@ CFLAGS = \ $(CFLAGS_INCL) \ $(CFLAGS_PREFIX) \ /object = $(MMS$TARGET) - + LINKFLAGS = $(LINKFLAGS_DBG) $(LINKFLAGS_LIST) \ /executable = $(MMS$TARGET) diff --git a/vms/VMS-WGET.COM b/vms/VMS-WGET.COM index 94e1321d..46034c35 100644 --- a/vms/VMS-WGET.COM +++ b/vms/VMS-WGET.COM @@ -24,7 +24,7 @@ $! $! To prevent automatic detection and use of OpenSSL, add "NOSSL" $! to the command line. This procedure prefers a generic SSL kit to HP $! SSL. If the generic logical names OPENSSL and SSLLIB are defined, -$! they will be used instead of the the HP SSL logical names SSL$INCLUDE +$! they will be used instead of the HP SSL logical names SSL$INCLUDE $! and SYS$SHARE. To use HP SSL when these generic logical names are $! defined, add "HPSSL" to the command line. $! diff --git a/vms/VMS_NOTES.TXT b/vms/VMS_NOTES.TXT index 5456880b..ed4c290d 100644 --- a/vms/VMS_NOTES.TXT +++ b/vms/VMS_NOTES.TXT @@ -43,7 +43,7 @@ OpenVMS VAX V7.3, Compaq C V6.4-005, TCPIP V5.1. - Changed to avoid trying "LIST -a" for a VMS FTP server. -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Version 1.10.2c 2006-11-16 ---------------------------- @@ -61,7 +61,7 @@ OpenVMS VAX V7.3, Compaq C V6.4-005, TCPIP V5.1. MultiNet versions where the old MultiNet-specific changes are still needed, specify "MULTINET" on the VMS-WGET.COM command line. -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Version 1.10.2b 2004-12-15 ---------------------------- @@ -71,7 +71,7 @@ OpenVMS VAX V7.3, Compaq C V6.4-005, TCPIP V5.1. - Changed the I/O scheme on VMS for progress dots to avoid spurious newline characters when output is directed to a file. -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Version 1.10.2a 2004-10-13 ---------------------------- @@ -90,12 +90,12 @@ OpenVMS VAX V7.3, Compaq C V6.4-005, TCPIP V5.1. directory listing format confused the program. The typical symptom was "No such file `-rwx---r-x'." The added "CWD []" command resets the TCPware server to VMS mode, and should be harmless on other VMS - FTP servers. + FTP servers. - VMS-WGET.COM now finds MMK when it's on DCL$PATH as well as when a foreign command symbol "MMK" is defined. -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Version 1.10.1a 2004-09-09 --------------------------- @@ -110,7 +110,7 @@ OpenVMS VAX V7.3, Compaq C V6.4-005, TCPIP V5.1. - VMS-WGET.COM may now be run from any default directory, not only [.SRC]. -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Version 1.9.1e 2005-09-09 -------------------------- @@ -157,7 +157,7 @@ OpenVMS VAX V7.3, Compaq C V6.4-005, TCPIP V5.1. (was none), speeding creation of a large output file. Explicitly set RMS_DEFAULT values override built-in defaults. -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Version 1.9.1c 2004-12-15 -------------------------- @@ -178,7 +178,7 @@ OpenVMS VAX V7.3, Compaq C V6.4-005, TCPIP V5.1. redefined. at line number 178 in module NETDB of text library SYS$COMMON:[SYSLIB]DECC$RTLDEF.TLB;1 - - A run-time problem with an FTP URL. Typical symptom: + - A run-time problem with an FTP URL. Typical symptom: accept: bad address @@ -199,7 +199,7 @@ OpenVMS VAX V7.3, Compaq C V6.4-005, TCPIP V5.1. - Changed VMS.C to fix a problem with the utime() function (supplied with Wget) when the user specified a non-UNIX file name with the Wget - "-O" option. Typical symptom: + "-O" option. Typical symptom: utime(home_sms:[sms.wget]t.h): error 0 @@ -213,7 +213,7 @@ OpenVMS VAX V7.3, Compaq C V6.4-005, TCPIP V5.1. VMS-WGET.COM. New: DESCRIP_DEPS.MMS, DESCRIP_MKDEPS.MMS, DESCRIP_SRC.MMS, COLLECT_DEPS.COM, and MOD_DEP.COM. -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Version 1.9.1b 2004-09-28 -------------------------- @@ -233,7 +233,7 @@ OpenVMS VAX V7.3, Compaq C V6.4-005, TCPIP V5.1. disk:[xxx.WGET-1_9_1A_VMS.SRC]VMS.C;1 - Fixed a build problem with C RTL before VMS V7.3 with C Runtime ECO - 2 on Alpha: + 2 on Alpha: %CC-I-IMPLICITFUNC, In this statement, the identifier "decc$feature_get_index" is implicitly declared as a function. at line number 155 in file disk:[xxx.WGET-1_9_1A_VMS.SRC]VMS.C;1 @@ -246,7 +246,7 @@ OpenVMS VAX V7.3, Compaq C V6.4-005, TCPIP V5.1. "decc$feature_set_value" is implicitly declared as a function. at line number 169 in file disk:[xxx.WGET-1_9_1A_VMS.SRC]VMS.C;1 - and the related: + and the related: %LINK-W-NUDFSYMS, 3 undefined symbols: %LINK-I-UDFSYM, DECC$FEATURE_GET_INDEX @@ -266,7 +266,7 @@ OpenVMS VAX V7.3, Compaq C V6.4-005, TCPIP V5.1. caused a run-time problem on non-VAX systems with some ODS5 extended file specifications with multiple dots in file names, typically when "-m" ("--mirror"), "-O" ("--output-document"), or - "-r" ("--recursive") was used: + "-r" ("--recursive") was used: hostname/test/a.B.c: file specification syntax error or @@ -274,7 +274,7 @@ OpenVMS VAX V7.3, Compaq C V6.4-005, TCPIP V5.1. rms-f-syn, file specification syntax error - Fixed a spurious diagnostic message when doing HTTP and - complex FTP transfers: + complex FTP transfers: utime(). sys$parse() = 00010001. @@ -291,7 +291,7 @@ OpenVMS VAX V7.3, Compaq C V6.4-005, TCPIP V5.1. attempt to puzzle out whether "/one/two" should really be interpreted as "one:[two]", but it's better equipped to do it than Wget is. -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Version 1.9.1a 2004-04-28 -------------------------- @@ -299,7 +299,7 @@ OpenVMS VAX V7.3, Compaq C V6.4-005, TCPIP V5.1. - Changes to VMS-WGET.COM since Wget 1.5.3h: - A separate LIST command-line option now controls compiler listing - files. The DBG option no longer implies compiler listing files. + files. The DBG option no longer implies compiler listing files. The LIST option also generates a link map with cross-reference. - The DBG option may actually work now. @@ -310,7 +310,7 @@ OpenVMS VAX V7.3, Compaq C V6.4-005, TCPIP V5.1. - Compiler listing files (.LIS) and link maps (.MAP) are now put into the system-specific directory with the corresponding object files - (.OBJ), namely, [.SRC.ALPHA], [.SRC.IA64], or [.SRC.VAX]. + (.OBJ), namely, [.SRC.ALPHA], [.SRC.IA64], or [.SRC.VAX]. Previously, they were put into the source directory ([.SRC]) itself. @@ -388,7 +388,7 @@ OpenVMS VAX V7.3, Compaq C V6.4-005, TCPIP V5.1. vms.h VMS-specific header file. For VMS C RTL before V7.3, replacement for . For VMS C RTL - before V7.0, replacement for . + before V7.0, replacement for . Declarations of replacement data types/structures and function prototypes for vms.c. @@ -453,7 +453,7 @@ OpenVMS VAX V7.3, Compaq C V6.4-005, TCPIP V5.1. host.c Added code for VMS header files. host.h Added code for VMS header files. - + http.c Added code for VMS header files. Changed to use an OS-specific file name suffix, "_orig" for VMS, rather than a hard-coded diff --git a/vms/WGET.HLP b/vms/WGET.HLP index f99c777f..414316cc 100644 --- a/vms/WGET.HLP +++ b/vms/WGET.HLP @@ -242,4 +242,4 @@ that the "FILE" be in Stream_LF format. (In this case, HTTP 1.0 requires the length of the request to be known, and the method used to determine the size of the file will fail for Variable-length format - files.) + files.) diff --git a/vms/vms.c b/vms/vms.c index 428b388b..8104d137 100644 --- a/vms/vms.c +++ b/vms/vms.c @@ -33,7 +33,7 @@ * * Simplifies a fancy URL-derived file name into an ODS2- or * ODS5-compatible file name. - * + * *---------------------------------------------------------------------- * * utime() @@ -235,7 +235,7 @@ int dmy_lib$initialize = (int) lib$initialize; /*--------------------------------------------------------------------*/ /* vms_arch() - + Returns (run-time) VMS architecture string. */ @@ -270,7 +270,7 @@ return arch; /*--------------------------------------------------------------------*/ /* vms_vers() - + Returns (run-time) VMS version string. */ diff --git a/windows/ChangeLog b/windows/ChangeLog index 7cadaa56..b53f4612 100644 --- a/windows/ChangeLog +++ b/windows/ChangeLog @@ -64,7 +64,7 @@ 2006-12-29 Gisle Vanem * config.h: Added 'HAVE_SYS_UTIME_H 1' which gets undefined as needed - in config-compiler.h. + in config-compiler.h. * config-compiler.h: Added '_WIN32_WINNT=0x0501' as needed to pull in the prototype of getaddrinfo() and other library functions. Defined @@ -187,20 +187,20 @@ 2005-02-10 Mauro Tortonesi - * Makefile.src: Renamed string.{c,h} to string_t.{c,h} to fix - a compilation conflict with the string.h header in the standard + * Makefile.src: Renamed string.{c,h} to string_t.{c,h} to fix + a compilation conflict with the string.h header in the standard C library. - * Makefile.src.bor: Renamed string.{c,h} to string_t.{c,h} to fix - a compilation conflict with the string.h header in the standard + * Makefile.src.bor: Renamed string.{c,h} to string_t.{c,h} to fix + a compilation conflict with the string.h header in the standard C library. * Makefile.src.mingw: Renamed string.{c,h} to string_t.{c,h} to fix - a compilation conflict with the string.h header in the standard + a compilation conflict with the string.h header in the standard C library. * Makefile.src.watcom: Renamed string.{c,h} to string_t.{c,h} to fix - a compilation conflict with the string.h header in the standard + a compilation conflict with the string.h header in the standard C library. * wget.dep: Renamed string.{c,h} to string_t.{c,h} to fix a diff --git a/windows/Makefile.top b/windows/Makefile.top index 8b00ad40..32f7b043 100644 --- a/windows/Makefile.top +++ b/windows/Makefile.top @@ -75,6 +75,6 @@ wget.zip: $(SUBDIRS) $(RM) wget.zip $(RM) cacert.pem src\wget http://curl.haxx.se/ca/cacert.pem - zip -Djl9 wget.zip AUTHORS COPYING INSTALL MAILING-LIST NEWS README doc/sample.wgetrc - zip -Dj9 wget.zip src/wget.exe doc/wget.hlp cacert.pem + zip -Djl9 wget.zip AUTHORS COPYING INSTALL MAILING-LIST NEWS README doc/sample.wgetrc + zip -Dj9 wget.zip src/wget.exe doc/wget.hlp cacert.pem zip -Dj9 wget.zip c:\openssl\bin\libeay32.dll c:\openssl\bin\ssleay32.dll c:\openssl\bin\msvcr80.dll diff --git a/windows/Makefile.top.bor b/windows/Makefile.top.bor index 5171f17e..1b69fd4c 100644 --- a/windows/Makefile.top.bor +++ b/windows/Makefile.top.bor @@ -37,7 +37,7 @@ SUBDIRS = src doc #util # default target all: Makefile $(SUBDIRS) -$(SUBDIRS): +$(SUBDIRS): cd $@ $(MAKEDIR)\$(MAKE) cd .. @@ -73,7 +73,7 @@ wget.zip: $(SUBDIRS) $(RM) wget.zip $(RM) cacert.pem src\wget http://curl.haxx.se/ca/cacert.pem - zip -Djl9 wget.zip AUTHORS COPYING INSTALL MAILING-LIST NEWS README doc/sample.wgetrc - zip -Dj9 wget.zip src/wget.exe doc/wget.hlp cacert.pem + zip -Djl9 wget.zip AUTHORS COPYING INSTALL MAILING-LIST NEWS README doc/sample.wgetrc + zip -Dj9 wget.zip src/wget.exe doc/wget.hlp cacert.pem zip -Dj9 wget.zip c:\openssl\bin\libeay32.dll c:\openssl\bin\ssleay32.dll c:\openssl\bin\msvcr80.dll diff --git a/windows/README b/windows/README index 8d63bc74..9239cef8 100644 --- a/windows/README +++ b/windows/README @@ -6,18 +6,18 @@ list of possible options. Run it with the option corresponding to the compiler you intend to use to build Wget and follow the (brief) instructions printed on the screen. The instructions bellow are for building Wget with Microsoft Visual C++ (MSVC); you may need to make -appropriate substitutions for your compiler and build environment; -currently wget can be built at least with Visual Studio/.Net, the free +appropriate substitutions for your compiler and build environment; +currently wget can be built at least with Visual Studio/.Net, the free Borland compiler, and the free mingw environment. The instructions do *not* apply to the Cygwin environment, on which Wget is built with the procedure described in the INSTALL file in the top-level directory. To build Wget with MSVC run configure.bat (in the main Wget directory) with the argument --msvc, and then run nmake. At a certain point in time -Wget exposed some compiler bugs in MSVC 5.0; later Wget started to -expose (at least http.c, retr.c) some other compiler bugs in MSVC 6.0 -SP6 (cl.exe version 12) which could/can be worked around by compiling -completely without optimization or at least partially (by using +Wget exposed some compiler bugs in MSVC 5.0; later Wget started to +expose (at least http.c, retr.c) some other compiler bugs in MSVC 6.0 +SP6 (cl.exe version 12) which could/can be worked around by compiling +completely without optimization or at least partially (by using #pragma optimize("g",on) and "off" around offending functions). However, read the rest of this document before continuing. @@ -32,7 +32,7 @@ and from out32dll (in the OpenSSL directory) the two needed libraries (libeay32.lib and ssleay32.lib) to "C:\Program Files\Microsoft Visual Studio\VC98\lib". These locations aren't exactly the best but will get you started if you don't know where -to place these headers and libraries, you should find similar paths for +to place these headers and libraries, you should find similar paths for later compiler versions. Usually at run-time some OpenSSL libraries (currently ssleay32.dll and libeay32.dll) will need to be available in your environment PATH.