diff options
Diffstat (limited to 'libc/inc')
-rw-r--r-- | libc/inc/def.h | 1 | ||||
-rw-r--r-- | libc/inc/print.h | 10 | ||||
-rw-r--r-- | libc/inc/sys.h | 4 |
3 files changed, 12 insertions, 3 deletions
diff --git a/libc/inc/def.h b/libc/inc/def.h index 2c77203..a6e3210 100644 --- a/libc/inc/def.h +++ b/libc/inc/def.h @@ -23,6 +23,7 @@ typedef unsigned long long u64; * Macros */ +#define EOF (-1) #define NULL ((void *)0) #define U8_MAX 255 diff --git a/libc/inc/print.h b/libc/inc/print.h index 04668b2..575cc5f 100644 --- a/libc/inc/print.h +++ b/libc/inc/print.h @@ -11,4 +11,14 @@ int vprintf(const char *format, va_list ap); int vsprintf(char *str, const char *format, va_list ap); int print(const char *str); +#ifdef userspace +int vfprintf(const char *path, const char *format, va_list ap); +int fprintf(const char *path, const char *format, ...); +int log(const char *format, ...); +int err(int code, const char *format, ...); +#else +#include <proc.h> +int print_app(enum stream_defaults id, const char *proc_name, const char *str); +#endif + #endif diff --git a/libc/inc/sys.h b/libc/inc/sys.h index 231a0e2..d7e5e3d 100644 --- a/libc/inc/sys.h +++ b/libc/inc/sys.h @@ -28,8 +28,6 @@ enum sys { SYS_NET_RECEIVE, // Receive data from socket }; -enum event_type { EVENT_KEYBOARD, EVENT_MOUSE, EVENT_MAX }; - struct message { int src; int type; @@ -70,7 +68,7 @@ int sys5(enum sys num, int d1, int d2, int d3, int d4, int d5); int sysv(enum sys num, ...); /** - * Wrappers + * Syscall wrappers */ #define loop() sys0(SYS_LOOP) |