Mercurial > emacs
diff src/sysdep.c @ 111544:107fd4b37e9d
Clean up src/systty.h macros.
* systty.h (EMACS_GET_TTY_PGRP, EMACS_SET_TTY_PGRP, EMACS_GET_TTY)
(EMACS_SET_TTY): Remove unneeded abstraction, instead inline the
definition in all uses.
(EMACS_TTY_TABS_OK): Remove, it has a single user.
* src/sysdep.c (discard_tty_input, child_setup_tty)
(init_sys_modes, tabs_safe_p, reset_sys_modes):
* src/emacs.c (shut_down_emacs):
* src/callproc.c (child_setup):
* src/term.c (dissociate_if_controlling_tty): Inline removed macros.
| author | Dan Nicolaescu <dann@ics.uci.edu> |
|---|---|
| date | Sun, 14 Nov 2010 22:10:35 -0800 |
| parents | a702e5199b83 |
| children | 72b4312028a2 |
line wrap: on
line diff
--- a/src/sysdep.c Sun Nov 14 21:52:58 2010 -0800 +++ b/src/sysdep.c Sun Nov 14 22:10:35 2010 -0800 @@ -229,8 +229,8 @@ { 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 @@ #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 @@ 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 @@ 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 @@ 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 @@ { 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 @@ #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) ;
