summaryrefslogtreecommitdiff
path: root/src/user/lib/include/stdio.h
blob: b8de85d57bfd9363b121cefcba1aab7561171323 (plain)
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
#pragma once
#include <bits/file.h>
#include <stddef.h>

#define EOF (-1)

int printf(const char *fmt, ...);
int snprintf(char *str, size_t len, const char *fmt, ...);

int _klogf(const char *fmt, ...); // for kernel debugging only


extern FILE *const stdin, *const stdout;

FILE *fopen(const char *path, const char *mode);
FILE *freopen(const char *path, const char *mode, FILE *);
FILE *fdopen(int fd, const char *mode);
FILE *file_clone(const FILE *);
int fclose(FILE *);

size_t fread(void *restrict ptr, size_t size, size_t nitems, FILE *restrict);
size_t fwrite(const void *restrict ptr, size_t size, size_t nitems, FILE *restrict);

int feof(FILE *);
int ferror(FILE *);