From fa871c313191a5a5d28d5cbd18921daaea4d212a Mon Sep 17 00:00:00 2001 From: "Charles.Forsyth" Date: Tue, 26 May 2009 14:42:13 +0000 Subject: 20090526-1541 --- CHANGES | 2 ++ emu/Nt/os.c | 10 +++++++++- include/version.h | 2 +- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index bc82dd75..4baf5c71 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,5 @@ +20090526 + emu/Nt/os.c allow /dev/hoststdin input on file or pipe (thanks to caerwyn, issue 173) 20090524 appl/cmd/tarfs.b dis/tarfs.dis - remove accidentally small limit on file size in tar file (issue 172) 20090521 diff --git a/emu/Nt/os.c b/emu/Nt/os.c index 9bf6736a..1c49fc07 100644 --- a/emu/Nt/os.c +++ b/emu/Nt/os.c @@ -495,7 +495,15 @@ close(int fd) int read(int fd, void *buf, uint n) { - if(!ReadFile(ntfd2h(fd), buf, n, &n, NULL)) + HANDLE h; + + if(fd == 0) + h = kbdh; + else + h = ntfd2h(fd); + if(h == INVALID_HANDLE_VALUE) + return -1; + if(!ReadFile(h, buf, n, &n, NULL)) return -1; return n; } diff --git a/include/version.h b/include/version.h index 43143948..8d321c41 100644 --- a/include/version.h +++ b/include/version.h @@ -1 +1 @@ -#define VERSION "Fourth Edition (20090524)" +#define VERSION "Fourth Edition (20090526)" -- cgit v1.2.3