aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2000-11-07 06:52:13 +0000
committerEric Andersen <andersen@codepoet.org>2000-11-07 06:52:13 +0000
commit63a862272cc5c0cc8e15c8d95dfb9e8944eb944e (patch)
tree7540b55fa5eaf6f2c271a89017822c1626371a63
parenteb69ead09102ef9cb404a4b3e72b6615321b49e6 (diff)
downloadbusybox-63a862272cc5c0cc8e15c8d95dfb9e8944eb944e.tar.gz
Cleanup of duplicated symbols -- found by compiling with
LDFLAGS += -Wl,-warn-common
-rw-r--r--archival/gunzip.c44
-rw-r--r--archival/gzip.c41
-rw-r--r--cmdedit.c2
-rw-r--r--gunzip.c44
-rw-r--r--gzip.c41
-rw-r--r--more.c2
-rw-r--r--shell/cmdedit.c2
-rw-r--r--util-linux/more.c2
8 files changed, 74 insertions, 104 deletions
diff --git a/archival/gunzip.c b/archival/gunzip.c
index 0c9d40670..1ff3c40fb 100644
--- a/archival/gunzip.c
+++ b/archival/gunzip.c
@@ -155,32 +155,28 @@ typedef unsigned short ush;
typedef unsigned long ulg;
typedef int file_t; /* Do not use stdio */
-uch *inbuf;
-uch *outbuf;
-ush *d_buf;
-uch *window;
-ush *tab_prefix0;
-ush *tab_prefix1;
+static uch *inbuf;
+static uch *outbuf;
+static ush *d_buf;
+static uch *window;
+static ush *tab_prefix0;
+static ush *tab_prefix1;
/* local variables */
-int test_mode = 0; /* check file integrity option */
-int foreground; /* set if program run in foreground */
-int maxbits = BITS; /* max bits per code for LZW */
-int method = DEFLATED; /* compression method */
-int exit_code = OK; /* program exit code */
-int last_member; /* set for .zip and .Z files */
-int part_nb; /* number of parts in .gz file */
-long ifile_size; /* input file size, -1 for devices (debug only) */
-long bytes_in; /* number of input bytes */
-long bytes_out; /* number of output bytes */
-long total_in = 0; /* input bytes for all files */
-long total_out = 0; /* output bytes for all files */
-struct stat istat; /* status for input file */
-int ifd; /* input file descriptor */
-int ofd; /* output file descriptor */
-unsigned insize; /* valid bytes in inbuf */
-unsigned inptr; /* index of next byte to be processed in inbuf */
-unsigned outcnt; /* bytes in output buffer */
+static int test_mode = 0; /* check file integrity option */
+static int foreground; /* set if program run in foreground */
+static int method = DEFLATED; /* compression method */
+static int exit_code = OK; /* program exit code */
+static int last_member; /* set for .zip and .Z files */
+static int part_nb; /* number of parts in .gz file */
+static long ifile_size; /* input file size, -1 for devices (debug only) */
+static long bytes_in; /* number of input bytes */
+static long bytes_out; /* number of output bytes */
+static int ifd; /* input file descriptor */
+static int ofd; /* output file descriptor */
+static unsigned insize; /* valid bytes in inbuf */
+static unsigned inptr; /* index of next byte to be processed in inbuf */
+static unsigned outcnt; /* bytes in output buffer */
unsigned hufts; /* track memory usage */
ulg bb; /* bit buffer */
diff --git a/archival/gzip.c b/archival/gzip.c
index 6b25e47df..add94d0d7 100644
--- a/archival/gzip.c
+++ b/archival/gzip.c
@@ -1754,34 +1754,23 @@ DECLARE(ush, tab_prefix1, 1L << (BITS - 1));
/* local variables */
-int ascii = 0; /* convert end-of-lines to local OS conventions */
-int decompress = 0; /* decompress (-d) */
-int no_name = -1; /* don't save or restore the original file name */
-int no_time = -1; /* don't save or restore the original file time */
-int foreground; /* set if program run in foreground */
-char *progname; /* program name */
+static int foreground; /* set if program run in foreground */
static int method = DEFLATED; /* compression method */
static int exit_code = OK; /* program exit code */
-int save_orig_name; /* set if original name must be saved */
-int last_member; /* set for .zip and .Z files */
-int part_nb; /* number of parts in .gz file */
-long time_stamp; /* original time stamp (modification time) */
-long ifile_size; /* input file size, -1 for devices (debug only) */
-char *env; /* contents of GZIP env variable */
-char z_suffix[MAX_SUFFIX + 1]; /* default suffix (can be set with --suffix) */
-int z_len; /* strlen(z_suffix) */
-
-long bytes_in; /* number of input bytes */
-long bytes_out; /* number of output bytes */
-char ifname[MAX_PATH_LEN]; /* input file name */
-char ofname[MAX_PATH_LEN]; /* output file name */
-int remove_ofname = 0; /* remove output file on error */
-struct stat istat; /* status for input file */
-int ifd; /* input file descriptor */
-int ofd; /* output file descriptor */
-unsigned insize; /* valid bytes in inbuf */
-unsigned inptr; /* index of next byte to be processed in inbuf */
-unsigned outcnt; /* bytes in output buffer */
+static int part_nb; /* number of parts in .gz file */
+static long time_stamp; /* original time stamp (modification time) */
+static long ifile_size; /* input file size, -1 for devices (debug only) */
+static char z_suffix[MAX_SUFFIX + 1]; /* default suffix (can be set with --suffix) */
+static int z_len; /* strlen(z_suffix) */
+
+static long bytes_in; /* number of input bytes */
+static long bytes_out; /* number of output bytes */
+static char ifname[MAX_PATH_LEN]; /* input file name */
+static char ofname[MAX_PATH_LEN]; /* output file name */
+static int ifd; /* input file descriptor */
+static int ofd; /* output file descriptor */
+static unsigned insize; /* valid bytes in inbuf */
+static unsigned outcnt; /* bytes in output buffer */
/* local functions */
diff --git a/cmdedit.c b/cmdedit.c
index a59aeebb7..8115e5259 100644
--- a/cmdedit.c
+++ b/cmdedit.c
@@ -69,7 +69,7 @@ static struct history *his_end = NULL; /* Last element in command line list */
#endif
/* Current termio and the previous termio before starting sh */
-struct termios initial_settings, new_settings;
+static struct termios initial_settings, new_settings;
#ifndef _POSIX_VDISABLE
diff --git a/gunzip.c b/gunzip.c
index 0c9d40670..1ff3c40fb 100644
--- a/gunzip.c
+++ b/gunzip.c
@@ -155,32 +155,28 @@ typedef unsigned short ush;
typedef unsigned long ulg;
typedef int file_t; /* Do not use stdio */
-uch *inbuf;
-uch *outbuf;
-ush *d_buf;
-uch *window;
-ush *tab_prefix0;
-ush *tab_prefix1;
+static uch *inbuf;
+static uch *outbuf;
+static ush *d_buf;
+static uch *window;
+static ush *tab_prefix0;
+static ush *tab_prefix1;
/* local variables */
-int test_mode = 0; /* check file integrity option */
-int foreground; /* set if program run in foreground */
-int maxbits = BITS; /* max bits per code for LZW */
-int method = DEFLATED; /* compression method */
-int exit_code = OK; /* program exit code */
-int last_member; /* set for .zip and .Z files */
-int part_nb; /* number of parts in .gz file */
-long ifile_size; /* input file size, -1 for devices (debug only) */
-long bytes_in; /* number of input bytes */
-long bytes_out; /* number of output bytes */
-long total_in = 0; /* input bytes for all files */
-long total_out = 0; /* output bytes for all files */
-struct stat istat; /* status for input file */
-int ifd; /* input file descriptor */
-int ofd; /* output file descriptor */
-unsigned insize; /* valid bytes in inbuf */
-unsigned inptr; /* index of next byte to be processed in inbuf */
-unsigned outcnt; /* bytes in output buffer */
+static int test_mode = 0; /* check file integrity option */
+static int foreground; /* set if program run in foreground */
+static int method = DEFLATED; /* compression method */
+static int exit_code = OK; /* program exit code */
+static int last_member; /* set for .zip and .Z files */
+static int part_nb; /* number of parts in .gz file */
+static long ifile_size; /* input file size, -1 for devices (debug only) */
+static long bytes_in; /* number of input bytes */
+static long bytes_out; /* number of output bytes */
+static int ifd; /* input file descriptor */
+static int ofd; /* output file descriptor */
+static unsigned insize; /* valid bytes in inbuf */
+static unsigned inptr; /* index of next byte to be processed in inbuf */
+static unsigned outcnt; /* bytes in output buffer */
unsigned hufts; /* track memory usage */
ulg bb; /* bit buffer */
diff --git a/gzip.c b/gzip.c
index 6b25e47df..add94d0d7 100644
--- a/gzip.c
+++ b/gzip.c
@@ -1754,34 +1754,23 @@ DECLARE(ush, tab_prefix1, 1L << (BITS - 1));
/* local variables */
-int ascii = 0; /* convert end-of-lines to local OS conventions */
-int decompress = 0; /* decompress (-d) */
-int no_name = -1; /* don't save or restore the original file name */
-int no_time = -1; /* don't save or restore the original file time */
-int foreground; /* set if program run in foreground */
-char *progname; /* program name */
+static int foreground; /* set if program run in foreground */
static int method = DEFLATED; /* compression method */
static int exit_code = OK; /* program exit code */
-int save_orig_name; /* set if original name must be saved */
-int last_member; /* set for .zip and .Z files */
-int part_nb; /* number of parts in .gz file */
-long time_stamp; /* original time stamp (modification time) */
-long ifile_size; /* input file size, -1 for devices (debug only) */
-char *env; /* contents of GZIP env variable */
-char z_suffix[MAX_SUFFIX + 1]; /* default suffix (can be set with --suffix) */
-int z_len; /* strlen(z_suffix) */
-
-long bytes_in; /* number of input bytes */
-long bytes_out; /* number of output bytes */
-char ifname[MAX_PATH_LEN]; /* input file name */
-char ofname[MAX_PATH_LEN]; /* output file name */
-int remove_ofname = 0; /* remove output file on error */
-struct stat istat; /* status for input file */
-int ifd; /* input file descriptor */
-int ofd; /* output file descriptor */
-unsigned insize; /* valid bytes in inbuf */
-unsigned inptr; /* index of next byte to be processed in inbuf */
-unsigned outcnt; /* bytes in output buffer */
+static int part_nb; /* number of parts in .gz file */
+static long time_stamp; /* original time stamp (modification time) */
+static long ifile_size; /* input file size, -1 for devices (debug only) */
+static char z_suffix[MAX_SUFFIX + 1]; /* default suffix (can be set with --suffix) */
+static int z_len; /* strlen(z_suffix) */
+
+static long bytes_in; /* number of input bytes */
+static long bytes_out; /* number of output bytes */
+static char ifname[MAX_PATH_LEN]; /* input file name */
+static char ofname[MAX_PATH_LEN]; /* output file name */
+static int ifd; /* input file descriptor */
+static int ofd; /* output file descriptor */
+static unsigned insize; /* valid bytes in inbuf */
+static unsigned outcnt; /* bytes in output buffer */
/* local functions */
diff --git a/more.c b/more.c
index f95cb48ad..ffc8206f2 100644
--- a/more.c
+++ b/more.c
@@ -49,7 +49,7 @@
FILE *cin;
-struct termios initial_settings, new_settings;
+static struct termios initial_settings, new_settings;
void gotsig(int sig)
{
diff --git a/shell/cmdedit.c b/shell/cmdedit.c
index a59aeebb7..8115e5259 100644
--- a/shell/cmdedit.c
+++ b/shell/cmdedit.c
@@ -69,7 +69,7 @@ static struct history *his_end = NULL; /* Last element in command line list */
#endif
/* Current termio and the previous termio before starting sh */
-struct termios initial_settings, new_settings;
+static struct termios initial_settings, new_settings;
#ifndef _POSIX_VDISABLE
diff --git a/util-linux/more.c b/util-linux/more.c
index f95cb48ad..ffc8206f2 100644
--- a/util-linux/more.c
+++ b/util-linux/more.c
@@ -49,7 +49,7 @@
FILE *cin;
-struct termios initial_settings, new_settings;
+static struct termios initial_settings, new_settings;
void gotsig(int sig)
{