From 05498860e8f7b1e8bb27880bc7526de026694804 Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Fri, 26 Mar 2021 21:55:50 +0100 Subject: Renamed libs Cleaner and more flexible. --- libs/libc/inc/print.h | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 libs/libc/inc/print.h (limited to 'libs/libc/inc/print.h') diff --git a/libs/libc/inc/print.h b/libs/libc/inc/print.h new file mode 100644 index 0000000..58b5dc6 --- /dev/null +++ b/libs/libc/inc/print.h @@ -0,0 +1,27 @@ +// MIT License, Copyright (c) 2020 Marvin Borner + +#ifndef PRINT_H +#define PRINT_H + +#include "arg.h" +#include + +int printf(const char *format, ...); +int vprintf(const char *format, va_list ap); +int sprintf(char *str, const char *format, ...); +int vsprintf(char *str, const char *format, va_list ap); +int print(const char *str); +NORETURN void panic(const char *format, ...); + +#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 +int print_app(enum stream_defaults id, const char *proc_name, const char *str); +void print_trace(u32 count); +#endif + +#endif -- cgit v1.2.3