From 8307e1260e771ba065fe16359a756beec26d9e7f Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Sun, 10 Mar 2024 15:01:20 +0200 Subject: Replace optparse_init() with mkoptparser() --- include/optparse.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/optparse.h b/include/optparse.h index 816b192..70e4318 100644 --- a/include/optparse.h +++ b/include/optparse.h @@ -8,9 +8,12 @@ #include "__u8view.h" struct optparse { - int optind, subopt; + bool _b; + int _subopt; + char **_argv; + + int optind; char errmsg[128]; - char **argv; struct u8view optarg; }; @@ -27,6 +30,6 @@ struct op_option { }; rune optparse(struct optparse *, const struct op_option *, size_t); -void optparse_init(struct optparse *, char **); +struct optparse mkoptparser(char **); #endif /* !MLIB_OPTPARSE_H */ -- cgit v1.2.3