summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRussell Lang <gsview@ghostgum.com.au>2001-04-06 08:43:29 +0000
committerRussell Lang <gsview@ghostgum.com.au>2001-04-06 08:43:29 +0000
commit463a2fb99639068861bd2237ff727c017c0e383b (patch)
tree82c4f126337bc24e8003ba4b02471c18585a4451
parent073f2c86b91ee94724333b671b3bb195141e3a35 (diff)
downloadghostpdl-463a2fb99639068861bd2237ff727c017c0e383b.tar.gz
Fix: Do not put Windows stdin into binary mode if it is the console
because this returns CR and LF each time the Enter key is pressed. This caused Ghostscript to not pause at following showpage prompts. git-svn-id: http://svn.ghostscript.com/ghostscript/trunk@1382 a1074d23-0009-0410-80fe-cf8c14f379e6
-rw-r--r--gs/src/dwmainc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gs/src/dwmainc.c b/gs/src/dwmainc.c
index c5e166542..d0ab84954 100644
--- a/gs/src/dwmainc.c
+++ b/gs/src/dwmainc.c
@@ -313,7 +313,8 @@ int main(int argc, char *argv[])
char buf[256];
char dformat[64];
- _setmode(fileno(stdin), _O_BINARY);
+ if (!_isatty(fileno(stdin)))
+ _setmode(fileno(stdin), _O_BINARY);
_setmode(fileno(stdout), _O_BINARY);
_setmode(fileno(stderr), _O_BINARY);