OrionLibC
Barry Importing existing Orion LibC 03048a9 (3 years, 1 month ago)
#ifndef _STDIO_H
#define _STDIO_H
#include <stdarg.h>
#include <stddef.h>
#define EOF ((int) -1)
#define SEEK_SET 0
#define SEEK_CUR 1
#define SEEK_END 2
typedef struct {
size_t count;
char *buf, *ptr;
int flags;
int fd;
} FILE;
enum FILEFlags {
FILE_READ = 1,
FILE_WRITE = 2,
FILE_UNBUF = 4,
FILE_EOF = 10,
FILE_ERR = 20,
};
#ifdef __cplusplus
extern "C" {
#endif
extern FILE *stdin;
extern FILE *stdout;
extern FILE *stderr;
#define stdin stdin
#define stdout stdout
#define stderr stderr
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);
long ftell(FILE *);
size_t fwrite(const void *, size_t, size_t, FILE *);
void setbuf(FILE *stream, char *buf);
int vfprintf(FILE *stream, const char *fmt, va_list);
int sprintf(char *buf, const char *fmt, ...);
void dbgprintf(char *fmt, ...);
void dbgputs(char *str);
int printf(const char *fmt, ...);
void perror(const char *s);
int getc(FILE *stream);
int getchar(void);
int puts(const char *s);
int putc(int c, FILE *stream);
int putchar(int c);
int rename(const char *oldpath, const char *newpath);
#ifdef __cplusplus
}
#endif
#endif