namespace polluting things that really should be static.
"post-inst-failed", "removal-failed", 0 }
};
-const int color_white = 0;
-const int color_grey = 1;
-const int color_black = 2;
+static const int color_white = 0;
+static const int color_grey = 1;
+static const int color_black = 2;
/* data structures */
typedef struct package_s {
#ifdef BB_FEATURE_TAR_GZIP
/* Signal handler for when child gzip process dies... */
-void child_died()
+static void child_died()
{
fflush(stdout);
fflush(stderr);
#endif
#if defined BB_FEATURE_TAR_EXCLUDE
-struct option longopts[] = {
+static struct option longopts[] = {
{ "exclude", 1, NULL, 'e' },
{ NULL, 0, NULL, 0 }
};
return( FALSE);
}
-int exclude_file(char **excluded_files, const char *file)
+static int exclude_file(char **excluded_files, const char *file)
{
int i;
return 0;
}
-int extract_file(char **extract_files, const char *file)
+static int extract_file(char **extract_files, const char *file)
{
int i;
/* Default input handling to save suprising some people */
-struct tm *date_conv_time(struct tm *tm_time, const char *t_string)
+static struct tm *date_conv_time(struct tm *tm_time, const char *t_string)
{
int nr;
/* The new stuff for LRP */
-struct tm *date_conv_ftime(struct tm *tm_time, const char *t_string)
+static struct tm *date_conv_ftime(struct tm *tm_time, const char *t_string)
{
struct tm t;
#include <string.h>
#include "busybox.h"
-int head(int len, FILE *fp)
+static int head(int len, FILE *fp)
{
int i;
char *input;
};
typedef struct dnode dnode_t;
-struct dnode **list_dir(char *);
-struct dnode **dnalloc(int);
-int list_single(struct dnode *);
+static struct dnode **list_dir(char *);
+static struct dnode **dnalloc(int);
+static int list_single(struct dnode *);
static unsigned int disp_opts;
static unsigned int style_fmt;
static int status = EXIT_SUCCESS;
#ifdef BB_FEATURE_HUMAN_READABLE
-unsigned long ls_disp_hr = 0;
+static unsigned long ls_disp_hr = 0;
#endif
static int my_stat(struct dnode *cur)
strcmp(dn->name, "..") != 0);
}
-int countdirs(struct dnode **dn, int nfiles)
+static int countdirs(struct dnode **dn, int nfiles)
{
int i, dirs;
return(dirs);
}
-int countsubdirs(struct dnode **dn, int nfiles)
+static int countsubdirs(struct dnode **dn, int nfiles)
{
int i, subdirs;
return subdirs;
}
-int countfiles(struct dnode **dnp)
+static int countfiles(struct dnode **dnp)
{
int nfiles;
struct dnode *cur;
}
/* get memory to hold an array of pointers */
-struct dnode **dnalloc(int num)
+static struct dnode **dnalloc(int num)
{
struct dnode **p;
return(p);
}
-void dfree(struct dnode **dnp)
+static void dfree(struct dnode **dnp)
{
struct dnode *cur, *next;
free(dnp); /* free the array holding the dnode pointers */
}
-struct dnode **splitdnarray(struct dnode **dn, int nfiles, int which)
+static struct dnode **splitdnarray(struct dnode **dn, int nfiles, int which)
{
int dncnt, i, d;
struct dnode **dnp;
/*----------------------------------------------------------------------*/
#ifdef BB_FEATURE_LS_SORTFILES
-int sortcmp(struct dnode *d1, struct dnode *d2)
+static int sortcmp(struct dnode *d1, struct dnode *d2)
{
int cmp, dif;
}
/*----------------------------------------------------------------------*/
-void shellsort(struct dnode **dn, int size)
+static void shellsort(struct dnode **dn, int size)
{
struct dnode *temp;
int gap, i, j;
#endif
/*----------------------------------------------------------------------*/
-void showfiles(struct dnode **dn, int nfiles)
+static void showfiles(struct dnode **dn, int nfiles)
{
int i, ncols, nrows, row, nc;
#ifdef BB_FEATURE_AUTOWIDTH
}
/*----------------------------------------------------------------------*/
-void showdirs(struct dnode **dn, int ndirs)
+static void showdirs(struct dnode **dn, int ndirs)
{
int i, nfiles;
struct dnode **subdnp;
}
/*----------------------------------------------------------------------*/
-struct dnode **list_dir(char *path)
+static struct dnode **list_dir(char *path)
{
struct dnode *dn, *cur, **dnp;
struct dirent *entry;
}
/*----------------------------------------------------------------------*/
-int list_single(struct dnode *dn)
+static int list_single(struct dnode *dn)
{
int i, len;
char scratch[BUFSIZ + 1];
#include <stdlib.h>
#include "busybox.h"
-int compare_ascii(const void *x, const void *y)
+static int compare_ascii(const void *x, const void *y)
{
return strcmp(*(char **)x, *(char **)y);
}
-int compare_numeric(const void *x, const void *y)
+static int compare_numeric(const void *x, const void *y)
{
return atoi(*(char **)x) - atoi(*(char **)y);
}
static int taillen;
static int newline;
-void tailbuf_append(char *buf, int len)
+static void tailbuf_append(char *buf, int len)
{
tailbuf = xrealloc(tailbuf, taillen + len);
memcpy(tailbuf + taillen, buf, len);
taillen += len;
}
-void tailbuf_trunc()
+static void tailbuf_trunc()
{
char *s;
s = memchr(tailbuf, '\n', taillen);
static void encode __P ((void));
/* Pointer to the translation table we currently use. */
-const char *trans_ptr;
+static const char *trans_ptr;
/* The two currently defined translation tables. The first is the
standard uuencoding, the second is base64 encoding. */
-const char uu_std[64] = {
+static const char uu_std[64] = {
'`', '!', '"', '#', '$', '%', '&', '\'',
'(', ')', '*', '+', ',', '-', '.', '/',
'0', '1', '2', '3', '4', '5', '6', '7',
'X', 'Y', 'Z', '[', '\\', ']', '^', '_'
};
-const char uu_base64[64] = {
+static const char uu_base64[64] = {
'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H',
'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P',
'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X',
static int total_lines, total_words, total_chars, max_length;
static int print_lines, print_words, print_chars, print_length;
-void print_counts(int lines, int words, int chars, int length,
- const char *name)
+static void print_counts(int lines, int words, int chars, int length,
+ const char *name)
{
char const *space = "";
/* Default input handling to save suprising some people */
-struct tm *date_conv_time(struct tm *tm_time, const char *t_string)
+static struct tm *date_conv_time(struct tm *tm_time, const char *t_string)
{
int nr;
/* The new stuff for LRP */
-struct tm *date_conv_ftime(struct tm *tm_time, const char *t_string)
+static struct tm *date_conv_ftime(struct tm *tm_time, const char *t_string)
{
struct tm t;
"post-inst-failed", "removal-failed", 0 }
};
-const int color_white = 0;
-const int color_grey = 1;
-const int color_black = 2;
+static const int color_white = 0;
+static const int color_grey = 1;
+static const int color_black = 2;
/* data structures */
typedef struct package_s {
};
-struct cmdoptions_t {
+static struct cmdoptions_t {
char *name;
unsigned char param_count;
unsigned char code;
}
}
-struct minix_inode *get_inode(unsigned int nr)
+static struct minix_inode *get_inode(unsigned int nr)
{
struct minix_inode *inode;
}
#ifdef BB_FEATURE_MINIX2
-struct minix2_inode *get_inode2(unsigned int nr)
+static struct minix2_inode *get_inode2(unsigned int nr)
{
struct minix2_inode *inode;
/* Some global variables that tells us how to parse. */
-shell_t shell=BASH; /* The shell we generate output for. */
-int quiet_errors=0; /* 0 is not quiet. */
-int quiet_output=0; /* 0 is not quiet. */
-int quote=1; /* 1 is do quote. */
-int alternative=0; /* 0 is getopt_long, 1 is getopt_long_only */
+static shell_t shell=BASH; /* The shell we generate output for. */
+static int quiet_errors=0; /* 0 is not quiet. */
+static int quiet_output=0; /* 0 is not quiet. */
+static int quote=1; /* 1 is do quote. */
+static int alternative=0; /* 0 is getopt_long, 1 is getopt_long_only */
/* Function prototypes */
-const char *normalize(const char *arg);
-int generate_output(char * argv[],int argc,const char *optstr,
+static const char *normalize(const char *arg);
+static int generate_output(char * argv[],int argc,const char *optstr,
const struct option *longopts);
-void add_long_options(char *options);
-void add_longopt(const char *name,int has_arg);
-void set_shell(const char *new_shell);
-void set_initial_shell(void);
+static void add_long_options(char *options);
+static void add_longopt(const char *name,int has_arg);
+static void set_shell(const char *new_shell);
/*
#include <string.h>
#include "busybox.h"
-int head(int len, FILE *fp)
+static int head(int len, FILE *fp)
{
int i;
char *input;
/* vi: set sw=4 ts=4: */
/*
- * $Id: hostname.c,v 1.25 2001/03/09 14:36:42 andersen Exp $
+ * $Id: hostname.c,v 1.26 2001/03/09 21:24:12 andersen Exp $
* Mini hostname implementation for busybox
*
* Copyright (C) 1999 by Randolph Chung <tausq@debian.org>
#include <stdio.h>
#include <stdlib.h>
-void do_sethostname(char *s, int isfile)
+static void do_sethostname(char *s, int isfile)
{
FILE *f;
char buf[255];
initAction *nextPtr;
initActionEnum action;
};
-initAction *initActionList = NULL;
+static initAction *initActionList = NULL;
static char *secondConsole = VT_SECONDARY;
}
/* Set terminal settings to reasonable defaults */
-void set_term(int fd)
+static void set_term(int fd)
{
struct termios tty;
#endif /* ! DEBUG_INIT */
-void new_initAction(initActionEnum action, char *process, char *cons)
+static void new_initAction(initActionEnum action, char *process, char *cons)
{
initAction *newAction;
* _is_ defined, but /etc/inittab is missing, this
* results in the same set of default behaviors.
* */
-void parse_inittab(void)
+static void parse_inittab(void)
{
#ifdef BB_FEATURE_USE_INITTAB
FILE *file;
initAction *nextPtr;
initActionEnum action;
};
-initAction *initActionList = NULL;
+static initAction *initActionList = NULL;
static char *secondConsole = VT_SECONDARY;
}
/* Set terminal settings to reasonable defaults */
-void set_term(int fd)
+static void set_term(int fd)
{
struct termios tty;
#endif /* ! DEBUG_INIT */
-void new_initAction(initActionEnum action, char *process, char *cons)
+static void new_initAction(initActionEnum action, char *process, char *cons)
{
initAction *newAction;
* _is_ defined, but /etc/inittab is missing, this
* results in the same set of default behaviors.
* */
-void parse_inittab(void)
+static void parse_inittab(void)
{
#ifdef BB_FEATURE_USE_INITTAB
FILE *file;
int number;
};
-const struct signal_name signames[] = {
+static const struct signal_name signames[] = {
/* POSIX signals */
{ "HUP", SIGHUP }, /* 1 */
{ "INT", SIGINT }, /* 2 */
};
typedef struct dnode dnode_t;
-struct dnode **list_dir(char *);
-struct dnode **dnalloc(int);
-int list_single(struct dnode *);
+static struct dnode **list_dir(char *);
+static struct dnode **dnalloc(int);
+static int list_single(struct dnode *);
static unsigned int disp_opts;
static unsigned int style_fmt;
static int status = EXIT_SUCCESS;
#ifdef BB_FEATURE_HUMAN_READABLE
-unsigned long ls_disp_hr = 0;
+static unsigned long ls_disp_hr = 0;
#endif
static int my_stat(struct dnode *cur)
strcmp(dn->name, "..") != 0);
}
-int countdirs(struct dnode **dn, int nfiles)
+static int countdirs(struct dnode **dn, int nfiles)
{
int i, dirs;
return(dirs);
}
-int countsubdirs(struct dnode **dn, int nfiles)
+static int countsubdirs(struct dnode **dn, int nfiles)
{
int i, subdirs;
return subdirs;
}
-int countfiles(struct dnode **dnp)
+static int countfiles(struct dnode **dnp)
{
int nfiles;
struct dnode *cur;
}
/* get memory to hold an array of pointers */
-struct dnode **dnalloc(int num)
+static struct dnode **dnalloc(int num)
{
struct dnode **p;
return(p);
}
-void dfree(struct dnode **dnp)
+static void dfree(struct dnode **dnp)
{
struct dnode *cur, *next;
free(dnp); /* free the array holding the dnode pointers */
}
-struct dnode **splitdnarray(struct dnode **dn, int nfiles, int which)
+static struct dnode **splitdnarray(struct dnode **dn, int nfiles, int which)
{
int dncnt, i, d;
struct dnode **dnp;
/*----------------------------------------------------------------------*/
#ifdef BB_FEATURE_LS_SORTFILES
-int sortcmp(struct dnode *d1, struct dnode *d2)
+static int sortcmp(struct dnode *d1, struct dnode *d2)
{
int cmp, dif;
}
/*----------------------------------------------------------------------*/
-void shellsort(struct dnode **dn, int size)
+static void shellsort(struct dnode **dn, int size)
{
struct dnode *temp;
int gap, i, j;
#endif
/*----------------------------------------------------------------------*/
-void showfiles(struct dnode **dn, int nfiles)
+static void showfiles(struct dnode **dn, int nfiles)
{
int i, ncols, nrows, row, nc;
#ifdef BB_FEATURE_AUTOWIDTH
}
/*----------------------------------------------------------------------*/
-void showdirs(struct dnode **dn, int ndirs)
+static void showdirs(struct dnode **dn, int ndirs)
{
int i, nfiles;
struct dnode **subdnp;
}
/*----------------------------------------------------------------------*/
-struct dnode **list_dir(char *path)
+static struct dnode **list_dir(char *path)
{
struct dnode *dn, *cur, **dnp;
struct dirent *entry;
}
/*----------------------------------------------------------------------*/
-int list_single(struct dnode *dn)
+static int list_single(struct dnode *dn)
{
int i, len;
char scratch[BUFSIZ + 1];
* Perform a test of a block; return the number of
* blocks readable/writeable.
*/
-long do_check(char *buffer, int try, unsigned int current_block)
+static long do_check(char *buffer, int try, unsigned int current_block)
{
long got;
static int pagesize;
static int *signature_page;
-struct swap_header_v1 {
+static struct swap_header_v1 {
char bootbits[1024]; /* Space for disklabel etc. */
unsigned int version;
unsigned int last_page;
}
}
-int
+static int
mount_one(char *blockDevice, char *directory, char *filesystemType,
unsigned long flags, char *string_flags, int useMtab, int fakeIt,
char *mtab_opts, int whineOnErrors)
/* vi: set sw=4 ts=4: */
/*
- * $Id: hostname.c,v 1.25 2001/03/09 14:36:42 andersen Exp $
+ * $Id: hostname.c,v 1.26 2001/03/09 21:24:12 andersen Exp $
* Mini hostname implementation for busybox
*
* Copyright (C) 1999 by Randolph Chung <tausq@debian.org>
#include <stdio.h>
#include <stdlib.h>
-void do_sethostname(char *s, int isfile)
+static void do_sethostname(char *s, int isfile)
{
FILE *f;
char buf[255];
* Foundation; either version 2 of the License, or (at
* your option) any later version.
*
- * $Id: route.c,v 1.8 2001/03/07 06:33:01 andersen Exp $
+ * $Id: route.c,v 1.9 2001/03/09 21:24:12 andersen Exp $
*
* displayroute() code added by Vladimir N. Oleynik <dzo@simtreas.ru>
* adjustments by Larry Doolittle <LRDoolittle@lbl.gov>
return EXIT_SUCCESS;
}
-void displayroutes(void)
+static void displayroutes(void)
{
char buff[256];
int nl = 0 ;
/* ******************************* */
-char const escapecharis[] = "\r\nEscape character is ";
+static char const escapecharis[] = "\r\nEscape character is ";
static void setConMode()
{
} 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);
*/
-int
+static int
getttywidth(void)
{
struct winsize winsize;
return (80);
}
-void
+static void
updateprogressmeter(int ignore)
{
int save_errno = errno;
errno = save_errno;
}
-void
+static void
alarmtimer(int wait)
{
struct itimerval itv;
}
-void
+static void
progressmeter(int flag)
{
static const char prefixes[] = " KMGTP";
* 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 $
*/
return buf;
}
-bool_t
+static bool_t
xdr_fhandle (XDR *xdrs, fhandle objp)
{
//register int32_t *buf;
int number;
};
-const struct signal_name signames[] = {
+static const struct signal_name signames[] = {
/* POSIX signals */
{ "HUP", SIGHUP }, /* 1 */
{ "INT", SIGINT }, /* 2 */
static const int RFC_868_BIAS = 2208988800UL;
-int setdate= 0;
-int printdate= 0;
+static int setdate= 0;
+static int printdate= 0;
-time_t askremotedate(char *host)
+static time_t askremotedate(char *host)
{
struct hostent *h;
struct sockaddr_in sin;
* Foundation; either version 2 of the License, or (at
* your option) any later version.
*
- * $Id: route.c,v 1.8 2001/03/07 06:33:01 andersen Exp $
+ * $Id: route.c,v 1.9 2001/03/09 21:24:12 andersen Exp $
*
* displayroute() code added by Vladimir N. Oleynik <dzo@simtreas.ru>
* adjustments by Larry Doolittle <LRDoolittle@lbl.gov>
return EXIT_SUCCESS;
}
-void displayroutes(void)
+static void displayroutes(void)
{
char buff[256];
int nl = 0 ;
#include <stdlib.h>
#include "busybox.h"
-int compare_ascii(const void *x, const void *y)
+static int compare_ascii(const void *x, const void *y)
{
return strcmp(*(char **)x, *(char **)y);
}
-int compare_numeric(const void *x, const void *y)
+static int compare_numeric(const void *x, const void *y)
{
return atoi(*(char **)x) - atoi(*(char **)y);
}
#include <linux/unistd.h>
#include "busybox.h"
-_syscall2(int, swapon, const char *, path, int, flags);
-_syscall1(int, swapoff, const char *, path);
+static _syscall2(int, swapon, const char *, path, int, flags);
+static _syscall1(int, swapoff, const char *, path);
static int whichApp;
static int taillen;
static int newline;
-void tailbuf_append(char *buf, int len)
+static void tailbuf_append(char *buf, int len)
{
tailbuf = xrealloc(tailbuf, taillen + len);
memcpy(tailbuf + taillen, buf, len);
taillen += len;
}
-void tailbuf_trunc()
+static void tailbuf_trunc()
{
char *s;
s = memchr(tailbuf, '\n', taillen);
#ifdef BB_FEATURE_TAR_GZIP
/* Signal handler for when child gzip process dies... */
-void child_died()
+static void child_died()
{
fflush(stdout);
fflush(stderr);
#endif
#if defined BB_FEATURE_TAR_EXCLUDE
-struct option longopts[] = {
+static struct option longopts[] = {
{ "exclude", 1, NULL, 'e' },
{ NULL, 0, NULL, 0 }
};
return( FALSE);
}
-int exclude_file(char **excluded_files, const char *file)
+static int exclude_file(char **excluded_files, const char *file)
{
int i;
return 0;
}
-int extract_file(char **extract_files, const char *file)
+static int extract_file(char **extract_files, const char *file)
{
int i;
/* ******************************* */
-char const escapecharis[] = "\r\nEscape character is ";
+static char const escapecharis[] = "\r\nEscape character is ";
static void setConMode()
{
};
-struct cmdoptions_t {
+static struct cmdoptions_t {
char *name;
unsigned char param_count;
unsigned char code;
}
}
-struct minix_inode *get_inode(unsigned int nr)
+static struct minix_inode *get_inode(unsigned int nr)
{
struct minix_inode *inode;
}
#ifdef BB_FEATURE_MINIX2
-struct minix2_inode *get_inode2(unsigned int nr)
+static struct minix2_inode *get_inode2(unsigned int nr)
{
struct minix2_inode *inode;
/* Some global variables that tells us how to parse. */
-shell_t shell=BASH; /* The shell we generate output for. */
-int quiet_errors=0; /* 0 is not quiet. */
-int quiet_output=0; /* 0 is not quiet. */
-int quote=1; /* 1 is do quote. */
-int alternative=0; /* 0 is getopt_long, 1 is getopt_long_only */
+static shell_t shell=BASH; /* The shell we generate output for. */
+static int quiet_errors=0; /* 0 is not quiet. */
+static int quiet_output=0; /* 0 is not quiet. */
+static int quote=1; /* 1 is do quote. */
+static int alternative=0; /* 0 is getopt_long, 1 is getopt_long_only */
/* Function prototypes */
-const char *normalize(const char *arg);
-int generate_output(char * argv[],int argc,const char *optstr,
+static const char *normalize(const char *arg);
+static int generate_output(char * argv[],int argc,const char *optstr,
const struct option *longopts);
-void add_long_options(char *options);
-void add_longopt(const char *name,int has_arg);
-void set_shell(const char *new_shell);
-void set_initial_shell(void);
+static void add_long_options(char *options);
+static void add_longopt(const char *name,int has_arg);
+static void set_shell(const char *new_shell);
/*
* Perform a test of a block; return the number of
* blocks readable/writeable.
*/
-long do_check(char *buffer, int try, unsigned int current_block)
+static long do_check(char *buffer, int try, unsigned int current_block)
{
long got;
static int pagesize;
static int *signature_page;
-struct swap_header_v1 {
+static struct swap_header_v1 {
char bootbits[1024]; /* Space for disklabel etc. */
unsigned int version;
unsigned int last_page;
}
}
-int
+static int
mount_one(char *blockDevice, char *directory, char *filesystemType,
unsigned long flags, char *string_flags, int useMtab, int fakeIt,
char *mtab_opts, int whineOnErrors)
return buf;
}
-bool_t
+static bool_t
xdr_fhandle (XDR *xdrs, fhandle objp)
{
//register int32_t *buf;
static const int RFC_868_BIAS = 2208988800UL;
-int setdate= 0;
-int printdate= 0;
+static int setdate= 0;
+static int printdate= 0;
-time_t askremotedate(char *host)
+static time_t askremotedate(char *host)
{
struct hostent *h;
struct sockaddr_in sin;
#include <linux/unistd.h>
#include "busybox.h"
-_syscall2(int, swapon, const char *, path, int, flags);
-_syscall1(int, swapoff, const char *, path);
+static _syscall2(int, swapon, const char *, path, int, flags);
+static _syscall1(int, swapoff, const char *, path);
static int whichApp;
static void encode __P ((void));
/* Pointer to the translation table we currently use. */
-const char *trans_ptr;
+static const char *trans_ptr;
/* The two currently defined translation tables. The first is the
standard uuencoding, the second is base64 encoding. */
-const char uu_std[64] = {
+static const char uu_std[64] = {
'`', '!', '"', '#', '$', '%', '&', '\'',
'(', ')', '*', '+', ',', '-', '.', '/',
'0', '1', '2', '3', '4', '5', '6', '7',
'X', 'Y', 'Z', '[', '\\', ']', '^', '_'
};
-const char uu_base64[64] = {
+static const char uu_base64[64] = {
'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H',
'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P',
'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X',
static int total_lines, total_words, total_chars, max_length;
static int print_lines, print_words, print_chars, print_length;
-void print_counts(int lines, int words, int chars, int length,
- const char *name)
+static void print_counts(int lines, int words, int chars, int length,
+ const char *name)
{
char const *space = "";
} 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);
*/
-int
+static int
getttywidth(void)
{
struct winsize winsize;
return (80);
}
-void
+static void
updateprogressmeter(int ignore)
{
int save_errno = errno;
errno = save_errno;
}
-void
+static void
alarmtimer(int wait)
{
struct itimerval itv;
}
-void
+static void
progressmeter(int flag)
{
static const char prefixes[] = " KMGTP";
* 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 $
*/