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_once.c
diff --git
a/src/ecoli_node_once.c
b/src/ecoli_node_once.c
index
4662a66
..
e3ed96a
100644
(file)
--- a/
src/ecoli_node_once.c
+++ b/
src/ecoli_node_once.c
@@
-29,18
+29,18
@@
struct ec_node_once {
};
static unsigned int
};
static unsigned int
-count_node(struct ec_p
ars
e *parse, const struct ec_node *node)
+count_node(struct ec_p
nod
e *parse, const struct ec_node *node)
{
{
- struct ec_p
ars
e *child;
+ struct ec_p
nod
e *child;
unsigned int count = 0;
if (parse == NULL)
return 0;
unsigned int count = 0;
if (parse == NULL)
return 0;
- if (ec_p
ars
e_get_node(parse) == node)
+ if (ec_p
nod
e_get_node(parse) == node)
count++;
count++;
- EC_P
ARS
E_FOREACH_CHILD(child, parse)
+ EC_P
NOD
E_FOREACH_CHILD(child, parse)
count += count_node(child, node);
return count;
count += count_node(child, node);
return count;
@@
-48,7
+48,7
@@
count_node(struct ec_parse *parse, const struct ec_node *node)
static int
ec_node_once_parse(const struct ec_node *node,
static int
ec_node_once_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_once *priv = ec_node_priv(node);
const struct ec_strvec *strvec)
{
struct ec_node_once *priv = ec_node_priv(node);
@@
-57,11
+57,11
@@
ec_node_once_parse(const struct ec_node *node,
/* count the number of occurences of the node: if already parsed,
* do not match
*/
/* count the number of occurences of the node: if already parsed,
* do not match
*/
- count = count_node(ec_p
ars
e_get_root(state), priv->child);
+ count = count_node(ec_p
nod
e_get_root(state), priv->child);
if (count > 0)
return EC_PARSE_NOMATCH;
if (count > 0)
return EC_PARSE_NOMATCH;
- return ec_
node_
parse_child(priv->child, state, strvec);
+ return ec_parse_child(priv->child, state, strvec);
}
static int
}
static int
@@
-70,18
+70,18
@@
ec_node_once_complete(const struct ec_node *node,
const struct ec_strvec *strvec)
{
struct ec_node_once *priv = ec_node_priv(node);
const struct ec_strvec *strvec)
{
struct ec_node_once *priv = ec_node_priv(node);
- struct ec_p
ars
e *parse = ec_comp_get_state(comp);
+ struct ec_p
nod
e *parse = ec_comp_get_state(comp);
unsigned int count;
int ret;
/* count the number of occurences of the node: if already parsed,
* do not match
*/
unsigned int count;
int ret;
/* count the number of occurences of the node: if already parsed,
* do not match
*/
- count = count_node(ec_p
ars
e_get_root(parse), priv->child);
+ count = count_node(ec_p
nod
e_get_root(parse), priv->child);
if (count > 0)
return 0;
if (count > 0)
return 0;
- ret = ec_
node_
complete_child(priv->child, comp, strvec);
+ ret = ec_complete_child(priv->child, comp, strvec);
if (ret < 0)
return ret;
if (ret < 0)
return ret;
@@
-253,20
+253,20
@@
static int ec_node_once_testcase(void)
testres |= EC_TEST_CHECK_PARSE(node, 0, "foox");
testres |= EC_TEST_CHECK_COMPLETE(node,
testres |= EC_TEST_CHECK_PARSE(node, 0, "foox");
testres |= EC_TEST_CHECK_COMPLETE(node,
- "", EC_
NODE_ENDLIST
,
- "foo", "bar", EC_
NODE_ENDLIST
);
+ "", EC_
VA_END
,
+ "foo", "bar", 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,
- "b", EC_
NODE_ENDLIST
,
- "bar", EC_
NODE_ENDLIST
);
+ "b", EC_
VA_END
,
+ "bar", EC_
VA_END
);
testres |= EC_TEST_CHECK_COMPLETE(node,
testres |= EC_TEST_CHECK_COMPLETE(node,
- "foo", "", EC_
NODE_ENDLIST
,
- "bar", EC_
NODE_ENDLIST
);
+ "foo", "", EC_
VA_END
,
+ "bar", EC_
VA_END
);
testres |= EC_TEST_CHECK_COMPLETE(node,
testres |= EC_TEST_CHECK_COMPLETE(node,
- "bar", "", EC_
NODE_ENDLIST
,
- "foo", "bar", EC_
NODE_ENDLIST
);
+ "bar", "", EC_
VA_END
,
+ "foo", "bar", EC_
VA_END
);
ec_node_free(node);
return testres;
ec_node_free(node);
return testres;