From 8ec4a104daa06ab19090536104a9fae0ea9f8423 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Mon, 26 Aug 2013 13:27:43 +0200 Subject: c fix MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/argparser.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src') diff --git a/src/argparser.h b/src/argparser.h index 0027c28..7cc82b2 100644 --- a/src/argparser.h +++ b/src/argparser.h @@ -235,6 +235,18 @@ extern args_Option args_new_argumentless(void (*trigger)(char*, char*), int stan */ extern args_Option args_new_argumented(void (*trigger)(char*, char*, char*), char* argument, int standard, char* alternatives, ...); +/** + * Creates, but does not add, a option that optionally takes one argument per use + * + * @param stickless Should return true if the (feed) next argument can used for the argument without being sticky + * @param trigger Function to invoke when the option is used, with the used option, the standard option and the used value + * @param argument The new of the argument + * @param standard The index of the standard alternative name + * @param alternatives... The alternative names, end with `null` + * @return The created option + */ +extern args_Option args_new_optargumented(long (*stickless)(char*), void (*trigger)(char*, char*, char*), char* argument, int standard, char* alternatives, ...); + /** * Creates, but does not add, a option that takes all following arguments * -- cgit v1.2.3-70-g09d2