diff options
author | Eric Andersen | 2001-03-09 21:24:12 +0000 |
---|---|---|
committer | Eric Andersen | 2001-03-09 21:24:12 +0000 |
commit | 3e6ff9017f5aa4ea41de2520a3f6d29fb20e0332 (patch) | |
tree | c9e6d3d695cbb2449132428a32fb6c309aad870f /wget.c | |
parent | dd91724aa089e344d0f05e40a338dcce481c1845 (diff) | |
download | busybox-3e6ff9017f5aa4ea41de2520a3f6d29fb20e0332.zip busybox-3e6ff9017f5aa4ea41de2520a3f6d29fb20e0332.tar.gz |
A cleanup patch from Jeff Garzik to static-ify a number of
namespace polluting things that really should be static.
Diffstat (limited to 'wget.c')
-rw-r--r-- | wget.c | 22 |
1 files changed, 11 insertions, 11 deletions
@@ -47,22 +47,22 @@ } while (0) #endif -void parse_url(char *url, char **uri_host, int *uri_port, char **uri_path); -FILE *open_socket(char *host, int port); -char *gethdr(char *buf, size_t bufsiz, FILE *fp, int *istrunc); -void progressmeter(int flag); +static void parse_url(char *url, char **uri_host, int *uri_port, char **uri_path); +static FILE *open_socket(char *host, int port); +static char *gethdr(char *buf, size_t bufsiz, FILE *fp, int *istrunc); +static void progressmeter(int flag); /* Globals (can be accessed from signal handlers */ static off_t filesize = 0; /* content-length of the file */ #ifdef BB_FEATURE_WGET_STATUSBAR static char *curfile; /* Name of current file being transferred. */ static struct timeval start; /* Time a transfer started. */ -volatile unsigned long statbytes; /* Number of bytes transferred so far. */ +static volatile unsigned long statbytes; /* Number of bytes transferred so far. */ /* For progressmeter() -- number of seconds before xfer considered "stalled" */ static const int STALLTIME = 5; #endif -void close_and_delete_outfile(FILE* output, char *fname_out, int do_continue) +static void close_and_delete_outfile(FILE* output, char *fname_out, int do_continue) { if (output != stdout && do_continue==0) { fclose(output); @@ -371,7 +371,7 @@ char *gethdr(char *buf, size_t bufsiz, FILE *fp, int *istrunc) */ -int +static int getttywidth(void) { struct winsize winsize; @@ -382,7 +382,7 @@ getttywidth(void) return (80); } -void +static void updateprogressmeter(int ignore) { int save_errno = errno; @@ -391,7 +391,7 @@ updateprogressmeter(int ignore) errno = save_errno; } -void +static void alarmtimer(int wait) { struct itimerval itv; @@ -403,7 +403,7 @@ alarmtimer(int wait) } -void +static void progressmeter(int flag) { static const char prefixes[] = " KMGTP"; @@ -534,7 +534,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.28 2001/02/20 06:14:08 andersen Exp $ + * $Id: wget.c,v 1.29 2001/03/09 21:24:12 andersen Exp $ */ |