summaryrefslogtreecommitdiff
path: root/getopt.c
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 /getopt.c
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.
Diffstat (limited to 'getopt.c')
-rw-r--r--getopt.c21
1 files changed, 10 insertions, 11 deletions
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/*