From 5bbb03a9b2a7d21c47cda358ddc68a68861935bd Mon Sep 17 00:00:00 2001 From: Hugh McMaster Date: Sun, 30 Jun 2013 18:15:10 +1000 Subject: Ctrl-Z Ctrl-D --- programs/cmd/builtins.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/programs/cmd/builtins.c b/programs/cmd/builtins.c index aa1e7d4..43d328e 100644 --- a/programs/cmd/builtins.c +++ b/programs/cmd/builtins.c @@ -4405,12 +4405,12 @@ void WCMD_more (WCHAR *args) { WINE_TRACE("No parms - working probably in pipe mode\n"); SetStdHandle(STD_INPUT_HANDLE, hConIn); - /* Warning: No easy way of ending the stream (ctrl+z on windows) so - once you get in this bit unless due to a pipe, its going to end badly... */ wsprintfW(moreStrPage, moreFmt, moreStr); WCMD_enter_paged_mode(moreStrPage); + while (WCMD_ReadFile(hstdin, buffer, (sizeof(buffer)/sizeof(WCHAR))-1, &count)) { + if (((char*)buffer)[0] == 26 || ((char*)buffer)[0] == 4) break; if (count == 0) break; /* ReadFile reports success on EOF! */ buffer[count] = 0; WCMD_output_asis (buffer); -- 1.7.10.4