Mercurial > hg > octave-kai > gnulib-hg
diff lib/getopt1.c @ 5453:d29dafc60cf3
Merge from coreutils to support a more-standard getopt.
author | Paul Eggert <eggert@cs.ucla.edu> |
---|---|
date | Wed, 17 Nov 2004 01:13:54 +0000 |
parents | 54760e095396 |
children | 4e3460b787b0 |
line wrap: on
line diff
--- a/lib/getopt1.c +++ b/lib/getopt1.c @@ -41,19 +41,19 @@ #endif int -getopt_long (int argc, char *__getopt_argv_const *argv, const char *options, +getopt_long (int argc, char **argv, const char *options, const struct option *long_options, int *opt_index) { - return _getopt_internal (argc, argv, options, long_options, opt_index, 0); + return _getopt_internal (argc, argv, options, long_options, opt_index, 0, 0); } int -_getopt_long_r (int argc, char *__getopt_argv_const *argv, const char *options, +_getopt_long_r (int argc, char **argv, const char *options, const struct option *long_options, int *opt_index, struct _getopt_data *d) { return _getopt_internal_r (argc, argv, options, long_options, opt_index, - 0, d); + 0, 0, d); } /* Like getopt_long, but '-' as well as '--' can indicate a long option. @@ -62,21 +62,19 @@ instead. */ int -getopt_long_only (int argc, char *__getopt_argv_const *argv, - const char *options, +getopt_long_only (int argc, char **argv, const char *options, const struct option *long_options, int *opt_index) { - return _getopt_internal (argc, argv, options, long_options, opt_index, 1); + return _getopt_internal (argc, argv, options, long_options, opt_index, 1, 0); } int -_getopt_long_only_r (int argc, char *__getopt_argv_const *argv, - const char *options, +_getopt_long_only_r (int argc, char **argv, const char *options, const struct option *long_options, int *opt_index, struct _getopt_data *d) { return _getopt_internal_r (argc, argv, options, long_options, opt_index, - 1, d); + 1, 0, d); }