diff options
| author | Syndamia <kamen.d.mladenov@protonmail.com> | 2021-09-02 08:45:47 +0300 |
|---|---|---|
| committer | Syndamia <kamen.d.mladenov@protonmail.com> | 2021-09-02 08:45:47 +0300 |
| commit | 6a36d7e889fb3b683c03607428ad88cd5fadaceb (patch) | |
| tree | dbad26ce67228334603c808ca5ed6e062fda1e23 /commandRouter.c | |
| parent | 124e07eb3d22e3964f1fcd2580d7f2954621c596 (diff) | |
| download | you86-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.c | 20 |
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; -} |
