Files
rosetta/lib/libc/include/stdio.h
T

52 lines
1.0 KiB
C
Raw Normal View History

2026-02-19 19:28:50 +00:00
#ifndef STDIO_H_
#define STDIO_H_
#include <stdarg.h>
#include <stddef.h>
#define EOF -1
2026-02-19 19:28:50 +00:00
#ifdef __cplusplus
extern "C" {
#endif
struct __opaque_file;
typedef struct __opaque_file FILE;
2026-02-19 19:28:50 +00:00
extern int snprintf(char *buffer, size_t count, const char *format, ...);
extern int vsnprintf(
char *buffer,
size_t count,
const char *format,
va_list va);
extern FILE *fopen(const char *path, const char *mode);
extern int fclose(FILE *stream);
extern int feof(FILE *stream);
extern int ferr(FILE *stream);
extern size_t fread(void *buf, size_t size, size_t count, FILE *stream);
extern size_t fwrite(const void *buf, size_t size, size_t count, FILE *stream);
extern int fgetc(FILE *stream);
static inline int getc(FILE *stream)
{
return fgetc(stream);
}
extern int fputc(int c, FILE *stream);
static inline int putc(int c, FILE *stream)
{
return fputc(c, stream);
}
extern char *fgets(char *restrict str, int count, FILE *restrict stream);
extern int fputs(const char *restrict str, FILE *restrict stream);
2026-02-19 19:28:50 +00:00
#ifdef __cplusplus
}
#endif
#endif