From 6374309c6d4d17ab1e4109133ab8aad55f77d51c Mon Sep 17 00:00:00 2001 From: Paul Smith Date: Mon, 14 Oct 2002 21:54:04 +0000 Subject: 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. --- getopt1.c | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) (limited to 'getopt1.c') 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 int -main (argc, argv) - int argc; - char **argv; +main (int argc, char **argv) { int c; int digit_optind = 0; -- cgit v1.2.3