aboutsummaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'main.c')
-rw-r--r--main.c35
1 files changed, 0 insertions, 35 deletions
diff --git a/main.c b/main.c
deleted file mode 100644
index 3f2bba6..0000000
--- a/main.c
+++ /dev/null
@@ -1,35 +0,0 @@
-#include <bits/posix2_lim.h>
-#include <stdbool.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <limits.h>
-#include <string.h>
-
-#define SHELL_STRING "> "
-
-extern void registerDefaultHandlers();
-void printDefault();
-extern bool route(char *command);
-
-int main() {
- char buffer[LINE_MAX];
- buffer[0] = 0;
-
- registerDefaultHandlers();
-
- printf("Welcome!\n\n");
- do {
- // Removes the Line Feed character at the "end", if it exists
- char *toChange = strchr(buffer, 0x0A);
- if (toChange != NULL)
- toChange[0] = 0;
-
- if (buffer[0] > 0)
- if (route(buffer))
- printf("\n");
-
- printf(SHELL_STRING);
- } while (fgets(buffer, LINE_MAX, stdin));
-
- return 0;
-}