diff options
author | Eric Andersen <andersen@codepoet.org> | 2001-03-09 21:24:12 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2001-03-09 21:24:12 +0000 |
commit | 3e6ff9017f5aa4ea41de2520a3f6d29fb20e0332 (patch) | |
tree | c9e6d3d695cbb2449132428a32fb6c309aad870f /networking/wget.c | |
parent | dd91724aa089e344d0f05e40a338dcce481c1845 (diff) | |
download | busybox-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.c | 22 |
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 | ||
50 | void parse_url(char *url, char **uri_host, int *uri_port, char **uri_path); | 50 | static void parse_url(char *url, char **uri_host, int *uri_port, char **uri_path); |
51 | FILE *open_socket(char *host, int port); | 51 | static FILE *open_socket(char *host, int port); |
52 | char *gethdr(char *buf, size_t bufsiz, FILE *fp, int *istrunc); | 52 | static char *gethdr(char *buf, size_t bufsiz, FILE *fp, int *istrunc); |
53 | void progressmeter(int flag); | 53 | static void progressmeter(int flag); |
54 | 54 | ||
55 | /* Globals (can be accessed from signal handlers */ | 55 | /* Globals (can be accessed from signal handlers */ |
56 | static off_t filesize = 0; /* content-length of the file */ | 56 | static off_t filesize = 0; /* content-length of the file */ |
57 | #ifdef BB_FEATURE_WGET_STATUSBAR | 57 | #ifdef BB_FEATURE_WGET_STATUSBAR |
58 | static char *curfile; /* Name of current file being transferred. */ | 58 | static char *curfile; /* Name of current file being transferred. */ |
59 | static struct timeval start; /* Time a transfer started. */ | 59 | static struct timeval start; /* Time a transfer started. */ |
60 | volatile unsigned long statbytes; /* Number of bytes transferred so far. */ | 60 | static 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" */ |
62 | static const int STALLTIME = 5; | 62 | static const int STALLTIME = 5; |
63 | #endif | 63 | #endif |
64 | 64 | ||
65 | void close_and_delete_outfile(FILE* output, char *fname_out, int do_continue) | 65 | static 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 | ||
374 | int | 374 | static int |
375 | getttywidth(void) | 375 | getttywidth(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 | ||
385 | void | 385 | static void |
386 | updateprogressmeter(int ignore) | 386 | updateprogressmeter(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 | ||
394 | void | 394 | static void |
395 | alarmtimer(int wait) | 395 | alarmtimer(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 | ||
406 | void | 406 | static void |
407 | progressmeter(int flag) | 407 | progressmeter(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 | ||