129#define BAD_OPTION '\0'
166#ifdef __GNU_LIBRARY__
172#define my_index strchr
173#define my_strlen strlen
179#if __STDC__ || defined(PROTO)
181extern int strcmp (
const char *
s1,
const char *
s2);
182extern int strncmp(
const char *
s1,
const char *
s2,
size_t n);
185static const char *
my_index (
const char *str,
int chr);
203 return (
const char *) str;
239#if __STDC__ || defined(PROTO)
250 while (first <
last) {
257 while (first <
last) {
265 while (first <
last) {
460 while (*
s && *
s !=
'=')
514 "%s: option `--%s' doesn't allow an argument\n",
519 "%s: option `%c%s' doesn't allow an argument\n",
526 else if (
pfound->has_arg == 1)
587 fprintf (
stderr,
"%s: unrecognized option, character code 0%o\n",
715 printf (
"digits occur in two different argv-elements.\n");
717 printf (
"option %c\n", c);
736 printf (
"?? fe_getopt returned character code 0%o ??\n", c);
742 printf (
"non-option ARGV-elements: ");
const CanonicalForm int s
char name(const Variable &v)
int fe_getopt(int argc, char *const *argv, const char *optstring)
int fe_getopt_long_only(int argc, char *const *argv, const char *options, const struct fe_option *long_options, int *opt_index)
int fe_getopt_long(int argc, char *const *argv, const char *options, const struct fe_option *long_options, int *opt_index)
static void exchange(char **argv)
static size_t my_strlen(const char *str)
int _fe_getopt_internal(int argc, char *const *argv, const char *optstring, const struct fe_option *longopts, int *longind, int long_only)
static const char * my_index(const char *str, int chr)