aboutsummaryrefslogtreecommitdiff
path: root/libiberty/getopt.c
diff options
context:
space:
mode:
authorDJ Delorie <dj@redhat.com>2005-03-28 02:09:01 +0000
committerDJ Delorie <dj@redhat.com>2005-03-28 02:09:01 +0000
commit49b1fae4309ab5b9833f0af388483c2b6b4b3d50 (patch)
tree4d135fc6ff13dd077dc5cf1669777e75cae85305 /libiberty/getopt.c
parent67700458404b636f413570c6fab3d2cb221c63ba (diff)
downloadgdb-49b1fae4309ab5b9833f0af388483c2b6b4b3d50.zip
gdb-49b1fae4309ab5b9833f0af388483c2b6b4b3d50.tar.gz
gdb-49b1fae4309ab5b9833f0af388483c2b6b4b3d50.tar.bz2
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 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;