diff options
author | "Vladimir N. Oleynik" <dzo@simtreas.ru> | 2005-10-19 09:21:51 +0000 |
---|---|---|
committer | "Vladimir N. Oleynik" <dzo@simtreas.ru> | 2005-10-19 09:21:51 +0000 |
commit | 5cf9a03b3f7b9feb08f4aa4fc36f036b2f00614d (patch) | |
tree | 59c172d4dfecd04e30f11e741c78afc0f8666c56 /util-linux | |
parent | bb20462cb34245037ecf92a0e7fc42b54b9e2d7b (diff) | |
download | busybox-w32-5cf9a03b3f7b9feb08f4aa4fc36f036b2f00614d.tar.gz busybox-w32-5cf9a03b3f7b9feb08f4aa4fc36f036b2f00614d.tar.bz2 busybox-w32-5cf9a03b3f7b9feb08f4aa4fc36f036b2f00614d.zip |
more const, attribute_noreturn saved 200 bytes
Diffstat (limited to 'util-linux')
-rw-r--r-- | util-linux/getopt.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/util-linux/getopt.c b/util-linux/getopt.c index 0ad69ad9a..fc3b9f97e 100644 --- a/util-linux/getopt.c +++ b/util-linux/getopt.c | |||
@@ -63,10 +63,10 @@ typedef enum {BASH,TCSH} shell_t; | |||
63 | 63 | ||
64 | /* Some global variables that tells us how to parse. */ | 64 | /* Some global variables that tells us how to parse. */ |
65 | static shell_t shell=BASH; /* The shell we generate output for. */ | 65 | static shell_t shell=BASH; /* The shell we generate output for. */ |
66 | static int quiet_errors=0; /* 0 is not quiet. */ | 66 | static int quiet_errors; /* 0 is not quiet. */ |
67 | static int quiet_output=0; /* 0 is not quiet. */ | 67 | static int quiet_output; /* 0 is not quiet. */ |
68 | static int quote=1; /* 1 is do quote. */ | 68 | static int quote=1; /* 1 is do quote. */ |
69 | static int alternative=0; /* 0 is getopt_long, 1 is getopt_long_only */ | 69 | static int alternative; /* 0 is getopt_long, 1 is getopt_long_only */ |
70 | 70 | ||
71 | /* Function prototypes */ | 71 | /* Function prototypes */ |
72 | static const char *normalize(const char *arg); | 72 | static const char *normalize(const char *arg); |
@@ -192,9 +192,9 @@ int generate_output(char * argv[],int argc,const char *optstr, | |||
192 | return exit_code; | 192 | return exit_code; |
193 | } | 193 | } |
194 | 194 | ||
195 | static struct option *long_options=NULL; | 195 | static struct option *long_options; |
196 | static int long_options_length=0; /* Length of array */ | 196 | static int long_options_length; /* Length of array */ |
197 | static int long_options_nr=0; /* Nr of used elements in array */ | 197 | static int long_options_nr; /* Nr of used elements in array */ |
198 | static const int LONG_OPTIONS_INCR = 10; | 198 | static const int LONG_OPTIONS_INCR = 10; |
199 | #define init_longopt() add_longopt(NULL,0) | 199 | #define init_longopt() add_longopt(NULL,0) |
200 | 200 | ||
@@ -285,7 +285,7 @@ void set_shell(const char *new_shell) | |||
285 | * 4) Returned for -T | 285 | * 4) Returned for -T |
286 | */ | 286 | */ |
287 | 287 | ||
288 | static struct option longopts[]= | 288 | static const struct option longopts[]= |
289 | { | 289 | { |
290 | {"options",required_argument,NULL,'o'}, | 290 | {"options",required_argument,NULL,'o'}, |
291 | {"longoptions",required_argument,NULL,'l'}, | 291 | {"longoptions",required_argument,NULL,'l'}, |
@@ -300,7 +300,7 @@ static struct option longopts[]= | |||
300 | }; | 300 | }; |
301 | 301 | ||
302 | /* Stop scanning as soon as a non-option argument is found! */ | 302 | /* Stop scanning as soon as a non-option argument is found! */ |
303 | static const char *shortopts="+ao:l:n:qQs:Tu"; | 303 | static const char shortopts[]="+ao:l:n:qQs:Tu"; |
304 | 304 | ||
305 | 305 | ||
306 | int getopt_main(int argc, char *argv[]) | 306 | int getopt_main(int argc, char *argv[]) |