From: Richard M. Stallman Date: Sun, 14 Apr 1996 17:11:47 +0000 (+0000) Subject: (main) [DJGPP v2]: Don't change to binary for a tty. X-Git-Tag: emacs-19.34~842 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=3f5b4e35ccb5666749201bf8b3ffc667c0709baf;p=emacs.git (main) [DJGPP v2]: Don't change to binary for a tty. --- diff --git a/lib-src/hexl.c b/lib-src/hexl.c index 417d9f285d1..beb170613dd 100644 --- a/lib-src/hexl.c +++ b/lib-src/hexl.c @@ -138,7 +138,8 @@ main (argc, argv) #ifdef MSDOS #if __DJGPP__ >= 2 - setmode (fileno (stdout), O_BINARY); + if (!isatty (fileno (stdout))) + setmode (fileno (stdout), O_BINARY); #else (stdout)->_flag &= ~_IOTEXT; /* print binary */ _setmode (fileno (stdout), O_BINARY); @@ -186,7 +187,8 @@ main (argc, argv) { #ifdef MSDOS #if __DJGPP__ >= 2 - setmode (fileno (stdout), O_BINARY); + if (!isatty (fileno (fp))) + setmode (fileno (fp), O_BINARY); #else (fp)->_flag &= ~_IOTEXT; /* read binary */ _setmode (fileno (fp), O_BINARY);