Make the zlib compile against the tinycrt library.
[git-build-vc9.git] / tcrt / inc / stdio.h
blob02b6f1845449f5280bb1936e182f66490159148b
1 /*=============================================================================
2 stdio.h :
4 Copyright © 2008 Bruno Santos <nayart3@gmail.com>
5 =============================================================================*/
7 #ifndef TCRT_STDIO__H_
8 #define TCRT_STDIO__H_
10 ///////////////////////////////////////////////////////////////////////////////
11 #include "tcrt.h"
12 #include <stdarg.h>
14 ///////////////////////////////////////////////////////////////////////////////
15 TCRT_BEGIN_EXTERN_C
17 ///////////////////////////////////////////////////////////////////////////////
18 #define EOF 0x80
19 #define FILENAME_MAX 260
20 #define TMP_MAX 0x00FFFFFF
22 #define _IOFBF 0x0001
23 #define _IOLBF 0x0002
24 #define _IONBF 0x0004
26 #define BUFSIZ 4096
27 #define FOPEN_MAX 0x3FFFFFFF
28 #define L_tmpnam (sizeof("/tmp/") + 20)
30 #define SEEK_SET 0
31 #define SEEK_CUR 1
32 #define SEEK_END 2
34 ///////////////////////////////////////////////////////////////////////////////
35 #ifdef __cplusplus
36 struct FILE;
37 #else
38 typedef struct _FILE FILE;
39 #endif
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);
50 FILE* tmpfile(void);
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);
79 int getchar(void);
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 ///////////////////////////////////////////////////////////////////////////////
101 TCRT_END_EXTERN_C
103 // EOF ////////////////////////////////////////////////////////////////////////
104 #endif /* TCRT_STDIO_H */