aboutsummaryrefslogtreecommitdiff
path: root/commandRouter.c
diff options
context:
space:
mode:
authorSyndamia <kamen.d.mladenov@protonmail.com>2021-09-02 08:45:47 +0300
committerSyndamia <kamen.d.mladenov@protonmail.com>2021-09-02 08:45:47 +0300
commit6a36d7e889fb3b683c03607428ad88cd5fadaceb (patch)
treedbad26ce67228334603c808ca5ed6e062fda1e23 /commandRouter.c
parent124e07eb3d22e3964f1fcd2580d7f2954621c596 (diff)
downloadyou86-6a36d7e889fb3b683c03607428ad88cd5fadaceb.tar
you86-6a36d7e889fb3b683c03607428ad88cd5fadaceb.tar.gz
you86-6a36d7e889fb3b683c03607428ad88cd5fadaceb.zip
(1) Moved code files to src folder
Diffstat (limited to 'commandRouter.c')
-rw-r--r--commandRouter.c20
1 files changed, 0 insertions, 20 deletions
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 <stdio.h>
-#include <string.h>
-#include <stdbool.h>
-#include <strings.h>
-#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;
-}