From 478c691187fbc9ba4ccaacf92f57828eef20041c Mon Sep 17 00:00:00 2001 From: Alex AUVOLAT Date: Fri, 18 May 2012 19:06:35 +0200 Subject: Simple shell added. Simple fprintf function added too. --- src/user/lib/include/stdarg.h | 10 ++++++++++ src/user/lib/include/stdio.h | 10 ++++++++-- 2 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 src/user/lib/include/stdarg.h (limited to 'src/user/lib/include') diff --git a/src/user/lib/include/stdarg.h b/src/user/lib/include/stdarg.h new file mode 100644 index 0000000..5cd74ff --- /dev/null +++ b/src/user/lib/include/stdarg.h @@ -0,0 +1,10 @@ +#ifndef DEF_STDARG_H +#define DEF_STDARG_H + +#define va_start(v,l) __builtin_va_start(v,l) +#define va_arg(v,l) __builtin_va_arg(v,l) +#define va_end(v) __builtin_va_end(v) +#define va_copy(d,s) __builtin_va_copy(d,s) +typedef __builtin_va_list va_list; + +#endif diff --git a/src/user/lib/include/stdio.h b/src/user/lib/include/stdio.h index e3f9d89..91fe169 100644 --- a/src/user/lib/include/stdio.h +++ b/src/user/lib/include/stdio.h @@ -1,7 +1,13 @@ #ifndef DEF_STDIO_H #define DEF_STDIO_H -void printk_int(int number); -void printk_hex(unsigned number); +#include + +void fprint(FILE f, char *s); +void fprint_int(FILE f, int number); +void fprint_hex(FILE f, unsigned number); +void fprintf(FILE f, char *s, ...); + +char* freadln(FILE f); #endif -- cgit v1.2.3