From 98eb242e282650e9c6645dd2e5290e144b105bb4 Mon Sep 17 00:00:00 2001 From: Michal Idziorek Date: Sat, 23 May 2015 23:44:44 +0200 Subject: improved params and environment passing and started snake-game :) --- userspace/foolshell.c | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) (limited to 'userspace/foolshell.c') diff --git a/userspace/foolshell.c b/userspace/foolshell.c index 2abb549..0ec7e88 100644 --- a/userspace/foolshell.c +++ b/userspace/foolshell.c @@ -4,6 +4,7 @@ #include extern char **environ; + // void hello() { @@ -13,7 +14,7 @@ void hello() puts( "\033c" - "\033[37;44m" + "\033[36m" " ______ __ ____ _____ \n" " / ____/___ ____ / / / __ \\/ ___/ \n" @@ -21,10 +22,11 @@ void hello() " / __/ / /_/ / /_/ / / / /_/ /___/ / \n" " /_/ \\____/\\____/_/ \\____//____/ \n" " \n" - "\033[37;43m" + + "\033[37;44m" " \n" - " Welcome to FoolShell v0.7 (Compiled on " __DATE__ " at " __TIME__ "\n" + " Welcome to FoolShell v0.8 (Compiled on " __DATE__ " at " __TIME__")\n" " ------------------------------------------------------------------\n\n" " Please type 'help' anytime, to show shell \"built-ins\". You can execute \n" " user programms that are in your $PATH directory by simply typing \n" @@ -41,15 +43,20 @@ void hello() void prompt() { - printf("%s%s",getenv("PWD"),getenv("PS1")); + printf("\033[36mfool\033[37m@\033[32mhill\033[33m:%s%s\033[37m",getenv("PWD"),getenv("PS1")); } + int main(int argc, char **argv) { - +/* + printf("argv= 0x%08x \n",argv); + printf("environ= 0x%08x \n",environ); +*/ bool silent=false; for(int i=0;i