#include <ecoli_malloc.h>
#include <ecoli_string.h>
#include <ecoli_strvec.h>
-#include <ecoli_keyval.h>
+#include <ecoli_dict.h>
#include <ecoli_log.h>
#include <ecoli_test.h>
#include <ecoli_node.h>
char *full; /* the full token after completion */
char *completion; /* chars that are added, NULL if not applicable */
char *display; /* what should be displayed by help/completers */
- struct ec_keyval *attrs;
+ struct ec_dict *attrs;
};
struct ec_comp *ec_comp(struct ec_parse *state)
if (comp == NULL)
goto fail;
- comp->attrs = ec_keyval();
+ comp->attrs = ec_dict();
if (comp->attrs == NULL)
goto fail;
fail:
if (comp != NULL)
- ec_keyval_free(comp->attrs);
+ ec_dict_free(comp->attrs);
ec_free(comp);
return NULL;
if (grp == NULL)
return NULL;
- grp->attrs = ec_keyval();
+ grp->attrs = ec_dict();
if (grp->attrs == NULL)
goto fail;
fail:
if (grp != NULL) {
ec_parse_free(grp->state);
- ec_keyval_free(grp->attrs);
+ ec_dict_free(grp->attrs);
}
ec_free(grp);
return NULL;
const char *start, const char *full)
{
struct ec_comp_item *item = NULL;
- struct ec_keyval *attrs = NULL;
+ struct ec_dict *attrs = NULL;
char *comp_cp = NULL, *start_cp = NULL;
char *full_cp = NULL, *display_cp = NULL;
if (item == NULL)
goto fail;
- attrs = ec_keyval();
+ attrs = ec_dict();
if (attrs == NULL)
goto fail;
return item;
fail:
- ec_keyval_free(attrs);
+ ec_dict_free(attrs);
ec_free(comp_cp);
ec_free(start_cp);
ec_free(full_cp);
ec_free(item->start);
ec_free(item->completion);
ec_free(item->display);
- ec_keyval_free(item->attrs);
+ ec_dict_free(item->attrs);
ec_free(item);
}
ec_comp_item_free(item);
}
ec_parse_free(ec_parse_get_root(grp->state));
- ec_keyval_free(grp->attrs);
+ ec_dict_free(grp->attrs);
ec_free(grp);
}
TAILQ_REMOVE(&comp->groups, grp, next);
ec_comp_group_free(grp);
}
- ec_keyval_free(comp->attrs);
+ ec_dict_free(comp->attrs);
ec_free(comp);
}