Remove trailing whitespace. Update copyright to include 2004.
This commit is contained in:
parent
8854004b41
commit
c7bda1ce65
374 changed files with 2048 additions and 2051 deletions
|
@ -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 $
|
||||
*/
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue