summaryrefslogtreecommitdiff
path: root/lib/command_match.c
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@opensourcerouting.org>2016-11-18 16:24:47 +0100
committerQuentin Young <qlyoung@users.noreply.github.com>2017-05-15 10:27:43 -0400
commit5894e76da7974eb00f4c8277a67630f5e50cec53 (patch)
tree24a6904b37e39aea941afe2e26b4a7ef6a63d1fd /lib/command_match.c
parent16705ecc653dd657c5b8149934d8734e89c27c07 (diff)
lib: parser: split off & rename graph handling
Put core CLI graph stuff in lib/command_graph.[ch] and consistently prefix all function names with "cmd_". Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'lib/command_match.c')
-rw-r--r--lib/command_match.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/command_match.c b/lib/command_match.c
index bbd9cd091d..df1a8bb72b 100644
--- a/lib/command_match.c
+++ b/lib/command_match.c
@@ -117,7 +117,7 @@ command_match (struct graph *cmdgraph,
struct listnode *tail = listtail (*argv);
// delete dummy start node
- del_cmd_token ((struct cmd_token *) head->data);
+ cmd_token_del ((struct cmd_token *) head->data);
list_delete_node (*argv, head);
// get cmd_element out of list tail
@@ -281,7 +281,7 @@ command_match_r (struct graph_node *start, vector vline, unsigned int n,
// manually deleted
struct cmd_element *el = leaf->data;
listnode_add (currbest, el);
- currbest->del = (void (*)(void *)) &del_cmd_token;
+ currbest->del = (void (*)(void *)) &cmd_token_del;
// do not break immediately; continue walking through the follow set
// to ensure that there is exactly one END_TKN
}
@@ -320,7 +320,7 @@ command_match_r (struct graph_node *start, vector vline, unsigned int n,
{
// copy token, set arg and prepend to currbest
struct cmd_token *token = start->data;
- struct cmd_token *copy = copy_cmd_token (token);
+ struct cmd_token *copy = cmd_token_dup (token);
copy->arg = XSTRDUP (MTYPE_CMD_ARG, input_token);
listnode_add_before (currbest, currbest->head, copy);
matcher_rv = MATCHER_OK;