Changes in uspace/lib/c/include/stdio.h [55092672:4e6a610] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/include/stdio.h
r55092672 r4e6a610 1 1 /* 2 2 * Copyright (c) 2005 Martin Decky 3 * Copyright (c) 2018 Jiri Svoboda 3 4 * All rights reserved. 4 5 * … … 36 37 #define LIBC_STDIO_H_ 37 38 39 #include <offset.h> 38 40 #include <stdarg.h> 39 41 #include <io/verify.h> 42 #include <_bits/NULL.h> 40 43 #include <_bits/size_t.h> 41 44 #include <_bits/wchar_t.h> 42 45 #include <_bits/wint_t.h> 43 46 44 #define EOF (-1)45 46 #ifndef SEEK_SET47 #define SEEK_SET 048 #endif49 50 #ifndef SEEK_CUR51 #define SEEK_CUR 152 #endif53 54 #ifndef SEEK_END55 #define SEEK_END 256 #endif57 58 /** Default size for stream I/O buffers */59 #define BUFSIZ 409660 61 /** Recommended size of fixed-size array for holding file names. */62 #define FILENAME_MAX 409663 64 47 /** Forward declaration */ 65 48 struct _IO_FILE; 66 49 typedef struct _IO_FILE FILE; 50 51 /** File position */ 52 typedef struct { 53 off64_t pos; 54 } fpos_t; 55 56 #ifndef _HELENOS_SOURCE 57 #define _IONBF 0 58 #define _IOLBF 1 59 #define _IOFBF 2 60 #endif 61 62 /** Default size for stream I/O buffers */ 63 #define BUFSIZ 4096 64 65 #define EOF (-1) 66 67 /** Max number of files that is guaranteed to be able to open at the same time */ 68 #define FOPEN_MAX VFS_MAX_OPEN_FILES 69 70 /** Recommended size of fixed-size array for holding file names. */ 71 #define FILENAME_MAX 4096 72 73 /** Length of "/tmp/tmp.XXXXXX" + 1 */ 74 #define L_tmpnam 16 75 76 #ifndef SEEK_SET 77 #define SEEK_SET 0 78 #endif 79 80 #ifndef SEEK_CUR 81 #define SEEK_CUR 1 82 #endif 83 84 #ifndef SEEK_END 85 #define SEEK_END 2 86 #endif 87 88 /** Minimum number of unique temporary file names */ 89 #define TMP_MAX 1000000 67 90 68 91 extern FILE *stdin; … … 74 97 extern int fgetc(FILE *); 75 98 extern char *fgets(char *, int, FILE *); 99 extern char *gets(char *, size_t) __attribute__((deprecated)); 76 100 77 101 extern int getchar(void); … … 104 128 extern int vasprintf(char **, const char *, va_list); 105 129 extern int asprintf(char **, const char *, ...) 106 #endif107 130 _HELENOS_PRINTF_ATTRIBUTE(2, 3); 131 #endif 108 132 extern int vsnprintf(char *, size_t, const char *, va_list); 133 134 extern int sprintf(char *, const char *, ...) 135 __attribute__((deprecated)) _HELENOS_PRINTF_ATTRIBUTE(2, 3); 136 extern int vsprintf(char *, const char *, va_list) __attribute__((deprecated)); 109 137 110 138 /* Formatted input */ … … 124 152 extern size_t fwrite(const void *, size_t, size_t, FILE *); 125 153 154 extern int fgetpos(FILE *, fpos_t *); 155 extern int fsetpos(FILE *, const fpos_t *); 156 126 157 extern int fseek(FILE *, long, int); 127 158 extern void rewind(FILE *); … … 133 164 extern void clearerr(FILE *); 134 165 166 extern void perror(const char *); 167 135 168 extern void setvbuf(FILE *, void *, int, size_t); 136 169 extern void setbuf(FILE *, void *); 137 170 138 171 /* Misc file functions */ 172 extern int remove(const char *); 139 173 extern int rename(const char *, const char *); 140 extern int remove(const char *); 141 142 #ifndef _HELENOS_SOURCE 143 #define _IONBF 0 144 #define _IOLBF 1 145 #define _IOFBF 2 146 147 extern char *gets(char *, size_t); 148 149 #endif 174 175 extern FILE *tmpfile(void); 176 extern char *tmpnam(char *s) __attribute__((deprecated)); 150 177 151 178 #ifdef _HELENOS_SOURCE
Note:
See TracChangeset
for help on using the changeset viewer.