diff options
-rw-r--r-- | ctxopt.c | 16 | ||||
-rw-r--r-- | ctxopt.h | 9 |
2 files changed, 17 insertions, 8 deletions
@@ -1,7 +1,8 @@ -/* ########################################################### */ -/* This Software is licensed under the GPL licensed Version 2, */ -/* please read http://www.gnu.org/copyleft/gpl.html */ -/* ########################################################### */ +/* ################################################################### */ +/* This Source Code Form is subject to the terms of the Mozilla Public */ +/* License, v. 2.0. If a copy of the MPL was not distributed with this */ +/* file, You can obtain one at https://mozilla.org/MPL/2.0/. */ +/* ################################################################### */ #include <errno.h> #include <limits.h> @@ -77,9 +78,11 @@ typedef enum leaf } walk_order_e; +#if 0 /* Unused yet */ static void * bst_delete(const void * vkey, void ** vrootp, int (*compar)(const void *, const void *)); +#endif static void bst_destroy(void * vrootp, void (*clean)(void *)); @@ -3201,6 +3204,11 @@ ctxopt_analyze(int nb_words, char ** words, int * nb_rem_args, par_name = cli_node->data; + /* Replace a leading -- by a single - */ + /* """""""""""""""""""""""""""""""""" */ + if (strncmp(cli_node->data, "--", 2) == 0) + par_name += 1; /* Ignore the first dash */ + if (strcmp(par_name, "\x1d") == 0) { check_for_missing_mandatory_opt(ctx_inst, (char *)(cli_node->prev->data)); @@ -1,7 +1,8 @@ -/* ########################################################### */ -/* This Software is licensed under the GPL licensed Version 2, */ -/* please read http://www.gnu.org/copyleft/gpl.html */ -/* ########################################################### */ +/* ################################################################### */ +/* This Source Code Form is subject to the terms of the Mozilla Public */ +/* License, v. 2.0. If a copy of the MPL was not distributed with this */ +/* file, You can obtain one at https://mozilla.org/MPL/2.0/. */ +/* ################################################################### */ #ifndef CTXOPT_H #define CTXOPT_H |