#include <libintl.h>
#endif
+libc_hidden_proto(strchr)
+libc_hidden_proto(strcmp)
+libc_hidden_proto(strlen)
+libc_hidden_proto(strncmp)
+libc_hidden_proto(getenv)
+libc_hidden_proto(fprintf)
+
#ifdef __UCLIBC_MJN3_ONLY__
#warning TODO: Enable gettext awareness.
#endif /* __UCLIBC_MJN3_ONLY__ */
} ordering;
# include <string.h>
-# define my_index __strchr
+# define my_index strchr
\f
/* Handle permutation of arguments. */
ordering = REQUIRE_ORDER;
++optstring;
}
- else if (__getenv ("POSIXLY_CORRECT") != NULL)
+ else if (getenv ("POSIXLY_CORRECT") != NULL)
ordering = REQUIRE_ORDER;
else
ordering = PERMUTE;
then exchange with previous non-options as if it were an option,
then skip everything else like a non-option. */
- if (optind != argc && !__strcmp (argv[optind], "--"))
+ if (optind != argc && !strcmp (argv[optind], "--"))
{
optind++;
/* Test all long options for either exact match
or abbreviated matches. */
for (p = longopts, option_index = 0; p->name; p++, option_index++)
- if (!__strncmp (p->name, nextchar, nameend - nextchar))
+ if (!strncmp (p->name, nextchar, nameend - nextchar))
{
if ((unsigned int) (nameend - nextchar)
- == (unsigned int) __strlen (p->name))
+ == (unsigned int) strlen (p->name))
{
/* Exact match found. */
pfound = p;
fprintf (stderr, _("%s: option `%s' is ambiguous\n"),
argv[0], argv[optind]);
}
- nextchar += __strlen (nextchar);
+ nextchar += strlen (nextchar);
optind++;
optopt = 0;
return '?';
}
- nextchar += __strlen (nextchar);
+ nextchar += strlen (nextchar);
optopt = pfound->val;
return '?';
_("%s: option `%s' requires an argument\n"),
argv[0], argv[optind - 1]);
}
- nextchar += __strlen (nextchar);
+ nextchar += strlen (nextchar);
optopt = pfound->val;
return optstring[0] == ':' ? ':' : '?';
}
}
- nextchar += __strlen (nextchar);
+ nextchar += strlen (nextchar);
if (longind != NULL)
*longind = option_index;
if (pfound->flag)
/* Test all long options for either exact match
or abbreviated matches. */
for (p = longopts, option_index = 0; p->name; p++, option_index++)
- if (!__strncmp (p->name, nextchar, nameend - nextchar))
+ if (!strncmp (p->name, nextchar, nameend - nextchar))
{
- if ((unsigned int) (nameend - nextchar) == __strlen (p->name))
+ if ((unsigned int) (nameend - nextchar) == strlen (p->name))
{
/* Exact match found. */
pfound = p;
fprintf (stderr, _("%s: option `-W %s' is ambiguous\n"),
argv[0], argv[optind]);
}
- nextchar += __strlen (nextchar);
+ nextchar += strlen (nextchar);
optind++;
return '?';
}
argv[0], pfound->name);
}
- nextchar += __strlen (nextchar);
+ nextchar += strlen (nextchar);
return '?';
}
}
_("%s: option `%s' requires an argument\n"),
argv[0], argv[optind - 1]);
}
- nextchar += __strlen (nextchar);
+ nextchar += strlen (nextchar);
return optstring[0] == ':' ? ':' : '?';
}
}
- nextchar += __strlen (nextchar);
+ nextchar += strlen (nextchar);
if (longind != NULL)
*longind = option_index;
if (pfound->flag)