summaryrefslogtreecommitdiff
path: root/src/include/getopt.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/getopt.h')
-rw-r--r--src/include/getopt.h39
1 files changed, 24 insertions, 15 deletions
diff --git a/src/include/getopt.h b/src/include/getopt.h
index 59bc2443..67eb5d7e 100644
--- a/src/include/getopt.h
+++ b/src/include/getopt.h
@@ -1,3 +1,12 @@
+ /*@@
+ @header getopt.h
+ @date 1989
+ @author GNU
+ @desc
+ GNU getop stuff
+ @enddesc
+ @version $Header$
+ @@*/
/* Declarations for getopt.
Copyright (C) 1989, 1990, 1991, 1992, 1993 Free Software Foundation, Inc.
@@ -20,7 +29,7 @@
#ifndef _GETOPT_H
#define _GETOPT_H 1
-#ifdef __cplusplus
+#ifdef __cplusplus
extern "C" {
#endif
@@ -61,9 +70,9 @@ extern int optopt;
zero.
The field `has_arg' is:
- no_argument (or 0) if the option does not take an argument,
- required_argument (or 1) if the option requires an argument,
- optional_argument (or 2) if the option takes an optional argument.
+ no_argument (or 0) if the option does not take an argument,
+ required_argument (or 1) if the option requires an argument,
+ optional_argument (or 2) if the option takes an optional argument.
If the field `flag' is not NULL, it points to a variable that is set
to the value given in the field `val' when the option is found, but
@@ -78,7 +87,7 @@ extern int optopt;
struct option
{
-#if __STDC__
+#if __STDC__
const char *name;
#else
char *name;
@@ -92,9 +101,9 @@ struct option
/* Names for the values of the `has_arg' field of `struct option'. */
-#define no_argument 0
-#define required_argument 1
-#define optional_argument 2
+#define no_argument 0
+#define required_argument 1
+#define optional_argument 2
#if __STDC__
#if defined(__GNU_LIBRARY__)
@@ -106,16 +115,16 @@ extern int getopt (int argc, char *const *argv, const char *shortopts);
extern int getopt ();
#endif /* not __GNU_LIBRARY__ */
extern int getopt_long (int argc, char *const *argv, const char *shortopts,
- const struct option *longopts, int *longind);
+ const struct option *longopts, int *longind);
extern int getopt_long_only (int argc, char *const *argv,
- const char *shortopts,
- const struct option *longopts, int *longind);
+ const char *shortopts,
+ const struct option *longopts, int *longind);
/* Internal only. Users should not call this directly. */
extern int _getopt_internal (int argc, char *const *argv,
- const char *shortopts,
- const struct option *longopts, int *longind,
- int long_only);
+ const char *shortopts,
+ const struct option *longopts, int *longind,
+ int long_only);
#else /* not __STDC__ */
extern int getopt ();
extern int getopt_long ();
@@ -124,7 +133,7 @@ extern int getopt_long_only ();
extern int _getopt_internal ();
#endif /* not __STDC__ */
-#ifdef __cplusplus
+#ifdef __cplusplus
}
#endif