- if (item->type == BT_ARGPAR_ITEM_TYPE_OPT) {
- struct bt_argpar_item_opt * const opt_item = (void *) item;
+ if (item->type == ARGPAR_ITEM_TYPE_OPT) {
+ struct argpar_item_opt * const opt_item = (void *) item;
-bool push_item(struct bt_argpar_item_array * const array,
- struct bt_argpar_item * const item)
+bool push_item(struct argpar_item_array * const array,
+ struct argpar_item * const item)
- new_items = argpar_realloc(array->items,
- struct bt_argpar_item *, new_n_alloc);
+ new_items = argpar_realloc(array->items,
+ struct argpar_item *, new_n_alloc);
-struct bt_argpar_item_opt *create_opt_item(
- const struct bt_argpar_opt_descr * const descr,
+struct argpar_item_opt *create_opt_item(
+ const struct argpar_opt_descr * const descr,
const unsigned int orig_index,
const unsigned int non_opt_index)
{
const unsigned int orig_index,
const unsigned int non_opt_index)
{
-const struct bt_argpar_opt_descr *find_descr(
- const struct bt_argpar_opt_descr * const descrs,
+const struct argpar_opt_descr *find_descr(
+ const struct argpar_opt_descr * const descrs,
for (descr = descrs; descr->short_name || descr->long_name; descr++) {
if (short_name && descr->short_name &&
for (descr = descrs; descr->short_name || descr->long_name; descr++) {
if (short_name && descr->short_name &&
static
enum parse_orig_arg_opt_ret parse_short_opts(const char * const short_opts,
const char * const next_orig_arg,
static
enum parse_orig_arg_opt_ret parse_short_opts(const char * const short_opts,
const char * const next_orig_arg,
- const struct bt_argpar_opt_descr * const descrs,
- struct bt_argpar_parse_ret * const parse_ret,
+ const struct argpar_opt_descr * const descrs,
+ struct argpar_parse_ret * const parse_ret,
/* Find corresponding option descriptor */
descr = find_descr(descrs, *short_opt_ch, NULL);
/* Find corresponding option descriptor */
descr = find_descr(descrs, *short_opt_ch, NULL);
static
enum parse_orig_arg_opt_ret parse_long_opt(const char * const long_opt_arg,
const char * const next_orig_arg,
static
enum parse_orig_arg_opt_ret parse_long_opt(const char * const long_opt_arg,
const char * const next_orig_arg,
- const struct bt_argpar_opt_descr * const descrs,
- struct bt_argpar_parse_ret * const parse_ret,
+ const struct argpar_opt_descr * const descrs,
+ struct argpar_parse_ret * const parse_ret,
bool * const used_next_orig_arg)
{
const size_t max_len = 127;
enum parse_orig_arg_opt_ret ret = PARSE_ORIG_ARG_OPT_RET_OK;
bool * const used_next_orig_arg)
{
const size_t max_len = 127;
enum parse_orig_arg_opt_ret ret = PARSE_ORIG_ARG_OPT_RET_OK;
/* Option's argument, if any */
const char *opt_arg = NULL;
/* Option's argument, if any */
const char *opt_arg = NULL;
static
enum parse_orig_arg_opt_ret parse_orig_arg_opt(const char * const orig_arg,
const char * const next_orig_arg,
static
enum parse_orig_arg_opt_ret parse_orig_arg_opt(const char * const orig_arg,
const char * const next_orig_arg,
- const struct bt_argpar_opt_descr * const descrs,
- struct bt_argpar_parse_ret * const parse_ret,
+ const struct argpar_opt_descr * const descrs,
+ struct argpar_parse_ret * const parse_ret,