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
enhance documentation of ec_parse
[protos/libecoli.git]
/
src
/
ecoli_node_cmd.c
diff --git
a/src/ecoli_node_cmd.c
b/src/ecoli_node_cmd.c
index
1fb006a
..
5aac4e9
100644
(file)
--- a/
src/ecoli_node_cmd.c
+++ b/
src/ecoli_node_cmd.c
@@
-62,7
+62,7
@@
ec_node_cmd_eval_var(void **result, void *userctx,
unsigned int i;
/* get parsed string vector, it should contain only one str */
unsigned int i;
/* get parsed string vector, it should contain only one str */
- vec = ec_pnode_strvec(var);
+ vec = ec_pnode_
get_
strvec(var);
if (ec_strvec_len(vec) != 1) {
errno = EINVAL;
return -1;
if (ec_strvec_len(vec) != 1) {
errno = EINVAL;
return -1;
@@
-118,7
+118,7
@@
ec_node_cmd_eval_post_op(void **result, void *userctx, void *operand,
(void)userctx;
/* get parsed string vector, it should contain only one str */
(void)userctx;
/* get parsed string vector, it should contain only one str */
- vec = ec_pnode_strvec(operator);
+ vec = ec_pnode_
get_
strvec(operator);
if (ec_strvec_len(vec) != 1) {
errno = EINVAL;
return -1;
if (ec_strvec_len(vec) != 1) {
errno = EINVAL;
return -1;
@@
-152,7
+152,7
@@
ec_node_cmd_eval_bin_op(void **result, void *userctx, void *operand1,
(void)userctx;
/* get parsed string vector, it should contain only one str */
(void)userctx;
/* get parsed string vector, it should contain only one str */
- vec = ec_pnode_strvec(operator);
+ vec = ec_pnode_
get_
strvec(operator);
if (ec_strvec_len(vec) > 1) {
errno = EINVAL;
return -1;
if (ec_strvec_len(vec) > 1) {
errno = EINVAL;
return -1;
@@
-235,7
+235,7
@@
ec_node_cmd_eval_parenthesis(void **result, void *userctx,
(void)close_paren;
/* get parsed string vector, it should contain only one str */
(void)close_paren;
/* get parsed string vector, it should contain only one str */
- vec = ec_pnode_strvec(open_paren);
+ vec = ec_pnode_
get_
strvec(open_paren);
if (ec_strvec_len(vec) != 1) {
errno = EINVAL;
return -1;
if (ec_strvec_len(vec) != 1) {
errno = EINVAL;
return -1;
@@
-371,10
+371,6
@@
ec_node_cmd_build(const char *cmd_str, struct ec_node **table, size_t len)
errno = EINVAL;
goto fail;
}
errno = EINVAL;
goto fail;
}
- if (!ec_pnode_has_child(p)) {
- errno = EINVAL;
- goto fail;
- }
ret = ec_node_expr_eval(&result, ec_node_cmd_expr,
ec_pnode_get_first_child(p),
ret = ec_node_expr_eval(&result, ec_node_cmd_expr,
ec_pnode_get_first_child(p),