summaryrefslogtreecommitdiff
path: root/networking/wget.c
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2001-03-09 21:24:12 +0000
committerEric Andersen <andersen@codepoet.org>2001-03-09 21:24:12 +0000
commit3e6ff9017f5aa4ea41de2520a3f6d29fb20e0332 (patch)
treec9e6d3d695cbb2449132428a32fb6c309aad870f /networking/wget.c
parentdd91724aa089e344d0f05e40a338dcce481c1845 (diff)
downloadbusybox-w32-3e6ff9017f5aa4ea41de2520a3f6d29fb20e0332.tar.gz
busybox-w32-3e6ff9017f5aa4ea41de2520a3f6d29fb20e0332.tar.bz2
busybox-w32-3e6ff9017f5aa4ea41de2520a3f6d29fb20e0332.zip
A cleanup patch from Jeff Garzik to static-ify a number of
namespace polluting things that really should be static.
Diffstat (limited to 'networking/wget.c')
-rw-r--r--networking/wget.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/networking/wget.c b/networking/wget.c
index 4b8392ba5..85023f977 100644
--- a/networking/wget.c
+++ b/networking/wget.c
@@ -47,22 +47,22 @@
47 } while (0) 47 } while (0)
48#endif 48#endif
49 49
50void parse_url(char *url, char **uri_host, int *uri_port, char **uri_path); 50static void parse_url(char *url, char **uri_host, int *uri_port, char **uri_path);
51FILE *open_socket(char *host, int port); 51static FILE *open_socket(char *host, int port);
52char *gethdr(char *buf, size_t bufsiz, FILE *fp, int *istrunc); 52static char *gethdr(char *buf, size_t bufsiz, FILE *fp, int *istrunc);
53void progressmeter(int flag); 53static void progressmeter(int flag);
54 54
55/* Globals (can be accessed from signal handlers */ 55/* Globals (can be accessed from signal handlers */
56static off_t filesize = 0; /* content-length of the file */ 56static off_t filesize = 0; /* content-length of the file */
57#ifdef BB_FEATURE_WGET_STATUSBAR 57#ifdef BB_FEATURE_WGET_STATUSBAR
58static char *curfile; /* Name of current file being transferred. */ 58static char *curfile; /* Name of current file being transferred. */
59static struct timeval start; /* Time a transfer started. */ 59static struct timeval start; /* Time a transfer started. */
60volatile unsigned long statbytes; /* Number of bytes transferred so far. */ 60static volatile unsigned long statbytes; /* Number of bytes transferred so far. */
61/* For progressmeter() -- number of seconds before xfer considered "stalled" */ 61/* For progressmeter() -- number of seconds before xfer considered "stalled" */
62static const int STALLTIME = 5; 62static const int STALLTIME = 5;
63#endif 63#endif
64 64
65void close_and_delete_outfile(FILE* output, char *fname_out, int do_continue) 65static void close_and_delete_outfile(FILE* output, char *fname_out, int do_continue)
66{ 66{
67 if (output != stdout && do_continue==0) { 67 if (output != stdout && do_continue==0) {
68 fclose(output); 68 fclose(output);
@@ -371,7 +371,7 @@ char *gethdr(char *buf, size_t bufsiz, FILE *fp, int *istrunc)
371 */ 371 */
372 372
373 373
374int 374static int
375getttywidth(void) 375getttywidth(void)
376{ 376{
377 struct winsize winsize; 377 struct winsize winsize;
@@ -382,7 +382,7 @@ getttywidth(void)
382 return (80); 382 return (80);
383} 383}
384 384
385void 385static void
386updateprogressmeter(int ignore) 386updateprogressmeter(int ignore)
387{ 387{
388 int save_errno = errno; 388 int save_errno = errno;
@@ -391,7 +391,7 @@ updateprogressmeter(int ignore)
391 errno = save_errno; 391 errno = save_errno;
392} 392}
393 393
394void 394static void
395alarmtimer(int wait) 395alarmtimer(int wait)
396{ 396{
397 struct itimerval itv; 397 struct itimerval itv;
@@ -403,7 +403,7 @@ alarmtimer(int wait)
403} 403}
404 404
405 405
406void 406static void
407progressmeter(int flag) 407progressmeter(int flag)
408{ 408{
409 static const char prefixes[] = " KMGTP"; 409 static const char prefixes[] = " KMGTP";
@@ -534,7 +534,7 @@ progressmeter(int flag)
534 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 534 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
535 * SUCH DAMAGE. 535 * SUCH DAMAGE.
536 * 536 *
537 * $Id: wget.c,v 1.28 2001/02/20 06:14:08 andersen Exp $ 537 * $Id: wget.c,v 1.29 2001/03/09 21:24:12 andersen Exp $
538 */ 538 */
539 539
540 540