diff options
Diffstat (limited to 'src/sysdep.c')
-rw-r--r-- | src/sysdep.c | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/src/sysdep.c b/src/sysdep.c index 84fa6d6b3b7..0c291dd80ac 100644 --- a/src/sysdep.c +++ b/src/sysdep.c @@ -229,8 +229,8 @@ discard_tty_input (void) { if (tty->input) /* Is the device suspended? */ { - EMACS_GET_TTY (fileno (tty->input), &buf); - EMACS_SET_TTY (fileno (tty->input), &buf, 0); + emacs_get_tty (fileno (tty->input), &buf); + emacs_set_tty (fileno (tty->input), &buf, 0); } } } @@ -366,7 +366,7 @@ child_setup_tty (int out) #ifndef WINDOWSNT struct emacs_tty s; - EMACS_GET_TTY (out, &s); + emacs_get_tty (out, &s); s.main.c_oflag |= OPOST; /* Enable output postprocessing */ s.main.c_oflag &= ~ONLCR; /* Disable map of NL to CR-NL on output */ #ifdef NLDLY @@ -444,7 +444,7 @@ child_setup_tty (int out) s.main.c_cc[VTIME] = 0; #endif - EMACS_SET_TTY (out, &s, 0); + emacs_set_tty (out, &s, 0); #endif /* not WINDOWSNT */ } #endif /* not MSDOS */ @@ -856,7 +856,7 @@ init_sys_modes (struct tty_display_info *tty_out) if (! tty_out->old_tty) tty_out->old_tty = (struct emacs_tty *) xmalloc (sizeof (struct emacs_tty)); - EMACS_GET_TTY (fileno (tty_out->input), tty_out->old_tty); + emacs_get_tty (fileno (tty_out->input), tty_out->old_tty); tty = *tty_out->old_tty; @@ -1002,7 +1002,7 @@ init_sys_modes (struct tty_display_info *tty_out) dos_ttraw (tty_out); #endif - EMACS_SET_TTY (fileno (tty_out->input), &tty, 0); + emacs_set_tty (fileno (tty_out->input), &tty, 0); /* This code added to insure that, if flow-control is not to be used, we have an unlocked terminal at the start. */ @@ -1094,8 +1094,16 @@ tabs_safe_p (int fd) { struct emacs_tty etty; - EMACS_GET_TTY (fd, &etty); - return EMACS_TTY_TABS_OK (&etty); + emacs_get_tty (fd, &etty); +#ifndef DOS_NT +#ifdef TABDLY + return ((etty.main.c_oflag & TABDLY) != TAB3); +#else /* not TABDLY */ + return 1; +#endif /* not TABDLY */ +#else /* DOS_NT */ + return 0; +#endif /* DOS_NT */ } /* Get terminal size from system. @@ -1257,7 +1265,7 @@ reset_sys_modes (struct tty_display_info *tty_out) #endif /* F_SETFL */ if (tty_out->old_tty) - while (EMACS_SET_TTY (fileno (tty_out->input), + while (emacs_set_tty (fileno (tty_out->input), tty_out->old_tty, 0) < 0 && errno == EINTR) ; |