git.droids-corp.org
/
protos
/
libecoli.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rename structures and functions
[protos/libecoli.git]
/
src
/
ecoli_node_seq.c
diff --git
a/src/ecoli_node_seq.c
b/src/ecoli_node_seq.c
index
6b1a2cd
..
d06b053
100644
(file)
--- a/
src/ecoli_node_seq.c
+++ b/
src/ecoli_node_seq.c
@@
-34,7
+34,7
@@
struct ec_node_seq {
static int
ec_node_seq_parse(const struct ec_node *node,
static int
ec_node_seq_parse(const struct ec_node *node,
- struct ec_p
ars
e *state,
+ struct ec_p
nod
e *state,
const struct ec_strvec *strvec)
{
struct ec_node_seq *priv = ec_node_priv(node);
const struct ec_strvec *strvec)
{
struct ec_node_seq *priv = ec_node_priv(node);
@@
-49,7
+49,7
@@
ec_node_seq_parse(const struct ec_node *node,
if (childvec == NULL)
goto fail;
if (childvec == NULL)
goto fail;
- ret = ec_
node_
parse_child(priv->table[i], state, childvec);
+ ret = ec_parse_child(priv->table[i], state, childvec);
if (ret < 0)
goto fail;
if (ret < 0)
goto fail;
@@
-57,7
+57,7
@@
ec_node_seq_parse(const struct ec_node *node,
childvec = NULL;
if (ret == EC_PARSE_NOMATCH) {
childvec = NULL;
if (ret == EC_PARSE_NOMATCH) {
- ec_p
ars
e_free_children(state);
+ ec_p
nod
e_free_children(state);
return EC_PARSE_NOMATCH;
}
return EC_PARSE_NOMATCH;
}
@@
-76,7
+76,7
@@
__ec_node_seq_complete(struct ec_node **table, size_t table_len,
struct ec_comp *comp,
const struct ec_strvec *strvec)
{
struct ec_comp *comp,
const struct ec_strvec *strvec)
{
- struct ec_p
ars
e *parse = ec_comp_get_state(comp);
+ struct ec_p
nod
e *parse = ec_comp_get_state(comp);
struct ec_strvec *childvec = NULL;
unsigned int i;
int ret;
struct ec_strvec *childvec = NULL;
unsigned int i;
int ret;
@@
-96,7
+96,7
@@
__ec_node_seq_complete(struct ec_node **table, size_t table_len,
*/
/* first, try to complete with the first node of the table */
*/
/* first, try to complete with the first node of the table */
- ret = ec_
node_
complete_child(table[0], comp, strvec);
+ ret = ec_complete_child(table[0], comp, strvec);
if (ret < 0)
goto fail;
if (ret < 0)
goto fail;
@@
-107,7
+107,7
@@
__ec_node_seq_complete(struct ec_node **table, size_t table_len,
if (childvec == NULL)
goto fail;
if (childvec == NULL)
goto fail;
- ret = ec_
node_
parse_child(table[0], parse, childvec);
+ ret = ec_parse_child(table[0], parse, childvec);
if (ret < 0)
goto fail;
if (ret < 0)
goto fail;
@@
-116,20
+116,20
@@
__ec_node_seq_complete(struct ec_node **table, size_t table_len,
if ((unsigned int)ret != i) {
if (ret != EC_PARSE_NOMATCH)
if ((unsigned int)ret != i) {
if (ret != EC_PARSE_NOMATCH)
- ec_p
ars
e_del_last_child(parse);
+ ec_p
nod
e_del_last_child(parse);
continue;
}
childvec = ec_strvec_ndup(strvec, i, ec_strvec_len(strvec) - i);
if (childvec == NULL) {
continue;
}
childvec = ec_strvec_ndup(strvec, i, ec_strvec_len(strvec) - i);
if (childvec == NULL) {
- ec_p
ars
e_del_last_child(parse);
+ ec_p
nod
e_del_last_child(parse);
goto fail;
}
ret = __ec_node_seq_complete(&table[1],
table_len - 1,
comp, childvec);
goto fail;
}
ret = __ec_node_seq_complete(&table[1],
table_len - 1,
comp, childvec);
- ec_p
ars
e_del_last_child(parse);
+ ec_p
nod
e_del_last_child(parse);
ec_strvec_free(childvec);
childvec = NULL;
ec_strvec_free(childvec);
childvec = NULL;
@@
-325,7
+325,7
@@
struct ec_node *__ec_node_seq(const char *id, ...)
if (children == NULL)
goto fail_free_children;
if (children == NULL)
goto fail_free_children;
- for (; child != EC_
NODE_ENDLIST
; child = va_arg(ap, struct ec_node *)) {
+ for (; child != EC_
VA_END
; child = va_arg(ap, struct ec_node *)) {
if (child == NULL)
goto fail_free_children;
if (child == NULL)
goto fail_free_children;
@@
-351,7
+351,7
@@
struct ec_node *__ec_node_seq(const char *id, ...)
return node;
fail_free_children:
return node;
fail_free_children:
- for (; child != EC_
NODE_ENDLIST
; child = va_arg(ap, struct ec_node *))
+ for (; child != EC_
VA_END
; child = va_arg(ap, struct ec_node *))
ec_node_free(child);
fail:
ec_node_free(node); /* will also free added children */
ec_node_free(child);
fail:
ec_node_free(node); /* will also free added children */
@@
-400,32
+400,32
@@
static int ec_node_seq_testcase(void)
return -1;
}
testres |= EC_TEST_CHECK_COMPLETE(node,
return -1;
}
testres |= EC_TEST_CHECK_COMPLETE(node,
- "", EC_
NODE_ENDLIST
,
- "foo", EC_
NODE_ENDLIST
);
+ "", EC_
VA_END
,
+ "foo", EC_
VA_END
);
testres |= EC_TEST_CHECK_COMPLETE(node,
testres |= EC_TEST_CHECK_COMPLETE(node,
- "f", EC_
NODE_ENDLIST
,
- "foo", EC_
NODE_ENDLIST
);
+ "f", EC_
VA_END
,
+ "foo", EC_
VA_END
);
testres |= EC_TEST_CHECK_COMPLETE(node,
testres |= EC_TEST_CHECK_COMPLETE(node,
- "foo", EC_
NODE_ENDLIST
,
- "foo", EC_
NODE_ENDLIST
);
+ "foo", EC_
VA_END
,
+ "foo", EC_
VA_END
);
testres |= EC_TEST_CHECK_COMPLETE(node,
testres |= EC_TEST_CHECK_COMPLETE(node,
- "foo", "", EC_
NODE_ENDLIST
,
- "bar", "toto", EC_
NODE_ENDLIST
);
+ "foo", "", EC_
VA_END
,
+ "bar", "toto", EC_
VA_END
);
testres |= EC_TEST_CHECK_COMPLETE(node,
testres |= EC_TEST_CHECK_COMPLETE(node,
- "foo", "t", EC_
NODE_ENDLIST
,
- "toto", EC_
NODE_ENDLIST
);
+ "foo", "t", EC_
VA_END
,
+ "toto", EC_
VA_END
);
testres |= EC_TEST_CHECK_COMPLETE(node,
testres |= EC_TEST_CHECK_COMPLETE(node,
- "foo", "b", EC_
NODE_ENDLIST
,
- "bar", EC_
NODE_ENDLIST
);
+ "foo", "b", EC_
VA_END
,
+ "bar", EC_
VA_END
);
testres |= EC_TEST_CHECK_COMPLETE(node,
testres |= EC_TEST_CHECK_COMPLETE(node,
- "foo", "bar", EC_
NODE_ENDLIST
,
- "bar", EC_
NODE_ENDLIST
);
+ "foo", "bar", EC_
VA_END
,
+ "bar", EC_
VA_END
);
testres |= EC_TEST_CHECK_COMPLETE(node,
testres |= EC_TEST_CHECK_COMPLETE(node,
- "x", EC_
NODE_ENDLIST
,
- EC_
NODE_ENDLIST
);
+ "x", EC_
VA_END
,
+ EC_
VA_END
);
testres |= EC_TEST_CHECK_COMPLETE(node,
testres |= EC_TEST_CHECK_COMPLETE(node,
- "foobarx", EC_
NODE_ENDLIST
,
- EC_
NODE_ENDLIST
);
+ "foobarx", EC_
VA_END
,
+ EC_
VA_END
);
ec_node_free(node);
return testres;
ec_node_free(node);
return testres;