Simplify musl's getopt, including removing optind, optopt, opterr, idx, and longonly

This commit is contained in:
Rangi committed 2025-10-23 13:39:28 -04:00
1 parent efb5a88edb
commit 8bedd710d7
3 files changed
+131 -174

No files matched your search

+2 -4
View File
@@ -12,7 +12,7 @@ static constexpr int optional_argument = 2;
// clang-format on
extern char *musl_optarg;
extern int musl_optind, musl_opterr, musl_optopt, musl_optreset;
extern int musl_optind, musl_optopt;
struct option {
char const *name;
@@ -21,8 +21,6 @@ struct option {
int val;
};
int musl_getopt_long_only(
int argc, char **argv, char const *optstring, option const *longopts, int *idx
);
int musl_getopt_long_only(int argc, char **argv, char const *optstring, option const *longopts);
#endif // RGBDS_EXTERN_GETOPT_HPP