LibCore: Allow ArgsParser::parse() to not exit on failure

This allows its use in places where multiple calls to
ArgsParser::parse() are needed, such as Shell builtins.
This commit is contained in:
AnotherTest 2020-05-16 01:50:46 +04:30 committed by Andreas Kling
commit 1c4f38749e
Notes: sideshowbarker 2024-07-19 06:34:56 +09:00
2 changed files with 18 additions and 6 deletions

View file

@ -66,7 +66,7 @@ public:
Function<bool(const char*)> accept_value;
};
void parse(int argc, char** argv);
bool parse(int argc, char** argv, bool exit_on_failure = true);
void print_usage(FILE*, const char* argv0);
void add_option(Option&&);