From b8c3cc7c4c7551a308d37277480b404771a592aa Mon Sep 17 00:00:00 2001 From: Jakub Adamski Date: Thu, 10 Jan 2019 14:53:53 +0100 Subject: [PATCH] test --- Microshell/microshell.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Microshell/microshell.c b/Microshell/microshell.c index c2fee4d..fae2228 100644 --- a/Microshell/microshell.c +++ b/Microshell/microshell.c @@ -38,7 +38,7 @@ int cut(char **argv, char *command){ int main (){ int ile, i; while (1){ - char** argv; + char* argv[100]; char komenda[max], directory[max]; if (getcwd(directory, sizeof(directory)) == NULL){ perror("getcwd() error"); @@ -47,7 +47,7 @@ int main (){ printf("[%s]$ ", directory); fgets(komenda, max, stdin); ile = cut(argv, komenda); - + printf("\n%s\n\n", argv[0]); if (argv[0]==NULL) continue; else if (strcmp(argv[0], "exit") == 0) @@ -60,7 +60,6 @@ int main (){ for(i=0; i