diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 5 | ||||
| -rw-r--r-- | src/minibuf.c | 6 |
2 files changed, 9 insertions, 2 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 9265051e311..9d5dff49166 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2014-07-12 Eli Zaretskii <eliz@gnu.org> | ||
| 2 | |||
| 3 | * minibuf.c (read_minibuf_noninteractive) [WINDOWSNT]: Switch | ||
| 4 | stdin to binary mode only if it is connected to a terminal. | ||
| 5 | |||
| 1 | 2014-07-11 Paul Eggert <eggert@cs.ucla.edu> | 6 | 2014-07-11 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 7 | ||
| 3 | Coalesce extern decls. | 8 | Coalesce extern decls. |
diff --git a/src/minibuf.c b/src/minibuf.c index 1f2fb1fdf3f..e2450b53964 100644 --- a/src/minibuf.c +++ b/src/minibuf.c | |||
| @@ -241,7 +241,8 @@ read_minibuf_noninteractive (Lisp_Object map, Lisp_Object initial, | |||
| 241 | { | 241 | { |
| 242 | emacs_get_tty (fileno (stdin), &etty); | 242 | emacs_get_tty (fileno (stdin), &etty); |
| 243 | #ifdef WINDOWSNT | 243 | #ifdef WINDOWSNT |
| 244 | _setmode (fileno (stdin), O_BINARY); | 244 | if (isatty (fileno (stdin))) |
| 245 | _setmode (fileno (stdin), O_BINARY); | ||
| 245 | #endif | 246 | #endif |
| 246 | suppress_echo_on_tty (fileno (stdin)); | 247 | suppress_echo_on_tty (fileno (stdin)); |
| 247 | } | 248 | } |
| @@ -282,7 +283,8 @@ read_minibuf_noninteractive (Lisp_Object map, Lisp_Object initial, | |||
| 282 | fprintf (stdout, "\n"); | 283 | fprintf (stdout, "\n"); |
| 283 | emacs_set_tty (fileno (stdin), &etty, 0); | 284 | emacs_set_tty (fileno (stdin), &etty, 0); |
| 284 | #ifdef WINDOWSNT | 285 | #ifdef WINDOWSNT |
| 285 | _setmode (fileno (stdin), O_TEXT); | 286 | if (isatty (fileno (stdin))) |
| 287 | _setmode (fileno (stdin), O_TEXT); | ||
| 286 | #endif | 288 | #endif |
| 287 | } | 289 | } |
| 288 | 290 | ||