diff options
author | Dan Nicolaescu <dann@ics.uci.edu> | 2010-11-14 22:10:35 -0800 |
---|---|---|
committer | Dan Nicolaescu <dann@ics.uci.edu> | 2010-11-14 22:10:35 -0800 |
commit | 12e610e89e2a3ae9de569e12a57d310102952ce6 (patch) | |
tree | b946605e1027b2a7c76e89cf7aab0abb962721e5 /src/systty.h | |
parent | 92d3ab7e328831b39967bd92ad51c123a66756ce (diff) | |
download | emacs-12e610e89e2a3ae9de569e12a57d310102952ce6.tar.gz emacs-12e610e89e2a3ae9de569e12a57d310102952ce6.tar.bz2 emacs-12e610e89e2a3ae9de569e12a57d310102952ce6.zip |
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.
Diffstat (limited to 'src/systty.h')
-rw-r--r-- | src/systty.h | 52 |
1 files changed, 1 insertions, 51 deletions
diff --git a/src/systty.h b/src/systty.h index 8c46411cedb..9cecbab4f0e 100644 --- a/src/systty.h +++ b/src/systty.h @@ -86,17 +86,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ /* Manipulate a terminal's current process group. */ -/* EMACS_GET_TTY_PGRP(int FD, int *PGID) sets *PGID the terminal FD's - current process group. Return -1 if there is an error. - - EMACS_SET_TTY_PGRP(int FD, int *PGID) sets the terminal FD's - current process group to *PGID. Return -1 if there is an error. */ - -#ifndef DOS_NT -#define EMACS_GET_TTY_PGRP(fd, pgid) (*(pgid) = tcgetpgrp ((fd))) -#define EMACS_SET_TTY_PGRP(fd, pgid) (tcsetpgrp ((fd), *(pgid))) -#endif /* not DOS_NT */ - /* EMACS_GETPGRP (arg) returns the process group of the process. */ #if defined (GETPGRP_VOID) @@ -112,21 +101,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ state, for example a struct tchars, a struct sgttyb, a struct tchars, a struct ltchars, and a struct pagechars, struct emacs_tty should contain an element for each parameter struct - that Emacs may change. - - EMACS_GET_TTY (int FD, struct emacs_tty *P) stores the parameters - of the tty on FD in *P. Return zero if all's well, or -1 if we ran - into an error we couldn't deal with. - - EMACS_SET_TTY (int FD, struct emacs_tty *P, int flushp) - sets the parameters of the tty on FD according to the contents of - *P. If flushp is non-zero, we discard queued input to be - written before making the change. - Return 0 if all went well, and -1 if anything failed. - - EMACS_TTY_TABS_OK (struct emacs_tty *P) is false if the kernel - expands tabs to spaces upon output; in that case, there is no - advantage to using tabs over spaces. */ + that Emacs may change. */ /* For each tty parameter structure that Emacs might want to save and restore, @@ -145,31 +120,6 @@ struct emacs_tty { #endif /* DOS_NT */ }; -/* Define EMACS_GET_TTY and EMACS_SET_TTY, - the macros for reading and setting parts of `struct emacs_tty'. - - These got pretty unmanageable (huge macros are hard to debug), and - finally needed some code which couldn't be done as part of an - expression, so we moved them out to their own functions in sysdep.c. */ -#define EMACS_GET_TTY(fd, p) (emacs_get_tty ((fd), (p))) -#define EMACS_SET_TTY(fd, p, waitp) (emacs_set_tty ((fd), (p), (waitp))) extern int emacs_get_tty (int, struct emacs_tty *); extern int emacs_set_tty (int, struct emacs_tty *, int); - -/* Define EMACS_TTY_TABS_OK. */ - -#ifndef DOS_NT - -#ifdef TABDLY -#define EMACS_TTY_TABS_OK(p) (((p)->main.c_oflag & TABDLY) != TAB3) -#else /* not TABDLY */ -#define EMACS_TTY_TABS_OK(p) 1 -#endif /* not TABDLY */ - -#else /* DOS_NT */ -#define EMACS_TTY_TABS_OK(p) 0 -#endif /* DOS_NT */ - -/* arch-tag: cf4b90bc-be41-401c-be98-40619178a712 - (do not change this comment) */ |