Changes in uspace/lib/c/include/stdio.h [bc56f30:4805495] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/include/stdio.h
rbc56f30 r4805495 37 37 #define _LIBC_STDIO_H_ 38 38 39 #ifdef __cplusplus 40 extern "C" { 41 #endif 42 43 #include <offset.h> 39 44 #include <stdarg.h> 40 45 #include <io/verify.h> … … 43 48 #include <_bits/wchar_t.h> 44 49 #include <_bits/wint_t.h> 45 #include <_bits/decls.h> 50 51 /** Forward declaration */ 52 struct _IO_FILE; 53 typedef struct _IO_FILE FILE; 54 55 /** File position */ 56 typedef struct { 57 off64_t pos; 58 } fpos_t; 46 59 47 60 #ifndef _HELENOS_SOURCE … … 57 70 58 71 /** Max number of files that is guaranteed to be able to open at the same time */ 59 #define FOPEN_MAX 1672 #define FOPEN_MAX VFS_MAX_OPEN_FILES 60 73 61 74 /** Recommended size of fixed-size array for holding file names. */ … … 79 92 /** Minimum number of unique temporary file names */ 80 93 #define TMP_MAX 1000000 81 82 __C_DECLS_BEGIN;83 84 /** Forward declaration */85 struct _IO_FILE;86 typedef struct _IO_FILE FILE;87 88 /** File position */89 typedef struct {90 long long pos;91 } fpos_t;92 94 93 95 extern FILE *stdin; … … 96 98 97 99 /* Character and string input functions */ 100 #define getc fgetc 98 101 extern int fgetc(FILE *); 99 102 extern char *fgets(char *, int, FILE *); 100 103 extern char *gets(char *, size_t) __attribute__((deprecated)); 101 104 102 static inline int getc(FILE *f)103 {104 return fgetc(f);105 }106 107 105 extern int getchar(void); 108 106 109 107 /* Character and string output functions */ 108 #define putc fputc 110 109 extern int fputc(int, FILE *); 111 110 extern int fputs(const char *, FILE *); 112 113 static inline int putc(int i, FILE *f)114 {115 return fputc(i, f);116 }117 111 118 112 extern int putchar(int); … … 186 180 extern char *tmpnam(char *s); 187 181 188 __C_DECLS_END;189 190 182 #ifdef _HELENOS_SOURCE 191 183 192 #include <_bits/off64_t.h>193 194 __HELENOS_DECLS_BEGIN;195 196 184 /* Nonstandard extensions. */ 197 185 198 enum _ _buffer_type {186 enum _buffer_type { 199 187 /** No buffering */ 200 188 _IONBF, … … 205 193 }; 206 194 195 enum _buffer_state { 196 /** Buffer is empty */ 197 _bs_empty, 198 199 /** Buffer contains data to be written */ 200 _bs_write, 201 202 /** Buffer contains prefetched data for reading */ 203 _bs_read 204 }; 205 207 206 extern int vprintf_length(const char *, va_list); 208 207 extern int printf_length(const char *, ...) … … 211 210 extern int fileno(FILE *); 212 211 212 #include <offset.h> 213 213 214 extern int fseek64(FILE *, off64_t, int); 214 215 extern off64_t ftell64(FILE *); 215 216 216 __HELENOS_DECLS_END; 217 #endif 218 219 #ifdef __cplusplus 220 } 217 221 #endif 218 222
Note:
See TracChangeset
for help on using the changeset viewer.