Use bitfield `flags` flags in file instead of `int` variables `mode`, `error`, `eof`. And rewrite weird logic opening/close files Reviewed-on: #691 Reviewed-by: Ivan B <1+dunkaist@noreply.localhost> Reviewed-by: Kiril Lipatov <lipatov.kiril@gmail.com> Co-authored-by: Egor00f <y.yarin@inbox.ru>
10 lines
213 B
C
10 lines
213 B
C
#ifndef __LIBC_STDIO_H
|
|
#define __LIBC_STDIO_H
|
|
|
|
#include <stdio.h>
|
|
|
|
int fclose_r(FILE* stream);
|
|
FILE* fopen_r(const char* restrict name, const char* restrict mode, FILE* restrict stream);
|
|
|
|
#endif // __LIBC_STDIO_H
|