diff options
Diffstat (limited to 'commandHandler.c')
| -rw-r--r-- | commandHandler.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/commandHandler.c b/commandHandler.c new file mode 100644 index 0000000..9d158f3 --- /dev/null +++ b/commandHandler.c @@ -0,0 +1,13 @@ +#include "commandHandler.h" + +struct CommandHandler handlers[MAX_HANDLERS]; + +int handlerCount = 0; + +void registerHandler(char *name, F_EXECUTOR executor) { + struct CommandHandler newCH; + newCH.p_name = name; + newCH.p_executor = executor; + + handlers[handlerCount++] = newCH; +} |
