}
int
-ec_node_complete_child(/* XXX const */struct ec_node *node,
+ec_node_complete_child(const struct ec_node *node,
struct ec_completed *completed,
const struct ec_strvec *strvec)
{
return 0;
}
-struct ec_completed *ec_node_complete_strvec(struct ec_node *node,
+struct ec_completed *ec_node_complete_strvec(const struct ec_node *node,
const struct ec_strvec *strvec)
{
struct ec_completed *completed = NULL;
return NULL;
}
-struct ec_completed *ec_node_complete(struct ec_node *node,
+struct ec_completed *ec_node_complete(const struct ec_node *node,
const char *str)
{
struct ec_strvec *strvec = NULL;
* return a completed object filled with items
* return NULL on error (nomem?)
*/
-struct ec_completed *ec_node_complete(struct ec_node *node,
+struct ec_completed *ec_node_complete(const struct ec_node *node,
const char *str);
-struct ec_completed *ec_node_complete_strvec(struct ec_node *node,
+struct ec_completed *ec_node_complete_strvec(const struct ec_node *node,
const struct ec_strvec *strvec);
/* internal: used by nodes */
-int ec_node_complete_child(struct ec_node *node,
+int ec_node_complete_child(const struct ec_node *node,
struct ec_completed *completed,
const struct ec_strvec *strvec);
struct ec_keyval *attrs;
};
-static int __ec_node_parse_child(struct ec_node *node, struct ec_parsed *state,
+static int __ec_node_parse_child(const struct ec_node *node,
+ struct ec_parsed *state,
bool is_root, const struct ec_strvec *strvec)
{
struct ec_strvec *match_strvec;
return ret;
}
-int ec_node_parse_child(struct ec_node *node, struct ec_parsed *state,
+int ec_node_parse_child(const struct ec_node *node, struct ec_parsed *state,
const struct ec_strvec *strvec)
{
assert(state != NULL);
return __ec_node_parse_child(node, state, false, strvec);
}
-struct ec_parsed *ec_node_parse_strvec(struct ec_node *node,
+struct ec_parsed *ec_node_parse_strvec(const struct ec_node *node,
const struct ec_strvec *strvec)
{
struct ec_parsed *parsed = ec_parsed(node);
return parsed;
}
-struct ec_parsed *ec_node_parse(struct ec_node *node, const char *str)
+struct ec_parsed *ec_node_parse(const struct ec_node *node, const char *str)
{
struct ec_strvec *strvec = NULL;
struct ec_parsed *parsed = NULL;
*
*
*/
-struct ec_parsed *ec_node_parse(struct ec_node *node, const char *str);
+struct ec_parsed *ec_node_parse(const struct ec_node *node, const char *str);
/**
*
*
*
*/
-struct ec_parsed *ec_node_parse_strvec(struct ec_node *node,
+struct ec_parsed *ec_node_parse_strvec(const struct ec_node *node,
const struct ec_strvec *strvec);
/**
* the number of matched strings in strvec
* XXX state is not freed on error ?
*/
-int ec_node_parse_child(struct ec_node *node,
+int ec_node_parse_child(const struct ec_node *node,
struct ec_parsed *state,
const struct ec_strvec *strvec);