| OLD | NEW |
| 1 #ifndef _STDIO_IMPL_H | 1 #ifndef _STDIO_IMPL_H |
| 2 #define _STDIO_IMPL_H | 2 #define _STDIO_IMPL_H |
| 3 | 3 |
| 4 #include <stdio.h> | 4 #include <stdio.h> |
| 5 #include "syscall.h" | 5 #include "syscall.h" |
| 6 #include "libc.h" | 6 #include "libc.h" |
| 7 | 7 |
| 8 #define UNGET 8 | 8 #define UNGET 8 |
| 9 | 9 |
| 10 #define FFINALLOCK(f) ((f)->lock>=0 ? __lockfile((f)) : 0) | 10 #define FFINALLOCK(f) ((f)->lock>=0 ? __lockfile((f)) : 0) |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 FILE *__ofl_add(FILE *f); | 79 FILE *__ofl_add(FILE *f); |
| 80 FILE **__ofl_lock(void); | 80 FILE **__ofl_lock(void); |
| 81 void __ofl_unlock(void); | 81 void __ofl_unlock(void); |
| 82 | 82 |
| 83 #define feof(f) ((f)->flags & F_EOF) | 83 #define feof(f) ((f)->flags & F_EOF) |
| 84 #define ferror(f) ((f)->flags & F_ERR) | 84 #define ferror(f) ((f)->flags & F_ERR) |
| 85 | 85 |
| 86 #define getc_unlocked(f) \ | 86 #define getc_unlocked(f) \ |
| 87 ( ((f)->rpos < (f)->rend) ? *(f)->rpos++ : __uflow((f)) ) | 87 ( ((f)->rpos < (f)->rend) ? *(f)->rpos++ : __uflow((f)) ) |
| 88 | 88 |
| 89 #define putc_unlocked(c, f) ( ((c)!=(f)->lbf && (f)->wpos<(f)->wend) \ | 89 #define putc_unlocked(c, f) \ |
| 90 » ( ((unsigned char)(c)!=(f)->lbf && (f)->wpos<(f)->wend) \ |
| 90 ? *(f)->wpos++ = (c) : __overflow((f),(c)) ) | 91 ? *(f)->wpos++ = (c) : __overflow((f),(c)) ) |
| 91 | 92 |
| 92 /* Caller-allocated FILE * operations */ | 93 /* Caller-allocated FILE * operations */ |
| 93 FILE *__fopen_rb_ca(const char *, FILE *, unsigned char *, size_t); | 94 FILE *__fopen_rb_ca(const char *, FILE *, unsigned char *, size_t); |
| 94 int __fclose_ca(FILE *); | 95 int __fclose_ca(FILE *); |
| 95 | 96 |
| 96 #endif | 97 #endif |
| OLD | NEW |