stdio.h (1222B)
1 #ifndef _STDIO_H 2 #define _STDIO_H 3 4 #include <stddef.h> 5 #include <stdarg.h> 6 7 typedef struct _FILE FILE; 8 9 #define EOF (-1) 10 #define BUFSIZ 8192 11 12 extern FILE *stdin; 13 extern FILE *stdout; 14 extern FILE *stderr; 15 16 int printf(const char *format, ...); 17 int sprintf(char *str, const char *format, ...); 18 int snprintf(char *str, size_t size, const char *format, ...); 19 int vprintf(const char *format, va_list ap); 20 int vsprintf(char *str, const char *format, va_list ap); 21 int vsnprintf(char *str, size_t size, const char *format, va_list ap); 22 23 int fprintf(FILE *stream, const char *format, ...); 24 int vfprintf(FILE *stream, const char *format, va_list ap); 25 26 int puts(const char *s); 27 int putchar(int c); 28 int fputs(const char *s, FILE *stream); 29 int fputc(int c, FILE *stream); 30 31 FILE *fopen(const char *pathname, const char *mode); 32 int fclose(FILE *stream); 33 size_t fread(void *ptr, size_t size, size_t nmemb, FILE *stream); 34 size_t fwrite(const void *ptr, size_t size, size_t nmemb, FILE *stream); 35 int fseek(FILE *stream, long offset, int whence); 36 long ftell(FILE *stream); 37 void rewind(FILE *stream); 38 int feof(FILE *stream); 39 int ferror(FILE *stream); 40 int fflush(FILE *stream); 41 42 #define SEEK_SET 0 43 #define SEEK_CUR 1 44 #define SEEK_END 2 45 46 #endif