summaryrefslogtreecommitdiff
path: root/libiberty/getopt.c
diff options
context:
space:
mode:
authorDJ Delorie <dj@delorie.com>2005-03-28 02:09:01 +0000
committerDJ Delorie <dj@delorie.com>2005-03-28 02:09:01 +0000
commit625f0fd13f1e5c8e5b885404288eb5862512d658 (patch)
tree084866c73980bcc1ca02b61e80198f78c3c350f3 /libiberty/getopt.c
parent54f7a5111c0b299ecd43dcac86bb8ea6df73f81b (diff)
downloadbinutils-redhat-625f0fd13f1e5c8e5b885404288eb5862512d658.tar.gz
merge from gcc
Diffstat (limited to 'libiberty/getopt.c')
-rw-r--r--libiberty/getopt.c31
1 files changed, 8 insertions, 23 deletions
diff --git a/libiberty/getopt.c b/libiberty/getopt.c
index a1e482763c..785c7aad2f 100644
--- a/libiberty/getopt.c
+++ b/libiberty/getopt.c
@@ -217,9 +217,7 @@ extern char *getenv ();
#endif
static char *
-my_index (str, chr)
- const char *str;
- int chr;
+my_index (const char *str, int chr)
{
while (*str)
{
@@ -307,8 +305,7 @@ static void exchange (char **);
#endif
static void
-exchange (argv)
- char **argv;
+exchange (char **argv)
{
int bottom = first_nonopt;
int middle = last_nonopt;
@@ -392,10 +389,7 @@ exchange (argv)
static const char *_getopt_initialize (int, char *const *, const char *);
#endif
static const char *
-_getopt_initialize (argc, argv, optstring)
- int argc;
- char *const *argv;
- const char *optstring;
+_getopt_initialize (int argc, char *const *argv, const char *optstring)
{
/* Start processing options with ARGV-element 1 (since ARGV-element 0
is the program name); the sequence of previously skipped
@@ -514,13 +508,9 @@ _getopt_initialize (argc, argv, optstring)
long-named options. */
int
-_getopt_internal (argc, argv, optstring, longopts, longind, long_only)
- int argc;
- char *const *argv;
- const char *optstring;
- const struct option *longopts;
- int *longind;
- int long_only;
+_getopt_internal (int argc, char *const *argv, const char *optstring,
+ const struct option *longopts,
+ int *longind, int long_only)
{
optarg = NULL;
@@ -970,10 +960,7 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
}
int
-getopt (argc, argv, optstring)
- int argc;
- char *const *argv;
- const char *optstring;
+getopt (int argc, char *const *argv, const char *optstring)
{
return _getopt_internal (argc, argv, optstring,
(const struct option *) 0,
@@ -989,9 +976,7 @@ getopt (argc, argv, optstring)
the above definition of `getopt'. */
int
-main (argc, argv)
- int argc;
- char **argv;
+main (int argc, char **argv)
{
int c;
int digit_optind = 0;