aboutsummaryrefslogtreecommitdiff
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
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.
-rw-r--r--archival/dpkg.c6
-rw-r--r--archival/tar.c8
-rw-r--r--coreutils/date.c4
-rw-r--r--coreutils/head.c2
-rw-r--r--coreutils/ls.c32
-rw-r--r--coreutils/sort.c4
-rw-r--r--coreutils/tail.c4
-rw-r--r--coreutils/uuencode.c6
-rw-r--r--coreutils/wc.c4
-rw-r--r--date.c4
-rw-r--r--dpkg.c6
-rw-r--r--fbset.c2
-rw-r--r--fsck_minix.c4
-rw-r--r--getopt.c21
-rw-r--r--head.c2
-rw-r--r--hostname.c4
-rw-r--r--init.c8
-rw-r--r--init/init.c8
-rw-r--r--kill.c2
-rw-r--r--ls.c32
-rw-r--r--mkfs_minix.c2
-rw-r--r--mkswap.c2
-rw-r--r--mount.c2
-rw-r--r--networking/hostname.c4
-rw-r--r--networking/route.c4
-rw-r--r--networking/telnet.c2
-rw-r--r--networking/wget.c22
-rw-r--r--nfsmount.c2
-rw-r--r--procps/kill.c2
-rw-r--r--rdate.c6
-rw-r--r--route.c4
-rw-r--r--sort.c4
-rw-r--r--swaponoff.c4
-rw-r--r--tail.c4
-rw-r--r--tar.c8
-rw-r--r--telnet.c2
-rw-r--r--util-linux/fbset.c2
-rw-r--r--util-linux/fsck_minix.c4
-rw-r--r--util-linux/getopt.c21
-rw-r--r--util-linux/mkfs_minix.c2
-rw-r--r--util-linux/mkswap.c2
-rw-r--r--util-linux/mount.c2
-rw-r--r--util-linux/nfsmount.c2
-rw-r--r--util-linux/rdate.c6
-rw-r--r--util-linux/swaponoff.c4
-rw-r--r--uuencode.c6
-rw-r--r--wc.c4
-rw-r--r--wget.c22
48 files changed, 156 insertions, 158 deletions
diff --git a/archival/dpkg.c b/archival/dpkg.c
index 0e4fd8efc..4e53652e4 100644
--- a/archival/dpkg.c
+++ b/archival/dpkg.c
@@ -79,9 +79,9 @@ static const char *statuswords[][10] = {
79 "post-inst-failed", "removal-failed", 0 } 79 "post-inst-failed", "removal-failed", 0 }
80}; 80};
81 81
82const int color_white = 0; 82static const int color_white = 0;
83const int color_grey = 1; 83static const int color_grey = 1;
84const int color_black = 2; 84static const int color_black = 2;
85 85
86/* data structures */ 86/* data structures */
87typedef struct package_s { 87typedef struct package_s {
diff --git a/archival/tar.c b/archival/tar.c
index a9363d5ad..38a8d9a04 100644
--- a/archival/tar.c
+++ b/archival/tar.c
@@ -150,7 +150,7 @@ static int writeTarFile(const char* tarName, int verboseFlag, char **argv,
150 150
151#ifdef BB_FEATURE_TAR_GZIP 151#ifdef BB_FEATURE_TAR_GZIP
152/* Signal handler for when child gzip process dies... */ 152/* Signal handler for when child gzip process dies... */
153void child_died() 153static void child_died()
154{ 154{
155 fflush(stdout); 155 fflush(stdout);
156 fflush(stderr); 156 fflush(stderr);
@@ -186,7 +186,7 @@ extern int tar_unzip_init(int tarFd)
186#endif 186#endif
187 187
188#if defined BB_FEATURE_TAR_EXCLUDE 188#if defined BB_FEATURE_TAR_EXCLUDE
189struct option longopts[] = { 189static struct option longopts[] = {
190 { "exclude", 1, NULL, 'e' }, 190 { "exclude", 1, NULL, 'e' },
191 { NULL, 0, NULL, 0 } 191 { NULL, 0, NULL, 0 }
192}; 192};
@@ -574,7 +574,7 @@ readTarHeader(struct TarHeader *rawHeader, struct TarInfo *header)
574 return( FALSE); 574 return( FALSE);
575} 575}
576 576
577int exclude_file(char **excluded_files, const char *file) 577static int exclude_file(char **excluded_files, const char *file)
578{ 578{
579 int i; 579 int i;
580 580
@@ -601,7 +601,7 @@ int exclude_file(char **excluded_files, const char *file)
601 return 0; 601 return 0;
602} 602}
603 603
604int extract_file(char **extract_files, const char *file) 604static int extract_file(char **extract_files, const char *file)
605{ 605{
606 int i; 606 int i;
607 607
diff --git a/coreutils/date.c b/coreutils/date.c
index 878331f71..4b2f66add 100644
--- a/coreutils/date.c
+++ b/coreutils/date.c
@@ -46,7 +46,7 @@
46 46
47/* Default input handling to save suprising some people */ 47/* Default input handling to save suprising some people */
48 48
49struct tm *date_conv_time(struct tm *tm_time, const char *t_string) 49static struct tm *date_conv_time(struct tm *tm_time, const char *t_string)
50{ 50{
51 int nr; 51 int nr;
52 52
@@ -73,7 +73,7 @@ struct tm *date_conv_time(struct tm *tm_time, const char *t_string)
73 73
74/* The new stuff for LRP */ 74/* The new stuff for LRP */
75 75
76struct tm *date_conv_ftime(struct tm *tm_time, const char *t_string) 76static struct tm *date_conv_ftime(struct tm *tm_time, const char *t_string)
77{ 77{
78 struct tm t; 78 struct tm t;
79 79
diff --git a/coreutils/head.c b/coreutils/head.c
index fac9ec659..0c8ef3d59 100644
--- a/coreutils/head.c
+++ b/coreutils/head.c
@@ -29,7 +29,7 @@
29#include <string.h> 29#include <string.h>
30#include "busybox.h" 30#include "busybox.h"
31 31
32int head(int len, FILE *fp) 32static int head(int len, FILE *fp)
33{ 33{
34 int i; 34 int i;
35 char *input; 35 char *input;
diff --git a/coreutils/ls.c b/coreutils/ls.c
index a8d7b182f..77de93a0c 100644
--- a/coreutils/ls.c
+++ b/coreutils/ls.c
@@ -156,9 +156,9 @@ struct dnode { /* the basic node */
156}; 156};
157typedef struct dnode dnode_t; 157typedef struct dnode dnode_t;
158 158
159struct dnode **list_dir(char *); 159static struct dnode **list_dir(char *);
160struct dnode **dnalloc(int); 160static struct dnode **dnalloc(int);
161int list_single(struct dnode *); 161static int list_single(struct dnode *);
162 162
163static unsigned int disp_opts; 163static unsigned int disp_opts;
164static unsigned int style_fmt; 164static unsigned int style_fmt;
@@ -186,7 +186,7 @@ static unsigned short column_width = COLUMN_WIDTH;
186static int status = EXIT_SUCCESS; 186static int status = EXIT_SUCCESS;
187 187
188#ifdef BB_FEATURE_HUMAN_READABLE 188#ifdef BB_FEATURE_HUMAN_READABLE
189unsigned long ls_disp_hr = 0; 189static unsigned long ls_disp_hr = 0;
190#endif 190#endif
191 191
192static int my_stat(struct dnode *cur) 192static int my_stat(struct dnode *cur)
@@ -256,7 +256,7 @@ static int is_subdir(struct dnode *dn)
256 strcmp(dn->name, "..") != 0); 256 strcmp(dn->name, "..") != 0);
257} 257}
258 258
259int countdirs(struct dnode **dn, int nfiles) 259static int countdirs(struct dnode **dn, int nfiles)
260{ 260{
261 int i, dirs; 261 int i, dirs;
262 262
@@ -268,7 +268,7 @@ int countdirs(struct dnode **dn, int nfiles)
268 return(dirs); 268 return(dirs);
269} 269}
270 270
271int countsubdirs(struct dnode **dn, int nfiles) 271static int countsubdirs(struct dnode **dn, int nfiles)
272{ 272{
273 int i, subdirs; 273 int i, subdirs;
274 274
@@ -280,7 +280,7 @@ int countsubdirs(struct dnode **dn, int nfiles)
280 return subdirs; 280 return subdirs;
281} 281}
282 282
283int countfiles(struct dnode **dnp) 283static int countfiles(struct dnode **dnp)
284{ 284{
285 int nfiles; 285 int nfiles;
286 struct dnode *cur; 286 struct dnode *cur;
@@ -293,7 +293,7 @@ int countfiles(struct dnode **dnp)
293} 293}
294 294
295/* get memory to hold an array of pointers */ 295/* get memory to hold an array of pointers */
296struct dnode **dnalloc(int num) 296static struct dnode **dnalloc(int num)
297{ 297{
298 struct dnode **p; 298 struct dnode **p;
299 299
@@ -303,7 +303,7 @@ struct dnode **dnalloc(int num)
303 return(p); 303 return(p);
304} 304}
305 305
306void dfree(struct dnode **dnp) 306static void dfree(struct dnode **dnp)
307{ 307{
308 struct dnode *cur, *next; 308 struct dnode *cur, *next;
309 309
@@ -319,7 +319,7 @@ void dfree(struct dnode **dnp)
319 free(dnp); /* free the array holding the dnode pointers */ 319 free(dnp); /* free the array holding the dnode pointers */
320} 320}
321 321
322struct dnode **splitdnarray(struct dnode **dn, int nfiles, int which) 322static struct dnode **splitdnarray(struct dnode **dn, int nfiles, int which)
323{ 323{
324 int dncnt, i, d; 324 int dncnt, i, d;
325 struct dnode **dnp; 325 struct dnode **dnp;
@@ -359,7 +359,7 @@ struct dnode **splitdnarray(struct dnode **dn, int nfiles, int which)
359 359
360/*----------------------------------------------------------------------*/ 360/*----------------------------------------------------------------------*/
361#ifdef BB_FEATURE_LS_SORTFILES 361#ifdef BB_FEATURE_LS_SORTFILES
362int sortcmp(struct dnode *d1, struct dnode *d2) 362static int sortcmp(struct dnode *d1, struct dnode *d2)
363{ 363{
364 int cmp, dif; 364 int cmp, dif;
365 365
@@ -396,7 +396,7 @@ int sortcmp(struct dnode *d1, struct dnode *d2)
396} 396}
397 397
398/*----------------------------------------------------------------------*/ 398/*----------------------------------------------------------------------*/
399void shellsort(struct dnode **dn, int size) 399static void shellsort(struct dnode **dn, int size)
400{ 400{
401 struct dnode *temp; 401 struct dnode *temp;
402 int gap, i, j; 402 int gap, i, j;
@@ -420,7 +420,7 @@ void shellsort(struct dnode **dn, int size)
420#endif 420#endif
421 421
422/*----------------------------------------------------------------------*/ 422/*----------------------------------------------------------------------*/
423void showfiles(struct dnode **dn, int nfiles) 423static void showfiles(struct dnode **dn, int nfiles)
424{ 424{
425 int i, ncols, nrows, row, nc; 425 int i, ncols, nrows, row, nc;
426#ifdef BB_FEATURE_AUTOWIDTH 426#ifdef BB_FEATURE_AUTOWIDTH
@@ -481,7 +481,7 @@ void showfiles(struct dnode **dn, int nfiles)
481} 481}
482 482
483/*----------------------------------------------------------------------*/ 483/*----------------------------------------------------------------------*/
484void showdirs(struct dnode **dn, int ndirs) 484static void showdirs(struct dnode **dn, int ndirs)
485{ 485{
486 int i, nfiles; 486 int i, nfiles;
487 struct dnode **subdnp; 487 struct dnode **subdnp;
@@ -524,7 +524,7 @@ void showdirs(struct dnode **dn, int ndirs)
524} 524}
525 525
526/*----------------------------------------------------------------------*/ 526/*----------------------------------------------------------------------*/
527struct dnode **list_dir(char *path) 527static struct dnode **list_dir(char *path)
528{ 528{
529 struct dnode *dn, *cur, **dnp; 529 struct dnode *dn, *cur, **dnp;
530 struct dirent *entry; 530 struct dirent *entry;
@@ -575,7 +575,7 @@ struct dnode **list_dir(char *path)
575} 575}
576 576
577/*----------------------------------------------------------------------*/ 577/*----------------------------------------------------------------------*/
578int list_single(struct dnode *dn) 578static int list_single(struct dnode *dn)
579{ 579{
580 int i, len; 580 int i, len;
581 char scratch[BUFSIZ + 1]; 581 char scratch[BUFSIZ + 1];
diff --git a/coreutils/sort.c b/coreutils/sort.c
index 79e629c75..9707efa51 100644
--- a/coreutils/sort.c
+++ b/coreutils/sort.c
@@ -26,12 +26,12 @@
26#include <stdlib.h> 26#include <stdlib.h>
27#include "busybox.h" 27#include "busybox.h"
28 28
29int compare_ascii(const void *x, const void *y) 29static int compare_ascii(const void *x, const void *y)
30{ 30{
31 return strcmp(*(char **)x, *(char **)y); 31 return strcmp(*(char **)x, *(char **)y);
32} 32}
33 33
34int compare_numeric(const void *x, const void *y) 34static int compare_numeric(const void *x, const void *y)
35{ 35{
36 return atoi(*(char **)x) - atoi(*(char **)y); 36 return atoi(*(char **)x) - atoi(*(char **)y);
37} 37}
diff --git a/coreutils/tail.c b/coreutils/tail.c
index a85256c80..ff77bde77 100644
--- a/coreutils/tail.c
+++ b/coreutils/tail.c
@@ -44,14 +44,14 @@ static char *tailbuf;
44static int taillen; 44static int taillen;
45static int newline; 45static int newline;
46 46
47void tailbuf_append(char *buf, int len) 47static void tailbuf_append(char *buf, int len)
48{ 48{
49 tailbuf = xrealloc(tailbuf, taillen + len); 49 tailbuf = xrealloc(tailbuf, taillen + len);
50 memcpy(tailbuf + taillen, buf, len); 50 memcpy(tailbuf + taillen, buf, len);
51 taillen += len; 51 taillen += len;
52} 52}
53 53
54void tailbuf_trunc() 54static void tailbuf_trunc()
55{ 55{
56 char *s; 56 char *s;
57 s = memchr(tailbuf, '\n', taillen); 57 s = memchr(tailbuf, '\n', taillen);
diff --git a/coreutils/uuencode.c b/coreutils/uuencode.c
index 41541defb..35a533309 100644
--- a/coreutils/uuencode.c
+++ b/coreutils/uuencode.c
@@ -34,11 +34,11 @@
34static void encode __P ((void)); 34static void encode __P ((void));
35 35
36/* Pointer to the translation table we currently use. */ 36/* Pointer to the translation table we currently use. */
37const char *trans_ptr; 37static const char *trans_ptr;
38 38
39/* The two currently defined translation tables. The first is the 39/* The two currently defined translation tables. The first is the
40 standard uuencoding, the second is base64 encoding. */ 40 standard uuencoding, the second is base64 encoding. */
41const char uu_std[64] = { 41static const char uu_std[64] = {
42 '`', '!', '"', '#', '$', '%', '&', '\'', 42 '`', '!', '"', '#', '$', '%', '&', '\'',
43 '(', ')', '*', '+', ',', '-', '.', '/', 43 '(', ')', '*', '+', ',', '-', '.', '/',
44 '0', '1', '2', '3', '4', '5', '6', '7', 44 '0', '1', '2', '3', '4', '5', '6', '7',
@@ -49,7 +49,7 @@ const char uu_std[64] = {
49 'X', 'Y', 'Z', '[', '\\', ']', '^', '_' 49 'X', 'Y', 'Z', '[', '\\', ']', '^', '_'
50}; 50};
51 51
52const char uu_base64[64] = { 52static const char uu_base64[64] = {
53 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 53 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H',
54 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 54 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P',
55 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 55 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X',
diff --git a/coreutils/wc.c b/coreutils/wc.c
index 5472c3070..695e7e7d4 100644
--- a/coreutils/wc.c
+++ b/coreutils/wc.c
@@ -29,8 +29,8 @@
29static int total_lines, total_words, total_chars, max_length; 29static int total_lines, total_words, total_chars, max_length;
30static int print_lines, print_words, print_chars, print_length; 30static int print_lines, print_words, print_chars, print_length;
31 31
32void print_counts(int lines, int words, int chars, int length, 32static void print_counts(int lines, int words, int chars, int length,
33 const char *name) 33 const char *name)
34{ 34{
35 char const *space = ""; 35 char const *space = "";
36 36
diff --git a/date.c b/date.c
index 878331f71..4b2f66add 100644
--- a/date.c
+++ b/date.c
@@ -46,7 +46,7 @@
46 46
47/* Default input handling to save suprising some people */ 47/* Default input handling to save suprising some people */
48 48
49struct tm *date_conv_time(struct tm *tm_time, const char *t_string) 49static struct tm *date_conv_time(struct tm *tm_time, const char *t_string)
50{ 50{
51 int nr; 51 int nr;
52 52
@@ -73,7 +73,7 @@ struct tm *date_conv_time(struct tm *tm_time, const char *t_string)
73 73
74/* The new stuff for LRP */ 74/* The new stuff for LRP */
75 75
76struct tm *date_conv_ftime(struct tm *tm_time, const char *t_string) 76static struct tm *date_conv_ftime(struct tm *tm_time, const char *t_string)
77{ 77{
78 struct tm t; 78 struct tm t;
79 79
diff --git a/dpkg.c b/dpkg.c
index 0e4fd8efc..4e53652e4 100644
--- a/dpkg.c
+++ b/dpkg.c
@@ -79,9 +79,9 @@ static const char *statuswords[][10] = {
79 "post-inst-failed", "removal-failed", 0 } 79 "post-inst-failed", "removal-failed", 0 }
80}; 80};
81 81
82const int color_white = 0; 82static const int color_white = 0;
83const int color_grey = 1; 83static const int color_grey = 1;
84const int color_black = 2; 84static const int color_black = 2;
85 85
86/* data structures */ 86/* data structures */
87typedef struct package_s { 87typedef struct package_s {
diff --git a/fbset.c b/fbset.c
index be1e3c3f1..80711ec9f 100644
--- a/fbset.c
+++ b/fbset.c
@@ -132,7 +132,7 @@ struct fb_var_screeninfo {
132}; 132};
133 133
134 134
135struct cmdoptions_t { 135static struct cmdoptions_t {
136 char *name; 136 char *name;
137 unsigned char param_count; 137 unsigned char param_count;
138 unsigned char code; 138 unsigned char code;
diff --git a/fsck_minix.c b/fsck_minix.c
index 9a53a705e..bd0c8a61c 100644
--- a/fsck_minix.c
+++ b/fsck_minix.c
@@ -701,7 +701,7 @@ static void read_tables(void)
701 } 701 }
702} 702}
703 703
704struct minix_inode *get_inode(unsigned int nr) 704static struct minix_inode *get_inode(unsigned int nr)
705{ 705{
706 struct minix_inode *inode; 706 struct minix_inode *inode;
707 707
@@ -749,7 +749,7 @@ struct minix_inode *get_inode(unsigned int nr)
749} 749}
750 750
751#ifdef BB_FEATURE_MINIX2 751#ifdef BB_FEATURE_MINIX2
752struct minix2_inode *get_inode2(unsigned int nr) 752static struct minix2_inode *get_inode2(unsigned int nr)
753{ 753{
754 struct minix2_inode *inode; 754 struct minix2_inode *inode;
755 755
diff --git a/getopt.c b/getopt.c
index eb28d5d07..b74dd65a1 100644
--- a/getopt.c
+++ b/getopt.c
@@ -62,20 +62,19 @@ typedef enum {BASH,TCSH} shell_t;
62 62
63 63
64/* Some global variables that tells us how to parse. */ 64/* Some global variables that tells us how to parse. */
65shell_t shell=BASH; /* The shell we generate output for. */ 65static shell_t shell=BASH; /* The shell we generate output for. */
66int quiet_errors=0; /* 0 is not quiet. */ 66static int quiet_errors=0; /* 0 is not quiet. */
67int quiet_output=0; /* 0 is not quiet. */ 67static int quiet_output=0; /* 0 is not quiet. */
68int quote=1; /* 1 is do quote. */ 68static int quote=1; /* 1 is do quote. */
69int alternative=0; /* 0 is getopt_long, 1 is getopt_long_only */ 69static int alternative=0; /* 0 is getopt_long, 1 is getopt_long_only */
70 70
71/* Function prototypes */ 71/* Function prototypes */
72const char *normalize(const char *arg); 72static const char *normalize(const char *arg);
73int generate_output(char * argv[],int argc,const char *optstr, 73static int generate_output(char * argv[],int argc,const char *optstr,
74 const struct option *longopts); 74 const struct option *longopts);
75void add_long_options(char *options); 75static void add_long_options(char *options);
76void add_longopt(const char *name,int has_arg); 76static void add_longopt(const char *name,int has_arg);
77void set_shell(const char *new_shell); 77static void set_shell(const char *new_shell);
78void set_initial_shell(void);
79 78
80 79
81/* 80/*
diff --git a/head.c b/head.c
index fac9ec659..0c8ef3d59 100644
--- a/head.c
+++ b/head.c
@@ -29,7 +29,7 @@
29#include <string.h> 29#include <string.h>
30#include "busybox.h" 30#include "busybox.h"
31 31
32int head(int len, FILE *fp) 32static int head(int len, FILE *fp)
33{ 33{
34 int i; 34 int i;
35 char *input; 35 char *input;
diff --git a/hostname.c b/hostname.c
index 8ea8fe107..a6e001d54 100644
--- a/hostname.c
+++ b/hostname.c
@@ -1,6 +1,6 @@
1/* vi: set sw=4 ts=4: */ 1/* vi: set sw=4 ts=4: */
2/* 2/*
3 * $Id: hostname.c,v 1.25 2001/03/09 14:36:42 andersen Exp $ 3 * $Id: hostname.c,v 1.26 2001/03/09 21:24:12 andersen Exp $
4 * Mini hostname implementation for busybox 4 * Mini hostname implementation for busybox
5 * 5 *
6 * Copyright (C) 1999 by Randolph Chung <tausq@debian.org> 6 * Copyright (C) 1999 by Randolph Chung <tausq@debian.org>
@@ -32,7 +32,7 @@
32#include <stdio.h> 32#include <stdio.h>
33#include <stdlib.h> 33#include <stdlib.h>
34 34
35void do_sethostname(char *s, int isfile) 35static void do_sethostname(char *s, int isfile)
36{ 36{
37 FILE *f; 37 FILE *f;
38 char buf[255]; 38 char buf[255];
diff --git a/init.c b/init.c
index 52ee6777a..a0f15b0ff 100644
--- a/init.c
+++ b/init.c
@@ -174,7 +174,7 @@ struct initActionTag {
174 initAction *nextPtr; 174 initAction *nextPtr;
175 initActionEnum action; 175 initActionEnum action;
176}; 176};
177initAction *initActionList = NULL; 177static initAction *initActionList = NULL;
178 178
179 179
180static char *secondConsole = VT_SECONDARY; 180static char *secondConsole = VT_SECONDARY;
@@ -255,7 +255,7 @@ static void message(int device, char *fmt, ...)
255} 255}
256 256
257/* Set terminal settings to reasonable defaults */ 257/* Set terminal settings to reasonable defaults */
258void set_term(int fd) 258static void set_term(int fd)
259{ 259{
260 struct termios tty; 260 struct termios tty;
261 261
@@ -670,7 +670,7 @@ static void reboot_signal(int sig)
670 670
671#endif /* ! DEBUG_INIT */ 671#endif /* ! DEBUG_INIT */
672 672
673void new_initAction(initActionEnum action, char *process, char *cons) 673static void new_initAction(initActionEnum action, char *process, char *cons)
674{ 674{
675 initAction *newAction; 675 initAction *newAction;
676 676
@@ -725,7 +725,7 @@ static void delete_initAction(initAction * action)
725 * _is_ defined, but /etc/inittab is missing, this 725 * _is_ defined, but /etc/inittab is missing, this
726 * results in the same set of default behaviors. 726 * results in the same set of default behaviors.
727 * */ 727 * */
728void parse_inittab(void) 728static void parse_inittab(void)
729{ 729{
730#ifdef BB_FEATURE_USE_INITTAB 730#ifdef BB_FEATURE_USE_INITTAB
731 FILE *file; 731 FILE *file;
diff --git a/init/init.c b/init/init.c
index 52ee6777a..a0f15b0ff 100644
--- a/init/init.c
+++ b/init/init.c
@@ -174,7 +174,7 @@ struct initActionTag {
174 initAction *nextPtr; 174 initAction *nextPtr;
175 initActionEnum action; 175 initActionEnum action;
176}; 176};
177initAction *initActionList = NULL; 177static initAction *initActionList = NULL;
178 178
179 179
180static char *secondConsole = VT_SECONDARY; 180static char *secondConsole = VT_SECONDARY;
@@ -255,7 +255,7 @@ static void message(int device, char *fmt, ...)
255} 255}
256 256
257/* Set terminal settings to reasonable defaults */ 257/* Set terminal settings to reasonable defaults */
258void set_term(int fd) 258static void set_term(int fd)
259{ 259{
260 struct termios tty; 260 struct termios tty;
261 261
@@ -670,7 +670,7 @@ static void reboot_signal(int sig)
670 670
671#endif /* ! DEBUG_INIT */ 671#endif /* ! DEBUG_INIT */
672 672
673void new_initAction(initActionEnum action, char *process, char *cons) 673static void new_initAction(initActionEnum action, char *process, char *cons)
674{ 674{
675 initAction *newAction; 675 initAction *newAction;
676 676
@@ -725,7 +725,7 @@ static void delete_initAction(initAction * action)
725 * _is_ defined, but /etc/inittab is missing, this 725 * _is_ defined, but /etc/inittab is missing, this
726 * results in the same set of default behaviors. 726 * results in the same set of default behaviors.
727 * */ 727 * */
728void parse_inittab(void) 728static void parse_inittab(void)
729{ 729{
730#ifdef BB_FEATURE_USE_INITTAB 730#ifdef BB_FEATURE_USE_INITTAB
731 FILE *file; 731 FILE *file;
diff --git a/kill.c b/kill.c
index e62503b3c..fb3d72213 100644
--- a/kill.c
+++ b/kill.c
@@ -39,7 +39,7 @@ struct signal_name {
39 int number; 39 int number;
40}; 40};
41 41
42const struct signal_name signames[] = { 42static const struct signal_name signames[] = {
43 /* POSIX signals */ 43 /* POSIX signals */
44 { "HUP", SIGHUP }, /* 1 */ 44 { "HUP", SIGHUP }, /* 1 */
45 { "INT", SIGINT }, /* 2 */ 45 { "INT", SIGINT }, /* 2 */
diff --git a/ls.c b/ls.c
index a8d7b182f..77de93a0c 100644
--- a/ls.c
+++ b/ls.c
@@ -156,9 +156,9 @@ struct dnode { /* the basic node */
156}; 156};
157typedef struct dnode dnode_t; 157typedef struct dnode dnode_t;
158 158
159struct dnode **list_dir(char *); 159static struct dnode **list_dir(char *);
160struct dnode **dnalloc(int); 160static struct dnode **dnalloc(int);
161int list_single(struct dnode *); 161static int list_single(struct dnode *);
162 162
163static unsigned int disp_opts; 163static unsigned int disp_opts;
164static unsigned int style_fmt; 164static unsigned int style_fmt;
@@ -186,7 +186,7 @@ static unsigned short column_width = COLUMN_WIDTH;
186static int status = EXIT_SUCCESS; 186static int status = EXIT_SUCCESS;
187 187
188#ifdef BB_FEATURE_HUMAN_READABLE 188#ifdef BB_FEATURE_HUMAN_READABLE
189unsigned long ls_disp_hr = 0; 189static unsigned long ls_disp_hr = 0;
190#endif 190#endif
191 191
192static int my_stat(struct dnode *cur) 192static int my_stat(struct dnode *cur)
@@ -256,7 +256,7 @@ static int is_subdir(struct dnode *dn)
256 strcmp(dn->name, "..") != 0); 256 strcmp(dn->name, "..") != 0);
257} 257}
258 258
259int countdirs(struct dnode **dn, int nfiles) 259static int countdirs(struct dnode **dn, int nfiles)
260{ 260{
261 int i, dirs; 261 int i, dirs;
262 262
@@ -268,7 +268,7 @@ int countdirs(struct dnode **dn, int nfiles)
268 return(dirs); 268 return(dirs);
269} 269}
270 270
271int countsubdirs(struct dnode **dn, int nfiles) 271static int countsubdirs(struct dnode **dn, int nfiles)
272{ 272{
273 int i, subdirs; 273 int i, subdirs;
274 274
@@ -280,7 +280,7 @@ int countsubdirs(struct dnode **dn, int nfiles)
280 return subdirs; 280 return subdirs;
281} 281}
282 282
283int countfiles(struct dnode **dnp) 283static int countfiles(struct dnode **dnp)
284{ 284{
285 int nfiles; 285 int nfiles;
286 struct dnode *cur; 286 struct dnode *cur;
@@ -293,7 +293,7 @@ int countfiles(struct dnode **dnp)
293} 293}
294 294
295/* get memory to hold an array of pointers */ 295/* get memory to hold an array of pointers */
296struct dnode **dnalloc(int num) 296static struct dnode **dnalloc(int num)
297{ 297{
298 struct dnode **p; 298 struct dnode **p;
299 299
@@ -303,7 +303,7 @@ struct dnode **dnalloc(int num)
303 return(p); 303 return(p);
304} 304}
305 305
306void dfree(struct dnode **dnp) 306static void dfree(struct dnode **dnp)
307{ 307{
308 struct dnode *cur, *next; 308 struct dnode *cur, *next;
309 309
@@ -319,7 +319,7 @@ void dfree(struct dnode **dnp)
319 free(dnp); /* free the array holding the dnode pointers */ 319 free(dnp); /* free the array holding the dnode pointers */
320} 320}
321 321
322struct dnode **splitdnarray(struct dnode **dn, int nfiles, int which) 322static struct dnode **splitdnarray(struct dnode **dn, int nfiles, int which)
323{ 323{
324 int dncnt, i, d; 324 int dncnt, i, d;
325 struct dnode **dnp; 325 struct dnode **dnp;
@@ -359,7 +359,7 @@ struct dnode **splitdnarray(struct dnode **dn, int nfiles, int which)
359 359
360/*----------------------------------------------------------------------*/ 360/*----------------------------------------------------------------------*/
361#ifdef BB_FEATURE_LS_SORTFILES 361#ifdef BB_FEATURE_LS_SORTFILES
362int sortcmp(struct dnode *d1, struct dnode *d2) 362static int sortcmp(struct dnode *d1, struct dnode *d2)
363{ 363{
364 int cmp, dif; 364 int cmp, dif;
365 365
@@ -396,7 +396,7 @@ int sortcmp(struct dnode *d1, struct dnode *d2)
396} 396}
397 397
398/*----------------------------------------------------------------------*/ 398/*----------------------------------------------------------------------*/
399void shellsort(struct dnode **dn, int size) 399static void shellsort(struct dnode **dn, int size)
400{ 400{
401 struct dnode *temp; 401 struct dnode *temp;
402 int gap, i, j; 402 int gap, i, j;
@@ -420,7 +420,7 @@ void shellsort(struct dnode **dn, int size)
420#endif 420#endif
421 421
422/*----------------------------------------------------------------------*/ 422/*----------------------------------------------------------------------*/
423void showfiles(struct dnode **dn, int nfiles) 423static void showfiles(struct dnode **dn, int nfiles)
424{ 424{
425 int i, ncols, nrows, row, nc; 425 int i, ncols, nrows, row, nc;
426#ifdef BB_FEATURE_AUTOWIDTH 426#ifdef BB_FEATURE_AUTOWIDTH
@@ -481,7 +481,7 @@ void showfiles(struct dnode **dn, int nfiles)
481} 481}
482 482
483/*----------------------------------------------------------------------*/ 483/*----------------------------------------------------------------------*/
484void showdirs(struct dnode **dn, int ndirs) 484static void showdirs(struct dnode **dn, int ndirs)
485{ 485{
486 int i, nfiles; 486 int i, nfiles;
487 struct dnode **subdnp; 487 struct dnode **subdnp;
@@ -524,7 +524,7 @@ void showdirs(struct dnode **dn, int ndirs)
524} 524}
525 525
526/*----------------------------------------------------------------------*/ 526/*----------------------------------------------------------------------*/
527struct dnode **list_dir(char *path) 527static struct dnode **list_dir(char *path)
528{ 528{
529 struct dnode *dn, *cur, **dnp; 529 struct dnode *dn, *cur, **dnp;
530 struct dirent *entry; 530 struct dirent *entry;
@@ -575,7 +575,7 @@ struct dnode **list_dir(char *path)
575} 575}
576 576
577/*----------------------------------------------------------------------*/ 577/*----------------------------------------------------------------------*/
578int list_single(struct dnode *dn) 578static int list_single(struct dnode *dn)
579{ 579{
580 int i, len; 580 int i, len;
581 char scratch[BUFSIZ + 1]; 581 char scratch[BUFSIZ + 1];
diff --git a/mkfs_minix.c b/mkfs_minix.c
index 928a49674..a83fa7961 100644
--- a/mkfs_minix.c
+++ b/mkfs_minix.c
@@ -609,7 +609,7 @@ static void setup_tables(void)
609 * Perform a test of a block; return the number of 609 * Perform a test of a block; return the number of
610 * blocks readable/writeable. 610 * blocks readable/writeable.
611 */ 611 */
612long do_check(char *buffer, int try, unsigned int current_block) 612static long do_check(char *buffer, int try, unsigned int current_block)
613{ 613{
614 long got; 614 long got;
615 615
diff --git a/mkswap.c b/mkswap.c
index b5153f623..f72c7009a 100644
--- a/mkswap.c
+++ b/mkswap.c
@@ -72,7 +72,7 @@ static int version = -1;
72static int pagesize; 72static int pagesize;
73static int *signature_page; 73static int *signature_page;
74 74
75struct swap_header_v1 { 75static struct swap_header_v1 {
76 char bootbits[1024]; /* Space for disklabel etc. */ 76 char bootbits[1024]; /* Space for disklabel etc. */
77 unsigned int version; 77 unsigned int version;
78 unsigned int last_page; 78 unsigned int last_page;
diff --git a/mount.c b/mount.c
index fd68dafd6..a2d6053c0 100644
--- a/mount.c
+++ b/mount.c
@@ -231,7 +231,7 @@ parse_mount_options(char *options, int *flags, char *strflags)
231 } 231 }
232} 232}
233 233
234int 234static int
235mount_one(char *blockDevice, char *directory, char *filesystemType, 235mount_one(char *blockDevice, char *directory, char *filesystemType,
236 unsigned long flags, char *string_flags, int useMtab, int fakeIt, 236 unsigned long flags, char *string_flags, int useMtab, int fakeIt,
237 char *mtab_opts, int whineOnErrors) 237 char *mtab_opts, int whineOnErrors)
diff --git a/networking/hostname.c b/networking/hostname.c
index 8ea8fe107..a6e001d54 100644
--- a/networking/hostname.c
+++ b/networking/hostname.c
@@ -1,6 +1,6 @@
1/* vi: set sw=4 ts=4: */ 1/* vi: set sw=4 ts=4: */
2/* 2/*
3 * $Id: hostname.c,v 1.25 2001/03/09 14:36:42 andersen Exp $ 3 * $Id: hostname.c,v 1.26 2001/03/09 21:24:12 andersen Exp $
4 * Mini hostname implementation for busybox 4 * Mini hostname implementation for busybox
5 * 5 *
6 * Copyright (C) 1999 by Randolph Chung <tausq@debian.org> 6 * Copyright (C) 1999 by Randolph Chung <tausq@debian.org>
@@ -32,7 +32,7 @@
32#include <stdio.h> 32#include <stdio.h>
33#include <stdlib.h> 33#include <stdlib.h>
34 34
35void do_sethostname(char *s, int isfile) 35static void do_sethostname(char *s, int isfile)
36{ 36{
37 FILE *f; 37 FILE *f;
38 char buf[255]; 38 char buf[255];
diff --git a/networking/route.c b/networking/route.c
index b1152ca9d..337b35825 100644
--- a/networking/route.c
+++ b/networking/route.c
@@ -15,7 +15,7 @@
15 * Foundation; either version 2 of the License, or (at 15 * Foundation; either version 2 of the License, or (at
16 * your option) any later version. 16 * your option) any later version.
17 * 17 *
18 * $Id: route.c,v 1.8 2001/03/07 06:33:01 andersen Exp $ 18 * $Id: route.c,v 1.9 2001/03/09 21:24:12 andersen Exp $
19 * 19 *
20 * displayroute() code added by Vladimir N. Oleynik <dzo@simtreas.ru> 20 * displayroute() code added by Vladimir N. Oleynik <dzo@simtreas.ru>
21 * adjustments by Larry Doolittle <LRDoolittle@lbl.gov> 21 * adjustments by Larry Doolittle <LRDoolittle@lbl.gov>
@@ -346,7 +346,7 @@ INET_setroute(int action, int options, char **args)
346 return EXIT_SUCCESS; 346 return EXIT_SUCCESS;
347} 347}
348 348
349void displayroutes(void) 349static void displayroutes(void)
350{ 350{
351 char buff[256]; 351 char buff[256];
352 int nl = 0 ; 352 int nl = 0 ;
diff --git a/networking/telnet.c b/networking/telnet.c
index fd1ace41d..758cce8b1 100644
--- a/networking/telnet.c
+++ b/networking/telnet.c
@@ -325,7 +325,7 @@ static void putiac1(byte c)
325 325
326/* ******************************* */ 326/* ******************************* */
327 327
328char const escapecharis[] = "\r\nEscape character is "; 328static char const escapecharis[] = "\r\nEscape character is ";
329 329
330static void setConMode() 330static void setConMode()
331{ 331{
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
diff --git a/nfsmount.c b/nfsmount.c
index aee496980..cd815102c 100644
--- a/nfsmount.c
+++ b/nfsmount.c
@@ -886,7 +886,7 @@ static char *nfs_strerror(int stat)
886 return buf; 886 return buf;
887} 887}
888 888
889bool_t 889static bool_t
890xdr_fhandle (XDR *xdrs, fhandle objp) 890xdr_fhandle (XDR *xdrs, fhandle objp)
891{ 891{
892 //register int32_t *buf; 892 //register int32_t *buf;
diff --git a/procps/kill.c b/procps/kill.c
index e62503b3c..fb3d72213 100644
--- a/procps/kill.c
+++ b/procps/kill.c
@@ -39,7 +39,7 @@ struct signal_name {
39 int number; 39 int number;
40}; 40};
41 41
42const struct signal_name signames[] = { 42static const struct signal_name signames[] = {
43 /* POSIX signals */ 43 /* POSIX signals */
44 { "HUP", SIGHUP }, /* 1 */ 44 { "HUP", SIGHUP }, /* 1 */
45 { "INT", SIGINT }, /* 2 */ 45 { "INT", SIGINT }, /* 2 */
diff --git a/rdate.c b/rdate.c
index ed7121a75..28e87323d 100644
--- a/rdate.c
+++ b/rdate.c
@@ -39,10 +39,10 @@
39 39
40static const int RFC_868_BIAS = 2208988800UL; 40static const int RFC_868_BIAS = 2208988800UL;
41 41
42int setdate= 0; 42static int setdate= 0;
43int printdate= 0; 43static int printdate= 0;
44 44
45time_t askremotedate(char *host) 45static time_t askremotedate(char *host)
46{ 46{
47 struct hostent *h; 47 struct hostent *h;
48 struct sockaddr_in sin; 48 struct sockaddr_in sin;
diff --git a/route.c b/route.c
index b1152ca9d..337b35825 100644
--- a/route.c
+++ b/route.c
@@ -15,7 +15,7 @@
15 * Foundation; either version 2 of the License, or (at 15 * Foundation; either version 2 of the License, or (at
16 * your option) any later version. 16 * your option) any later version.
17 * 17 *
18 * $Id: route.c,v 1.8 2001/03/07 06:33:01 andersen Exp $ 18 * $Id: route.c,v 1.9 2001/03/09 21:24:12 andersen Exp $
19 * 19 *
20 * displayroute() code added by Vladimir N. Oleynik <dzo@simtreas.ru> 20 * displayroute() code added by Vladimir N. Oleynik <dzo@simtreas.ru>
21 * adjustments by Larry Doolittle <LRDoolittle@lbl.gov> 21 * adjustments by Larry Doolittle <LRDoolittle@lbl.gov>
@@ -346,7 +346,7 @@ INET_setroute(int action, int options, char **args)
346 return EXIT_SUCCESS; 346 return EXIT_SUCCESS;
347} 347}
348 348
349void displayroutes(void) 349static void displayroutes(void)
350{ 350{
351 char buff[256]; 351 char buff[256];
352 int nl = 0 ; 352 int nl = 0 ;
diff --git a/sort.c b/sort.c
index 79e629c75..9707efa51 100644
--- a/sort.c
+++ b/sort.c
@@ -26,12 +26,12 @@
26#include <stdlib.h> 26#include <stdlib.h>
27#include "busybox.h" 27#include "busybox.h"
28 28
29int compare_ascii(const void *x, const void *y) 29static int compare_ascii(const void *x, const void *y)
30{ 30{
31 return strcmp(*(char **)x, *(char **)y); 31 return strcmp(*(char **)x, *(char **)y);
32} 32}
33 33
34int compare_numeric(const void *x, const void *y) 34static int compare_numeric(const void *x, const void *y)
35{ 35{
36 return atoi(*(char **)x) - atoi(*(char **)y); 36 return atoi(*(char **)x) - atoi(*(char **)y);
37} 37}
diff --git a/swaponoff.c b/swaponoff.c
index 9deb13a28..55022ae3b 100644
--- a/swaponoff.c
+++ b/swaponoff.c
@@ -33,8 +33,8 @@
33#include <linux/unistd.h> 33#include <linux/unistd.h>
34#include "busybox.h" 34#include "busybox.h"
35 35
36_syscall2(int, swapon, const char *, path, int, flags); 36static _syscall2(int, swapon, const char *, path, int, flags);
37_syscall1(int, swapoff, const char *, path); 37static _syscall1(int, swapoff, const char *, path);
38 38
39 39
40static int whichApp; 40static int whichApp;
diff --git a/tail.c b/tail.c
index a85256c80..ff77bde77 100644
--- a/tail.c
+++ b/tail.c
@@ -44,14 +44,14 @@ static char *tailbuf;
44static int taillen; 44static int taillen;
45static int newline; 45static int newline;
46 46
47void tailbuf_append(char *buf, int len) 47static void tailbuf_append(char *buf, int len)
48{ 48{
49 tailbuf = xrealloc(tailbuf, taillen + len); 49 tailbuf = xrealloc(tailbuf, taillen + len);
50 memcpy(tailbuf + taillen, buf, len); 50 memcpy(tailbuf + taillen, buf, len);
51 taillen += len; 51 taillen += len;
52} 52}
53 53
54void tailbuf_trunc() 54static void tailbuf_trunc()
55{ 55{
56 char *s; 56 char *s;
57 s = memchr(tailbuf, '\n', taillen); 57 s = memchr(tailbuf, '\n', taillen);
diff --git a/tar.c b/tar.c
index a9363d5ad..38a8d9a04 100644
--- a/tar.c
+++ b/tar.c
@@ -150,7 +150,7 @@ static int writeTarFile(const char* tarName, int verboseFlag, char **argv,
150 150
151#ifdef BB_FEATURE_TAR_GZIP 151#ifdef BB_FEATURE_TAR_GZIP
152/* Signal handler for when child gzip process dies... */ 152/* Signal handler for when child gzip process dies... */
153void child_died() 153static void child_died()
154{ 154{
155 fflush(stdout); 155 fflush(stdout);
156 fflush(stderr); 156 fflush(stderr);
@@ -186,7 +186,7 @@ extern int tar_unzip_init(int tarFd)
186#endif 186#endif
187 187
188#if defined BB_FEATURE_TAR_EXCLUDE 188#if defined BB_FEATURE_TAR_EXCLUDE
189struct option longopts[] = { 189static struct option longopts[] = {
190 { "exclude", 1, NULL, 'e' }, 190 { "exclude", 1, NULL, 'e' },
191 { NULL, 0, NULL, 0 } 191 { NULL, 0, NULL, 0 }
192}; 192};
@@ -574,7 +574,7 @@ readTarHeader(struct TarHeader *rawHeader, struct TarInfo *header)
574 return( FALSE); 574 return( FALSE);
575} 575}
576 576
577int exclude_file(char **excluded_files, const char *file) 577static int exclude_file(char **excluded_files, const char *file)
578{ 578{
579 int i; 579 int i;
580 580
@@ -601,7 +601,7 @@ int exclude_file(char **excluded_files, const char *file)
601 return 0; 601 return 0;
602} 602}
603 603
604int extract_file(char **extract_files, const char *file) 604static int extract_file(char **extract_files, const char *file)
605{ 605{
606 int i; 606 int i;
607 607
diff --git a/telnet.c b/telnet.c
index fd1ace41d..758cce8b1 100644
--- a/telnet.c
+++ b/telnet.c
@@ -325,7 +325,7 @@ static void putiac1(byte c)
325 325
326/* ******************************* */ 326/* ******************************* */
327 327
328char const escapecharis[] = "\r\nEscape character is "; 328static char const escapecharis[] = "\r\nEscape character is ";
329 329
330static void setConMode() 330static void setConMode()
331{ 331{
diff --git a/util-linux/fbset.c b/util-linux/fbset.c
index be1e3c3f1..80711ec9f 100644
--- a/util-linux/fbset.c
+++ b/util-linux/fbset.c
@@ -132,7 +132,7 @@ struct fb_var_screeninfo {
132}; 132};
133 133
134 134
135struct cmdoptions_t { 135static struct cmdoptions_t {
136 char *name; 136 char *name;
137 unsigned char param_count; 137 unsigned char param_count;
138 unsigned char code; 138 unsigned char code;
diff --git a/util-linux/fsck_minix.c b/util-linux/fsck_minix.c
index 9a53a705e..bd0c8a61c 100644
--- a/util-linux/fsck_minix.c
+++ b/util-linux/fsck_minix.c
@@ -701,7 +701,7 @@ static void read_tables(void)
701 } 701 }
702} 702}
703 703
704struct minix_inode *get_inode(unsigned int nr) 704static struct minix_inode *get_inode(unsigned int nr)
705{ 705{
706 struct minix_inode *inode; 706 struct minix_inode *inode;
707 707
@@ -749,7 +749,7 @@ struct minix_inode *get_inode(unsigned int nr)
749} 749}
750 750
751#ifdef BB_FEATURE_MINIX2 751#ifdef BB_FEATURE_MINIX2
752struct minix2_inode *get_inode2(unsigned int nr) 752static struct minix2_inode *get_inode2(unsigned int nr)
753{ 753{
754 struct minix2_inode *inode; 754 struct minix2_inode *inode;
755 755
diff --git a/util-linux/getopt.c b/util-linux/getopt.c
index eb28d5d07..b74dd65a1 100644
--- a/util-linux/getopt.c
+++ b/util-linux/getopt.c
@@ -62,20 +62,19 @@ typedef enum {BASH,TCSH} shell_t;
62 62
63 63
64/* Some global variables that tells us how to parse. */ 64/* Some global variables that tells us how to parse. */
65shell_t shell=BASH; /* The shell we generate output for. */ 65static shell_t shell=BASH; /* The shell we generate output for. */
66int quiet_errors=0; /* 0 is not quiet. */ 66static int quiet_errors=0; /* 0 is not quiet. */
67int quiet_output=0; /* 0 is not quiet. */ 67static int quiet_output=0; /* 0 is not quiet. */
68int quote=1; /* 1 is do quote. */ 68static int quote=1; /* 1 is do quote. */
69int alternative=0; /* 0 is getopt_long, 1 is getopt_long_only */ 69static int alternative=0; /* 0 is getopt_long, 1 is getopt_long_only */
70 70
71/* Function prototypes */ 71/* Function prototypes */
72const char *normalize(const char *arg); 72static const char *normalize(const char *arg);
73int generate_output(char * argv[],int argc,const char *optstr, 73static int generate_output(char * argv[],int argc,const char *optstr,
74 const struct option *longopts); 74 const struct option *longopts);
75void add_long_options(char *options); 75static void add_long_options(char *options);
76void add_longopt(const char *name,int has_arg); 76static void add_longopt(const char *name,int has_arg);
77void set_shell(const char *new_shell); 77static void set_shell(const char *new_shell);
78void set_initial_shell(void);
79 78
80 79
81/* 80/*
diff --git a/util-linux/mkfs_minix.c b/util-linux/mkfs_minix.c
index 928a49674..a83fa7961 100644
--- a/util-linux/mkfs_minix.c
+++ b/util-linux/mkfs_minix.c
@@ -609,7 +609,7 @@ static void setup_tables(void)
609 * Perform a test of a block; return the number of 609 * Perform a test of a block; return the number of
610 * blocks readable/writeable. 610 * blocks readable/writeable.
611 */ 611 */
612long do_check(char *buffer, int try, unsigned int current_block) 612static long do_check(char *buffer, int try, unsigned int current_block)
613{ 613{
614 long got; 614 long got;
615 615
diff --git a/util-linux/mkswap.c b/util-linux/mkswap.c
index b5153f623..f72c7009a 100644
--- a/util-linux/mkswap.c
+++ b/util-linux/mkswap.c
@@ -72,7 +72,7 @@ static int version = -1;
72static int pagesize; 72static int pagesize;
73static int *signature_page; 73static int *signature_page;
74 74
75struct swap_header_v1 { 75static struct swap_header_v1 {
76 char bootbits[1024]; /* Space for disklabel etc. */ 76 char bootbits[1024]; /* Space for disklabel etc. */
77 unsigned int version; 77 unsigned int version;
78 unsigned int last_page; 78 unsigned int last_page;
diff --git a/util-linux/mount.c b/util-linux/mount.c
index fd68dafd6..a2d6053c0 100644
--- a/util-linux/mount.c
+++ b/util-linux/mount.c
@@ -231,7 +231,7 @@ parse_mount_options(char *options, int *flags, char *strflags)
231 } 231 }
232} 232}
233 233
234int 234static int
235mount_one(char *blockDevice, char *directory, char *filesystemType, 235mount_one(char *blockDevice, char *directory, char *filesystemType,
236 unsigned long flags, char *string_flags, int useMtab, int fakeIt, 236 unsigned long flags, char *string_flags, int useMtab, int fakeIt,
237 char *mtab_opts, int whineOnErrors) 237 char *mtab_opts, int whineOnErrors)
diff --git a/util-linux/nfsmount.c b/util-linux/nfsmount.c
index aee496980..cd815102c 100644
--- a/util-linux/nfsmount.c
+++ b/util-linux/nfsmount.c
@@ -886,7 +886,7 @@ static char *nfs_strerror(int stat)
886 return buf; 886 return buf;
887} 887}
888 888
889bool_t 889static bool_t
890xdr_fhandle (XDR *xdrs, fhandle objp) 890xdr_fhandle (XDR *xdrs, fhandle objp)
891{ 891{
892 //register int32_t *buf; 892 //register int32_t *buf;
diff --git a/util-linux/rdate.c b/util-linux/rdate.c
index ed7121a75..28e87323d 100644
--- a/util-linux/rdate.c
+++ b/util-linux/rdate.c
@@ -39,10 +39,10 @@
39 39
40static const int RFC_868_BIAS = 2208988800UL; 40static const int RFC_868_BIAS = 2208988800UL;
41 41
42int setdate= 0; 42static int setdate= 0;
43int printdate= 0; 43static int printdate= 0;
44 44
45time_t askremotedate(char *host) 45static time_t askremotedate(char *host)
46{ 46{
47 struct hostent *h; 47 struct hostent *h;
48 struct sockaddr_in sin; 48 struct sockaddr_in sin;
diff --git a/util-linux/swaponoff.c b/util-linux/swaponoff.c
index 9deb13a28..55022ae3b 100644
--- a/util-linux/swaponoff.c
+++ b/util-linux/swaponoff.c
@@ -33,8 +33,8 @@
33#include <linux/unistd.h> 33#include <linux/unistd.h>
34#include "busybox.h" 34#include "busybox.h"
35 35
36_syscall2(int, swapon, const char *, path, int, flags); 36static _syscall2(int, swapon, const char *, path, int, flags);
37_syscall1(int, swapoff, const char *, path); 37static _syscall1(int, swapoff, const char *, path);
38 38
39 39
40static int whichApp; 40static int whichApp;
diff --git a/uuencode.c b/uuencode.c
index 41541defb..35a533309 100644
--- a/uuencode.c
+++ b/uuencode.c
@@ -34,11 +34,11 @@
34static void encode __P ((void)); 34static void encode __P ((void));
35 35
36/* Pointer to the translation table we currently use. */ 36/* Pointer to the translation table we currently use. */
37const char *trans_ptr; 37static const char *trans_ptr;
38 38
39/* The two currently defined translation tables. The first is the 39/* The two currently defined translation tables. The first is the
40 standard uuencoding, the second is base64 encoding. */ 40 standard uuencoding, the second is base64 encoding. */
41const char uu_std[64] = { 41static const char uu_std[64] = {
42 '`', '!', '"', '#', '$', '%', '&', '\'', 42 '`', '!', '"', '#', '$', '%', '&', '\'',
43 '(', ')', '*', '+', ',', '-', '.', '/', 43 '(', ')', '*', '+', ',', '-', '.', '/',
44 '0', '1', '2', '3', '4', '5', '6', '7', 44 '0', '1', '2', '3', '4', '5', '6', '7',
@@ -49,7 +49,7 @@ const char uu_std[64] = {
49 'X', 'Y', 'Z', '[', '\\', ']', '^', '_' 49 'X', 'Y', 'Z', '[', '\\', ']', '^', '_'
50}; 50};
51 51
52const char uu_base64[64] = { 52static const char uu_base64[64] = {
53 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 53 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H',
54 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 54 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P',
55 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 55 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X',
diff --git a/wc.c b/wc.c
index 5472c3070..695e7e7d4 100644
--- a/wc.c
+++ b/wc.c
@@ -29,8 +29,8 @@
29static int total_lines, total_words, total_chars, max_length; 29static int total_lines, total_words, total_chars, max_length;
30static int print_lines, print_words, print_chars, print_length; 30static int print_lines, print_words, print_chars, print_length;
31 31
32void print_counts(int lines, int words, int chars, int length, 32static void print_counts(int lines, int words, int chars, int length,
33 const char *name) 33 const char *name)
34{ 34{
35 char const *space = ""; 35 char const *space = "";
36 36
diff --git a/wget.c b/wget.c
index 4b8392ba5..85023f977 100644
--- a/wget.c
+++ b/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