summaryrefslogtreecommitdiff
path: root/userspace
diff options
context:
space:
mode:
authorMichal Idziorek <m.i@gmx.at>2015-05-25 17:46:54 +0200
committerMichal Idziorek <m.i@gmx.at>2015-05-25 17:46:54 +0200
commitce50b0f007b8d71078a03d2a83ad8e35b0931dab (patch)
treee26d2f3272cdd4d90661345af4f3ac08ed5f55d7 /userspace
parent2c8cefb3a269d66a6a705bcb4912b0657379273c (diff)
fixed critical but in ELF loader and finally got tput etc.. (ncurses) working
Diffstat (limited to 'userspace')
-rw-r--r--userspace/Makefile2
-rw-r--r--userspace/foolshell.c4
-rw-r--r--userspace/sys/sys/termios.h7
3 files changed, 10 insertions, 3 deletions
diff --git a/userspace/Makefile b/userspace/Makefile
index d87b7a7..5590a42 100644
--- a/userspace/Makefile
+++ b/userspace/Makefile
@@ -29,7 +29,7 @@ ext2.img: $(PROGS) ../mp/mp.bin
echo "++++++++[>++++[>++>+++>+++>+<<<<-]>+>+>->>+[<]<-]>>.>---.+++++++..+++.>>.<-.<.+++.------.--------.>>+.>++." > mnt/home/miguel/hello.brain
# cp ~/temp/fool-os-stuff/binutils-build-host-foolos/binutils/readelf mnt/bin
# cp ../font/binfont.bin mnt/
- cp ~/temp/fool-os-stuff/ncurses-5.9-foolos-new/progs/* mnt/bin/
+ cp ~/temp/fool-os-stuff/ncurses/ncurses-5.9-build/progs/* mnt/bin/
cp ../mp/mp.bin mnt/boot/
mkdir -p mnt/etc
echo "127.0.0.1 localhost" > mnt/etc/hosts
diff --git a/userspace/foolshell.c b/userspace/foolshell.c
index fa62094..ba73e1d 100644
--- a/userspace/foolshell.c
+++ b/userspace/foolshell.c
@@ -74,7 +74,7 @@ int main(int argc, char **argv)
if(!silent)hello();
//char *buf=malloc(256);
- char buf[256];
+ char *buf=calloc(sizeof(char),256);
while(1)
{
@@ -101,7 +101,7 @@ char **tokenize(char *buf)
for(i=0;i<l;i++)
{
// init space for next token
- token[c]=calloc(sizeof(char),256);
+ token[c]=malloc(256);
//skip all the whitespace
while(buf[i]==' '&&i<l)i++;
diff --git a/userspace/sys/sys/termios.h b/userspace/sys/sys/termios.h
index b6625be..9b9cdc4 100644
--- a/userspace/sys/sys/termios.h
+++ b/userspace/sys/sys/termios.h
@@ -1,3 +1,5 @@
+#include <stdint.h>
+
typedef uint32_t speed_t;
typedef uint32_t DIR;
@@ -18,3 +20,8 @@ typedef uint32_t DIR;
#define B19200 0000016
#define B38400 0000017
+struct direct{
+ char d_name[256];
+ int d_namlen
+};
+