From 6a36d7e889fb3b683c03607428ad88cd5fadaceb Mon Sep 17 00:00:00 2001 From: Syndamia Date: Thu, 2 Sep 2021 08:45:47 +0300 Subject: (1) Moved code files to src folder --- commandRouter.c | 20 -------------------- 1 file changed, 20 deletions(-) delete mode 100644 commandRouter.c (limited to 'commandRouter.c') diff --git a/commandRouter.c b/commandRouter.c deleted file mode 100644 index 3d41ddd..0000000 --- a/commandRouter.c +++ /dev/null @@ -1,20 +0,0 @@ -#include -#include -#include -#include -#include "commandHandler.h" - -extern struct CommandHandler handlers[MAX_HANDLERS]; -extern int handlerCount; - -bool route(char *command) { - command = strtok(command, " "); - - for (int i = 0; i < handlerCount; i++) { - if (strcasecmp(handlers[i].p_name, command) == 0) { - handlers[i].p_executor(command); - return true; - } - } - return false; -} -- cgit v1.2.3