aboutsummaryrefslogtreecommitdiff
path: root/src/defaultCommands.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/defaultCommands.c')
-rw-r--r--src/defaultCommands.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/defaultCommands.c b/src/defaultCommands.c
new file mode 100644
index 0000000..cd3442e
--- /dev/null
+++ b/src/defaultCommands.c
@@ -0,0 +1,26 @@
+#include "commandHandler.h"
+#include <stdio.h>
+
+void help(char *args) {
+ printf("This is the help message");
+}
+
+void about(char *args) {
+ printf("This is the about message");
+}
+
+void version(char *args) {
+ printf("This is the version message");
+}
+
+extern void registerHandler(char *name, F_EXECUTOR executor);
+
+void registerDefaultHandlers() {
+ registerHandler("help", &help);
+ registerHandler("h", &help);
+ registerHandler("?", &help);
+ registerHandler("about", &about);
+ registerHandler("a", &about);
+ registerHandler("version", &version);
+ registerHandler("v", &version);
+}