Luna/libs/libc/include/stdio.h

55 lines
1.3 KiB
C

#ifndef _STDIO_H
#define _STDIO_H
#include <stdarg.h>
#include <stddef.h>
#define SEEK_SET 0
typedef struct
{
int f_fd;
int f_eof;
int f_err;
} FILE;
extern FILE* __stderr;
extern FILE* __stdout;
#define stderr __stderr
#define stdout __stdout
#ifdef __cplusplus
extern "C"
{
#endif
int fclose(FILE*);
int fflush(FILE*);
FILE* fopen(const char*, const char*);
int fprintf(FILE*, const char*, ...);
size_t fread(void*, size_t, size_t, FILE*);
int fseek(FILE*, long, int); // Not implemented.
long ftell(FILE*); // Not implemented.
size_t fwrite(const void*, size_t, size_t, FILE*);
int ferror(FILE*);
int feof(FILE*);
void clearerr(FILE*);
void setbuf(FILE*, char*); // Not implemented.
int vfprintf(FILE*, const char*, va_list);
int printf(const char*, ...);
int vprintf(const char*, va_list);
int sprintf(char*, const char*, ...);
int snprintf(char*, size_t, const char*, ...);
int vsprintf(char*, const char*, va_list);
int vsnprintf(char*, size_t, const char*, va_list);
int puts(const char*);
int fputs(const char*, FILE*);
int fputc(int, FILE*);
int putc(int, FILE*);
int putchar(int);
void perror(const char*);
#ifdef __cplusplus
}
#endif
#endif