| OLD | NEW |
| 1 #ifndef _STDIO_H | 1 #ifndef _STDIO_H |
| 2 #define _STDIO_H | 2 #define _STDIO_H |
| 3 | 3 |
| 4 #ifdef __cplusplus | 4 #ifdef __cplusplus |
| 5 extern "C" { | 5 extern "C" { |
| 6 #endif | 6 #endif |
| 7 | 7 |
| 8 #include <features.h> | 8 #include <features.h> |
| 9 | 9 |
| 10 #define __NEED_FILE | 10 #define __NEED_FILE |
| 11 #define __NEED___isoc_va_list | 11 #define __NEED___isoc_va_list |
| 12 #define __NEED_size_t | 12 #define __NEED_size_t |
| 13 | 13 |
| 14 #if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \ | 14 #if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) || \ |
| 15 || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) \ | 15 defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE) |
| 16 || defined(_BSD_SOURCE) | |
| 17 #define __NEED_ssize_t | 16 #define __NEED_ssize_t |
| 18 #define __NEED_off_t | 17 #define __NEED_off_t |
| 19 #define __NEED_va_list | 18 #define __NEED_va_list |
| 20 #endif | 19 #endif |
| 21 | 20 |
| 22 #include <bits/alltypes.h> | 21 #include <bits/alltypes.h> |
| 23 | 22 |
| 24 #ifdef __cplusplus | 23 #ifdef __cplusplus |
| 25 #define NULL 0L | 24 #define NULL 0L |
| 26 #else | 25 #else |
| (...skipping 14 matching lines...) Expand all Loading... |
| 41 #define _IOLBF 1 | 40 #define _IOLBF 1 |
| 42 #define _IONBF 2 | 41 #define _IONBF 2 |
| 43 | 42 |
| 44 #define BUFSIZ 1024 | 43 #define BUFSIZ 1024 |
| 45 #define FILENAME_MAX 4096 | 44 #define FILENAME_MAX 4096 |
| 46 #define FOPEN_MAX 1000 | 45 #define FOPEN_MAX 1000 |
| 47 #define TMP_MAX 10000 | 46 #define TMP_MAX 10000 |
| 48 #define L_tmpnam 20 | 47 #define L_tmpnam 20 |
| 49 | 48 |
| 50 typedef union _G_fpos64_t { | 49 typedef union _G_fpos64_t { |
| 51 » char __opaque[16]; | 50 char __opaque[16]; |
| 52 » double __align; | 51 double __align; |
| 53 } fpos_t; | 52 } fpos_t; |
| 54 | 53 |
| 55 extern FILE *const stdin; | 54 extern FILE* const stdin; |
| 56 extern FILE *const stdout; | 55 extern FILE* const stdout; |
| 57 extern FILE *const stderr; | 56 extern FILE* const stderr; |
| 58 | 57 |
| 59 #define stdin (stdin) | 58 #define stdin (stdin) |
| 60 #define stdout (stdout) | 59 #define stdout (stdout) |
| 61 #define stderr (stderr) | 60 #define stderr (stderr) |
| 62 | 61 |
| 63 FILE *fopen(const char *__restrict, const char *__restrict); | 62 FILE* fopen(const char* __restrict, const char* __restrict); |
| 64 FILE *freopen(const char *__restrict, const char *__restrict, FILE *__restrict); | 63 FILE* freopen(const char* __restrict, const char* __restrict, FILE* __restrict); |
| 65 int fclose(FILE *); | 64 int fclose(FILE*); |
| 66 | 65 |
| 67 int remove(const char *); | 66 int remove(const char*); |
| 68 int rename(const char *, const char *); | 67 int rename(const char*, const char*); |
| 69 | 68 |
| 70 int feof(FILE *); | 69 int feof(FILE*); |
| 71 int ferror(FILE *); | 70 int ferror(FILE*); |
| 72 int fflush(FILE *); | 71 int fflush(FILE*); |
| 73 void clearerr(FILE *); | 72 void clearerr(FILE*); |
| 74 | 73 |
| 75 int fseek(FILE *, long, int); | 74 int fseek(FILE*, long, int); |
| 76 long ftell(FILE *); | 75 long ftell(FILE*); |
| 77 void rewind(FILE *); | 76 void rewind(FILE*); |
| 78 | 77 |
| 79 int fgetpos(FILE *__restrict, fpos_t *__restrict); | 78 int fgetpos(FILE* __restrict, fpos_t* __restrict); |
| 80 int fsetpos(FILE *, const fpos_t *); | 79 int fsetpos(FILE*, const fpos_t*); |
| 81 | 80 |
| 82 size_t fread(void *__restrict, size_t, size_t, FILE *__restrict); | 81 size_t fread(void* __restrict, size_t, size_t, FILE* __restrict); |
| 83 size_t fwrite(const void *__restrict, size_t, size_t, FILE *__restrict); | 82 size_t fwrite(const void* __restrict, size_t, size_t, FILE* __restrict); |
| 84 | 83 |
| 85 int fgetc(FILE *); | 84 int fgetc(FILE*); |
| 86 int getc(FILE *); | 85 int getc(FILE*); |
| 87 int getchar(void); | 86 int getchar(void); |
| 88 int ungetc(int, FILE *); | 87 int ungetc(int, FILE*); |
| 89 | 88 |
| 90 int fputc(int, FILE *); | 89 int fputc(int, FILE*); |
| 91 int putc(int, FILE *); | 90 int putc(int, FILE*); |
| 92 int putchar(int); | 91 int putchar(int); |
| 93 | 92 |
| 94 char *fgets(char *__restrict, int, FILE *__restrict); | 93 char* fgets(char* __restrict, int, FILE* __restrict); |
| 95 #if __STDC_VERSION__ < 201112L | 94 #if __STDC_VERSION__ < 201112L |
| 96 char *gets(char *); | 95 char* gets(char*); |
| 97 #endif | 96 #endif |
| 98 | 97 |
| 99 int fputs(const char *__restrict, FILE *__restrict); | 98 int fputs(const char* __restrict, FILE* __restrict); |
| 100 int puts(const char *); | 99 int puts(const char*); |
| 101 | 100 |
| 102 int printf(const char *__restrict, ...); | 101 int printf(const char* __restrict, ...); |
| 103 int fprintf(FILE *__restrict, const char *__restrict, ...); | 102 int fprintf(FILE* __restrict, const char* __restrict, ...); |
| 104 int sprintf(char *__restrict, const char *__restrict, ...); | 103 int sprintf(char* __restrict, const char* __restrict, ...); |
| 105 int snprintf(char *__restrict, size_t, const char *__restrict, ...); | 104 int snprintf(char* __restrict, size_t, const char* __restrict, ...); |
| 106 | 105 |
| 107 int vprintf(const char *__restrict, __isoc_va_list); | 106 int vprintf(const char* __restrict, __isoc_va_list); |
| 108 int vfprintf(FILE *__restrict, const char *__restrict, __isoc_va_list); | 107 int vfprintf(FILE* __restrict, const char* __restrict, __isoc_va_list); |
| 109 int vsprintf(char *__restrict, const char *__restrict, __isoc_va_list); | 108 int vsprintf(char* __restrict, const char* __restrict, __isoc_va_list); |
| 110 int vsnprintf(char *__restrict, size_t, const char *__restrict, __isoc_va_list); | 109 int vsnprintf(char* __restrict, size_t, const char* __restrict, __isoc_va_list); |
| 111 | 110 |
| 112 int scanf(const char *__restrict, ...); | 111 int scanf(const char* __restrict, ...); |
| 113 int fscanf(FILE *__restrict, const char *__restrict, ...); | 112 int fscanf(FILE* __restrict, const char* __restrict, ...); |
| 114 int sscanf(const char *__restrict, const char *__restrict, ...); | 113 int sscanf(const char* __restrict, const char* __restrict, ...); |
| 115 int vscanf(const char *__restrict, __isoc_va_list); | 114 int vscanf(const char* __restrict, __isoc_va_list); |
| 116 int vfscanf(FILE *__restrict, const char *__restrict, __isoc_va_list); | 115 int vfscanf(FILE* __restrict, const char* __restrict, __isoc_va_list); |
| 117 int vsscanf(const char *__restrict, const char *__restrict, __isoc_va_list); | 116 int vsscanf(const char* __restrict, const char* __restrict, __isoc_va_list); |
| 118 | 117 |
| 119 void perror(const char *); | 118 void perror(const char*); |
| 120 | 119 |
| 121 int setvbuf(FILE *__restrict, char *__restrict, int, size_t); | 120 int setvbuf(FILE* __restrict, char* __restrict, int, size_t); |
| 122 void setbuf(FILE *__restrict, char *__restrict); | 121 void setbuf(FILE* __restrict, char* __restrict); |
| 123 | 122 |
| 124 char *tmpnam(char *); | 123 char* tmpnam(char*); |
| 125 FILE *tmpfile(void); | 124 FILE* tmpfile(void); |
| 126 | 125 |
| 127 #if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \ | 126 #if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) || \ |
| 128 || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) \ | 127 defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE) |
| 129 || defined(_BSD_SOURCE) | 128 FILE* fmemopen(void* __restrict, size_t, const char* __restrict); |
| 130 FILE *fmemopen(void *__restrict, size_t, const char *__restrict); | 129 FILE* open_memstream(char**, size_t*); |
| 131 FILE *open_memstream(char **, size_t *); | 130 FILE* fdopen(int, const char*); |
| 132 FILE *fdopen(int, const char *); | 131 FILE* popen(const char*, const char*); |
| 133 FILE *popen(const char *, const char *); | 132 int pclose(FILE*); |
| 134 int pclose(FILE *); | 133 int fileno(FILE*); |
| 135 int fileno(FILE *); | 134 int fseeko(FILE*, off_t, int); |
| 136 int fseeko(FILE *, off_t, int); | 135 off_t ftello(FILE*); |
| 137 off_t ftello(FILE *); | 136 int dprintf(int, const char* __restrict, ...); |
| 138 int dprintf(int, const char *__restrict, ...); | 137 int vdprintf(int, const char* __restrict, __isoc_va_list); |
| 139 int vdprintf(int, const char *__restrict, __isoc_va_list); | 138 void flockfile(FILE*); |
| 140 void flockfile(FILE *); | 139 int ftrylockfile(FILE*); |
| 141 int ftrylockfile(FILE *); | 140 void funlockfile(FILE*); |
| 142 void funlockfile(FILE *); | 141 int getc_unlocked(FILE*); |
| 143 int getc_unlocked(FILE *); | |
| 144 int getchar_unlocked(void); | 142 int getchar_unlocked(void); |
| 145 int putc_unlocked(int, FILE *); | 143 int putc_unlocked(int, FILE*); |
| 146 int putchar_unlocked(int); | 144 int putchar_unlocked(int); |
| 147 ssize_t getdelim(char **__restrict, size_t *__restrict, int, FILE *__restrict); | 145 ssize_t getdelim(char** __restrict, size_t* __restrict, int, FILE* __restrict); |
| 148 ssize_t getline(char **__restrict, size_t *__restrict, FILE *__restrict); | 146 ssize_t getline(char** __restrict, size_t* __restrict, FILE* __restrict); |
| 149 int renameat(int, const char *, int, const char *); | 147 int renameat(int, const char*, int, const char*); |
| 150 char *ctermid(char *); | 148 char* ctermid(char*); |
| 151 #define L_ctermid 20 | 149 #define L_ctermid 20 |
| 152 #endif | 150 #endif |
| 153 | 151 |
| 154 | 152 #if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE) |
| 155 #if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) \ | |
| 156 || defined(_BSD_SOURCE) | |
| 157 #define P_tmpdir "/tmp" | 153 #define P_tmpdir "/tmp" |
| 158 char *tempnam(const char *, const char *); | 154 char* tempnam(const char*, const char*); |
| 159 #endif | 155 #endif |
| 160 | 156 |
| 161 #if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) | 157 #if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) |
| 162 #define L_cuserid 20 | 158 #define L_cuserid 20 |
| 163 char *cuserid(char *); | 159 char* cuserid(char*); |
| 164 void setlinebuf(FILE *); | 160 void setlinebuf(FILE*); |
| 165 void setbuffer(FILE *, char *, size_t); | 161 void setbuffer(FILE*, char*, size_t); |
| 166 int fgetc_unlocked(FILE *); | 162 int fgetc_unlocked(FILE*); |
| 167 int fputc_unlocked(int, FILE *); | 163 int fputc_unlocked(int, FILE*); |
| 168 int fflush_unlocked(FILE *); | 164 int fflush_unlocked(FILE*); |
| 169 size_t fread_unlocked(void *, size_t, size_t, FILE *); | 165 size_t fread_unlocked(void*, size_t, size_t, FILE*); |
| 170 size_t fwrite_unlocked(const void *, size_t, size_t, FILE *); | 166 size_t fwrite_unlocked(const void*, size_t, size_t, FILE*); |
| 171 void clearerr_unlocked(FILE *); | 167 void clearerr_unlocked(FILE*); |
| 172 int feof_unlocked(FILE *); | 168 int feof_unlocked(FILE*); |
| 173 int ferror_unlocked(FILE *); | 169 int ferror_unlocked(FILE*); |
| 174 int fileno_unlocked(FILE *); | 170 int fileno_unlocked(FILE*); |
| 175 int getw(FILE *); | 171 int getw(FILE*); |
| 176 int putw(int, FILE *); | 172 int putw(int, FILE*); |
| 177 char *fgetln(FILE *, size_t *); | 173 char* fgetln(FILE*, size_t*); |
| 178 int asprintf(char **, const char *, ...); | 174 int asprintf(char**, const char*, ...); |
| 179 int vasprintf(char **, const char *, __isoc_va_list); | 175 int vasprintf(char**, const char*, __isoc_va_list); |
| 180 #endif | 176 #endif |
| 181 | 177 |
| 182 #ifdef _GNU_SOURCE | 178 #ifdef _GNU_SOURCE |
| 183 char *fgets_unlocked(char *, int, FILE *); | 179 char* fgets_unlocked(char*, int, FILE*); |
| 184 int fputs_unlocked(const char *, FILE *); | 180 int fputs_unlocked(const char*, FILE*); |
| 185 #endif | 181 #endif |
| 186 | 182 |
| 187 #if defined(_LARGEFILE64_SOURCE) || defined(_GNU_SOURCE) | 183 #if defined(_LARGEFILE64_SOURCE) || defined(_GNU_SOURCE) |
| 188 #define tmpfile64 tmpfile | 184 #define tmpfile64 tmpfile |
| 189 #define fopen64 fopen | 185 #define fopen64 fopen |
| 190 #define freopen64 freopen | 186 #define freopen64 freopen |
| 191 #define fseeko64 fseeko | 187 #define fseeko64 fseeko |
| 192 #define ftello64 ftello | 188 #define ftello64 ftello |
| 193 #define fgetpos64 fgetpos | 189 #define fgetpos64 fgetpos |
| 194 #define fsetpos64 fsetpos | 190 #define fsetpos64 fsetpos |
| 195 #define fpos64_t fpos_t | 191 #define fpos64_t fpos_t |
| 196 #define off64_t off_t | 192 #define off64_t off_t |
| 197 #endif | 193 #endif |
| 198 | 194 |
| 199 #ifdef __cplusplus | 195 #ifdef __cplusplus |
| 200 } | 196 } |
| 201 #endif | 197 #endif |
| 202 | 198 |
| 203 #endif | 199 #endif |
| OLD | NEW |