aboutsummaryrefslogtreecommitdiff
path: root/libiberty/getopt.c
diff options
context:
space:
mode:
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 a1e4827..785c7aa 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;