2019-02-09 12:52:45 -06:00
|
|
|
#ifndef STDIO_H
|
|
|
|
#define STDIO_H
|
|
|
|
|
2019-04-08 16:34:25 -05:00
|
|
|
#include <stdarg.h>
|
2019-02-09 12:52:45 -06:00
|
|
|
#include <stddef.h>
|
|
|
|
#include <stdint.h>
|
2019-04-08 16:34:25 -05:00
|
|
|
|
2019-02-09 12:52:45 -06:00
|
|
|
typedef struct {
|
|
|
|
char* mntpnt;
|
|
|
|
const char* path;
|
2019-04-09 09:01:06 -05:00
|
|
|
int wr;
|
|
|
|
int rd;
|
2019-02-09 12:52:45 -06:00
|
|
|
uint32_t type;
|
2019-04-06 09:07:06 -05:00
|
|
|
unsigned long pos;
|
2019-02-09 12:52:45 -06:00
|
|
|
int eof;
|
2019-04-08 16:33:19 -05:00
|
|
|
int error;
|
2019-03-11 09:32:55 -05:00
|
|
|
void* data;
|
2019-02-09 12:52:45 -06:00
|
|
|
} FILE;
|
|
|
|
|
|
|
|
#define SEEK_CUR 1
|
|
|
|
#define SEEK_END 2
|
|
|
|
#define SEEK_SET 3
|
|
|
|
#define EOF -1
|
|
|
|
|
2019-03-11 09:32:55 -05:00
|
|
|
extern FILE* stdin;
|
|
|
|
extern FILE* stdout;
|
|
|
|
extern FILE* stderr;
|
2019-02-09 12:52:45 -06:00
|
|
|
|
2019-03-11 09:32:55 -05:00
|
|
|
FILE* fopen(const char* filename,const char* mode);
|
2019-02-09 12:52:45 -06:00
|
|
|
int fgetc(FILE* stream);
|
|
|
|
int getc();
|
|
|
|
char* fgets(char* str,int count,FILE* stream);
|
|
|
|
size_t fread(void* buffer,size_t size,size_t count,FILE* stream);
|
|
|
|
int fputc(int c,FILE* stream);
|
|
|
|
int putc(int c);
|
|
|
|
int fputs(const char* s,FILE* stream);
|
2019-04-09 09:16:37 -05:00
|
|
|
size_t fwrite(void* buffer_ptr,size_t size,size_t count,FILE* stream);
|
2019-02-09 12:52:45 -06:00
|
|
|
int puts(const char* s);
|
|
|
|
int fprintf(FILE* stream,const char* format,...);
|
2019-04-08 16:34:25 -05:00
|
|
|
int vfprintf(FILE* stream,const char* format,va_list arg);
|
2019-02-09 12:52:45 -06:00
|
|
|
int printf(const char* format,...);
|
|
|
|
int fseek(FILE* stream,long offset,int origin);
|
|
|
|
long ftell(FILE* stream);
|
|
|
|
int fclose(FILE* file);
|
2019-04-08 16:33:49 -05:00
|
|
|
int feof(FILE *stream);
|
|
|
|
int ferror(FILE *stream);
|
2019-02-09 12:52:45 -06:00
|
|
|
|
|
|
|
#endif
|