Changeset bc56f30 in mainline for uspace/lib/c/include/stdio.h
- Timestamp:
- 2019-05-27T12:38:26Z (5 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 0d14c25
- Parents:
- 4d51c60
- git-author:
- Jiří Zárevúcky <zarevucky.jiri@…> (2019-02-13 16:06:49)
- git-committer:
- Jiří Zárevúcky <zarevucky.jiri@…> (2019-05-27 12:38:26)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/include/stdio.h
r4d51c60 rbc56f30 37 37 #define _LIBC_STDIO_H_ 38 38 39 #ifdef __cplusplus40 extern "C" {41 #endif42 43 #include <offset.h>44 39 #include <stdarg.h> 45 40 #include <io/verify.h> … … 48 43 #include <_bits/wchar_t.h> 49 44 #include <_bits/wint_t.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; 45 #include <_bits/decls.h> 59 46 60 47 #ifndef _HELENOS_SOURCE … … 70 57 71 58 /** Max number of files that is guaranteed to be able to open at the same time */ 72 #define FOPEN_MAX VFS_MAX_OPEN_FILES59 #define FOPEN_MAX 16 73 60 74 61 /** Recommended size of fixed-size array for holding file names. */ … … 92 79 /** Minimum number of unique temporary file names */ 93 80 #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; 94 92 95 93 extern FILE *stdin; … … 98 96 99 97 /* Character and string input functions */ 100 #define getc fgetc101 98 extern int fgetc(FILE *); 102 99 extern char *fgets(char *, int, FILE *); 103 100 extern char *gets(char *, size_t) __attribute__((deprecated)); 104 101 102 static inline int getc(FILE *f) 103 { 104 return fgetc(f); 105 } 106 105 107 extern int getchar(void); 106 108 107 109 /* Character and string output functions */ 108 #define putc fputc109 110 extern int fputc(int, FILE *); 110 111 extern int fputs(const char *, FILE *); 112 113 static inline int putc(int i, FILE *f) 114 { 115 return fputc(i, f); 116 } 111 117 112 118 extern int putchar(int); … … 180 186 extern char *tmpnam(char *s); 181 187 188 __C_DECLS_END; 189 182 190 #ifdef _HELENOS_SOURCE 183 191 192 #include <_bits/off64_t.h> 193 194 __HELENOS_DECLS_BEGIN; 195 184 196 /* Nonstandard extensions. */ 185 197 186 enum _ buffer_type {198 enum __buffer_type { 187 199 /** No buffering */ 188 200 _IONBF, … … 193 205 }; 194 206 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_read204 };205 206 207 extern int vprintf_length(const char *, va_list); 207 208 extern int printf_length(const char *, ...) … … 210 211 extern int fileno(FILE *); 211 212 212 #include <offset.h>213 214 213 extern int fseek64(FILE *, off64_t, int); 215 214 extern off64_t ftell64(FILE *); 216 215 217 #endif 218 219 #ifdef __cplusplus 220 } 216 __HELENOS_DECLS_END; 221 217 #endif 222 218
Note:
See TracChangeset
for help on using the changeset viewer.