summaryrefslogtreecommitdiff
path: root/getopt1.c
diff options
context:
space:
mode:
authorPaul Smith <psmith@gnu.org>2002-10-14 21:54:04 +0000
committerPaul Smith <psmith@gnu.org>2002-10-14 21:54:04 +0000
commit6374309c6d4d17ab1e4109133ab8aad55f77d51c (patch)
tree91011a11f637df979b9c5dd8b0f1fc4bfc2be831 /getopt1.c
parent8bbdbb02b30ffd39c2fac9259b3a91cb62e1711d (diff)
downloadgunmake-6374309c6d4d17ab1e4109133ab8aad55f77d51c.tar.gz
Convert the source code to use ANSI C style function definitions and
enable the automake ansi2knr capability. Right now this doesn't quite build using a K&R compiler because of a problem with the loadavg test program, but the rest of the code works. I'm asking the automake list about this problem.
Diffstat (limited to 'getopt1.c')
-rw-r--r--getopt1.c22
1 files changed, 6 insertions, 16 deletions
diff --git a/getopt1.c b/getopt1.c
index 4ce1065..f09a283 100644
--- a/getopt1.c
+++ b/getopt1.c
@@ -3,7 +3,7 @@
Free Software Foundation, Inc.
NOTE: The canonical source of this file is maintained with the GNU C Library.
- Bugs can be reported to bug-glibc@prep.ai.mit.edu.
+ Bugs can be reported to bug-glibc@gnu.org.
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
@@ -66,12 +66,8 @@
#endif
int
-getopt_long (argc, argv, options, long_options, opt_index)
- int argc;
- char *const *argv;
- const char *options;
- const struct option *long_options;
- int *opt_index;
+getopt_long (int argc, char *const *argv, const char *options,
+ const struct option *long_options, int *opt_index)
{
return _getopt_internal (argc, argv, options, long_options, opt_index, 0);
}
@@ -82,12 +78,8 @@ getopt_long (argc, argv, options, long_options, opt_index)
instead. */
int
-getopt_long_only (argc, argv, options, long_options, opt_index)
- int argc;
- char *const *argv;
- const char *options;
- const struct option *long_options;
- int *opt_index;
+getopt_long_only (int argc, char *const *argv, const char *options,
+ const struct option *long_options, int *opt_index)
{
return _getopt_internal (argc, argv, options, long_options, opt_index, 1);
}
@@ -100,9 +92,7 @@ getopt_long_only (argc, argv, options, long_options, opt_index)
#include <stdio.h>
int
-main (argc, argv)
- int argc;
- char **argv;
+main (int argc, char **argv)
{
int c;
int digit_optind = 0;