1 /*=============================================================================
4 Copyright © 2008 Bruno Santos <nayart3@gmail.com>
5 =============================================================================*/
10 ///////////////////////////////////////////////////////////////////////////////
14 ///////////////////////////////////////////////////////////////////////////////
17 ///////////////////////////////////////////////////////////////////////////////
19 #define FILENAME_MAX 260
20 #define TMP_MAX 0x00FFFFFF
27 #define FOPEN_MAX 0x3FFFFFFF
28 #define L_tmpnam (sizeof("/tmp/") + 20)
34 ///////////////////////////////////////////////////////////////////////////////
38 typedef struct _FILE
FILE;
41 typedef long long fpos_t;
43 extern FILE* const stdin
;
44 extern FILE* const stdout
;
45 extern FILE* const stderr
;
47 ///////////////////////////////////////////////////////////////////////////////
48 int remove(const char* filename
);
49 int rename(const char* oldname
, const char* newname
);
51 char* tmpnam(char* str
);
53 FILE* fopen(const char* filename
, const char* mode
);
54 FILE* freopen(const char* filename
, const char* mode
);
55 FILE* fdopen(int fildes
, const char* mode
);
56 int fileno(FILE* stream
);
57 int fflush(FILE* stream
);
58 int fclose(FILE* stream
);
59 void setbuf(FILE* stream
, char* buffer
);
60 int setvbuf(FILE* stream
, char* buffer
, int mode
, size_t size
);
62 int sprintf(char* dst
, const char* format
, ...);
63 TCRT_IMPORT
int vsprintf(char* dst
, const char* format
, va_list arg
);
64 int snprintf(char* dst
, size_t len
, const char* format
, ...);
65 int vsnprintf(char* dst
, size_t len
, const char* format
, va_list arg
);
66 TCRT_IMPORT
int sscanf(const char* str
, const char* format
, ...);
67 int printf(const char* format
, ...);
68 int vprintf(const char* format
, va_list arg
);
69 int scanf(const char* format
, ...);
70 int fprintf(FILE* stream
, const char* format
, ...);
71 int vfprintf(FILE* stream
, const char* format
, va_list arg
);
72 int fscanf(FILE* stream
, const char* format
, ...);
74 int fgetc(FILE* stream
);
75 char* fgets(char* str
, int num
, FILE * stream
);
76 int fputc(int character
, FILE * stream
);
77 int fputs(const char* str
, FILE * stream
);
78 int getc(FILE* stream
);
80 char* gets(char* str
);
81 int putc(int character
, FILE* stream
);
82 int putchar(int character
);
83 int puts(const char* str
);
84 int ungetc(int character
, FILE* stream
);
86 size_t fread(void * ptr
, size_t size
, size_t count
, FILE* stream
);
87 size_t fwrite(const void* ptr
, size_t size
, size_t count
, FILE* stream
);
89 int fgetpos(FILE* stream
, fpos_t* position
);
90 int fseek(FILE* stream
, long long offset
, int origin
);
91 int fsetpos(FILE* stream
, const fpos_t* pos
);
92 long long ftell(FILE* stream
);
93 void rewind(FILE* rewind
);
95 void clearerr(FILE* stream
);
96 int feof(FILE* stream
);
97 int ferror(FILE* stream
);
98 void perror(const char* str
);
100 ///////////////////////////////////////////////////////////////////////////////
103 // EOF ////////////////////////////////////////////////////////////////////////
104 #endif /* TCRT_STDIO_H */