aboutsummaryrefslogtreecommitdiff
path: root/src/core/io_win.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/io_win.c')
-rw-r--r--src/core/io_win.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/core/io_win.c b/src/core/io_win.c
index e197353..073022e 100644
--- a/src/core/io_win.c
+++ b/src/core/io_win.c
@@ -6,12 +6,14 @@
int J;
static int pk(void) { int c = _fgetc_nolock(stdin); if (c != EOF) _ungetc_nolock(c, stdin); return c == EOF; }
char Q(void) { int c = _fgetc_nolock(stdin); J = pk(); return (char)c; }
+int input_pending(void) { return 0; }
void G(char c) { _fputc_nolock(c, stdout); }
static void init_io(void) {
_setmode(_fileno(stdin), _O_BINARY);
_setmode(_fileno(stdout), _O_BINARY);
- J = pk();
+ /* the first read establishes eof; startup must not read stdin. */
+ J = 0;
}
#if defined(__GNUC__) || defined(__clang__)