31 #if !defined __STDC__ || !__STDC__
49 #define GETOPT_INTERFACE_VERSION 2
50 #if !defined _LIBC && defined __GLIBC__ && __GLIBC__ >= 2
51 #include <gnu-versions.h>
52 #if _GNU_GETOPT_INTERFACE_VERSION == GETOPT_INTERFACE_VERSION
62 #ifdef __GNU_LIBRARY__
71 getopt_long (argc, argv, options, long_options, opt_index)
75 const struct
option *long_options;
78 return _getopt_internal (argc, argv, options, long_options, opt_index, 0);
87 getopt_long_only (argc, argv, options, long_options, opt_index)
91 const struct
option *long_options;
94 return _getopt_internal (argc, argv, options, long_options, opt_index, 1);
98 libc_hidden_def (getopt_long)
99 libc_hidden_def (getopt_long_only)
114 int digit_optind = 0;
118 int this_option_optind = optind ? optind : 1;
119 int option_index = 0;
120 static struct option long_options[] =
125 {
"verbose", 0, 0, 0},
131 c = getopt_long (argc, argv,
"abc:d:0123456789",
132 long_options, &option_index);
139 printf (
"option %s", long_options[option_index].name);
141 printf (
" with arg %s", optarg);
155 if (digit_optind != 0 && digit_optind != this_option_optind)
156 printf (
"digits occur in two different argv-elements.\n");
157 digit_optind = this_option_optind;
158 printf (
"option %c\n", c);
162 printf (
"option a\n");
166 printf (
"option b\n");
170 printf (
"option c with value `%s'\n", optarg);
174 printf (
"option d with value `%s'\n", optarg);
181 printf (
"?? getopt returned character code 0%o ??\n", c);
187 printf (
"non-option ARGV-elements: ");
188 while (optind < argc)
189 printf (
"%s ", argv[optind++]);
Definitions for the configuration of the cbm4win driver.
int ARCH_MAINDECL main(int argc, char **argv)
Initialize the xum1541 device This function tries to find and identify the xum1541 device...