summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1995-06-14 23:17:44 +0000
committerRichard M. Stallman <rms@gnu.org>1995-06-14 23:17:44 +0000
commit394049ecabd644a825c76b40eee6c84bd14fb26c (patch)
treee353b234bf947d3a3cfd3c9677a2a94d0ad479c3
parente8d1a377251b2c9407c78d8cc1cfd80bf17d80db (diff)
downloademacs-394049ecabd644a825c76b40eee6c84bd14fb26c.tar.gz
(emacs_set_tty): Swap TCSETAF and TCSETAW.
Rename arg waitp to flushp.
-rw-r--r--src/sysdep.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/sysdep.c b/src/sysdep.c
index 9d352ab1beb..13417ed04e2 100644
--- a/src/sysdep.c
+++ b/src/sysdep.c
@@ -1035,15 +1035,14 @@ emacs_get_tty (fd, settings)
/* Set the parameters of the tty on FD according to the contents of
- *SETTINGS. If WAITP is non-zero, we wait for all queued output to
- be written before making the change; otherwise, we forget any
- queued input and make the change immediately.
+ *SETTINGS. If FLUSHP is non-zero, we discard input.
Return 0 if all went well, and -1 if anything failed. */
+
int
-emacs_set_tty (fd, settings, waitp)
+emacs_set_tty (fd, settings, flushp)
int fd;
struct emacs_tty *settings;
- int waitp;
+ int flushp;
{
/* Set the primary parameters - baud rate, character size, etcetera. */
#ifdef HAVE_TCATTR
@@ -1057,7 +1056,7 @@ emacs_set_tty (fd, settings, waitp)
AIX requires this to keep tty from hanging occasionally." */
/* This make sure that we don't loop indefinitely in here. */
for (i = 0 ; i < 10 ; i++)
- if (tcsetattr (fd, waitp ? TCSAFLUSH : TCSADRAIN, &settings->main) < 0)
+ if (tcsetattr (fd, flushp ? TCSAFLUSH : TCSADRAIN, &settings->main) < 0)
{
if (errno == EINTR)
continue;
@@ -1087,7 +1086,7 @@ emacs_set_tty (fd, settings, waitp)
#else
#ifdef HAVE_TERMIO
/* The SYSV-style interface? */
- if (ioctl (fd, waitp ? TCSETAW : TCSETAF, &settings->main) < 0)
+ if (ioctl (fd, flushp ? TCSETAF : TCSETAW, &settings->main) < 0)
return -1;
#else
@@ -1101,7 +1100,7 @@ emacs_set_tty (fd, settings, waitp)
#else
#ifndef DOS_NT
/* I give up - I hope you have the BSD ioctls. */
- if (ioctl (fd, (waitp) ? TIOCSETP : TIOCSETN, &settings->main) < 0)
+ if (ioctl (fd, (flushp) ? TIOCSETP : TIOCSETN, &settings->main) < 0)
return -1;
#endif /* not DOS_NT */