aboutsummaryrefslogtreecommitdiff
path: root/networking/wget.c
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2004-03-15 08:29:22 +0000
committerEric Andersen <andersen@codepoet.org>2004-03-15 08:29:22 +0000
commitc7bda1ce659294d6e22c06e087f6f265983c7578 (patch)
tree4c6d2217f4d8306c59cf1096f8664e1cfd167213 /networking/wget.c
parent8854004b41065b3d081af7f3df13a100b0c8bfbe (diff)
downloadbusybox-c7bda1ce659294d6e22c06e087f6f265983c7578.tar.gz
Remove trailing whitespace. Update copyright to include 2004.
Diffstat (limited to 'networking/wget.c')
-rw-r--r--networking/wget.c50
1 files changed, 25 insertions, 25 deletions
diff --git a/networking/wget.c b/networking/wget.c
index cb0790ea7..619c138ba 100644
--- a/networking/wget.c
+++ b/networking/wget.c
@@ -55,7 +55,7 @@ static volatile unsigned long statbytes = 0; /* Number of bytes transferred so f
/* For progressmeter() -- number of seconds before xfer considered "stalled" */
static const int STALLTIME = 5;
#endif
-
+
static void close_and_delete_outfile(FILE* output, char *fname_out, int do_continue)
{
if (output != stdout && do_continue==0) {
@@ -236,18 +236,18 @@ int wget_main(int argc, char **argv)
use_proxy = 0;
}
}
-
+
/* Guess an output filename */
if (!fname_out) {
- fname_out =
+ fname_out =
#ifdef CONFIG_FEATURE_WGET_STATUSBAR
- curfile =
+ curfile =
#endif
bb_get_last_path_component(target.path);
if (fname_out==NULL || strlen(fname_out)<1) {
- fname_out =
+ fname_out =
#ifdef CONFIG_FEATURE_WGET_STATUSBAR
- curfile =
+ curfile =
#endif
"index.html";
}
@@ -309,7 +309,7 @@ int wget_main(int argc, char **argv)
*/
if (sfp) fclose(sfp);
sfp = open_socket(&s_in);
-
+
/*
* Send HTTP request.
*/
@@ -351,7 +351,7 @@ int wget_main(int argc, char **argv)
read_response:
if (fgets(buf, sizeof(buf), sfp) == NULL)
close_delete_and_die("no response from server");
-
+
for (s = buf ; *s != '\0' && !isspace(*s) ; ++s)
;
for ( ; isspace(*s) ; ++s)
@@ -379,7 +379,7 @@ read_response:
chomp(buf);
close_delete_and_die("server returned error %d: %s", atoi(s), buf);
}
-
+
/*
* Retrieve HTTP headers.
*/
@@ -416,7 +416,7 @@ read_response:
}
}
} while(status >= 300);
-
+
dfp = sfp;
}
else
@@ -431,7 +431,7 @@ read_response:
if (ftpcmd(NULL, NULL, sfp, buf) != 220)
close_delete_and_die("%s", buf+4);
- /*
+ /*
* Splitting username:password pair,
* trying to log in
*/
@@ -448,10 +448,10 @@ read_response:
default:
close_delete_and_die("ftp login: %s", buf+4);
}
-
+
ftpcmd("CDUP", NULL, sfp, buf);
ftpcmd("TYPE I", NULL, sfp, buf);
-
+
/*
* Querying file size
*/
@@ -463,7 +463,7 @@ read_response:
filesize = value;
got_clen = 1;
}
-
+
/*
* Entering passive mode
*/
@@ -486,7 +486,7 @@ read_response:
} else
filesize -= beg_range;
}
-
+
if (ftpcmd("RETR /", target.path, sfp, buf) > 150)
close_delete_and_die("RETR: %s", buf+4);
@@ -661,27 +661,27 @@ char *gethdr(char *buf, size_t bufsiz, FILE *fp, int *istrunc)
static int ftpcmd(char *s1, char *s2, FILE *fp, char *buf)
{
char *p;
-
+
if (s1) {
if (!s2) s2="";
fprintf(fp, "%s%s\r\n", s1, s2);
fflush(fp);
}
-
+
do {
p = fgets(buf, 510, fp);
if (!p)
bb_perror_msg_and_die("fgets()");
} while (! isdigit(buf[0]) || buf[3] != ' ');
-
+
return atoi(buf);
}
#ifdef CONFIG_FEATURE_WGET_STATUSBAR
-/* Stuff below is from BSD rcp util.c, as added to openshh.
+/* Stuff below is from BSD rcp util.c, as added to openshh.
* Original copyright notice is retained at the end of this file.
- *
- */
+ *
+ */
static int
@@ -813,7 +813,7 @@ progressmeter(int flag)
/* Original copyright notice which applies to the CONFIG_FEATURE_WGET_STATUSBAR stuff,
* much of which was blatently stolen from openssh. */
-
+
/*-
* Copyright (c) 1992, 1993
* The Regents of the University of California. All rights reserved.
@@ -827,8 +827,8 @@ progressmeter(int flag)
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
- * 3. <BSD Advertising Clause omitted per the July 22, 1999 licensing change
- * ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change>
+ * 3. <BSD Advertising Clause omitted per the July 22, 1999 licensing change
+ * ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change>
*
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
@@ -846,7 +846,7 @@ progressmeter(int flag)
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: wget.c,v 1.70 2004/03/06 22:11:44 andersen Exp $
+ * $Id: wget.c,v 1.71 2004/03/15 08:28:53 andersen Exp $
*/