From 0825f4a6ddb4226ce45576ef1893771f7d2d37a8 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Wed, 26 Jun 2013 01:12:25 +0200 Subject: move structs into .h file MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/argparser.c | 80 -------------------------------------------------------- src/argparser.h | 81 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 81 insertions(+), 80 deletions(-) (limited to 'src') diff --git a/src/argparser.c b/src/argparser.c index fcf6edd..7df379f 100644 --- a/src/argparser.c +++ b/src/argparser.c @@ -36,86 +36,6 @@ static long cmp(char* a, char* b); -/** - * Option structure - */ -typedef struct -{ - /** - * The type of the option, either of: `ARGUMENTLESS`, `ARGUMENTED`, `VARIADIC` - */ - long type; - - /** - * Alterative option names - */ - char** alternatives; - - /** - * Number of elements in `alternatives` - */ - long alternatives_count; - - /** - * Standard option name - */ - char* standard; - - /** - * Argument name, not for argumentless options - */ - char* argument; - - /** - * Help text, multi-line - */ - char* help; - -} args_Option; - - -/** - * char* to void* map structure - */ -typedef struct -{ - /** - * Available keys - */ - char** keys; - - /** - * The number of available keys - */ - long key_count; - - /** - * Indefinite depth array with 17 elements per level, the last being the value at the position - */ - void** data; - -} args_Map; - - -/** - * Array with associated length - */ -typedef struct -{ - /** - * The values - */ - void** values; - - /** - * The length of `values` - */ - long count; - -} args_Array; - - - /** * Whether the Linux VT is being used */ diff --git a/src/argparser.h b/src/argparser.h index 288c585..19629ce 100644 --- a/src/argparser.h +++ b/src/argparser.h @@ -19,3 +19,84 @@ #include #include #include + + +/** + * Option structure + */ +typedef struct +{ + /** + * The type of the option, either of: `ARGUMENTLESS`, `ARGUMENTED`, `VARIADIC` + */ + long type; + + /** + * Alterative option names + */ + char** alternatives; + + /** + * Number of elements in `alternatives` + */ + long alternatives_count; + + /** + * Standard option name + */ + char* standard; + + /** + * Argument name, not for argumentless options + */ + char* argument; + + /** + * Help text, multi-line + */ + char* help; + +} args_Option; + + +/** + * char* to void* map structure + */ +typedef struct +{ + /** + * Available keys + */ + char** keys; + + /** + * The number of available keys + */ + long key_count; + + /** + * Indefinite depth array with 17 elements per level, the last being the value at the position + */ + void** data; + +} args_Map; + + +/** + * Array with associated length + */ +typedef struct +{ + /** + * The values + */ + void** values; + + /** + * The length of `values` + */ + long count; + +} args_Array; + + -- cgit v1.2.3-70-g09d2