aboutsummaryrefslogtreecommitdiffstats
path: root/src/sysdep.c
diff options
context:
space:
mode:
authorMichael Albinus2014-07-11 14:35:23 +0200
committerMichael Albinus2014-07-11 14:35:23 +0200
commitfb96e203d8830bc40eb2f5b599f24c606efcd4b3 (patch)
treeec3eaea79aee2aa0c6777cf4d94f778bfbc3fe95 /src/sysdep.c
parent3aa96ff51efd72767f1a4e04c546187269b008c0 (diff)
downloademacs-fb96e203d8830bc40eb2f5b599f24c606efcd4b3.tar.gz
emacs-fb96e203d8830bc40eb2f5b599f24c606efcd4b3.zip
* sysdep.c (suppress_echo_on_tty): New function.
* minibuf.c (read_minibuf_noninteractive): Use it.
Diffstat (limited to 'src/sysdep.c')
-rw-r--r--src/sysdep.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/sysdep.c b/src/sysdep.c
index 14d9f43c4db..46078807b43 100644
--- a/src/sysdep.c
+++ b/src/sysdep.c
@@ -1140,6 +1140,21 @@ tabs_safe_p (int fd)
1140 return 0; 1140 return 0;
1141#endif /* DOS_NT */ 1141#endif /* DOS_NT */
1142} 1142}
1143
1144/* Discard echoing. */
1145
1146void
1147suppress_echo_on_tty (int fd)
1148{
1149 struct emacs_tty etty;
1150
1151 emacs_get_tty (fd, &etty);
1152#ifndef WINDOWSNT
1153 etty.main.c_lflag &= ~ICANON; /* Disable buffering */
1154 etty.main.c_lflag &= ~ECHO; /* Disable echoing */
1155#endif /* ! WINDOWSNT */
1156 emacs_set_tty (fd, &etty, 0);
1157}
1143 1158
1144/* Get terminal size from system. 1159/* Get terminal size from system.
1145 Store number of lines into *HEIGHTP and width into *WIDTHP. 1160 Store number of lines into *HEIGHTP and width into *WIDTHP.