From f56d0c7aaf89ea6959c96b2189e1f1bbcaa0d431 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Tue, 25 Jun 2013 14:34:19 +0200 Subject: implement args_options functions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/argparser.c | 53 +++++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 45 insertions(+), 8 deletions(-) (limited to 'src/argparser.c') diff --git a/src/argparser.c b/src/argparser.c index 834d5c2..a1c1ac3 100644 --- a/src/argparser.c +++ b/src/argparser.c @@ -238,15 +238,52 @@ extern void args_dispose() } -/* -args_get_options_count() -args_options_get_help(long) -args_options_get_alternatives_count(long) -args_options_get_alternatives(long) -args_options_get_argument(long) -args_options_get_type(long) -args_options_get_standard(long) +extern args_Option* args_get_options() +{ + return args_options; +} + +extern long args_get_options_count() +{ + return args_options_count; +} + +extern args_Option args_options_get(long index) +{ + return *(args_options + index); +} + +extern long args_options_get_type(long index) +{ + return (*(args_options + index)).type; +} + +extern long args_options_get_alternatives_count(long index) +{ + return (*(args_options + index)).alternatives_count; +} + +extern char** args_options_get_alternatives(long index) +{ + return (*(args_options + index)).alternatives; +} + +extern char* args_options_get_argument(long index) +{ + return (*(args_options + index)).argument; +} +extern char* args_options_get_standard(long index) +{ + return (*(args_options + index)).standard; +} + +extern char* args_options_get_help(long index) +{ + return (*(args_options + index)).help; +} + +/* args_get_opts() args_get_opts_count() args_opts_has(char*) -- cgit v1.2.3-70-g09d2