os/sysroot/usr/include/stdio.h

46 lines
1.3 KiB
C
Raw Normal View History

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
#define FILE uint32_t //We're using pointers to FILE even though it's a uint32_t so we can expand to a struct if needed
2019-02-09 12:52:45 -06:00
#define SEEK_CUR 1
#define SEEK_END 2
#define SEEK_SET 3
#define EOF -1
2019-08-31 18:44:08 -05:00
#define stdin __stdio_stdin
#define stdout __stdio_stdout
#define stderr __stdio_stderr
2019-08-31 18:44:08 -05:00
extern FILE* __stdio_stdin;
extern FILE* __stdio_stdout;
extern FILE* __stdio_stderr;
2019-02-09 12:52:45 -06:00
FILE* fopen(char* filename,char* mode);
2019-02-09 12:52:45 -06:00
int fgetc(FILE* stream);
2019-09-01 08:39:26 -05:00
int getc(FILE* stream);
2019-02-09 12:52:45 -06:00
char* fgets(char* str,int count,FILE* stream);
2019-09-01 08:39:26 -05:00
char* gets(char* str);
2019-02-09 12:52:45 -06:00
size_t fread(void* buffer,size_t size,size_t count,FILE* stream);
int fputc(int c,FILE* stream);
int putc(int c,FILE *stream);
2019-02-09 12:52:45 -06:00
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);
int feof(FILE* stream);
int ferror(FILE* stream);
2019-08-27 20:07:54 -05:00
int fflush(FILE *stream); // GCC required
void setbuf(FILE *restrict stream, char *restrict buf); // GCC required
void rescan_vfs();
2019-02-09 12:52:45 -06:00
#endif