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 /main.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 '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; -} |
