From 8ea3e244d44190e44a092ffb004e13ad94174c68 Mon Sep 17 00:00:00 2001 From: Michal Idziorek Date: Sun, 24 May 2015 23:30:12 +0200 Subject: porting ncurses... --- userspace/foolshell.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'userspace/foolshell.c') diff --git a/userspace/foolshell.c b/userspace/foolshell.c index 0ec7e88..fa62094 100644 --- a/userspace/foolshell.c +++ b/userspace/foolshell.c @@ -3,7 +3,17 @@ #include #include +#include + extern char **environ; +extern struct _reent *_impure_ptr; + + + +uint8_t buf_test[1024*300]; + + + // void hello() @@ -50,6 +60,7 @@ void prompt() int main(int argc, char **argv) { /* + printf("_impure_ptr: 0x%08x\n",_impure_ptr); printf("argv= 0x%08x \n",argv); printf("environ= 0x%08x \n",environ); */ @@ -62,7 +73,8 @@ int main(int argc, char **argv) if(!silent)hello(); - char *buf=malloc(256); + //char *buf=malloc(256); + char buf[256]; while(1) { @@ -89,7 +101,7 @@ char **tokenize(char *buf) for(i=0;i