From af310d48d662d5b20266c45bdced5026f6cce1d3 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Wed, 7 Sep 2016 17:52:12 +0200 Subject: [PATCH] remove unused function after refactoring --- src/kernel/command.c | 13 ------------- src/kernel/command.h | 2 -- 2 files changed, 15 deletions(-) diff --git a/src/kernel/command.c b/src/kernel/command.c index 13e02ee2e..912f21f7d 100644 --- a/src/kernel/command.c +++ b/src/kernel/command.c @@ -85,19 +85,6 @@ void stree_add(struct syntaxtree *stree, const char *str, parser fun) { addtoken(&stree->root, str, var); } -void -add_command(struct tnode **keys, - const char *str, parser fun) -{ - command *cmd = (command *)malloc(sizeof(command)); - variant var; - - assert(str); - cmd->fun = fun; - var.v = cmd; - addtoken(keys, str, var); -} - static int do_command_i(const struct tnode *keys, struct unit *u, struct order *ord) { char token[128]; diff --git a/src/kernel/command.h b/src/kernel/command.h index 17aa3e949..8fba94b7b 100644 --- a/src/kernel/command.h +++ b/src/kernel/command.h @@ -30,8 +30,6 @@ extern "C" { } syntaxtree; typedef void(*parser) (const void *nodes, struct unit * u, struct order *); - void add_command(struct tnode **troot, - const char *str, parser fun); void do_command(const struct tnode *troot, struct unit *u, struct order *); struct syntaxtree *stree_create(void);