diff options
Diffstat (limited to 'main.c')
| -rw-r--r-- | main.c | 35 |
1 files changed, 0 insertions, 35 deletions
@@ -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; -} |
