aboutsummaryrefslogtreecommitdiff
path: root/libs/libc/inc/print.h
blob: c0d864e21c766702e8833e84bb78b150e999c305 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// MIT License, Copyright (c) 2020 Marvin Borner

#ifndef PRINT_H
#define PRINT_H

#include <arg.h>
#include <def.h>

int printf(const char *format, ...) NONNULL;
int vprintf(const char *format, va_list ap) NONNULL;
int snprintf(char *str, u32 size, const char *format, ...) NONNULL;
int vsnprintf(char *str, u32 size, const char *format, va_list ap) NONNULL;
int print(const char *str) NONNULL;
NORETURN void panic(const char *format, ...) NONNULL;

#ifdef USER
int vfprintf(const char *path, const char *format, va_list ap) NONNULL;
int fprintf(const char *path, const char *format, ...) NONNULL;
int log(const char *format, ...) NONNULL;
int err(int code, const char *format, ...) NONNULL;
#else
#include <proc.h>
int print_app(enum stream_defaults id, const char *proc_name, const char *str) NONNULL;
void print_trace(u32 count);
#endif

#endif