Rich Felker | 0b44a03 | 2011-02-12 00:22:29 -0500 | [diff] [blame] | 1 | #include "stdio_impl.h" |
| 2 | |
| 3 | static unsigned char buf[BUFSIZ+UNGET]; |
| 4 | static FILE f = { |
| 5 | .buf = buf+UNGET, |
| 6 | .buf_size = sizeof buf-UNGET, |
| 7 | .fd = 0, |
| 8 | .flags = F_PERM | F_NOWR, |
| 9 | .read = __stdio_read, |
| 10 | .seek = __stdio_seek, |
| 11 | .close = __stdio_close, |
Rich Felker | dba68bf | 2011-07-30 08:02:14 -0400 | [diff] [blame] | 12 | .lock = -1, |
Rich Felker | 0b44a03 | 2011-02-12 00:22:29 -0500 | [diff] [blame] | 13 | }; |
| 14 | FILE *const stdin = &f; |
Rich Felker | a6adb2b | 2014-07-16 21:32:06 -0400 | [diff] [blame] | 15 | FILE *volatile __stdin_used = &f; |